OSDN Git Service

FIX: PHP5/MySQL5における文法違反コードの修正
[nucleus-jp/nucleus-jp-ancient.git] / nucleus / libs / MEDIA.php
index 1a44d4c..26f83e3 100755 (executable)
@@ -149,7 +149,12 @@ class MEDIA {
                if ($filename === false) 
                        return _ERROR_BADFILETYPE;
                
-               $manager->notify('PreMediaUpload',array('collection' => &$collection, 'uploadfile' => $uploadfile, 'filename' => &$filename));
+               $param = array(
+                       'collection'    => &$collection,
+                       'uploadfile'    =>  $uploadfile,
+                       'filename'              => &$filename
+               );
+               $manager->notify('PreMediaUpload', $param);
                
                // don't allow uploads to unknown or forbidden collections
                $exceptReadOnly = true;
@@ -194,7 +199,12 @@ class MEDIA {
                @chmod($mediadir . $filename, 0644);
                umask($oldumask);
 
-               $manager->notify('PostMediaUpload',array('collection' => $collection, 'mediadir' => $mediadir, 'filename' => $filename));
+               $param = array(
+                       'collection'    => $collection,
+                       'mediadir'              => $mediadir,
+                       'filename'              => $filename
+               );
+               $manager->notify('PostMediaUpload', $param);
 
                return '';