Fix #5655 - UAT of Press release detail pages
[Pman.Core] / Images.php
index d1f1146..2e7c981 100644 (file)
@@ -465,7 +465,8 @@ class Pman_Core_Images extends Pman
         $id = $umatch[2];
         $hash = '';
         if (!empty($umatch[3]) && strpos($umatch[3],'#')) {
-            $hash = '#'. array_pop(explode('#',$umatch[3]));
+            $hh = explode('#',$umatch[3]);
+            $hash = '#'. array_pop($hh);
         }
         
         
@@ -551,16 +552,8 @@ class Pman_Core_Images extends Pman
                 continue;
             }
 
-            $src = false;
+            $src = $file = $ev->logDir() . date('/Y/m/d/', strtotime($ev->event_when)).  $f->tmp_name ;
             
-            if (!empty($ff->Pman['storedir'])) {
-                $src = $ff->Pman['storedir']. '/Events/'. $user. date('/Y/m/d/', strtotime($ev->event_when)).  $f->tmp_name ;
-            }
-            // DEPRICATED... 
-            if (!empty($ff->Pman['event_log_dir'])) {
-                $src = $ff->Pman['event_log_dir']. '/'. $user. date('/Y/m/d/', strtotime($ev->event_when)).  $f->tmp_name ;
-            }
-
             if (!$src || !file_exists($src)) {
                 die("file was not saved");
             }