OSDN Git Service

FIX: PHP5/MySQL5における文法違反コードの修正
[nucleus-jp/nucleus-jp-ancient.git] / nucleus / libs / ADMIN.php
index faa9c49..907617d 100755 (executable)
@@ -124,7 +124,7 @@ class ADMIN {
                }\r
 \r
                if (method_exists($this, $methodName))\r
-                       call_user_func(array(&$this, $methodName));\r
+                       call_user_func(array($this, $methodName));\r
                else\r
                        $this->error(_BADACTION . htmlspecialchars(" ($action)"));\r
 \r
@@ -360,7 +360,7 @@ class ADMIN {
                $template['now'] = $blog->getCorrectTime(time());\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
-               $navList =& new NAVLIST('itemlist', $start, $amount, 0, 1000, $blogid, $search, 0);\r
+               $navList = new NAVLIST('itemlist', $start, $amount, 0, 1000, $blogid, $search, 0);\r
                $navList->showBatchList('item',$query,'table',$template);\r
 \r
 \r
@@ -922,7 +922,7 @@ class ADMIN {
                $template['now'] = time();\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
-               $navList =& new NAVLIST('browseownitems', $start, $amount, 0, 1000, /*$blogid*/ 0, $search, 0);\r
+               $navList = new NAVLIST('browseownitems', $start, $amount, 0, 1000, /*$blogid*/ 0, $search, 0);\r
                $navList->showBatchList('item',$query,'table',$template);\r
 \r
                $this->pagefoot();\r
@@ -978,7 +978,7 @@ class ADMIN {
                $template['canAddBan'] = $member->blogAdminRights(getBlogIDFromItemID($itemid));\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
-               $navList =& new NAVLIST('itemcommentlist', $start, $amount, 0, 1000, 0, $search, $itemid);\r
+               $navList = new NAVLIST('itemcommentlist', $start, $amount, 0, 1000, 0, $search, $itemid);\r
                $navList->showBatchList('comment',$query,'table',$template,_NOCOMMENTS);\r
 \r
                $this->pagefoot();\r
@@ -1025,7 +1025,7 @@ class ADMIN {
                $template['canAddBan'] = 0; // doesn't make sense to allow banning yourself\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
-               $navList =& new NAVLIST('browseowncomments', $start, $amount, 0, 1000, 0, $search, 0);\r
+               $navList = new NAVLIST('browseowncomments', $start, $amount, 0, 1000, 0, $search, 0);\r
                $navList->showBatchList('comment',$query,'table',$template,_NOCOMMENTS_YOUR);\r
 \r
                $this->pagefoot();\r
@@ -1085,7 +1085,7 @@ class ADMIN {
                $template['canAddBan'] = $member->blogAdminRights($blogid);\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
-               $navList =& new NAVLIST('blogcommentlist', $start, $amount, 0, 1000, $blogid, $search, 0);\r
+               $navList = new NAVLIST('blogcommentlist', $start, $amount, 0, 1000, $blogid, $search, 0);\r
                $navList->showBatchList('comment',$query,'table',$template, _NOCOMMENTS_BLOG);\r
 \r
                $this->pagefoot();\r
@@ -1109,7 +1109,7 @@ class ADMIN {
                $this->pagehead();\r
 \r
                // generate the add-item form\r
-               $formfactory =& new PAGEFACTORY($blogid);\r
+               $formfactory = new PAGEFACTORY($blogid);\r
                $formfactory->createAddForm('admin');\r
 \r
                $this->pagefoot();\r
@@ -1129,7 +1129,8 @@ class ADMIN {
                $item =& $manager->getItem($itemid,1,1);\r
                $blog =& $manager->getBlog(getBlogIDFromItemID($itemid));\r
 \r
-               $manager->notify('PrepareItemForEdit', array('item' => &$item));\r
+               $param = array('item' => &$item);\r
+               $manager->notify('PrepareItemForEdit', $param);\r
 \r
                if ($blog->convertBreaks()) {\r
                        $item['body'] = removeBreaks($item['body']);\r
@@ -1138,7 +1139,7 @@ class ADMIN {
 \r
                // form to edit blog items\r
                $this->pagehead();\r
-               $formfactory =& new PAGEFACTORY($blog->getID());\r
+               $formfactory = new PAGEFACTORY($blog->getID());\r
                $formfactory->createEditForm('admin',$item);\r
                $this->pagefoot();\r
        }\r
@@ -1449,7 +1450,7 @@ class ADMIN {
                        $this->action_categoryedit($result['catid'], $blogid, $distURI);\r
                } else {\r
                        $methodName = 'action_itemList';\r
-                       call_user_func(array(&$this, $methodName), $blogid);\r
+                       call_user_func(array($this, $methodName), $blogid);\r
                }\r
        }\r
 \r
@@ -1465,7 +1466,8 @@ class ADMIN {
 \r
                $comment = COMMENT::getComment($commentid);\r
 \r
-               $manager->notify('PrepareCommentForEdit',array('comment' => &$comment));\r
+               $param = array('comment' => &$comment);\r
+               $manager->notify('PrepareCommentForEdit', $param);\r
 \r
                // change <br /> to \n\r
                $comment['body'] = str_replace('<br />','',$comment['body']);\r
@@ -1564,7 +1566,8 @@ class ADMIN {
                $body = COMMENT::prepareBody($body);\r
 \r
                // call plugins\r
-               $manager->notify('PreUpdateComment',array('body' => &$body));\r
+               $param = array('body' => &$body);\r
+               $manager->notify('PreUpdateComment', $param);\r
 \r
                $query =  'UPDATE '.sql_table('comment')\r
                           . " SET cmail = '" . sql_real_escape_string($url) . "', cemail = '" . sql_real_escape_string($email) . "', cbody = '" . sql_real_escape_string($body) . "'"\r
@@ -1660,13 +1663,15 @@ class ADMIN {
                if (!$member->canAlterComment($commentid))\r
                        return _ERROR_DISALLOWED;\r
 \r
-               $manager->notify('PreDeleteComment', array('commentid' => $commentid));\r
+               $param =array('commentid' => $commentid);\r
+               $manager->notify('PreDeleteComment', $param);\r
 \r
                // delete the comments associated with the item\r
                $query = 'DELETE FROM '.sql_table('comment').' WHERE cnumber=' . $commentid;\r
                sql_query($query);\r
 \r
-               $manager->notify('PostDeleteComment', array('commentid' => $commentid));\r
+               $param = array('commentid' => $commentid);\r
+               $manager->notify('PostDeleteComment', $param);\r
 \r
                return '';\r
        }\r
@@ -1695,7 +1700,7 @@ class ADMIN {
                $template['tabindex'] = 10;\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
-               $batch =& new BATCH('member');\r
+               $batch = new BATCH('member');\r
                $batch->showlist($query,'table',$template);\r
 \r
                echo '<h3>' . _MEMBERS_NEW .'</h3>';\r
@@ -1885,12 +1890,8 @@ class ADMIN {
                <?php\r
                        echo '<h3>',_PLUGINS_EXTRA,'</h3>';\r
 \r
-                       $manager->notify(\r
-                               'MemberSettingsFormExtras',\r
-                               array(\r
-                                       'member' => &$mem\r
-                               )\r
-                       );\r
+                       $param = array('member' => &$mem);\r
+                       $manager->notify('MemberSettingsFormExtras', $param);\r
 \r
                $this->pagefoot();\r
        }\r
@@ -1944,7 +1945,12 @@ class ADMIN {
                        if ($password) {\r
                                $pwdvalid = true;\r
                                $pwderror = '';\r
-                               $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid));\r
+                               $param = array(\r
+                                       'password'              =>  $password,\r
+                                       'errormessage'  => &$pwderror,\r
+                                       'valid'                 => &$pwdvalid\r
+                               );\r
+                               $manager->notify('PrePasswordSet', $param);\r
                                if (!$pwdvalid) {\r
                                        $this->error($pwderror);\r
                                }\r
@@ -2001,7 +2007,12 @@ class ADMIN {
                // store plugin options\r
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions);\r
-               $manager->notify('PostPluginOptionsUpdate',array('context' => 'member', 'memberid' => $memberid, 'member' => &$mem));\r
+               $param = array(\r
+                       'context'       =>  'member',\r
+                       'memberid'      =>  $memberid,\r
+                       'member'        => &$mem\r
+               );\r
+               $manager->notify('PostPluginOptionsUpdate', $param);\r
 \r
                // if email changed, generate new password\r
                if ($oldEmail != $mem->getEmail())\r
@@ -2050,7 +2061,8 @@ class ADMIN {
                // fire PostRegister event\r
                $newmem = new MEMBER();\r
                $newmem->readFromName(postVar('name'));\r
-               $manager->notify('PostRegister',array('member' => &$newmem));\r
+               $param = array('member' => &$newmem);\r
+               $manager->notify('PostRegister', $param);\r
 \r
                $this->action_usermanagement();\r
        }\r
@@ -2143,7 +2155,11 @@ class ADMIN {
                                                <?php\r
 \r
                                                        global $manager;\r
-                                                       $manager->notify('FormExtra', array('type' => 'activation', 'member' => $mem));\r
+                                                       $param = array(\r
+                                                               'type'          => 'activation',\r
+                                                               'member'        => $mem\r
+                                                       );\r
+                                                       $manager->notify('FormExtra', $param);\r
 \r
                                                ?>\r
                                                </tr><tr>\r
@@ -2204,14 +2220,24 @@ class ADMIN {
                $pwderror = '';\r
                \r
                global $manager;\r
-               $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid));\r
+               $param = array(\r
+                       'password'              =>  $password,\r
+                       'errormessage'  =>  &$pwderror,\r
+                       'valid'                 => &$pwdvalid\r
+               );\r
+               $manager->notify('PrePasswordSet', $param);\r
                \r
                if (!$pwdvalid) {\r
                        return $this->_showActivationPage($key,$pwderror);\r
                }\r
                \r
                $error = '';\r
-               $manager->notify('ValidateForm', array('type' => 'activation', 'member' => $mem, 'error' => &$error));\r
+               $param = array(\r
+                       'type'          =>  'activation',\r
+                       'member'        =>  $mem,\r
+                       'error'         => &$error\r
+               );\r
+               $manager->notify('ValidateForm', $param);\r
                if ($error != '')\r
                        return $this->_showActivationPage($key, $error);\r
 \r
@@ -2258,7 +2284,7 @@ class ADMIN {
                $template['tabindex'] = 10;\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
-               $batch =& new BATCH('team');\r
+               $batch = new BATCH('team');\r
                $batch->showlist($query, 'table', $template);\r
 \r
                ?>\r
@@ -2382,7 +2408,11 @@ class ADMIN {
                //                 - (there remains at least one team member)\r
                $tmem = MEMBER::createFromID($memberid);\r
 \r
-               $manager->notify('PreDeleteTeamMember', array('member' => &$tmem, 'blogid' => $blogid));\r
+               $param = array(\r
+                       'member' => &$tmem,\r
+                       'blogid' =>  $blogid\r
+               );\r
+               $manager->notify('PreDeleteTeamMember', $param);\r
 \r
                if ($tmem->isBlogAdmin($blogid)) {\r
                        // check if there are more blog members left and at least one admin\r
@@ -2396,7 +2426,11 @@ class ADMIN {
                $query = 'DELETE FROM '.sql_table('team')." WHERE tblog=$blogid and tmember=$memberid";\r
                sql_query($query);\r
 \r
-               $manager->notify('PostDeleteTeamMember', array('member' => &$tmem, 'blogid' => $blogid));\r
+               $param = array(\r
+                       'member' => &$tmem,\r
+                       'blogid' =>  $blogid\r
+               );\r
+               $manager->notify('PostDeleteTeamMember', $param);\r
 \r
                return '';\r
        }\r
@@ -2600,7 +2634,7 @@ class ADMIN {
                $template['tabindex'] = 200;\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
-               $batch =& new BATCH('category');\r
+               $batch = new BATCH('category');\r
                $batch->showlist($query,'table',$template);\r
 \r
                ?>\r
@@ -2629,13 +2663,9 @@ class ADMIN {
                <?php\r
 \r
                        echo '<h3>',_PLUGINS_EXTRA,'</h3>';\r
-\r
-                       $manager->notify(\r
-                               'BlogSettingsFormExtras',\r
-                               array(\r
-                                       'blog' => &$blog\r
-                               )\r
-                       );\r
+                       \r
+                       $param = array('blog' => &$blog);\r
+                       $manager->notify('BlogSettingsFormExtras', $param);\r
 \r
                $this->pagefoot();\r
        }\r
@@ -2761,7 +2791,11 @@ class ADMIN {
                // store plugin options\r
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions);\r
-               $manager->notify('PostPluginOptionsUpdate',array('context' => 'category', 'catid' => $catid));\r
+               $param = array(\r
+                       'context'       => 'category',\r
+                       'catid'         => $catid\r
+               );\r
+               $manager->notify('PostPluginOptionsUpdate', $param);\r
 \r
 \r
                if ($desturl) {\r
@@ -2869,7 +2903,8 @@ class ADMIN {
                if (sql_num_rows($res) == 1)\r
                        return _ERROR_DELETELASTCATEGORY;\r
 \r
-               $manager->notify('PreDeleteCategory', array('catid' => $catid));\r
+               $param = array('catid' => $catid);\r
+               $manager->notify('PreDeleteCategory', $param);\r
 \r
                // change category for all items to the default category\r
                $query = 'UPDATE '.sql_table('item')." SET icat=$destcatid WHERE icat=$catid";\r
@@ -2882,7 +2917,8 @@ class ADMIN {
                $query = 'DELETE FROM '.sql_table('category').' WHERE catid=' .$catid;\r
                sql_query($query);\r
 \r
-               $manager->notify('PostDeleteCategory', array('catid' => $catid));\r
+               $param = array('catid' => $catid);\r
+               $manager->notify('PostDeleteCategory', $param);\r
 \r
        }\r
 \r
@@ -2919,14 +2955,12 @@ class ADMIN {
                if ($blog->getDefaultCategory() == $catid)\r
                        return _ERROR_MOVEDEFCATEGORY;\r
 \r
-               $manager->notify(\r
-                       'PreMoveCategory',\r
-                       array(\r
-                               'catid' => &$catid,\r
-                               'sourceblog' => &$blog,\r
-                               'destblog' => &$destblog\r
-                       )\r
+               $param = array(\r
+                       'catid'                 => &$catid,\r
+                       'sourceblog'    => &$blog,\r
+                       'destblog'              => &$destblog\r
                );\r
+               $manager->notify('PreMoveCategory', $param);\r
 \r
                // update comments table (cblog)\r
                $query = 'SELECT inumber FROM '.sql_table('item').' WHERE icat='.$catid;\r
@@ -2943,14 +2977,12 @@ class ADMIN {
                $query = 'UPDATE '.sql_table('category').' SET cblog='.$destblogid.' WHERE catid='.$catid;\r
                sql_query($query);\r
 \r
-               $manager->notify(\r
-                       'PostMoveCategory',\r
-                       array(\r
-                               'catid' => &$catid,\r
-                               'sourceblog' => &$blog,\r
-                               'destblog' => $destblog\r
-                       )\r
+               $param = array(\r
+                       'catid'                 => &$catid,\r
+                       'sourceblog'    => &$blog,\r
+                       'destblog'              =>  $destblog\r
                );\r
+               $manager->notify('PostMoveCategory', $param);\r
 \r
        }\r
 \r
@@ -2982,7 +3014,7 @@ class ADMIN {
 \r
 \r
                if ($notify) {\r
-                       $not =& new NOTIFICATION($notify);\r
+                       $not = new NOTIFICATION($notify);\r
                        if (!$not->validAddresses())\r
                                $this->error(_ERROR_BADNOTIFY);\r
 \r
@@ -3021,7 +3053,12 @@ class ADMIN {
                // store plugin options\r
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions);\r
-               $manager->notify('PostPluginOptionsUpdate',array('context' => 'blog', 'blogid' => $blogid, 'blog' => &$blog));\r
+               $param = array(\r
+                       'context'       =>  'blog',\r
+                       'blogid'        =>  $blogid,\r
+                       'blog'          => &$blog\r
+               );\r
+               $manager->notify('PostPluginOptionsUpdate', $param);\r
 \r
 \r
                $this->action_overview(_MSG_SETTINGSCHANGED);\r
@@ -3072,7 +3109,8 @@ class ADMIN {
 \r
                $blogid = intRequestVar('blogid');\r
 \r
-               $manager->notify('PreDeleteBlog', array('blogid' => $blogid));\r
+               $param = array('blogid' => $blogid);\r
+               $manager->notify('PreDeleteBlog', $param);\r
 \r
                $member->blogAdminRights($blogid) or $this->disallow();\r
 \r
@@ -3107,7 +3145,8 @@ class ADMIN {
                $query = 'DELETE FROM '.sql_table('blog').' WHERE bnumber='.$blogid;\r
                sql_query($query);\r
 \r
-               $manager->notify('PostDeleteBlog', array('blogid' => $blogid));\r
+               $param = array('blogid' => $blogid);\r
+               $manager->notify('PostDeleteBlog', $param);\r
 \r
                $this->action_overview(_DELETED_BLOG);\r
        }\r
@@ -3178,7 +3217,8 @@ class ADMIN {
                if (!$mem->canBeDeleted())\r
                        return _ERROR_DELETEMEMBER;\r
 \r
-               $manager->notify('PreDeleteMember', array('member' => &$mem));\r
+               $param = array('member' => &$mem);\r
+               $manager->notify('PreDeleteMember', $param);\r
 \r
                /* unlink comments from memberid */\r
                if ($memberid) {\r
@@ -3199,7 +3239,8 @@ class ADMIN {
                // delete all associated plugin options\r
                NucleusPlugin::_deleteOptionValues('member', $memberid);\r
 \r
-               $manager->notify('PostDeleteMember', array('member' => &$mem));\r
+               $param = array('member' => &$mem);\r
+               $manager->notify('PostDeleteMember', $param);\r
 \r
                return '';\r
        }\r
@@ -3309,16 +3350,14 @@ class ADMIN {
                if ($manager->existsBlog($bshortname))\r
                        $this->error(_ERROR_DUPSHORTBLOGNAME);\r
 \r
-               $manager->notify(\r
-                       'PreAddBlog',\r
-                       array(\r
-                               'name'          => &$bname,\r
-                               'shortname'   => &$bshortname,\r
-                               'timeoffset'  => &$btimeoffset,\r
-                               'description' => &$bdesc,\r
-                               'defaultskin' => &$bdefskin\r
-                       )\r
+               $param = array(\r
+                       'name'                  => &$bname,\r
+                       'shortname'             => &$bshortname,\r
+                       'timeoffset'    => &$btimeoffset,\r
+                       'description'   => &$bdesc,\r
+                       'defaultskin'   => &$bdefskin\r
                );\r
+               $manager->notify('PreAddBlog', $param);\r
 \r
 \r
                // add slashes for sql queries\r
@@ -3358,23 +3397,18 @@ class ADMIN {
                //$blog->additem($blog->getDefaultCategory(),_EBLOG_FIRSTITEM_TITLE,_EBLOG_FIRSTITEM_BODY,'',$blogid, $memberid,$blog->getCorrectTime(),0,0,0);\r
                \r
                \r
-               \r
-               $manager->notify(\r
-                       'PostAddBlog',\r
-                       array(\r
-                               'blog' => &$blog\r
-                       )\r
+               $param = array(\r
+                       'blog' => &$blog\r
                );\r
-\r
-               $manager->notify(\r
-                       'PostAddCategory',\r
-                       array(\r
-                               'blog'          => &$blog,\r
-                               'name'          => _EBLOGDEFAULTCATEGORY_NAME,\r
-                               'description' => _EBLOGDEFAULTCATEGORY_DESC,\r
-                               'catid'    => $catid\r
-                       )\r
+               $manager->notify('PostAddBlog', $param);\r
+               \r
+               $param = array(\r
+                       'blog'                  => &$blog,\r
+                       'name'                  =>  _EBLOGDEFAULTCATEGORY_NAME,\r
+                       'description'   =>  _EBLOGDEFAULTCATEGORY_DESC,\r
+                       'catid'                 =>  $catid\r
                );\r
+               $manager->notify('PostAddCategory', $param);\r
 \r
                $this->pagehead();\r
                ?>\r
@@ -3576,7 +3610,7 @@ selector();
                $skinFileRaw= postVar('skinfile');\r
                $mode      = postVar('mode');\r
 \r
-               $importer =& new SKINIMPORT();\r
+               $importer = new SKINIMPORT();\r
 \r
                // get full filename\r
                if ($mode == 'file')\r
@@ -3672,7 +3706,7 @@ selector();
                        $skinFile = $skinFileRaw;\r
                }\r
 \r
-               $importer =& new SKINIMPORT();\r
+               $importer = new SKINIMPORT();\r
 \r
                $error = $importer->readFile($skinFile);\r
 \r
@@ -3722,7 +3756,7 @@ selector();
 \r
                $info = postVar('info');\r
 \r
-               $exporter =& new SKINEXPORT();\r
+               $exporter = new SKINEXPORT();\r
                foreach ($skinList as $skinId) {\r
                        $exporter->addSkin($skinId);\r
                }\r
@@ -3902,7 +3936,8 @@ selector();
 <?php\r
                $tab = 600;\r
                $pluginfields = array();\r
-               $manager->notify('TemplateExtraFields',array('fields'=>&$pluginfields));\r
+               $param = array('fields'=>&$pluginfields);\r
+               $manager->notify('TemplateExtraFields', $param);\r
 \r
                foreach ($pluginfields as $pfkey=>$pfvalue) {\r
                        echo "</tr><tr>\n";\r
@@ -4012,7 +4047,8 @@ selector();
                $this->addToTemplate($templateid, 'IMAGE_CODE', postVar('IMAGE_CODE'));\r
 \r
                $pluginfields = array();\r
-               $manager->notify('TemplateExtraFields',array('fields'=>&$pluginfields));\r
+               $param = array('fields'=>&$pluginfields);\r
+               $manager->notify('TemplateExtraFields', $param);\r
                foreach ($pluginfields as $pfkey=>$pfvalue) {\r
                        foreach ($pfvalue as $pffield=>$pfdesc) {\r
                                $this->addToTemplate($templateid, $pffield, postVar($pffield));\r
@@ -4085,7 +4121,8 @@ selector();
 \r
                $member->isAdmin() or $this->disallow();\r
 \r
-               $manager->notify('PreDeleteTemplate', array('templateid' => $templateid));\r
+               $param = array('templateid' => $templateid);\r
+               $manager->notify('PreDeleteTemplate', $param);\r
 \r
                // 1. delete description\r
                sql_query('DELETE FROM '.sql_table('template_desc').' WHERE tdnumber=' . $templateid);\r
@@ -4093,7 +4130,8 @@ selector();
                // 2. delete parts\r
                sql_query('DELETE FROM '.sql_table('template').' WHERE tdesc=' . $templateid);\r
 \r
-               $manager->notify('PostDeleteTemplate', array('templateid' => $templateid));\r
+               $param = array('templateid' => $templateid);\r
+               $manager->notify('PostDeleteTemplate', $param);\r
 \r
                $this->action_templateoverview();\r
        }\r
@@ -4236,7 +4274,7 @@ selector();
 \r
                $member->isAdmin() or $this->disallow();\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
 \r
                $this->pagehead();\r
                ?>\r
@@ -4334,7 +4372,7 @@ selector();
                $inc_mode = postVar('inc_mode');\r
                $inc_prefix = postVar('inc_prefix');\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
 \r
                // 1. Some checks\r
                if (!isValidSkinName($name))\r
@@ -4371,7 +4409,7 @@ selector();
                        $this->error(_ERROR_SKIN_PARTS_SPECIAL_FORMAT);\r
                }\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
 \r
                $friendlyNames = SKIN::getFriendlyNames();\r
 \r
@@ -4447,7 +4485,7 @@ selector();
 \r
                $member->isAdmin() or $this->disallow();\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
                $skin->update($type, $content);\r
 \r
                $this->action_skinedittype(_SKIN_UPDATED);\r
@@ -4475,7 +4513,7 @@ selector();
 \r
                $this->pagehead();\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
                $name = $skin->getName();\r
                $desc = $skin->getDescription();\r
 \r
@@ -4516,7 +4554,8 @@ selector();
                if ($o = sql_fetch_object($r))\r
                        $this->error(_ERROR_SKINDEFDELETE .$o->bname);\r
 \r
-               $manager->notify('PreDeleteSkin', array('skinid' => $skinid));\r
+               $param = array('skinid' => $skinid);\r
+               $manager->notify('PreDeleteSkin', $param);\r
 \r
                // 1. delete description\r
                sql_query('DELETE FROM '.sql_table('skin_desc').' WHERE sdnumber=' . $skinid);\r
@@ -4524,7 +4563,8 @@ selector();
                // 2. delete parts\r
                sql_query('DELETE FROM '.sql_table('skin').' WHERE sdesc=' . $skinid);\r
 \r
-               $manager->notify('PostDeleteSkin', array('skinid' => $skinid));\r
+               $param = array('skinid' => $skinid);\r
+               $manager->notify('PostDeleteSkin', $param);\r
 \r
                $this->action_skinoverview();\r
        }\r
@@ -4551,7 +4591,7 @@ selector();
 \r
                $this->pagehead();\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
                $name = $skin->getName();\r
                $desc = $skin->getDescription();\r
 \r
@@ -4593,12 +4633,20 @@ selector();
                        $this->error(_ERROR_SKIN_PARTS_SPECIAL_DELETE);\r
                }\r
 \r
-               $manager->notify('PreDeleteSkinPart', array('skinid' => $skinid, 'skintype' => $skintype));\r
+               $param = array(\r
+                       'skinid'        => $skinid,\r
+                       'skintype'      => $skintype\r
+               );\r
+               $manager->notify('PreDeleteSkinPart', $param);\r
 \r
                // delete part\r
                sql_query('DELETE FROM '.sql_table('skin').' WHERE sdesc=' . $skinid . ' AND stype=\'' . $skintype . '\'');\r
 \r
-               $manager->notify('PostDeleteSkinPart', array('skinid' => $skinid, 'skintype' => $skintype));\r
+               $param = array(\r
+                       'skinid'        => $skinid,\r
+                       'skintype'      => $skintype\r
+               );\r
+               $manager->notify('PostDeleteSkinPart', $param);\r
 \r
                $this->action_skinedit();\r
        }\r
@@ -4614,7 +4662,7 @@ selector();
                $member->isAdmin() or $this->disallow();\r
 \r
                // 1. read skin to clone\r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
 \r
                $name = "clone_" . $skin->getName();\r
 \r
@@ -4979,11 +5027,9 @@ selector();
 \r
                <?php\r
                        echo '<h2>',_PLUGINS_EXTRA,'</h2>';\r
-\r
-                       $manager->notify(\r
-                               'GeneralSettingsFormExtras',\r
-                               array()\r
-                       );\r
+                       \r
+                       $param = array();\r
+                       $manager->notify('GeneralSettingsFormExtras', $param);\r
 \r
                $this->pagefoot();\r
        }\r
@@ -5231,13 +5277,11 @@ selector();
        function pagehead($extrahead = '') {\r
                global $member, $nucleus, $CONF, $manager;\r
 \r
-               $manager->notify(\r
-                       'AdminPrePageHead',\r
-                       array(\r
-                               'extrahead' => &$extrahead,\r
-                               'action' => $this->action\r
-                       )\r
+               $param = array(\r
+                       'extrahead'     => &$extrahead,\r
+                       'action'        =>  $this->action\r
                );\r
+               $manager->notify('AdminPrePageHead', $param);\r
 \r
                $baseUrl = htmlspecialchars($CONF['AdminURL']);\r
                if (!array_key_exists('AdminCSS',$CONF)) \r
@@ -5310,12 +5354,10 @@ selector();
        function pagefoot() {\r
                global $action, $member, $manager;\r
 \r
-               $manager->notify(\r
-                       'AdminPrePageFoot',\r
-                       array(\r
-                               'action' => $this->action\r
-                       )\r
+               $param = array(\r
+                       'action' => $this->action\r
                );\r
+               $manager->notify('AdminPrePageFoot', $param);\r
 \r
                if ($member->isLoggedIn() && ($action != 'showlogin')) {\r
                        ?>\r
@@ -5404,12 +5446,10 @@ selector();
                                        }\r
 \r
                                        $aPluginExtras = array();\r
-                                       $manager->notify(\r
-                                               'QuickMenu',\r
-                                               array(\r
-                                                       'options' => &$aPluginExtras\r
-                                               )\r
+                                       $param = array(\r
+                                               'options' => &$aPluginExtras\r
                                        );\r
+                                       $manager->notify('QuickMenu', $param);\r
                                        if (count($aPluginExtras) > 0)\r
                                        {\r
                                                echo '<h2>', _QMENU_PLUGINS, '</h2>';\r
@@ -6081,12 +6121,10 @@ selector();
                // plugin will be added as last one in the list\r
                $newOrder = $numCurrent + 1;\r
 \r
-               $manager->notify(\r
-                       'PreAddPlugin',\r
-                       array(\r
-                               'file' => &$name\r
-                       )\r
+               $param = array(\r
+                       'file' => &$name\r
                );\r
+               $manager->notify('PreAddPlugin', $param);\r
 \r
                // do this before calling getPlugin (in case the plugin id is used there)\r
                $query = 'INSERT INTO '.sql_table('plugin').' (porder, pfile) VALUES ('.$newOrder.',"'.sql_real_escape_string($name).'")';\r
@@ -6143,12 +6181,10 @@ selector();
                // call the install method of the plugin\r
                $plugin->install();\r
 \r
-               $manager->notify(\r
-                       'PostAddPlugin',\r
-                       array(\r
-                               'plugin' => &$plugin\r
-                       )\r
+               $param = array(\r
+                       'plugin' => &$plugin\r
                );\r
+               $manager->notify('PostAddPlugin', $param);\r
 \r
                // update all events\r
                $this->action_pluginupdate();\r
@@ -6269,7 +6305,8 @@ selector();
                        }\r
                }\r
 \r
-               $manager->notify('PreDeletePlugin', array('plugid' => $pid));\r
+               $param = array('plugid' => $pid);\r
+               $manager->notify('PreDeletePlugin', $param);\r
 \r
                // call the unInstall method of the plugin\r
                if ($callUninstall) {\r
@@ -6302,7 +6339,8 @@ selector();
                sql_query('DELETE FROM '.sql_table('plugin').' WHERE pid='.$pid);\r
 \r
                $manager->clearCachedInfo('installedPlugins');\r
-               $manager->notify('PostDeletePlugin', array('plugid' => $pid));\r
+               $param = array('plugid' => $pid);\r
+               $manager->notify('PostDeletePlugin', $param);\r
 \r
                return '';\r
        }\r
@@ -6428,7 +6466,12 @@ selector();
                }\r
 \r
                // call plugins\r
-               $manager->notify('PrePluginOptionsEdit',array('context' => 'global', 'plugid' => $pid, 'options'=>&$aOptions));\r
+               $param = array(\r
+                       'context'       =>  'global',\r
+                       'plugid'        =>  $pid,\r
+                       'options'       => &$aOptions\r
+               );\r
+               $manager->notify('PrePluginOptionsEdit', $param);\r
 \r
                $template['content'] = 'plugoptionlist';\r
                $amount = showlist($aOptions,'table',$template);\r
@@ -6460,7 +6503,11 @@ selector();
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions);\r
 \r
-               $manager->notify('PostPluginOptionsUpdate',array('context' => 'global', 'plugid' => $pid));\r
+               $param = array(\r
+                       'context'       => 'global',\r
+                       'plugid'        => $pid\r
+               );\r
+               $manager->notify('PostPluginOptionsUpdate', $param);\r
 \r
                $this->action_pluginoptions(_PLUGS_OPTIONS_UPDATED);\r
        }\r
@@ -6504,7 +6551,12 @@ selector();
                }\r
 \r
                global $manager;\r
-               $manager->notify('PrePluginOptionsEdit',array('context' => $context, 'contextid' => $contextid, 'options'=>&$aOptions));\r
+               $param = array(\r
+                       'context'       =>  $context,\r
+                       'contextid'     =>  $contextid,\r
+                       'options'       => &$aOptions\r
+               );\r
+               $manager->notify('PrePluginOptionsEdit', $param);\r
 \r
 \r
                $iPrevPid = -1;\r