OSDN Git Service

FIX: PHP5/MySQL5における文法違反コードの修正
authorsakamocchi <o-takashi@sakamocchi.jp>
Sat, 22 Sep 2012 04:42:19 +0000 (13:42 +0900)
committersakamocchi <o-takashi@sakamocchi.jp>
Sat, 22 Sep 2012 04:42:19 +0000 (13:42 +0900)
1. [PHP5] new演算子によるオブジェクトのインスタンス取得字における、参照記号の不正使用
マニュアル:
http://php.net/manual/ja/language.oop5.basic.php#language.oop5.basic.new

「PHP 5 以降では、new 演算子が自動的に参照を返すようになりました。そのため、 new の結果を参照で代入しようとすると PHP 5.3
以降では E_DEPRECATED、それより前のバージョンでは E_STRICT が発生します。 」

2. [PHP5] 関数呼び出しにおける、参照記号の不正使用
マニュアル: http://php.net/manual/ja/language.references.pass.php

「注意: 関数コールの際には、リファレンス記号がないことに注意してください。
関数定義にのみリファレンス記号があります。リファレンスで正しく引数を 渡すには、関数定義のみで十分です。」

3. [PHP5] callableタイプヒント(PHP5.3以前はcallback型)変数に配列を渡す際の、参照記号の無意味な使用
マニュアル: http://php.net/manual/ja/language.types.callable.php

call_user_func()やcall_user_func_array()の第一引数はcallableタイプヒント(以前はcallback型)だが、オブジェクトのメソッドをコールバックする際、オブジェクトのインスタンスを第一引数、オブジェクトのメソッド名を第二引数に取る配列を指定する。この際、第一引数は常に参照渡し扱いとなるため、参照記号を付与する必要がない。

4. [MySQL5] 「TABLE CREATE」文における、TYPEオプションの不正使用
マニュアル: http://dev.mysql.com/doc/refman/5.5/en/create-table.html

"The older TYPE option was synonymous with ENGINE. TYPE was deprecated
in MySQL 4.0 and removed in MySQL 5.5. When upgrading to MySQL 5.5 or
later, you must convert existing applications that rely on TYPE to use
ENGINE instead."

35 files changed:
action.php
createaccount.php
install/install.sql
nucleus/bookmarklet.php
nucleus/libs/ACTION.php
nucleus/libs/ACTIONLOG.php
nucleus/libs/ACTIONS.php
nucleus/libs/ADMIN.php
nucleus/libs/BAN.php
nucleus/libs/BLOG.php
nucleus/libs/BODYACTIONS.php
nucleus/libs/BaseActions.php
nucleus/libs/COMMENTACTIONS.php
nucleus/libs/COMMENTS.php
nucleus/libs/ENCAPSULATE.php
nucleus/libs/ITEM.php
nucleus/libs/ITEMACTIONS.php
nucleus/libs/MANAGER.php
nucleus/libs/MEDIA.php
nucleus/libs/MEMBER.php
nucleus/libs/PAGEFACTORY.php
nucleus/libs/PARSER.php
nucleus/libs/PLUGIN.php
nucleus/libs/SKIN.php
nucleus/libs/TEMPLATE.php
nucleus/libs/globalfunctions.php
nucleus/libs/xmlrpc.inc.php
nucleus/libs/xmlrpcs.inc.php
nucleus/media.php
nucleus/plugins/NP_SecurityEnforcer.php
nucleus/upgrades/upgrade0.96.php
nucleus/upgrades/upgrade1.5.php
nucleus/upgrades/upgrade2.5.php
nucleus/xmlrpc/api_metaweblog.inc.php
nucleus/xmlrpc/api_mt.inc.php

index 3641845..a7de1b7 100755 (executable)
@@ -27,7 +27,7 @@ require('./config.php');
 include_libs('ACTION.php',true,false);
 
 $action = requestVar('action');
 include_libs('ACTION.php',true,false);
 
 $action = requestVar('action');
-$a =& new ACTION();
+$a = new ACTION();
 $errorInfo = $a->doAction($action);
 
 if ($errorInfo) {
 $errorInfo = $a->doAction($action);
 
 if ($errorInfo) {
index 00af4a1..25ce7d3 100644 (file)
@@ -75,9 +75,17 @@ if ($CONF['AllowMemberCreate']==1) {
                                <br />\r
                <?php\r
                // add extra fields from Plugins, like NP_Profile\r
                                <br />\r
                <?php\r
                // add extra fields from Plugins, like NP_Profile\r
-               $manager->notify('RegistrationFormExtraFields', array('type' => 'createaccount.php', 'prelabel' => '', 'postlabel' => '<br />', 'prefield' => '', 'postfield' => '<br /><br />'));\r
+               $param = array(\r
+                       'type'          => 'createaccount.php',\r
+                       'prelabel'      => '',\r
+                       'postlabel'     => '<br />',\r
+                       'prefield'      => '',\r
+                       'postfield'     => '<br /><br />'\r
+               );\r
+               $manager->notify('RegistrationFormExtraFields', $param);\r
                // add a Captcha challenge or something else\r
                // add a Captcha challenge or something else\r
-               $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));\r
+               $param = array('type' => 'membermailform-notloggedin');\r
+               $manager->notify('FormExtra', $param);\r
                ?>\r
                <br />\r
                <br />\r
                ?>\r
                <br />\r
                <br />\r
index 471eb03..bc05058 100755 (executable)
@@ -1,7 +1,7 @@
 CREATE TABLE `nucleus_actionlog` (
   `timestamp`  datetime     NOT NULL default '0000-00-00 00:00:00',
   `message`    varchar(255) NOT NULL default ''
 CREATE TABLE `nucleus_actionlog` (
   `timestamp`  datetime     NOT NULL default '0000-00-00 00:00:00',
   `message`    varchar(255) NOT NULL default ''
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_activation` (
   `vkey`    varchar(40)  NOT NULL default '',
 
 CREATE TABLE `nucleus_activation` (
   `vkey`    varchar(40)  NOT NULL default '',
@@ -10,13 +10,13 @@ CREATE TABLE `nucleus_activation` (
   `vtype`   varchar(15)  NOT NULL default '',
   `vextra`  varchar(128) NOT NULL default '',
   PRIMARY KEY  (`vkey`)
   `vtype`   varchar(15)  NOT NULL default '',
   `vextra`  varchar(128) NOT NULL default '',
   PRIMARY KEY  (`vkey`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_ban` (
   `iprange` varchar(15)  NOT NULL default '',
   `reason`  varchar(255) NOT NULL default '',
   `blogid`  int(11)      NOT NULL default '0'
 
 CREATE TABLE `nucleus_ban` (
   `iprange` varchar(15)  NOT NULL default '',
   `reason`  varchar(255) NOT NULL default '',
   `blogid`  int(11)      NOT NULL default '0'
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_blog` (
   `bnumber`        int(11)      NOT NULL auto_increment,
 
 CREATE TABLE `nucleus_blog` (
   `bnumber`        int(11)      NOT NULL auto_increment,
@@ -40,7 +40,7 @@ CREATE TABLE `nucleus_blog` (
   `bfuturepost`    tinyint(2)   NOT NULL default '0',
   PRIMARY KEY  (`bnumber`),
   UNIQUE KEY `bshortname` (`bshortname`)
   `bfuturepost`    tinyint(2)   NOT NULL default '0',
   PRIMARY KEY  (`bnumber`),
   UNIQUE KEY `bshortname` (`bshortname`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 INSERT INTO `nucleus_blog` VALUES (
     1,                                  /* bnumber */
 
 INSERT INTO `nucleus_blog` VALUES (
     1,                                  /* bnumber */
@@ -70,7 +70,7 @@ CREATE TABLE `nucleus_category` (
   `cname` varchar(200) default NULL,
   `cdesc` varchar(200) default NULL,
   PRIMARY KEY  (`catid`)
   `cname` varchar(200) default NULL,
   `cdesc` varchar(200) default NULL,
   PRIMARY KEY  (`catid`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 INSERT INTO `nucleus_category` VALUES (1, 1, 'General', 'Items that do not fit in other categories');
 
 
 INSERT INTO `nucleus_category` VALUES (1, 1, 'General', 'Items that do not fit in other categories');
 
@@ -90,13 +90,13 @@ CREATE TABLE `nucleus_comment` (
   KEY `citem` (`citem`),
   FULLTEXT KEY `cbody` (`cbody`),
   INDEX `cblog` (`cblog`)
   KEY `citem` (`citem`),
   FULLTEXT KEY `cbody` (`cbody`),
   INDEX `cblog` (`cblog`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_config` (
   `name`  varchar(20)  NOT NULL default '',
   `value` varchar(128)          default NULL,
   PRIMARY KEY  (`name`)
 
 CREATE TABLE `nucleus_config` (
   `name`  varchar(20)  NOT NULL default '',
   `value` varchar(128)          default NULL,
   PRIMARY KEY  (`name`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 INSERT INTO `nucleus_config` (`name`, `value`) VALUES
     ('DefaultBlog',       '1'),
 
 INSERT INTO `nucleus_config` (`name`, `value`) VALUES
     ('DefaultBlog',       '1'),
@@ -155,12 +155,12 @@ CREATE TABLE `nucleus_item` (
   INDEX `idraft` (`idraft`),\r
   INDEX `icat` (`icat`),
   FULLTEXT KEY `ibody` (`ibody`, `ititle`, `imore`)
   INDEX `idraft` (`idraft`),\r
   INDEX `icat` (`icat`),
   FULLTEXT KEY `ibody` (`ibody`, `ititle`, `imore`)
-) TYPE=MyISAM PACK_KEYS=0;
+) ENGINE=MyISAM PACK_KEYS=0;
 
 CREATE TABLE `nucleus_karma` (
   `itemid` int(11)  NOT NULL default '0',
   `ip`     char(15) NOT NULL default ''
 
 CREATE TABLE `nucleus_karma` (
   `itemid` int(11)  NOT NULL default '0',
   `ip`     char(15) NOT NULL default ''
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_member` (
   `mnumber`    int(11)      NOT NULL auto_increment,
 
 CREATE TABLE `nucleus_member` (
   `mnumber`    int(11)      NOT NULL auto_increment,
@@ -177,7 +177,7 @@ CREATE TABLE `nucleus_member` (
   `mautosave`  tinyint(2)   NOT NULL default '1',
   PRIMARY KEY         (`mnumber`),
   UNIQUE  KEY `mname` (`mname`)
   `mautosave`  tinyint(2)   NOT NULL default '1',
   PRIMARY KEY         (`mnumber`),
   UNIQUE  KEY `mname` (`mname`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 INSERT INTO `nucleus_member` VALUES (
     1,                                  /* mnumber */
 
 INSERT INTO `nucleus_member` VALUES (
     1,                                  /* mnumber */
@@ -200,20 +200,20 @@ CREATE TABLE `nucleus_plugin` (
   `porder` int(11)     NOT NULL default '0',
   PRIMARY KEY     (`pid`),
   KEY    `porder` (`porder`)
   `porder` int(11)     NOT NULL default '0',
   PRIMARY KEY     (`pid`),
   KEY    `porder` (`porder`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_plugin_event` (
   `pid`   int(11)     NOT NULL default '0',
   `event` varchar(40)          default NULL,
   KEY `pid` (`pid`)
 
 CREATE TABLE `nucleus_plugin_event` (
   `pid`   int(11)     NOT NULL default '0',
   `event` varchar(40)          default NULL,
   KEY `pid` (`pid`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_plugin_option` (
   `ovalue`     text    NOT NULL,
   `oid`        int(11) NOT NULL auto_increment,
   `ocontextid` int(11) NOT NULL default '0',
   PRIMARY KEY  (`oid`, `ocontextid`)
 
 CREATE TABLE `nucleus_plugin_option` (
   `ovalue`     text    NOT NULL,
   `oid`        int(11) NOT NULL auto_increment,
   `ocontextid` int(11) NOT NULL default '0',
   PRIMARY KEY  (`oid`, `ocontextid`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_plugin_option_desc` (
   `oid`      int(11)     NOT NULL auto_increment,
 
 CREATE TABLE `nucleus_plugin_option_desc` (
   `oid`      int(11)     NOT NULL auto_increment,
@@ -226,14 +226,14 @@ CREATE TABLE `nucleus_plugin_option_desc` (
   `oextra`   text,
   PRIMARY KEY  (`opid`, `oname`, `ocontext`),
   UNIQUE KEY `oid` (`oid`)
   `oextra`   text,
   PRIMARY KEY  (`opid`, `oname`, `ocontext`),
   UNIQUE KEY `oid` (`oid`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_skin` (
   `sdesc`    int(11)     NOT NULL default '0',
   `stype`    varchar(20) NOT NULL default '',
   `scontent` text        NOT NULL,
   PRIMARY KEY  (`sdesc`,`stype`)
 
 CREATE TABLE `nucleus_skin` (
   `sdesc`    int(11)     NOT NULL default '0',
   `stype`    varchar(20) NOT NULL default '',
   `scontent` text        NOT NULL,
   PRIMARY KEY  (`sdesc`,`stype`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_skin_desc` (
   `sdnumber`  int(11)     NOT NULL auto_increment,
 
 CREATE TABLE `nucleus_skin_desc` (
   `sdnumber`  int(11)     NOT NULL auto_increment,
@@ -244,14 +244,14 @@ CREATE TABLE `nucleus_skin_desc` (
   `sdincpref` varchar(50) NOT NULL default '',
   PRIMARY KEY  (`sdnumber`),
   UNIQUE KEY `sdname` (`sdname`)
   `sdincpref` varchar(50) NOT NULL default '',
   PRIMARY KEY  (`sdnumber`),
   UNIQUE KEY `sdname` (`sdname`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_team` (
   `tmember` int(11)     NOT NULL default '0',
   `tblog`   int(11)     NOT NULL default '0',
   `tadmin`   tinyint(2) NOT NULL default '0',
   PRIMARY KEY  (`tmember`, `tblog`)
 
 CREATE TABLE `nucleus_team` (
   `tmember` int(11)     NOT NULL default '0',
   `tblog`   int(11)     NOT NULL default '0',
   `tadmin`   tinyint(2) NOT NULL default '0',
   PRIMARY KEY  (`tmember`, `tblog`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 INSERT INTO `nucleus_team` VALUES (1, 1, 1);
 
 
 INSERT INTO `nucleus_team` VALUES (1, 1, 1);
 
@@ -260,7 +260,7 @@ CREATE TABLE `nucleus_template` (
   `tpartname` varchar(64) NOT NULL default '',
   `tcontent`  text        NOT NULL,
   PRIMARY KEY  (`tdesc`, `tpartname`)
   `tpartname` varchar(64) NOT NULL default '',
   `tcontent`  text        NOT NULL,
   PRIMARY KEY  (`tdesc`, `tpartname`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_template_desc` (
   `tdnumber` int(11)     NOT NULL auto_increment,
 
 CREATE TABLE `nucleus_template_desc` (
   `tdnumber` int(11)     NOT NULL auto_increment,
@@ -268,11 +268,11 @@ CREATE TABLE `nucleus_template_desc` (
   `tddesc`   varchar(200)         default NULL,
   PRIMARY KEY (`tdnumber`),
   UNIQUE  KEY `tdname` (`tdname`)
   `tddesc`   varchar(200)         default NULL,
   PRIMARY KEY (`tdnumber`),
   UNIQUE  KEY `tdname` (`tdname`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
 
 CREATE TABLE `nucleus_tickets` (
   `ticket` varchar(40) NOT NULL default '',
   `ctime` datetime     NOT NULL default '0000-00-00 00:00:00',
   `member` int(11)     NOT NULL default '0',
   PRIMARY KEY  (`ticket`,`member`)
 
 CREATE TABLE `nucleus_tickets` (
   `ticket` varchar(40) NOT NULL default '',
   `ctime` datetime     NOT NULL default '0000-00-00 00:00:00',
   `member` int(11)     NOT NULL default '0',
   PRIMARY KEY  (`ticket`,`member`)
-) TYPE=MyISAM;
+) ENGINE=MyISAM;
index 86b9088..eb29615 100755 (executable)
@@ -293,7 +293,8 @@ function bm_doEditForm() {
        $item =& $manager->getItem($itemid, 1, 1);
        $blog =& $manager->getBlog(getBlogIDFromItemID($itemid) );
 
        $item =& $manager->getItem($itemid, 1, 1);
        $blog =& $manager->getBlog(getBlogIDFromItemID($itemid) );
 
-       $manager->notify('PrepareItemForEdit', array('item' => &$item) );
+       $param = array('item' => &$item);
+       $manager->notify('PrepareItemForEdit', $param);
 
        if ($blog->convertBreaks() ) {
                $item['body'] = removeBreaks($item['body']);
 
        if ($blog->convertBreaks() ) {
                $item['body'] = removeBreaks($item['body']);
index c526722..8be8d4e 100755 (executable)
@@ -232,7 +232,11 @@ class ACTION
                // let plugins do verification (any plugin which thinks the comment is invalid
                // can change 'error' to something other than '')
                $result = '';
                // let plugins do verification (any plugin which thinks the comment is invalid
                // can change 'error' to something other than '')
                $result = '';
-               $manager->notify('ValidateForm', array('type' => 'membermail', 'error' => &$result) );
+               $param = array(
+                       'type'  => 'membermail',
+                       'error' => &$result
+               );
+               $manager->notify('ValidateForm', $param);
 
                return $result;
 
 
                return $result;
 
@@ -253,9 +257,12 @@ class ACTION
 
                // evaluate content from FormExtra
                $result = 1;
 
                // evaluate content from FormExtra
                $result = 1;
-               $data = array('type' => 'membermail', 'error' => &$result);
-               $manager->notify('ValidateForm', &$data);
-
+               $param = array(
+                       'type'  => 'membermail',
+                       'error' => &$result
+               );
+               $manager->notify('ValidateForm', $param);
+               
                if ( $result != 1 )\r
                {
                        return $result;
                if ( $result != 1 )\r
                {
                        return $result;
@@ -280,8 +287,9 @@ class ACTION
                        $newmem = new MEMBER();
                        $newmem->readFromName($name);
                        $newmem->sendActivationLink('register');
                        $newmem = new MEMBER();
                        $newmem->readFromName($name);
                        $newmem->sendActivationLink('register');
-
-                       $manager->notify('PostRegister', array('member' => &$newmem) );
+                       
+                       $param = array('member' => &$newmem);
+                       $manager->notify('PostRegister', $param);
 
                        if ( postVar('desturl') )\r
                        {\r
 
                        if ( postVar('desturl') )\r
                        {\r
index 57d15e1..4a1d31f 100755 (executable)
@@ -53,8 +53,9 @@ class ACTIONLOG {
                global $manager;
 
                $query = 'DELETE FROM ' . sql_table('actionlog');
                global $manager;
 
                $query = 'DELETE FROM ' . sql_table('actionlog');
-
-               $manager->notify('ActionLogCleared',array());
+               
+               $param = array();
+               $manager->notify('ActionLogCleared', $param);
 
                return sql_query($query);
        }
 
                return sql_query($query);
        }
index 8e6e380..a56c433 100644 (file)
@@ -185,7 +185,7 @@ class ACTIONS extends BaseActions {
                $params = func_get_args();
                array_shift($params);
 
                $params = func_get_args();
                array_shift($params);
 
-               return call_user_func_array(array(&$plugin, 'doIf'), $params);
+               return call_user_func_array(array($plugin, 'doIf'), $params);
        }
 
        /**
        }
 
        /**
@@ -397,7 +397,11 @@ class ACTIONS extends BaseActions {
         */
        function _preBlogContent($type, &$blog) {
                global $manager;
         */
        function _preBlogContent($type, &$blog) {
                global $manager;
-               $manager->notify('PreBlogContent',array('blog' => &$blog, 'type' => $type));
+               $param = array(
+                       'blog' => &$blog,
+                       'type' =>  $type
+               );
+               $manager->notify('PreBlogContent', $param);
        }
 
        /**
        }
 
        /**
@@ -405,7 +409,11 @@ class ACTIONS extends BaseActions {
         */
        function _postBlogContent($type, &$blog) {
                global $manager;
         */
        function _postBlogContent($type, &$blog) {
                global $manager;
-               $manager->notify('PostBlogContent',array('blog' => &$blog, 'type' => $type));
+               $param = array(
+                       'blog' => &$blog,
+                       'type' =>  $type
+               );
+               $manager->notify('PostBlogContent', $param);
        }
        
        /**
        }
        
        /**
@@ -596,7 +604,8 @@ class ACTIONS extends BaseActions {
        function parse_callback($eventName, $type)
        {
                global $manager;
        function parse_callback($eventName, $type)
        {
                global $manager;
-               $manager->notify($eventName, array('type' => $type));
+               $param = array('type' => $type);
+               $manager->notify($eventName, $param);
        }
        
        /**
        }
        
        /**
@@ -733,14 +742,14 @@ class ACTIONS extends BaseActions {
                $template =& $manager->getTemplate($template);
 
                // create parser object & action handler
                $template =& $manager->getTemplate($template);
 
                // create parser object & action handler
-               $actions =& new ITEMACTIONS($blog);
-               $parser =& new PARSER($actions->getDefinedActions(),$actions);
+               $actions = new ITEMACTIONS($blog);
+               $parser = new PARSER($actions->getDefinedActions(),$actions);
                $actions->setTemplate($template);
                $actions->setParser($parser);
                $item = ITEM::getitem($itemid, 0, 0);
                $actions->setCurrentItem($item);
 
                $actions->setTemplate($template);
                $actions->setParser($parser);
                $item = ITEM::getitem($itemid, 0, 0);
                $actions->setCurrentItem($item);
 
-               $comments =& new COMMENTS($itemid);
+               $comments = new COMMENTS($itemid);
                $comments->setItemActions($actions);
                $comments->showComments($template, -1, 1, $highlight);  // shows ALL comments
        }
                $comments->setItemActions($actions);
                $comments->showComments($template, -1, 1, $highlight);  // shows ALL comments
        }
@@ -1175,7 +1184,7 @@ class ACTIONS extends BaseActions {
                // add skin type on front
                array_unshift($params, $this->skintype);
 
                // add skin type on front
                array_unshift($params, $this->skintype);
 
-               call_user_func_array(array(&$plugin,'doSkinVar'), $params);
+               call_user_func_array(array($plugin,'doSkinVar'), $params);
        }
        
        /**
        }
        
        /**
index faa9c49..907617d 100755 (executable)
@@ -124,7 +124,7 @@ class ADMIN {
                }\r
 \r
                if (method_exists($this, $methodName))\r
                }\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
                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
                $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
                $navList->showBatchList('item',$query,'table',$template);\r
 \r
 \r
@@ -922,7 +922,7 @@ class ADMIN {
                $template['now'] = time();\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
                $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
                $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
                $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
                $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
                $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
                $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
                $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
                $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
                $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
                $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
                $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
 \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
 \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
                $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
                        $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
                }\r
        }\r
 \r
@@ -1465,7 +1466,8 @@ class ADMIN {
 \r
                $comment = COMMENT::getComment($commentid);\r
 \r
 \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
 \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
                $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
 \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
                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
 \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
 \r
                return '';\r
        }\r
@@ -1695,7 +1700,7 @@ class ADMIN {
                $template['tabindex'] = 10;\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
                $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
                $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
                <?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
 \r
                $this->pagefoot();\r
        }\r
@@ -1944,7 +1945,12 @@ class ADMIN {
                        if ($password) {\r
                                $pwdvalid = true;\r
                                $pwderror = '';\r
                        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
                                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
                // 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
 \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
                // 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
 \r
                $this->action_usermanagement();\r
        }\r
@@ -2143,7 +2155,11 @@ class ADMIN {
                                                <?php\r
 \r
                                                        global $manager;\r
                                                <?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
 \r
                                                ?>\r
                                                </tr><tr>\r
@@ -2204,14 +2220,24 @@ class ADMIN {
                $pwderror = '';\r
                \r
                global $manager;\r
                $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
                \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
                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
                $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
                $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
                //                 - (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
 \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
                $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
 \r
                return '';\r
        }\r
@@ -2600,7 +2634,7 @@ class ADMIN {
                $template['tabindex'] = 200;\r
 \r
                $manager->loadClass("ENCAPSULATE");\r
                $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
                $batch->showlist($query,'table',$template);\r
 \r
                ?>\r
@@ -2629,13 +2663,9 @@ class ADMIN {
                <?php\r
 \r
                        echo '<h3>',_PLUGINS_EXTRA,'</h3>';\r
                <?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
 \r
                $this->pagefoot();\r
        }\r
@@ -2761,7 +2791,11 @@ class ADMIN {
                // store plugin options\r
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions);\r
                // 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
 \r
 \r
                if ($desturl) {\r
@@ -2869,7 +2903,8 @@ class ADMIN {
                if (sql_num_rows($res) == 1)\r
                        return _ERROR_DELETELASTCATEGORY;\r
 \r
                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
 \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
                $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
 \r
        }\r
 \r
@@ -2919,14 +2955,12 @@ class ADMIN {
                if ($blog->getDefaultCategory() == $catid)\r
                        return _ERROR_MOVEDEFCATEGORY;\r
 \r
                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
                );\r
+               $manager->notify('PreMoveCategory', $param);\r
 \r
                // update comments table (cblog)\r
                $query = 'SELECT inumber FROM '.sql_table('item').' WHERE icat='.$catid;\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
                $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
                );\r
+               $manager->notify('PostMoveCategory', $param);\r
 \r
        }\r
 \r
 \r
        }\r
 \r
@@ -2982,7 +3014,7 @@ class ADMIN {
 \r
 \r
                if ($notify) {\r
 \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
                        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
                // 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
 \r
 \r
                $this->action_overview(_MSG_SETTINGSCHANGED);\r
@@ -3072,7 +3109,8 @@ class ADMIN {
 \r
                $blogid = intRequestVar('blogid');\r
 \r
 \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
 \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
                $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
 \r
                $this->action_overview(_DELETED_BLOG);\r
        }\r
@@ -3178,7 +3217,8 @@ class ADMIN {
                if (!$mem->canBeDeleted())\r
                        return _ERROR_DELETEMEMBER;\r
 \r
                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
 \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
                // 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
 \r
                return '';\r
        }\r
@@ -3309,16 +3350,14 @@ class ADMIN {
                if ($manager->existsBlog($bshortname))\r
                        $this->error(_ERROR_DUPSHORTBLOGNAME);\r
 \r
                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
                );\r
+               $manager->notify('PreAddBlog', $param);\r
 \r
 \r
                // add slashes for sql queries\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
                //$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
-\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
                );\r
+               $manager->notify('PostAddCategory', $param);\r
 \r
                $this->pagehead();\r
                ?>\r
 \r
                $this->pagehead();\r
                ?>\r
@@ -3576,7 +3610,7 @@ selector();
                $skinFileRaw= postVar('skinfile');\r
                $mode      = postVar('mode');\r
 \r
                $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
 \r
                // get full filename\r
                if ($mode == 'file')\r
@@ -3672,7 +3706,7 @@ selector();
                        $skinFile = $skinFileRaw;\r
                }\r
 \r
                        $skinFile = $skinFileRaw;\r
                }\r
 \r
-               $importer =& new SKINIMPORT();\r
+               $importer = new SKINIMPORT();\r
 \r
                $error = $importer->readFile($skinFile);\r
 \r
 \r
                $error = $importer->readFile($skinFile);\r
 \r
@@ -3722,7 +3756,7 @@ selector();
 \r
                $info = postVar('info');\r
 \r
 \r
                $info = postVar('info');\r
 \r
-               $exporter =& new SKINEXPORT();\r
+               $exporter = new SKINEXPORT();\r
                foreach ($skinList as $skinId) {\r
                        $exporter->addSkin($skinId);\r
                }\r
                foreach ($skinList as $skinId) {\r
                        $exporter->addSkin($skinId);\r
                }\r
@@ -3902,7 +3936,8 @@ selector();
 <?php\r
                $tab = 600;\r
                $pluginfields = array();\r
 <?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
 \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
                $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
                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
 \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
 \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
                // 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
 \r
                $this->action_templateoverview();\r
        }\r
@@ -4236,7 +4274,7 @@ selector();
 \r
                $member->isAdmin() or $this->disallow();\r
 \r
 \r
                $member->isAdmin() or $this->disallow();\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
 \r
                $this->pagehead();\r
                ?>\r
 \r
                $this->pagehead();\r
                ?>\r
@@ -4334,7 +4372,7 @@ selector();
                $inc_mode = postVar('inc_mode');\r
                $inc_prefix = postVar('inc_prefix');\r
 \r
                $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
 \r
                // 1. Some checks\r
                if (!isValidSkinName($name))\r
@@ -4371,7 +4409,7 @@ selector();
                        $this->error(_ERROR_SKIN_PARTS_SPECIAL_FORMAT);\r
                }\r
 \r
                        $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
 \r
                $friendlyNames = SKIN::getFriendlyNames();\r
 \r
@@ -4447,7 +4485,7 @@ selector();
 \r
                $member->isAdmin() or $this->disallow();\r
 \r
 \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
                $skin->update($type, $content);\r
 \r
                $this->action_skinedittype(_SKIN_UPDATED);\r
@@ -4475,7 +4513,7 @@ selector();
 \r
                $this->pagehead();\r
 \r
 \r
                $this->pagehead();\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
                $name = $skin->getName();\r
                $desc = $skin->getDescription();\r
 \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
                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
 \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
                // 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
 \r
                $this->action_skinoverview();\r
        }\r
@@ -4551,7 +4591,7 @@ selector();
 \r
                $this->pagehead();\r
 \r
 \r
                $this->pagehead();\r
 \r
-               $skin =& new SKIN($skinid);\r
+               $skin = new SKIN($skinid);\r
                $name = $skin->getName();\r
                $desc = $skin->getDescription();\r
 \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
                        $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
 \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
 \r
                $this->action_skinedit();\r
        }\r
@@ -4614,7 +4662,7 @@ selector();
                $member->isAdmin() or $this->disallow();\r
 \r
                // 1. read skin to clone\r
                $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
 \r
                $name = "clone_" . $skin->getName();\r
 \r
@@ -4979,11 +5027,9 @@ selector();
 \r
                <?php\r
                        echo '<h2>',_PLUGINS_EXTRA,'</h2>';\r
 \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
 \r
                $this->pagefoot();\r
        }\r
@@ -5231,13 +5277,11 @@ selector();
        function pagehead($extrahead = '') {\r
                global $member, $nucleus, $CONF, $manager;\r
 \r
        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
                );\r
+               $manager->notify('AdminPrePageHead', $param);\r
 \r
                $baseUrl = htmlspecialchars($CONF['AdminURL']);\r
                if (!array_key_exists('AdminCSS',$CONF)) \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
        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
                );\r
+               $manager->notify('AdminPrePageFoot', $param);\r
 \r
                if ($member->isLoggedIn() && ($action != 'showlogin')) {\r
                        ?>\r
 \r
                if ($member->isLoggedIn() && ($action != 'showlogin')) {\r
                        ?>\r
@@ -5404,12 +5446,10 @@ selector();
                                        }\r
 \r
                                        $aPluginExtras = array();\r
                                        }\r
 \r
                                        $aPluginExtras = array();\r
-                                       $manager->notify(\r
-                                               'QuickMenu',\r
-                                               array(\r
-                                                       'options' => &$aPluginExtras\r
-                                               )\r
+                                       $param = array(\r
+                                               'options' => &$aPluginExtras\r
                                        );\r
                                        );\r
+                                       $manager->notify('QuickMenu', $param);\r
                                        if (count($aPluginExtras) > 0)\r
                                        {\r
                                                echo '<h2>', _QMENU_PLUGINS, '</h2>';\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
                // 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
                );\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
 \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
                // 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
                );\r
+               $manager->notify('PostAddPlugin', $param);\r
 \r
                // update all events\r
                $this->action_pluginupdate();\r
 \r
                // update all events\r
                $this->action_pluginupdate();\r
@@ -6269,7 +6305,8 @@ selector();
                        }\r
                }\r
 \r
                        }\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
 \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
                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
 \r
                return '';\r
        }\r
@@ -6428,7 +6466,12 @@ selector();
                }\r
 \r
                // call plugins\r
                }\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
 \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
                $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
 \r
                $this->action_pluginoptions(_PLUGS_OPTIONS_UPDATED);\r
        }\r
@@ -6504,7 +6551,12 @@ selector();
                }\r
 \r
                global $manager;\r
                }\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
 \r
 \r
                $iPrevPid = -1;\r
index 7449f41..7aad84c 100755 (executable)
@@ -47,27 +47,23 @@ class BAN {
 
                $blogid = intval($blogid);
 
 
                $blogid = intval($blogid);
 
-               $manager->notify(
-                       'PreAddBan',
-                       array(
-                               'blogid' => $blogid,
-                               'iprange' => &$iprange,
-                               'reason' => &$reason
-                       )
+               $param = array(
+                       'blogid'        =>  $blogid,
+                       'iprange'       => &$iprange,
+                       'reason'        => &$reason
                );
                );
+               $manager->notify('PreAddBan', $param);
 
                $query = 'INSERT INTO '.sql_table('ban')." (blogid, iprange, reason) VALUES "
                           . "($blogid,'".sql_real_escape_string($iprange)."','".sql_real_escape_string($reason)."')";
                $res = sql_query($query);
 
 
                $query = 'INSERT INTO '.sql_table('ban')." (blogid, iprange, reason) VALUES "
                           . "($blogid,'".sql_real_escape_string($iprange)."','".sql_real_escape_string($reason)."')";
                $res = sql_query($query);
 
-               $manager->notify(
-                       'PostAddBan',
-                       array(
-                               'blogid' => $blogid,
-                               'iprange' => $iprange,
-                               'reason' => $reason
-                       )
+               $param = array(
+                       'blogid'        => $blogid,
+                       'iprange'       => $iprange,
+                       'reason'        => $reason
                );
                );
+               $manager->notify('PostAddBan', $param);
 
                return $res ? 1 : 0;
        }
 
                return $res ? 1 : 0;
        }
@@ -80,14 +76,22 @@ class BAN {
                global $manager;
                $blogid = intval($blogid);
 
                global $manager;
                $blogid = intval($blogid);
 
-               $manager->notify('PreDeleteBan', array('blogid' => $blogid, 'range' => $iprange));
+               $param = array(
+                       'blogid'        => $blogid,
+                       'range'         => $iprange
+               );
+               $manager->notify('PreDeleteBan', $param);
 
                $query = 'DELETE FROM '.sql_table('ban')." WHERE blogid=$blogid and iprange='" .sql_real_escape_string($iprange). "'";
                sql_query($query);
 
                $result = (sql_affected_rows() > 0);
 
 
                $query = 'DELETE FROM '.sql_table('ban')." WHERE blogid=$blogid and iprange='" .sql_real_escape_string($iprange). "'";
                sql_query($query);
 
                $result = (sql_affected_rows() > 0);
 
-               $manager->notify('PostDeleteBan', array('blogid' => $blogid, 'range' => $iprange));
+               $param = array(
+                       'blogid'        => $blogid,
+                       'range'         => $iprange
+               );
+               $manager->notify('PostDeleteBan', $param);
 
                return $result;
        }
 
                return $result;
        }
index a832f20..ae6a09d 100755 (executable)
@@ -161,8 +161,8 @@ class BLOG {
                $template =& $manager->getTemplate($templateName);
 
                // create parser object & action handler
                $template =& $manager->getTemplate($templateName);
 
                // create parser object & action handler
-               $actions =& new ITEMACTIONS($this);
-               $parser =& new PARSER($actions->getDefinedActions(),$actions);
+               $actions = new ITEMACTIONS($this);
+               $parser = new PARSER($actions->getDefinedActions(),$actions);
                $actions->setTemplate($template);
                $actions->setHighlight($highlight);
                $actions->setLastVisit($lastVisit);
                $actions->setTemplate($template);
                $actions->setHighlight($highlight);
                $actions->setLastVisit($lastVisit);
@@ -189,26 +189,50 @@ class BLOG {
                                        $timestamp = $item->timestamp;
                                        if ($old_date != 0) {
                                                $oldTS = strtotime($old_date);
                                        $timestamp = $item->timestamp;
                                        if ($old_date != 0) {
                                                $oldTS = strtotime($old_date);
-                                               $manager->notify('PreDateFoot',array('blog' => &$this, 'timestamp' => $oldTS));
+                                               $param = array(
+                                                       'blog'          => &$this,
+                                                       'timestamp'     =>  $oldTS
+                                               );
+                                               $manager->notify('PreDateFoot', $param);
                                                $tmp_footer = strftimejp(isset($template['DATE_FOOTER'])?$template['DATE_FOOTER']:'', $oldTS);
                                                $parser->parse($tmp_footer);
                                                $tmp_footer = strftimejp(isset($template['DATE_FOOTER'])?$template['DATE_FOOTER']:'', $oldTS);
                                                $parser->parse($tmp_footer);
-                                               $manager->notify('PostDateFoot',array('blog' => &$this, 'timestamp' => $oldTS));
+                                               $param = array(
+                                                       'blog'          => &$this,
+                                                       'timestamp'     =>  $oldTS
+                                               );
+                                               $manager->notify('PostDateFoot', $param);
                                        }
                                        }
-                                       $manager->notify('PreDateHead',array('blog' => &$this, 'timestamp' => $timestamp));
+                                       $param = array(
+                                               'blog'          => &$this,
+                                               'timestamp'     =>  $timestamp
+                                       );
+                                       $manager->notify('PreDateHead', $param);
                                        // note, to use templatvars in the dateheader, the %-characters need to be doubled in
                                        // order to be preserved by strftime
                                        $tmp_header = strftimejp((isset($template['DATE_HEADER']) ? $template['DATE_HEADER'] : null), $timestamp);
                                        $parser->parse($tmp_header);
                                        // note, to use templatvars in the dateheader, the %-characters need to be doubled in
                                        // order to be preserved by strftime
                                        $tmp_header = strftimejp((isset($template['DATE_HEADER']) ? $template['DATE_HEADER'] : null), $timestamp);
                                        $parser->parse($tmp_header);
-                                       $manager->notify('PostDateHead',array('blog' => &$this, 'timestamp' => $timestamp));
+                                       $param = array(
+                                               'blog'          => &$this,
+                                               'timestamp'     =>  $timestamp
+                                       );
+                                       $manager->notify('PostDateHead', $param);
                                }
                                $old_date = $new_date;
                        }
 
                        // parse item
                        $parser->parse($template['ITEM_HEADER']);
                                }
                                $old_date = $new_date;
                        }
 
                        // parse item
                        $parser->parse($template['ITEM_HEADER']);
-                       $manager->notify('PreItem', array('blog' => &$this, 'item' => &$item));
+                       $param = array(
+                               'blog' => &$this,
+                               'item' => &$item
+                       );
+                       $manager->notify('PreItem', $param);
                        $parser->parse($template['ITEM']);
                        $parser->parse($template['ITEM']);
-                       $manager->notify('PostItem', array('blog' => &$this, 'item' => &$item));
+                       $param = array(
+                               'blog' => &$this,
+                               'item' => &$item
+                       );
+                       $manager->notify('PostItem', $param);
                        $parser->parse($template['ITEM_FOOTER']);
 
                }
                        $parser->parse($template['ITEM_FOOTER']);
 
                }
@@ -217,9 +241,17 @@ class BLOG {
 
                // add another date footer if there was at least one item
                if (($numrows > 0) && $dateheads) {
 
                // add another date footer if there was at least one item
                if (($numrows > 0) && $dateheads) {
-                       $manager->notify('PreDateFoot',array('blog' => &$this, 'timestamp' => strtotime($old_date)));
+                       $param = array(
+                               'blog'          => &$this,
+                               'timestamp'     =>  strtotime($old_date)
+                       );
+                       $manager->notify('PreDateFoot', $param);
                        $parser->parse($template['DATE_FOOTER']);
                        $parser->parse($template['DATE_FOOTER']);
-                       $manager->notify('PostDateFoot',array('blog' => &$this, 'timestamp' => strtotime($old_date)));
+                       $param = array(
+                               'blog'          => &$this,
+                               'timestamp'     =>  strtotime($old_date)
+                       );
+                       $manager->notify('PostDateFoot', $param);
                }
 
                sql_free_result($items);        // free memory
                }
 
                sql_free_result($items);        // free memory
@@ -265,7 +297,18 @@ class BLOG {
 
                $timestamp = date('Y-m-d H:i:s',$timestamp);
 
 
                $timestamp = date('Y-m-d H:i:s',$timestamp);
 
-               $manager->notify('PreAddItem',array('title' => &$title, 'body' => &$body, 'more' => &$more, 'blog' => &$this, 'authorid' => &$authorid, 'timestamp' => &$timestamp, 'closed' => &$closed, 'draft' => &$draft, 'catid' => &$catid));
+               $param = array(
+               'title'         => &$title,
+               'body'          => &$body,
+               'more'          => &$more,
+               'blog'          => &$this,
+               'authorid'      => &$authorid,
+               'timestamp'     => &$timestamp,
+               'closed'        => &$closed,
+               'draft'         => &$draft,
+               'catid'         => &$catid
+               );
+               $manager->notify('PreAddItem', $param);
 
                $ititle = sql_real_escape_string($title);
                $ibody = sql_real_escape_string($body);
 
                $ititle = sql_real_escape_string($title);
                $ibody = sql_real_escape_string($body);
@@ -276,7 +319,8 @@ class BLOG {
                sql_query($query);
                $itemid = sql_insert_id();
 
                sql_query($query);
                $itemid = sql_insert_id();
 
-               $manager->notify('PostAddItem',array('itemid' => $itemid));
+               $param = array('itemid' => $itemid);
+               $manager->notify('PostAddItem', $param);
 
                if (!$draft)
                        $this->updateUpdateFile();
 
                if (!$draft)
                        $this->updateUpdateFile();
@@ -315,7 +359,7 @@ class BLOG {
 
                $frommail = $member->getNotifyFromMailAddress();
 
 
                $frommail = $member->getNotifyFromMailAddress();
 
-               $notify =& new NOTIFICATION($this->getNotifyAddress());
+               $notify = new NOTIFICATION($this->getNotifyAddress());
                $notify->notify($mailto_title, $mailto_msg , $frommail);
 
 
                $notify->notify($mailto_title, $mailto_msg , $frommail);
 
 
@@ -356,28 +400,24 @@ class BLOG {
                                $catName = $catName . $i;
                        }
 
                                $catName = $catName . $i;
                        }
 
-                       $manager->notify(
-                               'PreAddCategory',
-                               array(
-                                       'blog' => &$this,
-                                       'name' => &$catName,
-                                       'description' => $catDescription
-                               )
+                       $param = array(
+                               'blog'                  => &$this,
+                               'name'                  => &$catName,
+                               'description'   =>  $catDescription
                        );
                        );
+                       $manager->notify('PreAddCategory', $param);
 
                        $query = 'INSERT INTO '.sql_table('category').' (cblog, cname, cdesc) VALUES (' . $this->getID() . ", '" . sql_real_escape_string($catName) . "', '" . sql_real_escape_string($catDescription) . "')";
                        sql_query($query);
                        $catid = sql_insert_id();
 
 
                        $query = 'INSERT INTO '.sql_table('category').' (cblog, cname, cdesc) VALUES (' . $this->getID() . ", '" . sql_real_escape_string($catName) . "', '" . sql_real_escape_string($catDescription) . "')";
                        sql_query($query);
                        $catid = sql_insert_id();
 
-                       $manager->notify(
-                               'PostAddCategory',
-                               array(
-                                       'blog' => &$this,
-                                       'name' => $catName,
-                                       'description' => $catDescription,
-                                       'catid' => $catid
-                               )
+                       $param = array(
+                               'blog'                  => &$this,
+                               'name'                  =>  $catName,
+                               'description'   =>  $catDescription,
+                               'catid'                 =>  $catid
                        );
                        );
+                       $manager->notify('PostAddCategory', $param);
 
                        return $catid;
                } else {
 
                        return $catid;
                } else {
@@ -456,7 +496,7 @@ class BLOG {
         */
        function getSqlSearch($query, $amountMonths = 0, &$highlight, $mode = '')
        {
         */
        function getSqlSearch($query, $amountMonths = 0, &$highlight, $mode = '')
        {
-               $searchclass =& new SEARCH($query);
+               $searchclass = new SEARCH($query);
 
                $highlight      = $searchclass->inclusive;
 
 
                $highlight      = $searchclass->inclusive;
 
@@ -619,12 +659,8 @@ class BLOG {
                        $archive['year'] = $data['year'];
                        $data['archivelink'] = createArchiveLink($this->getID(),$archivedate,$linkparams);
 
                        $archive['year'] = $data['year'];
                        $data['archivelink'] = createArchiveLink($this->getID(),$archivedate,$linkparams);
 
-                       $manager->notify(
-                               'PreArchiveListItem',
-                               array(
-                                       'listitem' => &$data
-                               )
-                       );
+                       $param = array('listitem' => &$data);
+                       $manager->notify('PreArchiveListItem', $param);
 
                        $temp = TEMPLATE::fill($template['ARCHIVELIST_LISTITEM'],$data);
                        echo strftimejp($temp,$current->itime);
 
                        $temp = TEMPLATE::fill($template['ARCHIVELIST_LISTITEM'],$data);
                        echo strftimejp($temp,$current->itime);
@@ -732,12 +768,8 @@ class BLOG {
                                }
                        }
 
                                }
                        }
 
-                       $manager->notify(
-                               'PreCategoryListItem',
-                               array(
-                                       'listitem' => &$data
-                               )
-                       );
+                       $param = array('listitem' => &$data);
+                       $manager->notify('PreCategoryListItem', $param);
 
                        echo TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
                        //$temp = TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
 
                        echo TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
                        //$temp = TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
@@ -823,12 +855,8 @@ class BLOG {
                                $list['blogname'] = $data['bname'];
                        }
 
                                $list['blogname'] = $data['bname'];
                        }
 
-                       $manager->notify(
-                               'PreBlogListItem',
-                               array(
-                                       'listitem' => &$list
-                               )
-                       );
+                       $param = array('listitem' => &$list);
+                       $manager->notify('PreBlogListItem', $param);
 
                        echo TEMPLATE::fill((isset($template['BLOGLIST_LISTITEM']) ? $template['BLOGLIST_LISTITEM'] : null), $list);
 
 
                        echo TEMPLATE::fill((isset($template['BLOGLIST_LISTITEM']) ? $template['BLOGLIST_LISTITEM'] : null), $list);
 
@@ -1132,29 +1160,25 @@ class BLOG {
                if ($tmem->isTeamMember($this->getID()))
                        return 0;
 
                if ($tmem->isTeamMember($this->getID()))
                        return 0;
 
-               $manager->notify(
-                       'PreAddTeamMember',
-                       array(
-                               'blog' => &$this,
-                               'member' => &$tmem,
-                               'admin' => &$admin
-                       )
+               $param = array(
+                       'blog'          => &$this,
+                       'member'        => &$tmem,
+                       'admin'         => &$admin
                );
                );
+               $manager->notify('PreAddTeamMember', $param);
 
                // add to team
                $query = 'INSERT INTO '.sql_table('team').' (TMEMBER, TBLOG, TADMIN) '
                           . 'VALUES (' . $memberid .', '.$this->getID().', "'.$admin.'")';
                sql_query($query);
 
 
                // add to team
                $query = 'INSERT INTO '.sql_table('team').' (TMEMBER, TBLOG, TADMIN) '
                           . 'VALUES (' . $memberid .', '.$this->getID().', "'.$admin.'")';
                sql_query($query);
 
-               $manager->notify(
-                       'PostAddTeamMember',
-                       array(
-                               'blog' => &$this,
-                               'member' => &$tmem,
-                               'admin' => $admin
-                       )
-
+               
+               $param = array(
+                       'blog'          => &$this,
+                       'member'        => &$tmem,
+                       'admin'         => $admin
                );
                );
+               $manager->notify('PostAddTeamMember', $param);
 
                $logMsg = sprintf(_TEAM_ADD_NEWTEAMMEMBER, $tmem->getDisplayName(), $memberid, $this->getName());
                ACTIONLOG::add(INFO, $logMsg);
 
                $logMsg = sprintf(_TEAM_ADD_NEWTEAMMEMBER, $tmem->getDisplayName(), $memberid, $this->getName());
                ACTIONLOG::add(INFO, $logMsg);
@@ -1204,12 +1228,11 @@ class BLOG {
                                // This $pinged is allow a plugin to tell other hook to the event that a ping is sent already
                                // Note that the plugins's calling order is subject to thri order in the plugin list
                                $pinged = false;
                                // This $pinged is allow a plugin to tell other hook to the event that a ping is sent already
                                // Note that the plugins's calling order is subject to thri order in the plugin list
                                $pinged = false;
-                               $manager->notify(
-                                               'JustPosted',
-                                               array('blogid' => $blogid,
-                                               'pinged' => &$pinged
-                                               )
+                               $param = array(
+                                       'blogid' =>  $blogid,
+                                       'pinged' => &$pinged
                                );
                                );
+                               $manager->notify('JustPosted', $param);
 
                                // clear all expired future posts
                                sql_query("UPDATE " . sql_table('item') . " SET iposted='1' WHERE iblog=" . $blogid . " AND itime<NOW()");
 
                                // clear all expired future posts
                                sql_query("UPDATE " . sql_table('item') . " SET iposted='1' WHERE iblog=" . $blogid . " AND itime<NOW()");
index 5926717..64467c5 100644 (file)
@@ -64,14 +64,14 @@ class BODYACTIONS extends BaseActions {
                // add item reference (array_unshift didn't work)
                $params = array_merge(array(&$this->currentItem),$params);
 
                // add item reference (array_unshift didn't work)
                $params = array_merge(array(&$this->currentItem),$params);
 
-               call_user_func_array(array(&$plugin,'doItemVar'), $params);
+               call_user_func_array(array($plugin,'doItemVar'), $params);
        }
        
        function parse_image() {
                // image/popup calls have arguments separated by |
                $args = func_get_args();
                $args = explode('|',implode($args,', '));
        }
        
        function parse_image() {
                // image/popup calls have arguments separated by |
                $args = func_get_args();
                $args = explode('|',implode($args,', '));
-               call_user_func_array(array(&$this,'createImageCode'),$args);
+               call_user_func_array(array($this,'createImageCode'), $args);
        }
        
        function createImageCode($filename, $width, $height, $text = '') {
        }
        
        function createImageCode($filename, $width, $height, $text = '') {
@@ -101,7 +101,7 @@ class BODYACTIONS extends BaseActions {
                // image/popup calls have arguments separated by |
                $args = func_get_args();
                $args = explode('|',implode($args,', '));
                // image/popup calls have arguments separated by |
                $args = func_get_args();
                $args = explode('|',implode($args,', '));
-               call_user_func_array(array(&$this,'createMediaCode'),$args);
+               call_user_func_array(array($this,'createMediaCode'), $args);
        }
 
        function createMediaCode($filename, $text = '') {
        }
 
        function createMediaCode($filename, $text = '') {
@@ -124,7 +124,7 @@ class BODYACTIONS extends BaseActions {
                // image/popup calls have arguments separated by |
                $args = func_get_args();
                $args = explode('|',implode($args,', '));
                // image/popup calls have arguments separated by |
                $args = func_get_args();
                $args = explode('|',implode($args,', '));
-               call_user_func_array(array(&$this,'createPopupCode'),$args);
+               call_user_func_array(array($this,'createPopupCode'), $args);
        }
 
        function createPopupCode($filename, $width, $height, $text = '') {
        }
 
        function createPopupCode($filename, $width, $height, $text = '') {
@@ -390,7 +390,7 @@ class BODYACTIONS extends BaseActions {
                $params = func_get_args();
                array_shift($params);
                
                $params = func_get_args();
                array_shift($params);
                
-               return call_user_func_array(array(&$plugin, 'doIf'), $params);
+               return call_user_func_array(array($plugin, 'doIf'), $params);
        }
 }
 ?>
        }
 }
 ?>
index 660e3d0..2702a1d 100644 (file)
@@ -224,7 +224,7 @@ class BaseActions {
                $this->_addIfExecute();
 
                $args = func_get_args();
                $this->_addIfExecute();
 
                $args = func_get_args();
-               $condition = call_user_func_array(array(&$this,'checkCondition'), $args);
+               $condition = call_user_func_array(array($this,'checkCondition'), $args);
                $this->_addIfCondition($condition);
        }
 
                $this->_addIfCondition($condition);
        }
 
@@ -263,7 +263,7 @@ class BaseActions {
                } else {
                        ob_end_clean();
                        $args = func_get_args();
                } else {
                        ob_end_clean();
                        $args = func_get_args();
-                       $condition = call_user_func_array(array(&$this,'checkCondition'), $args);
+                       $condition = call_user_func_array(array($this,'checkCondition'), $args);
                        $this->_addIfCondition($condition);
                }
        }
                        $this->_addIfCondition($condition);
                }
        }
@@ -275,7 +275,7 @@ class BaseActions {
                $this->_addIfExecute();
 
                $args = func_get_args();
                $this->_addIfExecute();
 
                $args = func_get_args();
-               $condition = call_user_func_array(array(&$this,'checkCondition'), $args);
+               $condition = call_user_func_array(array($this,'checkCondition'), $args);
                $this->_addIfCondition(!$condition);
        }
 
                $this->_addIfCondition(!$condition);
        }
 
@@ -295,7 +295,7 @@ class BaseActions {
                } else {
                        ob_end_clean();
                        $args = func_get_args();
                } else {
                        ob_end_clean();
                        $args = func_get_args();
-                       $condition = call_user_func_array(array(&$this,'checkCondition'), $args);
+                       $condition = call_user_func_array(array($this,'checkCondition'), $args);
                        $this->_addIfCondition(!$condition);
                }
        }
                        $this->_addIfCondition(!$condition);
                }
        }
index 56be73e..fcf961b 100644 (file)
@@ -355,7 +355,7 @@ class COMMENTACTIONS extends BaseActions {
                $params = array_merge(array(&$this->currentComment),$params);
                $params = array_merge(array(&$this->commentsObj->itemActions->currentItem),$params);
 
                $params = array_merge(array(&$this->currentComment),$params);
                $params = array_merge(array(&$this->commentsObj->itemActions->currentItem),$params);
 
-               call_user_func_array(array(&$plugin,'doTemplateCommentsVar'), $params);
+               call_user_func_array(array($plugin, 'doTemplateCommentsVar'), $params);
        }
 
        /**
        }
 
        /**
@@ -700,7 +700,7 @@ class COMMENTACTIONS extends BaseActions {
                $params = func_get_args();
                array_shift($params);
 
                $params = func_get_args();
                array_shift($params);
 
-               return call_user_func_array(array(&$plugin, 'doIf'), $params);
+               return call_user_func_array(array($plugin, 'doIf'), $params);
        }
 
 }
        }
 
 }
index 92adf96..323b561 100755 (executable)
@@ -70,8 +70,8 @@ class COMMENTS {
                global $CONF, $manager;
 
                // create parser object & action handler
                global $CONF, $manager;
 
                // create parser object & action handler
-               $actions =& new COMMENTACTIONS($this);
-               $parser =& new PARSER($actions->getDefinedActions(),$actions);
+               $actions = new COMMENTACTIONS($this);
+               $parser = new PARSER($actions->getDefinedActions(), $actions);
                $actions->setTemplate($template);
                $actions->setParser($parser);
 
                $actions->setTemplate($template);
                $actions->setParser($parser);
 
@@ -106,9 +106,11 @@ class COMMENTS {
                        $comment['timestamp'] = strtotime($comment['ctime']);
                        $actions->setCurrentComment($comment);
                        $actions->setHighlight($highlight);
                        $comment['timestamp'] = strtotime($comment['ctime']);
                        $actions->setCurrentComment($comment);
                        $actions->setHighlight($highlight);
-                       $manager->notify('PreComment', array('comment' => &$comment));
+                       $param = array('comment' => &$comment);
+                       $manager->notify('PreComment', $param);
                        $parser->parse($template['COMMENTS_BODY']);
                        $parser->parse($template['COMMENTS_BODY']);
-                       $manager->notify('PostComment', array('comment' => &$comment));
+                       $param = array('comment' => &$comment);
+                       $manager->notify('PostComment', $param);
                }
 
                $parser->parse($template['COMMENTS_FOOTER']);
                }
 
                $parser->parse($template['COMMENTS_FOOTER']);
@@ -256,7 +258,8 @@ class COMMENTS {
                        $spamcheck['url'] = $comment['userid'];
                } // end if
 
                        $spamcheck['url'] = $comment['userid'];
                } // end if
 
-               $manager->notify('SpamCheck', array('spamcheck' => &$spamcheck) );
+               $param = array('spamcheck' => &$spamcheck);
+               $manager->notify('SpamCheck', $param);
 
                if ( !$continue && isset($spamcheck['result']) && $spamcheck['result'] == TRUE )
                {
 
                if ( !$continue && isset($spamcheck['result']) && $spamcheck['result'] == TRUE )
                {
@@ -316,13 +319,17 @@ class COMMENTS {
 
                        $frommail = $member->getNotifyFromMailAddress($comment['email']);
 
 
                        $frommail = $member->getNotifyFromMailAddress($comment['email']);
 
-                       $notify =& new NOTIFICATION($settings->getNotifyAddress() );
+                       $notify = new NOTIFICATION($settings->getNotifyAddress() );
                        $notify->notify($mailto_title, $mailto_msg , $frommail);
                }
 
                $comment = COMMENT::prepare($comment);
 
                        $notify->notify($mailto_title, $mailto_msg , $frommail);
                }
 
                $comment = COMMENT::prepare($comment);
 
-               $manager->notify('PreAddComment', array('comment' => &$comment, 'spamcheck' => &$spamcheck) );
+               $param = array(
+                       'comment'       => &$comment,
+                       'spamcheck'     => &$spamcheck
+               );
+               $manager->notify('PreAddComment', $param);
 
                $name           = sql_real_escape_string($comment['user']);
                $url            = sql_real_escape_string($comment['userid']);
 
                $name           = sql_real_escape_string($comment['user']);
                $url            = sql_real_escape_string($comment['userid']);
@@ -356,7 +363,12 @@ class COMMENTS {
 
                // post add comment
                $commentid = sql_insert_id();
 
                // post add comment
                $commentid = sql_insert_id();
-               $manager->notify('PostAddComment', array('comment' => &$comment, 'commentid' => &$commentid, 'spamcheck' => &$spamcheck) );
+               $param = array(
+                       'comment'       => &$comment,
+                       'commentid'     => &$commentid,
+                       'spamcheck'     => &$spamcheck
+               );
+               $manager->notify('PostAddComment', $param);
 
                // succeeded !
                return TRUE;
 
                // succeeded !
                return TRUE;
@@ -423,7 +435,13 @@ class COMMENTS {
                // let plugins do verification (any plugin which thinks the comment is invalid
                // can change 'error' to something other than '1')
                $result = 1;
                // let plugins do verification (any plugin which thinks the comment is invalid
                // can change 'error' to something other than '1')
                $result = 1;
-               $manager->notify('ValidateForm', array('type' => 'comment', 'comment' => &$comment, 'error' => &$result, 'spamcheck' => &$spamcheck) );
+               $param = array(
+                       'type'          => 'comment',
+                       'comment'       => &$comment,
+                       'error'         => &$result,
+                       'spamcheck'     => &$spamcheck
+               );
+               $manager->notify('ValidateForm', $param);
 
                return $result;
        }
 
                return $result;
        }
index 5281ec9..5589be9 100644 (file)
@@ -67,7 +67,7 @@ class NAVLIST extends ENCAPSULATE {
        }
 
        function showBatchList($batchtype, $query, $type, $template, $errorMessage = _LISTS_NOMORE) {
        }
 
        function showBatchList($batchtype, $query, $type, $template, $errorMessage = _LISTS_NOMORE) {
-               $batch =& new BATCH($batchtype);
+               $batch = new BATCH($batchtype);
 
                $this->doEncapsulate(
                                array(&$batch, 'showlist'),
 
                $this->doEncapsulate(
                                array(&$batch, 'showlist'),
index c1ef7cf..093d547 100755 (executable)
@@ -164,7 +164,17 @@ class ITEM {
                //Setting the itemOptions\r
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions, $itemid);\r
                //Setting the itemOptions\r
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions, $itemid);\r
-               $manager->notify('PostPluginOptionsUpdate',array('context' => 'item', 'itemid' => $itemid, 'item' => array('title' => $i_title, 'body' => $i_body, 'more' => $i_more, 'closed' => $i_closed, 'catid' => $i_catid)));\r
+               $param = array(\r
+               'context'       => 'item',\r
+               'itemid'        => $itemid,\r
+               'item'          => array(\r
+                       'title'         => $i_title,\r
+                       'body'          => $i_body,\r
+                       'more'          => $i_more,\r
+                       'closed'        => $i_closed,\r
+                       'catid'         => $i_catid)\r
+               );\r
+               $manager->notify('PostPluginOptionsUpdate', $param);\r
 \r
                if ($i_draftid > 0) {\r
                        // delete permission is checked inside ITEM::delete()\r
 \r
                if ($i_draftid > 0) {\r
                        // delete permission is checked inside ITEM::delete()\r
@@ -208,7 +218,16 @@ class ITEM {
                }\r
 \r
                // call plugins\r
                }\r
 \r
                // call plugins\r
-               $manager->notify('PreUpdateItem',array('itemid' => $itemid, 'title' => &$title, 'body' => &$body, 'more' => &$more, 'blog' => &$blog, 'closed' => &$closed, 'catid' => &$catid));\r
+               $param = array(\r
+               '       itemid'         =>  $itemid,\r
+                       'title'         => &$title,\r
+                       'body'          => &$body,\r
+                       'more'          => &$more,\r
+                       'blog'          => &$blog,\r
+                       'closed'        => &$closed,\r
+                       'catid'         => &$catid\r
+               );\r
+               $manager->notify('PreUpdateItem', $param);\r
 \r
                // update item itsself\r
                $query =  'UPDATE '.sql_table('item')\r
 \r
                // update item itsself\r
                $query =  'UPDATE '.sql_table('item')\r
@@ -264,7 +283,8 @@ class ITEM {
                // off we go!\r
                sql_query($query);\r
 \r
                // off we go!\r
                sql_query($query);\r
 \r
-               $manager->notify('PostUpdateItem',array('itemid' => $itemid));\r
+               $param = array('itemid' => $itemid);\r
+               $manager->notify('PostUpdateItem', $param);\r
 \r
                // when needed, move item and comments to new blog\r
                if ($moveNeeded)\r
 \r
                // when needed, move item and comments to new blog\r
                if ($moveNeeded)\r
@@ -273,7 +293,18 @@ class ITEM {
                //update the itemOptions\r
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions);\r
                //update the itemOptions\r
                $aOptions = requestArray('plugoption');\r
                NucleusPlugin::_applyPluginOptions($aOptions);\r
-               $manager->notify('PostPluginOptionsUpdate',array('context' => 'item', 'itemid' => $itemid, 'item' => array('title' => $title, 'body' => $body, 'more' => $more, 'closed' => $closed, 'catid' => $catid)));\r
+               $param = array(\r
+                       'context'       => 'item',\r
+                       'itemid'        => $itemid,\r
+                       'item'          => array(\r
+                               'title'         => $title,\r
+                               'body'          => $body,\r
+                               'more'          => $more,\r
+                               'closed'        => $closed,\r
+                               'catid'         => $catid\r
+                       )\r
+               );\r
+               $manager->notify('PostPluginOptionsUpdate', $param);\r
 \r
        }\r
 \r
 \r
        }\r
 \r
@@ -290,14 +321,12 @@ class ITEM {
 \r
                $new_blogid = getBlogIDFromCatID($new_catid);\r
 \r
 \r
                $new_blogid = getBlogIDFromCatID($new_catid);\r
 \r
-               $manager->notify(\r
-                       'PreMoveItem',\r
-                       array(\r
-                               'itemid' => $itemid,\r
-                               'destblogid' => $new_blogid,\r
-                               'destcatid' => $new_catid\r
-                       )\r
+               $param = array(\r
+                       'itemid'                => $itemid,\r
+                       'destblogid'    => $new_blogid,\r
+                       'destcatid'             => $new_catid\r
                );\r
                );\r
+               $manager->notify('PreMoveItem', $param);\r
 \r
 \r
                // update item table\r
 \r
 \r
                // update item table\r
@@ -308,14 +337,12 @@ class ITEM {
                $query = 'UPDATE '.sql_table('comment')." SET cblog=" . $new_blogid." WHERE citem=" . $itemid;\r
                sql_query($query);\r
 \r
                $query = 'UPDATE '.sql_table('comment')." SET cblog=" . $new_blogid." WHERE citem=" . $itemid;\r
                sql_query($query);\r
 \r
-               $manager->notify(\r
-                       'PostMoveItem',\r
-                       array(\r
-                               'itemid' => $itemid,\r
-                               'destblogid' => $new_blogid,\r
-                               'destcatid' => $new_catid\r
-                       )\r
+               $param = array(\r
+                       'itemid'                => $itemid,\r
+                       'destblogid'    => $new_blogid,\r
+                       'destcatid'             => $new_catid\r
                );\r
                );\r
+               $manager->notify('PostMoveItem', $param);\r
        }\r
 \r
        /**\r
        }\r
 \r
        /**\r
@@ -332,8 +359,8 @@ class ITEM {
                        return 1;\r
                }\r
 \r
                        return 1;\r
                }\r
 \r
-\r
-               $manager->notify('PreDeleteItem', array('itemid' => $itemid));\r
+               $param = array('itemid' => $itemid);\r
+               $manager->notify('PreDeleteItem', $param);\r
 \r
                // delete item\r
                $query = 'DELETE FROM '.sql_table('item').' WHERE inumber=' . $itemid;\r
 \r
                // delete item\r
                $query = 'DELETE FROM '.sql_table('item').' WHERE inumber=' . $itemid;\r
@@ -346,7 +373,8 @@ class ITEM {
                // delete all associated plugin options\r
                NucleusPlugin::_deleteOptionValues('item', $itemid);\r
 \r
                // delete all associated plugin options\r
                NucleusPlugin::_deleteOptionValues('item', $itemid);\r
 \r
-               $manager->notify('PostDeleteItem', array('itemid' => $itemid));\r
+               $param = array('itemid' => $itemid);\r
+               $manager->notify('PostDeleteItem', $param);\r
 \r
                return 0;\r
        }\r
 \r
                return 0;\r
        }\r
@@ -448,12 +476,25 @@ class ITEM {
                        $itemid = $blog->additem($i_catid, $i_title, $i_body, $i_more, $i_blogid, $i_author, $posttime, $i_closed, $i_draft);\r
                }\r
 \r
                        $itemid = $blog->additem($i_catid, $i_title, $i_body, $i_more, $i_blogid, $i_author, $posttime, $i_closed, $i_draft);\r
                }\r
 \r
+               /*\r
                // No plugin support in AutoSaveDraft yet\r
                //Setting the itemOptions\r
                // No plugin support in AutoSaveDraft yet\r
                //Setting the itemOptions\r
-               //$aOptions = requestArray('plugoption');\r
-               //NucleusPlugin::_applyPluginOptions($aOptions, $itemid);\r
-               //$manager->notify('PostPluginOptionsUpdate',array('context' => 'item', 'itemid' => $itemid, 'item' => array('title' => $i_title, 'body' => $i_body, 'more' => $i_more, 'closed' => $i_closed, 'catid' => $i_catid)));\r
-\r
+               $aOptions = requestArray('plugoption');\r
+               NucleusPlugin::_applyPluginOptions($aOptions, $itemid);\r
+               $param = array(\r
+                       'context'       => 'item',\r
+                       'itemid'        => $itemid,\r
+                       'item'          => array(\r
+                               'title'         => $i_title,\r
+                               'body'          => $i_body,\r
+                               'more'          => $i_more,\r
+                               'closed'        => $i_closed,\r
+                               'catid'         => $i_catid\r
+                       )\r
+               );\r
+               $manager->notify('PostPluginOptionsUpdate', $param);\r
+               */\r
+               \r
                // success\r
                return array('status' => 'added', 'draftid' => $itemid);\r
        }\r
                // success\r
                return array('status' => 'added', 'draftid' => $itemid);\r
        }\r
index 15d3ecb..9717549 100644 (file)
@@ -454,7 +454,7 @@ class ITEMACTIONS extends BaseActions {
 \r
                // add comments\r
                if ($this->showComments && $this->blog->commentsEnabled()) {\r
 \r
                // add comments\r
                if ($this->showComments && $this->blog->commentsEnabled()) {\r
-                       $comments =& new COMMENTS($this->currentItem->itemid);\r
+                       $comments = new COMMENTS($this->currentItem->itemid);\r
                        $comments->setItemActions($this);\r
                        $comments->showComments($this->template, $maxToShow, $this->currentItem->closed ? 0 : 1, $this->strHighlight);\r
                }\r
                        $comments->setItemActions($this);\r
                        $comments->showComments($this->template, $maxToShow, $this->currentItem->closed ? 0 : 1, $this->strHighlight);\r
                }\r
@@ -487,7 +487,7 @@ class ITEMACTIONS extends BaseActions {
                // add item reference (array_unshift didn't work)\r
                $params = array_merge(array(&$this->currentItem),$params);\r
 \r
                // add item reference (array_unshift didn't work)\r
                $params = array_merge(array(&$this->currentItem),$params);\r
 \r
-               call_user_func_array(array(&$plugin,'doTemplateVar'), $params);\r
+               call_user_func_array(array($plugin,'doTemplateVar'), $params);\r
        }\r
 \r
        /**\r
        }\r
 \r
        /**\r
@@ -523,8 +523,8 @@ class ITEMACTIONS extends BaseActions {
         * 'plugin variables in items' implementation by Andy\r
         */\r
        function highlightAndParse(&$data) {\r
         * 'plugin variables in items' implementation by Andy\r
         */\r
        function highlightAndParse(&$data) {\r
-               $actions =& new BODYACTIONS($this->blog);\r
-               $parser =& new PARSER($actions->getDefinedActions(), $actions);\r
+               $actions = new BODYACTIONS($this->blog);\r
+               $parser = new PARSER($actions->getDefinedActions(), $actions);\r
                $actions->setTemplate($this->template);\r
                $actions->setHighlight($this->strHighlight);\r
                $actions->setCurrentItem($this->currentItem);\r
                $actions->setTemplate($this->template);\r
                $actions->setHighlight($this->strHighlight);\r
                $actions->setCurrentItem($this->currentItem);\r
@@ -781,7 +781,7 @@ class ITEMACTIONS extends BaseActions {
                $params = func_get_args();
                array_shift($params);
 
                $params = func_get_args();
                array_shift($params);
 
-               return call_user_func_array(array(&$plugin, 'doIf'), $params);
+               return call_user_func_array(array($plugin, 'doIf'), $params);
        }
 }\r
 ?>
\ No newline at end of file
        }
 }\r
 ?>
\ No newline at end of file
index c898977..e0acd5f 100755 (executable)
@@ -66,7 +66,7 @@ class MANAGER {
     function &instance() {
         static $instance = array();
         if (empty($instance)) {
     function &instance() {
         static $instance = array();
         if (empty($instance)) {
-            $instance[0] =& new MANAGER();
+            $instance[0] = new MANAGER();
         }
         return $instance[0];
     }
         }
         return $instance[0];
     }
@@ -142,7 +142,7 @@ class MANAGER {
             // load class if needed
             $this->_loadClass('BLOG','BLOG.php');
             // load blog object
             // load class if needed
             $this->_loadClass('BLOG','BLOG.php');
             // load blog object
-            $blog =& new BLOG($blogid);
+            $blog = new BLOG($blogid);
             $this->blogs[$blogid] =& $blog;
         }
         return $blog;
             $this->blogs[$blogid] =& $blog;
         }
         return $blog;
@@ -187,7 +187,7 @@ class MANAGER {
             // load class if needed
             $this->_loadClass('KARMA','KARMA.php');
             // create KARMA object
             // load class if needed
             $this->_loadClass('KARMA','KARMA.php');
             // create KARMA object
-            $karma =& new KARMA($itemid);
+            $karma = new KARMA($itemid);
             $this->karma[$itemid] =& $karma;
         }
         return $karma;
             $this->karma[$itemid] =& $karma;
         }
         return $karma;
@@ -269,7 +269,7 @@ class MANAGER {
                 }
 
                 // add to plugin array
                 }
 
                 // add to plugin array
-                eval('$this->plugins[$name] =& new ' . $name . '();');
+                eval('$this->plugins[$name] = new ' . $name . '();');
 
                 // get plugid
                 $this->plugins[$name]->plugid = $this->getPidFromName($name);
 
                 // get plugid
                 $this->plugins[$name]->plugid = $this->getPidFromName($name);
@@ -426,7 +426,7 @@ class MANAGER {
                 $this->_loadPlugin($listener);
                 // do notify (if method exists)
                 if (isset($this->plugins[$listener]) && method_exists($this->plugins[$listener], 'event_' . $eventName))
                 $this->_loadPlugin($listener);
                 // do notify (if method exists)
                 if (isset($this->plugins[$listener]) && method_exists($this->plugins[$listener], 'event_' . $eventName))
-                    call_user_func(array(&$this->plugins[$listener],'event_' . $eventName), &$data);
+                    call_user_func(array($this->plugins[$listener], 'event_' . $eventName), $data);
             }
         }
 
             }
         }
 
index 1a44d4c..26f83e3 100755 (executable)
@@ -149,7 +149,12 @@ class MEDIA {
                if ($filename === false) 
                        return _ERROR_BADFILETYPE;
                
                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;
                
                // don't allow uploads to unknown or forbidden collections
                $exceptReadOnly = true;
@@ -194,7 +199,12 @@ class MEDIA {
                @chmod($mediadir . $filename, 0644);
                umask($oldumask);
 
                @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 '';
 
 
                return '';
 
index 1fa4816..2ba8972 100755 (executable)
@@ -51,7 +51,7 @@ class MEMBER {
         * @static
         */
        function &createFromName($displayname) {
         * @static
         */
        function &createFromName($displayname) {
-               $mem =& new MEMBER();
+               $mem = new MEMBER();
                $mem->readFromName($displayname);
                return $mem;
        }
                $mem->readFromName($displayname);
                return $mem;
        }
@@ -62,7 +62,7 @@ class MEMBER {
         * @static
         */
        function &createFromID($id) {
         * @static
         */
        function &createFromID($id) {
-               $mem =& new MEMBER();
+               $mem = new MEMBER();
                $mem->readFromID($id);
                return $mem;
        }
                $mem->readFromID($id);
                return $mem;
        }
@@ -85,7 +85,13 @@ class MEMBER {
                $this->loggedin = 0;
                $success = 0;
                $allowlocal = 1;
                $this->loggedin = 0;
                $success = 0;
                $allowlocal = 1;
-               $manager->notify('CustomLogin', array('login' => &$login, 'password'=>&$password, 'success'=>&$success, 'allowlocal'=>&$allowlocal) );
+               $param = array(
+                       'login'                 => &$login,
+                       'password'              =>&$password,
+                       'success'               =>&$success,
+                       'allowlocal'    =>&$allowlocal
+               );
+               $manager->notify('CustomLogin', $param);
                if ($success && $this->readFromName($login)) {
                        $this->loggedin = 1;
                        return $this->isLoggedIn();
                if ($success && $this->readFromName($login)) {
                        $this->loggedin = 1;
                        return $this->isLoggedIn();
index 0a8d4d3..6f2b2b2 100755 (executable)
@@ -101,7 +101,11 @@ class PAGEFACTORY extends BaseActions {
                $this->method = 'add';\r
 \r
                global $manager;\r
                $this->method = 'add';\r
 \r
                global $manager;\r
-               $manager->notify('PreAddItemForm', array('contents' => &$contents, 'blog' => &$this->blog));\r
+               $param = array(\r
+                       'contents'      => &$contents,\r
+                       'blog'          => &$this->blog\r
+               );\r
+               $manager->notify('PreAddItemForm', $param);\r
 \r
                $this->createForm($contents);\r
        }\r
 \r
                $this->createForm($contents);\r
        }\r
@@ -135,7 +139,7 @@ class PAGEFACTORY extends BaseActions {
                $template = $this->getTemplateFor($this->type);\r
 \r
                // use the PARSER engine to parse that template\r
                $template = $this->getTemplateFor($this->type);\r
 \r
                // use the PARSER engine to parse that template\r
-               $parser =& new PARSER($this->actions, $this);\r
+               $parser = new PARSER($this->actions, $this);\r
                $parser->parse($template);\r
        }\r
 \r
                $parser->parse($template);\r
        }\r
 \r
@@ -245,12 +249,10 @@ class PAGEFACTORY extends BaseActions {
 \r
                $extrahead = '';\r
 \r
 \r
                $extrahead = '';\r
 \r
-               $manager->notify(\r
-                       'BookmarkletExtraHead',\r
-                       array(\r
-                               'extrahead' => &$extrahead\r
-                       )\r
+               $param = array(\r
+                       'extrahead' => &$extrahead\r
                );\r
                );\r
+               $manager->notify('BookmarkletExtraHead', $param);\r
 \r
                echo $extrahead;\r
        }\r
 \r
                echo $extrahead;\r
        }\r
@@ -387,20 +389,18 @@ class PAGEFACTORY extends BaseActions {
 \r
                switch ($this->method) {\r
                        case 'add':\r
 \r
                switch ($this->method) {\r
                        case 'add':\r
-                               $manager->notify('AddItemFormExtras',\r
-                                               array(\r
-                                                       'blog' => &$this->blog\r
-                                               )\r
+                               $param = array(\r
+                                       'blog' => &$this->blog\r
                                );\r
                                );\r
+                               $manager->notify('AddItemFormExtras', $param);\r
                                break;\r
                        case 'edit':\r
                                break;\r
                        case 'edit':\r
-                               $manager->notify('EditItemFormExtras',\r
-                                               array(\r
-                                                       'variables' => $this->variables,\r
-                                                       'blog' => &$this->blog,\r
-                                                       'itemid' => $this->variables['itemid']\r
-                                               )\r
+                               $PARAM = array(\r
+                                       'variables'     =>  $this->variables,\r
+                                       'blog'          => &$this->blog,\r
+                                       'itemid'        =>  $this->variables['itemid']\r
                                );\r
                                );\r
+                               $manager->notify('EditItemFormExtras', $param);\r
                                break;\r
                }\r
        }\r
                                break;\r
                }\r
        }\r
index a964ce0..b4526de 100755 (executable)
@@ -111,7 +111,7 @@ class PARSER {
                        // when using PHP versions lower than 4.0.5, uncomment the line before\r
                        // and comment the call_user_func_array call\r
                        //$this->call_using_array($action, $this->handler, $params);\r
                        // when using PHP versions lower than 4.0.5, uncomment the line before\r
                        // and comment the call_user_func_array call\r
                        //$this->call_using_array($action, $this->handler, $params);\r
-                       call_user_func_array(array(&$this->handler,'parse_' . $actionlc), $params);\r
+                       call_user_func_array(array($this->handler, 'parse_' . $actionlc), $params);\r
                } else {\r
                        // redirect to plugin action if possible\r
                        if (in_array('plugin', $this->actions) && $manager->pluginInstalled('NP_' . $action)) {\r
                } else {\r
                        // redirect to plugin action if possible\r
                        if (in_array('plugin', $this->actions) && $manager->pluginInstalled('NP_' . $action)) {\r
@@ -138,7 +138,7 @@ class PARSER {
                        return;\r
                }\r
 \r
                        return;\r
                }\r
 \r
-               $command = 'call_user_func(array(&$handler,$methodname)';\r
+               $command = 'call_user_func(array($handler,$methodname)';\r
                for ($i = 0; $i<count($paramarray); $i++)\r
                        $command .= ',$paramarray[' . $i . ']';\r
                $command .= ');';\r
                for ($i = 0; $i<count($paramarray); $i++)\r
                        $command .= ',$paramarray[' . $i . ']';\r
                $command .= ');';\r
index f819b97..c27877a 100755 (executable)
                        $args = func_get_args();
                        array_shift($args);
                        array_unshift($args, 'template');
                        $args = func_get_args();
                        array_shift($args);
                        array_unshift($args, 'template');
-                       call_user_func_array(array(&$this,'doSkinVar'),$args);
+                       call_user_func_array(array($this,'doSkinVar'), $args);
                }
                function doTemplateCommentsVar(&$item, &$comment) {
                        $args = func_get_args();
                        array_shift($args);
                        array_shift($args);
                        array_unshift($args, 'template');
                }
                function doTemplateCommentsVar(&$item, &$comment) {
                        $args = func_get_args();
                        array_shift($args);
                        array_shift($args);
                        array_unshift($args, 'template');
-                       call_user_func_array(array(&$this,'doSkinVar'),$args);
+                       call_user_func_array(array($this,'doSkinVar'), $args);
                }
                function doAction($type) { return _ERROR_PLUGIN_NOSUCHACTION; }
                function doIf($key,$value) { return false; }
                }
                function doAction($type) { return _ERROR_PLUGIN_NOSUCHACTION; }
                function doIf($key,$value) { return false; }
 
                                                        //trigger event PrePluginOptionsUpdate to give the plugin the
                                                        //possibility to change/validate the new value for the option
 
                                                        //trigger event PrePluginOptionsUpdate to give the plugin the
                                                        //possibility to change/validate the new value for the option
-                                                       $manager->notify('PrePluginOptionsUpdate',array('context' => $o->ocontext, 'plugid' => $o->opid, 'optionname' => $o->oname, 'contextid' => $contextid, 'value' => &$value));
+                                                       $param = array(
+                                                               'context'               =>  $o->ocontext,
+                                                               'plugid'                =>  $o->opid,
+                                                               'optionname'    =>  $o->oname,
+                                                               'contextid'             =>  $contextid,
+                                                               'value'                 => &$value
+                                                       );
+                                                       $manager->notify('PrePluginOptionsUpdate', $param);
 
                                                        // delete the old value for the option
                                                        sql_query('DELETE FROM '.sql_table('plugin_option').' WHERE oid='.intval($oid).' AND ocontextid='.intval($contextid));
 
                                                        // delete the old value for the option
                                                        sql_query('DELETE FROM '.sql_table('plugin_option').' WHERE oid='.intval($oid).' AND ocontextid='.intval($contextid));
index fc6c7bb..1fc9c3f 100755 (executable)
@@ -122,31 +122,27 @@ class SKIN {
        function createNew($name, $desc, $type = 'text/html', $includeMode = 'normal', $includePrefix = '') {
                global $manager;
 
        function createNew($name, $desc, $type = 'text/html', $includeMode = 'normal', $includePrefix = '') {
                global $manager;
 
-               $manager->notify(
-                       'PreAddSkin',
-                       array(
-                               'name' => &$name,
-                               'description' => &$desc,
-                               'type' => &$type,
-                               'includeMode' => &$includeMode,
-                               'includePrefix' => &$includePrefix
-                       )
+               $param = array(
+                       'name'                  => &$name,
+                       'description'   => &$desc,
+                       'type'                  => &$type,
+                       'includeMode'   => &$includeMode,
+                       'includePrefix' => &$includePrefix
                );
                );
+               $manager->notify('PreAddSkin', $param);
 
                sql_query('INSERT INTO '.sql_table('skin_desc')." (sdname, sddesc, sdtype, sdincmode, sdincpref) VALUES ('" . sql_real_escape_string($name) . "','" . sql_real_escape_string($desc) . "','".sql_real_escape_string($type)."','".sql_real_escape_string($includeMode)."','".sql_real_escape_string($includePrefix)."')");
                $newid = sql_insert_id();
 
 
                sql_query('INSERT INTO '.sql_table('skin_desc')." (sdname, sddesc, sdtype, sdincmode, sdincpref) VALUES ('" . sql_real_escape_string($name) . "','" . sql_real_escape_string($desc) . "','".sql_real_escape_string($type)."','".sql_real_escape_string($includeMode)."','".sql_real_escape_string($includePrefix)."')");
                $newid = sql_insert_id();
 
-               $manager->notify(
-                       'PostAddSkin',
-                       array(
-                               'skinid' => $newid,
-                               'name' => $name,
-                               'description' => $desc,
-                               'type' => $type,
-                               'includeMode' => $includeMode,
-                               'includePrefix' => $includePrefix
-                       )
+               $param = array(
+                       'skinid'                => $newid,
+                       'name'                  => $name,
+                       'description'   => $desc,
+                       'type'                  => $type,
+                       'includeMode'   => $includeMode,
+                       'includePrefix' => $includePrefix
                );
                );
+               $manager->notify('PostAddSkin', $param);
 
                return $newid;
        }
 
                return $newid;
        }
@@ -154,7 +150,11 @@ class SKIN {
        function parse($type) {
                global $manager, $CONF, $skinid;
                
        function parse($type) {
                global $manager, $CONF, $skinid;
                
-               $manager->notify('InitSkinParse',array('skin' => &$this, 'type' => $type));
+               $param = array(
+                       'skin' => &$this,
+                       'type' =>  $type
+               );
+               $manager->notify('InitSkinParse', $param);
                $skinid = $this->id;
                
                // set output type
                $skinid = $this->id;
                
                // set output type
@@ -168,7 +168,7 @@ class SKIN {
                
                if (!$contents) {
                        // use base skin if this skin does not have contents
                
                if (!$contents) {
                        // use base skin if this skin does not have contents
-                       $defskin =& new SKIN($CONF['BaseSkin']);
+                       $defskin = new SKIN($CONF['BaseSkin']);
                        $contents = $defskin->getContent($type);
                        if (!$contents) {
                                echo _ERROR_SKIN;
                        $contents = $defskin->getContent($type);
                        if (!$contents) {
                                echo _ERROR_SKIN;
@@ -178,20 +178,29 @@ class SKIN {
                
                $actions = $this->getAllowedActionsForType($type);
                
                
                $actions = $this->getAllowedActionsForType($type);
                
-               $manager->notify('PreSkinParse',array('skin' => &$this, 'type' => $type, 'contents' => &$contents));
+               $param = array(
+                       'skin'          => &$this,
+                       'type'          =>  $type,
+                       'contents'      => &$contents
+               );
+               $manager->notify('PreSkinParse', $param);
                $skinid = $this->id;
                
                // set IncludeMode properties of parser
                PARSER::setProperty('IncludeMode',$this->getIncludeMode());
                PARSER::setProperty('IncludePrefix',$this->getIncludePrefix());
                
                $skinid = $this->id;
                
                // set IncludeMode properties of parser
                PARSER::setProperty('IncludeMode',$this->getIncludeMode());
                PARSER::setProperty('IncludePrefix',$this->getIncludePrefix());
                
-               $handler =& new ACTIONS($type, $this);
-               $parser =& new PARSER($actions, $handler);
+               $handler = new ACTIONS($type, $this);
+               $parser = new PARSER($actions, $handler);
                $handler->setParser($parser);
                $handler->setSkin($this);
                $parser->parse($contents);
                
                $handler->setParser($parser);
                $handler->setSkin($this);
                $parser->parse($contents);
                
-               $manager->notify('PostSkinParse',array('skin' => &$this, 'type' => $type));
+               $param = array(
+                       'skin' => &$this,
+                       'type' =>  $type
+               );
+               $manager->notify('PostSkinParse', $param);
                $skinid = $this->id;
 
 
                $skinid = $this->id;
 
 
index 9020b18..907ac12 100755 (executable)
@@ -87,25 +87,21 @@ class TEMPLATE {
        function createNew($name, $desc) {
                global $manager;
 
        function createNew($name, $desc) {
                global $manager;
 
-               $manager->notify(
-                       'PreAddTemplate',
-                       array(
-                               'name' => &$name,
-                               'description' => &$desc
-                       )
+               $param = array(
+                       'name'                  => &$name,
+                       'description'   => &$desc
                );
                );
+               $manager->notify('PreAddTemplate', $param);
 
                sql_query('INSERT INTO '.sql_table('template_desc')." (tdname, tddesc) VALUES ('" . sql_real_escape_string($name) . "','" . sql_real_escape_string($desc) . "')");
                $newId = sql_insert_id();
 
 
                sql_query('INSERT INTO '.sql_table('template_desc')." (tdname, tddesc) VALUES ('" . sql_real_escape_string($name) . "','" . sql_real_escape_string($desc) . "')");
                $newId = sql_insert_id();
 
-               $manager->notify(
-                       'PostAddTemplate',
-                       array(
-                               'templateid' => $newId,
-                               'name' => $name,
-                               'description' => $desc
-                       )
+               $param = array(
+                       'templateid'    => $newId,
+                       'name'                  => $name,
+                       'description'   => $desc
                );
                );
+               $manager->notify('PostAddTemplate', $param);
 
                return $newId;
        }
 
                return $newId;
        }
@@ -120,12 +116,11 @@ class TEMPLATE {
         */
        function read($name) {
                global $manager;
         */
        function read($name) {
                global $manager;
-               $manager->notify(
-                       'PreTemplateRead',
-                       array(
-                               'template' => &$name
-                       )
+               
+               $param = array(
+                       'template' => &$name
                );
                );
+               $manager->notify('PreTemplateRead', $param);
 
                $query = 'SELECT tpartname, tcontent'
                           . ' FROM '.sql_table('template_desc').', '.sql_table('template')
 
                $query = 'SELECT tpartname, tcontent'
                           . ' FROM '.sql_table('template_desc').', '.sql_table('template')
index 73586f0..a3671c1 100755 (executable)
@@ -290,7 +290,11 @@ if ($action == 'login') {
                        $action = $nextaction;\r
                }\r
 \r
                        $action = $nextaction;\r
                }\r
 \r
-               $manager->notify('LoginSuccess', array('member' => &$member, 'username' => $login) );\r
+               $param = array(\r
+                       'member'        => &$member,\r
+                       'username'      =>  $login\r
+               );\r
+               $manager->notify('LoginSuccess', $param);\r
                $errormessage = '';\r
                ACTIONLOG::add(INFO, "Login successful for $login (sharedpc=$shared)");\r
        } else {\r
                $errormessage = '';\r
                ACTIONLOG::add(INFO, "Login successful for $login (sharedpc=$shared)");\r
        } else {\r
@@ -303,8 +307,9 @@ if ($action == 'login') {
                else \r
                {\r
                        $errormessage = 'Login failed for ' . $login;\r
                else \r
                {\r
                        $errormessage = 'Login failed for ' . $login;\r
-               } \r
-               $manager->notify('LoginFailed', array('username' => $login) );\r
+               }\r
+               $param = array('username' => $login);\r
+               $manager->notify('LoginFailed', $param);\r
                ACTIONLOG::add(INFO, $errormessage);\r
        }\r
 /*\r
                ACTIONLOG::add(INFO, $errormessage);\r
        }\r
 /*\r
@@ -317,10 +322,12 @@ Backed out for now: See http://forum.nucleuscms.org/viewtopic.php?t=3684 for det
        $pw      = serverVar('PHP_AUTH_PW');\r
 \r
        if ($member->login($login, $pw) ) {\r
        $pw      = serverVar('PHP_AUTH_PW');\r
 \r
        if ($member->login($login, $pw) ) {\r
-               $manager->notify('LoginSuccess',array('member' => &$member));\r
+               $param = array('member' => &$member);\r
+               $manager->notify('LoginSuccess', $param);\r
                ACTIONLOG::add(INFO, "HTTP authentication successful for $login");\r
        } else {\r
                ACTIONLOG::add(INFO, "HTTP authentication successful for $login");\r
        } else {\r
-               $manager->notify('LoginFailed',array('username' => $login));\r
+               $param = array('username' => $login);\r
+               $manager->notify('LoginFailed', $param);\r
                ACTIONLOG::add(INFO, 'HTTP authentication failed for ' . $login);\r
 \r
                //Since bad credentials, generate an apropriate error page\r
                ACTIONLOG::add(INFO, 'HTTP authentication failed for ' . $login);\r
 \r
                //Since bad credentials, generate an apropriate error page\r
@@ -335,7 +342,8 @@ Backed out for now: See http://forum.nucleuscms.org/viewtopic.php?t=3684 for det
        // remove cookies on logout\r
        setcookie($CONF['CookiePrefix'] . 'user', '', (time() - 2592000), $CONF['CookiePath'], $CONF['CookieDomain'], $CONF['CookieSecure']);\r
        setcookie($CONF['CookiePrefix'] . 'loginkey', '', (time() - 2592000), $CONF['CookiePath'], $CONF['CookieDomain'], $CONF['CookieSecure']);\r
        // remove cookies on logout\r
        setcookie($CONF['CookiePrefix'] . 'user', '', (time() - 2592000), $CONF['CookiePath'], $CONF['CookieDomain'], $CONF['CookieSecure']);\r
        setcookie($CONF['CookiePrefix'] . 'loginkey', '', (time() - 2592000), $CONF['CookiePath'], $CONF['CookieDomain'], $CONF['CookieSecure']);\r
-       $manager->notify('Logout', array('username' => cookieVar($CONF['CookiePrefix'] . 'user') ) );\r
+       $param = array('username' => cookieVar($CONF['CookiePrefix'] . 'user'));\r
+       $manager->notify('Logout', $param);\r
 } elseif (cookieVar($CONF['CookiePrefix'] . 'user') ) {\r
        // Cookie Authentication\r
        $ck=cookieVar($CONF['CookiePrefix'] . 'loginkey');\r
 } elseif (cookieVar($CONF['CookiePrefix'] . 'user') ) {\r
        // Cookie Authentication\r
        $ck=cookieVar($CONF['CookiePrefix'] . 'loginkey');\r
@@ -353,7 +361,8 @@ Backed out for now: See http://forum.nucleuscms.org/viewtopic.php?t=3684 for det
 }\r
 \r
 // login completed\r
 }\r
 \r
 // login completed\r
-$manager->notify('PostAuthentication', array('loggedIn' => $member->isLoggedIn() ) );\r
+$param = array('loggedIn' => $member->isLoggedIn());\r
+$manager->notify('PostAuthentication', $param);\r
 ticketForPlugin();\r
 \r
 // first, let's see if the site is disabled or not. always allow admin area access.\r
 ticketForPlugin();\r
 \r
 // first, let's see if the site is disabled or not. always allow admin area access.\r
@@ -459,14 +468,12 @@ if ($CONF['URLMode'] == 'pathinfo') {
        }\r
 \r
        $parsed = false;\r
        }\r
 \r
        $parsed = false;\r
-       $manager->notify(\r
-               'ParseURL',\r
-               array(\r
-                       'type' => basename(serverVar('SCRIPT_NAME') ), // e.g. item, blog, ...\r
-                       'info' => $virtualpath,\r
-                       'complete' => &$parsed\r
-               )\r
+       $param = array(\r
+               'type'          =>  basename(serverVar('SCRIPT_NAME') ), // e.g. item, blog, ...\r
+               'info'          =>  $virtualpath,\r
+               'complete'      => &$parsed\r
        );\r
        );\r
+       $manager->notify('ParseURL', $param);\r
 \r
        if (!$parsed) {\r
                // default implementation\r
 \r
        if (!$parsed) {\r
                // default implementation\r
@@ -548,13 +555,11 @@ if ($CONF['URLMode'] == 'pathinfo') {
        the values of something like catid or itemid\r
        New in 3.60\r
 */\r
        the values of something like catid or itemid\r
        New in 3.60\r
 */\r
-$manager->notify(\r
-       'PostParseURL',\r
-       array(\r
-               'type' => basename(serverVar('SCRIPT_NAME') ), // e.g. item, blog, ...\r
-               'info' => $virtualpath\r
-       )\r
+$param = array(\r
+       'type' => basename(serverVar('SCRIPT_NAME') ), // e.g. item, blog, ...\r
+       'info' => $virtualpath\r
 );\r
 );\r
+$manager->notify('PostParseURL', $param);\r
 \r
 function include_libs($file,$once=true,$require=true){\r
        global $DIR_LIBS;\r
 \r
 function include_libs($file,$once=true,$require=true){\r
        global $DIR_LIBS;\r
@@ -684,14 +689,12 @@ function sendContentType($contenttype, $pagetype = '', $charset = _CHARSET) {
                        $contenttype = 'text/html';\r
                }\r
 \r
                        $contenttype = 'text/html';\r
                }\r
 \r
-               $manager->notify(\r
-                       'PreSendContentType',\r
-                       array(\r
-                               'contentType' => &$contenttype,\r
-                               'charset' => &$charset,\r
-                               'pageType' => $pagetype\r
-                       )\r
+               $param = array(\r
+                       'contentType'   => &$contenttype,\r
+                       'charset'               => &$charset,\r
+                       'pageType'              =>  $pagetype\r
                );\r
                );\r
+               $manager->notify('PreSendContentType', $param);\r
 \r
                // strip strange characters\r
                $contenttype = preg_replace('|[^a-z0-9-+./]|i', '', $contenttype);\r
 \r
                // strip strange characters\r
                $contenttype = preg_replace('|[^a-z0-9-+./]|i', '', $contenttype);\r
@@ -1549,7 +1552,7 @@ function createBlogidLink($blogid, $params = '') {
        return createLink('blog', array('blogid' => $blogid, 'extra' => $params) );\r
 }\r
 \r
        return createLink('blog', array('blogid' => $blogid, 'extra' => $params) );\r
 }\r
 \r
-function createLink($type, $params) {\r
+function createLink($type, $args) {\r
        global $manager, $CONF;\r
 \r
        $generatedURL = '';\r
        global $manager, $CONF;\r
 \r
        $generatedURL = '';\r
@@ -1559,15 +1562,13 @@ function createLink($type, $params) {
        $created = false;\r
 \r
        if ($usePathInfo) {\r
        $created = false;\r
 \r
        if ($usePathInfo) {\r
-               $manager->notify(\r
-                       'GenerateURL',\r
-                       array(\r
-                               'type' => $type,\r
-                               'params' => $params,\r
-                               'completed' => &$created,\r
-                               'url' => &$url\r
-                       )\r
+               $param = array(\r
+                       'type'          =>  $type,\r
+                       'args'          =>  $args,\r
+                       'completed'     => &$created,\r
+                       'url'           => &$url\r
                );\r
                );\r
+               $manager->notify('GenerateURL', $param);\r
        }\r
 \r
        // if a plugin created the URL, return it\r
        }\r
 \r
        // if a plugin created the URL, return it\r
@@ -1579,58 +1580,58 @@ function createLink($type, $params) {
        switch ($type) {\r
                case 'item':\r
                        if ($usePathInfo) {\r
        switch ($type) {\r
                case 'item':\r
                        if ($usePathInfo) {\r
-                               $url = $CONF['ItemURL'] . '/' . $CONF['ItemKey'] . '/' . $params['itemid'];\r
+                               $url = $CONF['ItemURL'] . '/' . $CONF['ItemKey'] . '/' . $args['itemid'];\r
                        } else {\r
                        } else {\r
-                               $url = $CONF['ItemURL'] . '?itemid=' . $params['itemid'];\r
+                               $url = $CONF['ItemURL'] . '?itemid=' . $args['itemid'];\r
                        }\r
                        break;\r
 \r
                case 'member':\r
                        if ($usePathInfo) {\r
                        }\r
                        break;\r
 \r
                case 'member':\r
                        if ($usePathInfo) {\r
-                               $url = $CONF['MemberURL'] . '/' . $CONF['MemberKey'] . '/' . $params['memberid'];\r
+                               $url = $CONF['MemberURL'] . '/' . $CONF['MemberKey'] . '/' . $args['memberid'];\r
                        } else {\r
                        } else {\r
-                               $url = $CONF['MemberURL'] . '?memberid=' . $params['memberid'];\r
+                               $url = $CONF['MemberURL'] . '?memberid=' . $args['memberid'];\r
                        }\r
                        break;\r
 \r
                case 'category':\r
                        if ($usePathInfo) {\r
                        }\r
                        break;\r
 \r
                case 'category':\r
                        if ($usePathInfo) {\r
-                               $url = $CONF['CategoryURL'] . '/' . $CONF['CategoryKey'] . '/' . $params['catid'];\r
+                               $url = $CONF['CategoryURL'] . '/' . $CONF['CategoryKey'] . '/' . $args['catid'];\r
                        } else {\r
                        } else {\r
-                               $url = $CONF['CategoryURL'] . '?catid=' . $params['catid'];\r
+                               $url = $CONF['CategoryURL'] . '?catid=' . $args['catid'];\r
                        }\r
                        break;\r
 \r
                case 'archivelist':\r
                        }\r
                        break;\r
 \r
                case 'archivelist':\r
-                       if (!$params['blogid']) {\r
-                               $params['blogid'] = $CONF['DefaultBlog'];\r
+                       if (!$args['blogid']) {\r
+                               $args['blogid'] = $CONF['DefaultBlog'];\r
                        }\r
 \r
                        if ($usePathInfo) {\r
                        }\r
 \r
                        if ($usePathInfo) {\r
-                               $url = $CONF['ArchiveListURL'] . '/' . $CONF['ArchivesKey'] . '/' . $params['blogid'];\r
+                               $url = $CONF['ArchiveListURL'] . '/' . $CONF['ArchivesKey'] . '/' . $args['blogid'];\r
                        } else {\r
                        } else {\r
-                               $url = $CONF['ArchiveListURL'] . '?archivelist=' . $params['blogid'];\r
+                               $url = $CONF['ArchiveListURL'] . '?archivelist=' . $args['blogid'];\r
                        }\r
                        break;\r
 \r
                case 'archive':\r
                        if ($usePathInfo) {\r
                        }\r
                        break;\r
 \r
                case 'archive':\r
                        if ($usePathInfo) {\r
-                               $url = $CONF['ArchiveURL'] . '/' . $CONF['ArchiveKey'] . '/'.$params['blogid'].'/' . $params['archive'];\r
+                               $url = $CONF['ArchiveURL'] . '/' . $CONF['ArchiveKey'] . '/'.$args['blogid'].'/' . $args['archive'];\r
                        } else {\r
                        } else {\r
-                               $url = $CONF['ArchiveURL'] . '?blogid='.$params['blogid'].'&amp;archive=' . $params['archive'];\r
+                               $url = $CONF['ArchiveURL'] . '?blogid='.$args['blogid'].'&amp;archive=' . $args['archive'];\r
                        }\r
                        break;\r
 \r
                case 'blog':\r
                        if ($usePathInfo) {\r
                        }\r
                        break;\r
 \r
                case 'blog':\r
                        if ($usePathInfo) {\r
-                               $url = $CONF['BlogURL'] . '/' . $CONF['BlogKey'] . '/' . $params['blogid'];\r
+                               $url = $CONF['BlogURL'] . '/' . $CONF['BlogKey'] . '/' . $args['blogid'];\r
                        } else {\r
                        } else {\r
-                               $url = $CONF['BlogURL'] . '?blogid=' . $params['blogid'];\r
+                               $url = $CONF['BlogURL'] . '?blogid=' . $args['blogid'];\r
                        }\r
                        break;\r
        }\r
 \r
                        }\r
                        break;\r
        }\r
 \r
-       return addLinkParams($url, (isset($params['extra'])? $params['extra'] : null));\r
+       return addLinkParams($url, (isset($args['extra'])? $args['extra'] : null));\r
 }\r
 \r
 function createBlogLink($url, $params) {\r
 }\r
 \r
 function createBlogLink($url, $params) {\r
index a4798b7..dfc0e36 100755 (executable)
@@ -556,7 +556,7 @@ $cp1252_to_xmlent =
                     if ($rebuild_xmlrpcvals)
                     {
                         // build the xmlrpc val out of the data received, and substitute it
                     if ($rebuild_xmlrpcvals)
                     {
                         // build the xmlrpc val out of the data received, and substitute it
-                        $temp =& new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']);
+                        $temp = new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']);
                         // in case we got info about underlying php class, save it
                         // in the object we're rebuilding
                         if (isset($GLOBALS['_xh']['php_class']))
                         // in case we got info about underlying php class, save it
                         // in the object we're rebuilding
                         if (isset($GLOBALS['_xh']['php_class']))
@@ -1119,7 +1119,7 @@ $cp1252_to_xmlent =
             }
             elseif(is_string($msg))
             {
             }
             elseif(is_string($msg))
             {
-                $n =& new xmlrpcmsg('');
+                $n = new xmlrpcmsg('');
                 $n->payload = $msg;
                 $msg = $n;
             }
                 $n->payload = $msg;
                 $msg = $n;
             }
@@ -1345,14 +1345,14 @@ $cp1252_to_xmlent =
             else
             {
                 $this->errstr='Connect error: '.$this->errstr;
             else
             {
                 $this->errstr='Connect error: '.$this->errstr;
-                $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')');
+                $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')');
                 return $r;
             }
 
             if(!fputs($fp, $op, strlen($op)))
             {
                 $this->errstr='Write error';
                 return $r;
             }
 
             if(!fputs($fp, $op, strlen($op)))
             {
                 $this->errstr='Write error';
-                $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr);
+                $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr);
                 return $r;
             }
             else
                 return $r;
             }
             else
@@ -1403,7 +1403,7 @@ $cp1252_to_xmlent =
             if(!function_exists('curl_init'))
             {
                 $this->errstr='CURL unavailable on this install';
             if(!function_exists('curl_init'))
             {
                 $this->errstr='CURL unavailable on this install';
-                $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_curl'], $GLOBALS['xmlrpcstr']['no_curl']);
+                $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_curl'], $GLOBALS['xmlrpcstr']['no_curl']);
                 return $r;
             }
             if($method == 'https')
                 return $r;
             }
             if($method == 'https')
@@ -1412,7 +1412,7 @@ $cp1252_to_xmlent =
                     ((is_string($info) && strpos($info, 'OpenSSL') === null) || (is_array($info) && !isset($info['ssl_version']))))
                 {
                     $this->errstr='SSL unavailable on this install';
                     ((is_string($info) && strpos($info, 'OpenSSL') === null) || (is_array($info) && !isset($info['ssl_version']))))
                 {
                     $this->errstr='SSL unavailable on this install';
-                    $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_ssl'], $GLOBALS['xmlrpcstr']['no_ssl']);
+                    $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_ssl'], $GLOBALS['xmlrpcstr']['no_ssl']);
                     return $r;
                 }
             }
                     return $r;
                 }
             }
@@ -1625,7 +1625,7 @@ $cp1252_to_xmlent =
             if(!$result)
             {
                 $this->errstr='no response';
             if(!$result)
             {
                 $this->errstr='no response';
-                $resp=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['curl_fail'], $GLOBALS['xmlrpcstr']['curl_fail']. ': '. curl_error($curl));
+                $resp= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['curl_fail'], $GLOBALS['xmlrpcstr']['curl_fail']. ': '. curl_error($curl));
                 if(!$keepalive)
                 {
                     curl_close($curl);
                 if(!$keepalive)
                 {
                     curl_close($curl);
@@ -1695,7 +1695,7 @@ $cp1252_to_xmlent =
                         }
                         else
                         {
                         }
                         else
                         {
-                            $result =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['multicall_error'], $GLOBALS['xmlrpcstr']['multicall_error']);
+                            $result = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['multicall_error'], $GLOBALS['xmlrpcstr']['multicall_error']);
                         }
                     }
                 }
                         }
                     }
                 }
@@ -1742,17 +1742,17 @@ $cp1252_to_xmlent =
             $calls = array();
             foreach($msgs as $msg)
             {
             $calls = array();
             foreach($msgs as $msg)
             {
-                $call['methodName'] =& new xmlrpcval($msg->method(),'string');
+                $call['methodName'] = new xmlrpcval($msg->method(),'string');
                 $numParams = $msg->getNumParams();
                 $params = array();
                 for($i = 0; $i < $numParams; $i++)
                 {
                     $params[$i] = $msg->getParam($i);
                 }
                 $numParams = $msg->getNumParams();
                 $params = array();
                 for($i = 0; $i < $numParams; $i++)
                 {
                     $params[$i] = $msg->getParam($i);
                 }
-                $call['params'] =& new xmlrpcval($params, 'array');
-                $calls[] =& new xmlrpcval($call, 'struct');
+                $call['params'] = new xmlrpcval($params, 'array');
+                $calls[] = new xmlrpcval($call, 'struct');
             }
             }
-            $multicall =& new xmlrpcmsg('system.multicall');
+            $multicall = new xmlrpcmsg('system.multicall');
             $multicall->addParam(new xmlrpcval($calls, 'array'));
 
             // Attempt RPC call
             $multicall->addParam(new xmlrpcval($calls, 'array'));
 
             // Attempt RPC call
@@ -1800,7 +1800,7 @@ $cp1252_to_xmlent =
                                 return false;       // Bad value
                             }
                             // Normal return value
                                 return false;       // Bad value
                             }
                             // Normal return value
-                            $response[$i] =& new xmlrpcresp($val[0], 0, '', 'phpvals');
+                            $response[$i] = new xmlrpcresp($val[0], 0, '', 'phpvals');
                             break;
                         case 2:
                             /// @todo remove usage of @: it is apparently quite slow
                             break;
                         case 2:
                             /// @todo remove usage of @: it is apparently quite slow
@@ -1814,7 +1814,7 @@ $cp1252_to_xmlent =
                             {
                                 return false;
                             }
                             {
                                 return false;
                             }
-                            $response[$i] =& new xmlrpcresp(0, $code, $str);
+                            $response[$i] = new xmlrpcresp(0, $code, $str);
                             break;
                         default:
                             return false;
                             break;
                         default:
                             return false;
@@ -1847,7 +1847,7 @@ $cp1252_to_xmlent =
                                 return false;       // Bad value
                             }
                             // Normal return value
                                 return false;       // Bad value
                             }
                             // Normal return value
-                            $response[$i] =& new xmlrpcresp($val->arraymem(0));
+                            $response[$i] = new xmlrpcresp($val->arraymem(0));
                             break;
                         case 'struct':
                             $code = $val->structmem('faultCode');
                             break;
                         case 'struct':
                             $code = $val->structmem('faultCode');
@@ -1860,7 +1860,7 @@ $cp1252_to_xmlent =
                             {
                                 return false;
                             }
                             {
                                 return false;
                             }
-                            $response[$i] =& new xmlrpcresp(0, $code->scalarval(), $str->scalarval());
+                            $response[$i] = new xmlrpcresp(0, $code->scalarval(), $str->scalarval());
                             break;
                         default:
                             return false;
                             break;
                         default:
                             return false;
@@ -2224,7 +2224,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                     else
                     {
                         error_log('XML-RPC: xmlrpcmsg::parseResponse: HTTPS via proxy error, tunnel connection possibly failed');
                     else
                     {
                         error_log('XML-RPC: xmlrpcmsg::parseResponse: HTTPS via proxy error, tunnel connection possibly failed');
-                        $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (HTTPS via proxy error, tunnel connection possibly failed)');
+                        $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (HTTPS via proxy error, tunnel connection possibly failed)');
                         return $r;
                     }
                 }
                         return $r;
                     }
                 }
@@ -2245,7 +2245,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                 {
                     $errstr= substr($data, 0, strpos($data, "\n")-1);
                     error_log('XML-RPC: xmlrpcmsg::parseResponse: HTTP error, got response: ' .$errstr);
                 {
                     $errstr= substr($data, 0, strpos($data, "\n")-1);
                     error_log('XML-RPC: xmlrpcmsg::parseResponse: HTTP error, got response: ' .$errstr);
-                    $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (' . $errstr . ')');
+                    $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (' . $errstr . ')');
                     return $r;
                 }
 
                     return $r;
                 }
 
@@ -2367,7 +2367,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                         if(!$data = decode_chunked($data))
                         {
                             error_log('XML-RPC: xmlrpcmsg::parseResponse: errors occurred when trying to rebuild the chunked data received from server');
                         if(!$data = decode_chunked($data))
                         {
                             error_log('XML-RPC: xmlrpcmsg::parseResponse: errors occurred when trying to rebuild the chunked data received from server');
-                            $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']);
+                            $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']);
                             return $r;
                         }
                     }
                             return $r;
                         }
                     }
@@ -2397,14 +2397,14 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                                 else
                                 {
                                     error_log('XML-RPC: xmlrpcmsg::parseResponse: errors occurred when trying to decode the deflated data received from server');
                                 else
                                 {
                                     error_log('XML-RPC: xmlrpcmsg::parseResponse: errors occurred when trying to decode the deflated data received from server');
-                                    $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']);
+                                    $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']);
                                     return $r;
                                 }
                             }
                             else
                             {
                                 error_log('XML-RPC: xmlrpcmsg::parseResponse: the server sent deflated data. Your php install must have the Zlib extension compiled in to support this.');
                                     return $r;
                                 }
                             }
                             else
                             {
                                 error_log('XML-RPC: xmlrpcmsg::parseResponse: the server sent deflated data. Your php install must have the Zlib extension compiled in to support this.');
-                                $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['cannot_decompress'], $GLOBALS['xmlrpcstr']['cannot_decompress']);
+                                $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['cannot_decompress'], $GLOBALS['xmlrpcstr']['cannot_decompress']);
                                 return $r;
                             }
                         }
                                 return $r;
                             }
                         }
@@ -2436,7 +2436,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
             if($data == '')
             {
                 error_log('XML-RPC: xmlrpcmsg::parseResponse: no response received from server.');
             if($data == '')
             {
                 error_log('XML-RPC: xmlrpcmsg::parseResponse: no response received from server.');
-                $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_data'], $GLOBALS['xmlrpcstr']['no_data']);
+                $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_data'], $GLOBALS['xmlrpcstr']['no_data']);
                 return $r;
             }
 
                 return $r;
             }
 
@@ -2496,7 +2496,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
             // if user wants back raw xml, give it to him
             if ($return_type == 'xml')
             {
             // if user wants back raw xml, give it to him
             if ($return_type == 'xml')
             {
-                $r =& new xmlrpcresp($data, 0, '', 'xml');
+                $r = new xmlrpcresp($data, 0, '', 'xml');
                 $r->hdrs = $GLOBALS['_xh']['headers'];
                 $r->_cookies = $GLOBALS['_xh']['cookies'];
                 $r->raw_data = $raw_data;
                 $r->hdrs = $GLOBALS['_xh']['headers'];
                 $r->_cookies = $GLOBALS['_xh']['cookies'];
                 $r->raw_data = $raw_data;
@@ -2557,7 +2557,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                         xml_get_current_line_number($parser), xml_get_current_column_number($parser));
                 }
                 error_log($errstr);
                         xml_get_current_line_number($parser), xml_get_current_column_number($parser));
                 }
                 error_log($errstr);
-                $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'], $GLOBALS['xmlrpcstr']['invalid_return'].' ('.$errstr.')');
+                $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'], $GLOBALS['xmlrpcstr']['invalid_return'].' ('.$errstr.')');
                 xml_parser_free($parser);
                 if($this->debug)
                 {
                 xml_parser_free($parser);
                 if($this->debug)
                 {
@@ -2577,7 +2577,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                     /// @todo echo something for user?
                 }
 
                     /// @todo echo something for user?
                 }
 
-                $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
+                $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
                 $GLOBALS['xmlrpcstr']['invalid_return'] . ' ' . $GLOBALS['_xh']['isf_reason']);
             }
             // third error check: parsing of the response has somehow gone boink.
                 $GLOBALS['xmlrpcstr']['invalid_return'] . ' ' . $GLOBALS['_xh']['isf_reason']);
             }
             // third error check: parsing of the response has somehow gone boink.
@@ -2587,7 +2587,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                 // something odd has happened
                 // and it's time to generate a client side error
                 // indicating something odd went on
                 // something odd has happened
                 // and it's time to generate a client side error
                 // indicating something odd went on
-                $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
+                $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
                     $GLOBALS['xmlrpcstr']['invalid_return']);
             }
             else
                     $GLOBALS['xmlrpcstr']['invalid_return']);
             }
             else
@@ -2627,11 +2627,11 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                         $errno = -1;
                     }
 
                         $errno = -1;
                     }
 
-                    $r =& new xmlrpcresp(0, $errno, $errstr);
+                    $r = new xmlrpcresp(0, $errno, $errstr);
                 }
                 else
                 {
                 }
                 else
                 {
-                    $r=&new xmlrpcresp($v, 0, '', $return_type);
+                    $r= new xmlrpcresp($v, 0, '', $return_type);
                 }
             }
 
                 }
             }
 
@@ -2747,10 +2747,10 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                 case 2:
                     // we're adding a scalar value to an array here
                     //$ar=$this->me['array'];
                 case 2:
                     // we're adding a scalar value to an array here
                     //$ar=$this->me['array'];
-                    //$ar[]=&new xmlrpcval($val, $type);
+                    //$ar[]= new xmlrpcval($val, $type);
                     //$this->me['array']=$ar;
                     // Faster (?) avoid all the costly array-copy-by-val done here...
                     //$this->me['array']=$ar;
                     // Faster (?) avoid all the costly array-copy-by-val done here...
-                    $this->me['array'][]=&new xmlrpcval($val, $type);
+                    $this->me['array'][]= new xmlrpcval($val, $type);
                     return 1;
                 default:
                     // a scalar, so set the value and remember we're scalar
                     return 1;
                 default:
                     // a scalar, so set the value and remember we're scalar
@@ -3296,20 +3296,20 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
         {
             case 'string':
                 if (in_array('auto_dates', $options) && preg_match('/^[0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $php_val))
         {
             case 'string':
                 if (in_array('auto_dates', $options) && preg_match('/^[0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $php_val))
-                    $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcDateTime']);
+                    $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcDateTime']);
                 else
                 else
-                    $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcString']);
+                    $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcString']);
                 break;
             case 'integer':
                 break;
             case 'integer':
-                $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcInt']);
+                $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcInt']);
                 break;
             case 'double':
                 break;
             case 'double':
-                $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcDouble']);
+                $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcDouble']);
                 break;
                 // <G_Giunta_2001-02-29>
                 // Add support for encoding/decoding of booleans, since they are supported in PHP
             case 'boolean':
                 break;
                 // <G_Giunta_2001-02-29>
                 // Add support for encoding/decoding of booleans, since they are supported in PHP
             case 'boolean':
-                $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcBoolean']);
+                $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcBoolean']);
                 break;
                 // </G_Giunta_2001-02-29>
             case 'array':
                 break;
                 // </G_Giunta_2001-02-29>
             case 'array':
@@ -3332,11 +3332,11 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                 }
                 if($ko)
                 {
                 }
                 if($ko)
                 {
-                    $xmlrpc_val =& new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']);
+                    $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']);
                 }
                 else
                 {
                 }
                 else
                 {
-                    $xmlrpc_val =& new xmlrpcval($arr, $GLOBALS['xmlrpcArray']);
+                    $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcArray']);
                 }
                 break;
             case 'object':
                 }
                 break;
             case 'object':
@@ -3351,7 +3351,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                     {
                         $arr[$k] = php_xmlrpc_encode($v, $options);
                     }
                     {
                         $arr[$k] = php_xmlrpc_encode($v, $options);
                     }
-                    $xmlrpc_val =& new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']);
+                    $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']);
                     if (in_array('encode_php_objs', $options))
                     {
                         // let's save original class name into xmlrpcval:
                     if (in_array('encode_php_objs', $options))
                     {
                         // let's save original class name into xmlrpcval:
@@ -3363,32 +3363,32 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
             case 'NULL':
                 if (in_array('extension_api', $options))
                 {
             case 'NULL':
                 if (in_array('extension_api', $options))
                 {
-                    $xmlrpc_val =& new xmlrpcval('', $GLOBALS['xmlrpcString']);
+                    $xmlrpc_val = new xmlrpcval('', $GLOBALS['xmlrpcString']);
                 }
                 if (in_array('null_extension', $options))
                 {
                 }
                 if (in_array('null_extension', $options))
                 {
-                    $xmlrpc_val =& new xmlrpcval('', $GLOBALS['xmlrpcNull']);
+                    $xmlrpc_val = new xmlrpcval('', $GLOBALS['xmlrpcNull']);
                 }
                 else
                 {
                 }
                 else
                 {
-                    $xmlrpc_val =& new xmlrpcval();
+                    $xmlrpc_val = new xmlrpcval();
                 }
                 break;
             case 'resource':
                 if (in_array('extension_api', $options))
                 {
                 }
                 break;
             case 'resource':
                 if (in_array('extension_api', $options))
                 {
-                    $xmlrpc_val =& new xmlrpcval((int)$php_val, $GLOBALS['xmlrpcInt']);
+                    $xmlrpc_val = new xmlrpcval((int)$php_val, $GLOBALS['xmlrpcInt']);
                 }
                 else
                 {
                 }
                 else
                 {
-                    $xmlrpc_val =& new xmlrpcval();
+                    $xmlrpc_val = new xmlrpcval();
                 }
             // catch "user function", "unknown type"
             default:
                 // giancarlo pinerolo <ping@alt.it>
                 // it has to return
                 // an empty object in case, not a boolean.
                 }
             // catch "user function", "unknown type"
             default:
                 // giancarlo pinerolo <ping@alt.it>
                 // it has to return
                 // an empty object in case, not a boolean.
-                $xmlrpc_val =& new xmlrpcval();
+                $xmlrpc_val = new xmlrpcval();
                 break;
             }
             return $xmlrpc_val;
                 break;
             }
             return $xmlrpc_val;
@@ -3443,15 +3443,15 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
                 {
                     $vc = $v->structmem('faultCode');
                     $vs = $v->structmem('faultString');
                 {
                     $vc = $v->structmem('faultCode');
                     $vs = $v->structmem('faultString');
-                    $r =& new xmlrpcresp(0, $vc->scalarval(), $vs->scalarval());
+                    $r = new xmlrpcresp(0, $vc->scalarval(), $vs->scalarval());
                 }
                 else
                 {
                 }
                 else
                 {
-                    $r =& new xmlrpcresp($v);
+                    $r = new xmlrpcresp($v);
                 }
                 return $r;
             case 'methodcall':
                 }
                 return $r;
             case 'methodcall':
-                $m =& new xmlrpcmsg($GLOBALS['_xh']['method']);
+                $m = new xmlrpcmsg($GLOBALS['_xh']['method']);
                 for($i=0; $i < count($GLOBALS['_xh']['params']); $i++)
                 {
                     $m->addParam($GLOBALS['_xh']['params'][$i]);
                 for($i=0; $i < count($GLOBALS['_xh']['params']); $i++)
                 {
                     $m->addParam($GLOBALS['_xh']['params'][$i]);
index 171e911..d7c0442 100755 (executable)
                $outAr=array();
                foreach($server->dmap as $key => $val)
                {
                $outAr=array();
                foreach($server->dmap as $key => $val)
                {
-                       $outAr[]=&new xmlrpcval($key, 'string');
+                       $outAr[]= new xmlrpcval($key, 'string');
                }
                if($server->allow_system_funcs)
                {
                        foreach($GLOBALS['_xmlrpcs_dmap'] as $key => $val)
                        {
                }
                if($server->allow_system_funcs)
                {
                        foreach($GLOBALS['_xmlrpcs_dmap'] as $key => $val)
                        {
-                               $outAr[]=&new xmlrpcval($key, 'string');
+                               $outAr[]= new xmlrpcval($key, 'string');
                        }
                }
                return new xmlrpcresp(new xmlrpcval($outAr, 'array'));
                        }
                }
                return new xmlrpcresp(new xmlrpcval($outAr, 'array'));
                                        $cursig=array();
                                        foreach($inSig as $sig)
                                        {
                                        $cursig=array();
                                        foreach($inSig as $sig)
                                        {
-                                               $cursig[]=&new xmlrpcval($sig, 'string');
+                                               $cursig[]= new xmlrpcval($sig, 'string');
                                        }
                                        }
-                                       $sigs[]=&new xmlrpcval($cursig, 'array');
+                                       $sigs[]= new xmlrpcval($cursig, 'array');
                                }
                                }
-                               $r=&new xmlrpcresp(new xmlrpcval($sigs, 'array'));
+                               $r= new xmlrpcresp(new xmlrpcval($sigs, 'array'));
                        }
                        else
                        {
                                // NB: according to the official docs, we should be returning a
                                // "none-array" here, which means not-an-array
                        }
                        else
                        {
                                // NB: according to the official docs, we should be returning a
                                // "none-array" here, which means not-an-array
-                               $r=&new xmlrpcresp(new xmlrpcval('undef', 'string'));
+                               $r= new xmlrpcresp(new xmlrpcval('undef', 'string'));
                        }
                }
                else
                {
                        }
                }
                else
                {
-                       $r=&new xmlrpcresp(0,$GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']);
+                       $r= new xmlrpcresp(0,$GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']);
                }
                return $r;
        }
                }
                return $r;
        }
                {
                        if(isset($dmap[$methName]['docstring']))
                        {
                {
                        if(isset($dmap[$methName]['docstring']))
                        {
-                               $r=&new xmlrpcresp(new xmlrpcval($dmap[$methName]['docstring']), 'string');
+                               $r= new xmlrpcresp(new xmlrpcval($dmap[$methName]['docstring']), 'string');
                        }
                        else
                        {
                        }
                        else
                        {
-                               $r=&new xmlrpcresp(new xmlrpcval('', 'string'));
+                               $r= new xmlrpcresp(new xmlrpcval('', 'string'));
                        }
                }
                else
                {
                        }
                }
                else
                {
-                       $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']);
+                       $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']);
                }
                return $r;
        }
                }
                return $r;
        }
                        $str = $err->faultString();
                }
                $struct = array();
                        $str = $err->faultString();
                }
                $struct = array();
-               $struct['faultCode'] =& new xmlrpcval($code, 'int');
-               $struct['faultString'] =& new xmlrpcval($str, 'string');
+               $struct['faultCode'] = new xmlrpcval($code, 'int');
+               $struct['faultString'] = new xmlrpcval($str, 'string');
                return new xmlrpcval($struct, 'struct');
        }
 
                return new xmlrpcval($struct, 'struct');
        }
 
                }
                $numParams = $params->arraysize();
 
                }
                $numParams = $params->arraysize();
 
-               $msg =& new xmlrpcmsg($methName->scalarval());
+               $msg = new xmlrpcmsg($methName->scalarval());
                for($i = 0; $i < $numParams; $i++)
                {
                        if(!$msg->addParam($params->arraymem($i)))
                for($i = 0; $i < $numParams; $i++)
                {
                        if(!$msg->addParam($params->arraymem($i)))
                                                }
                                                else
                                                {
                                                }
                                                else
                                                {
-                                                       $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_decompress_fail'], $GLOBALS['xmlrpcstr']['server_decompress_fail']);
+                                                       $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_decompress_fail'], $GLOBALS['xmlrpcstr']['server_decompress_fail']);
                                                        return $r;
                                                }
                                        }
                                        else
                                        {
                                                //error_log('The server sent deflated data. Your php install must have the Zlib extension compiled in to support this.');
                                                        return $r;
                                                }
                                        }
                                        else
                                        {
                                                //error_log('The server sent deflated data. Your php install must have the Zlib extension compiled in to support this.');
-                                               $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_cannot_decompress'], $GLOBALS['xmlrpcstr']['server_cannot_decompress']);
+                                               $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_cannot_decompress'], $GLOBALS['xmlrpcstr']['server_cannot_decompress']);
                                                return $r;
                                        }
                                }
                                                return $r;
                                        }
                                }
                        if(!xml_parse($parser, $data, 1))
                        {
                                // return XML error as a faultCode
                        if(!xml_parse($parser, $data, 1))
                        {
                                // return XML error as a faultCode
-                               $r=&new xmlrpcresp(0,
+                               $r= new xmlrpcresp(0,
                                $GLOBALS['xmlrpcerrxml']+xml_get_error_code($parser),
                                sprintf('XML error: %s at line %d, column %d',
                                        xml_error_string(xml_get_error_code($parser)),
                                $GLOBALS['xmlrpcerrxml']+xml_get_error_code($parser),
                                sprintf('XML error: %s at line %d, column %d',
                                        xml_error_string(xml_get_error_code($parser)),
                        elseif ($GLOBALS['_xh']['isf'])
                        {
                                xml_parser_free($parser);
                        elseif ($GLOBALS['_xh']['isf'])
                        {
                                xml_parser_free($parser);
-                               $r=&new xmlrpcresp(0,
+                               $r= new xmlrpcresp(0,
                                        $GLOBALS['xmlrpcerr']['invalid_request'],
                                        $GLOBALS['xmlrpcstr']['invalid_request'] . ' ' . $GLOBALS['_xh']['isf_reason']);
                        }
                                        $GLOBALS['xmlrpcerr']['invalid_request'],
                                        $GLOBALS['xmlrpcstr']['invalid_request'] . ' ' . $GLOBALS['_xh']['isf_reason']);
                        }
                                else
                                {
                                        // build an xmlrpcmsg object with data parsed from xml
                                else
                                {
                                        // build an xmlrpcmsg object with data parsed from xml
-                                       $m=&new xmlrpcmsg($GLOBALS['_xh']['method']);
+                                       $m= new xmlrpcmsg($GLOBALS['_xh']['method']);
                                        // now add parameters in
                                        for($i=0; $i<count($GLOBALS['_xh']['params']); $i++)
                                        {
                                        // now add parameters in
                                        for($i=0; $i<count($GLOBALS['_xh']['params']); $i++)
                                        {
                                        error_log("XML-RPC: xmlrpc_server::execute: function $func registered as method handler does not return an xmlrpcresp object");
                                        if (is_a($r, 'xmlrpcval'))
                                        {
                                        error_log("XML-RPC: xmlrpc_server::execute: function $func registered as method handler does not return an xmlrpcresp object");
                                        if (is_a($r, 'xmlrpcval'))
                                        {
-                                               $r =& new xmlrpcresp($r);
+                                               $r = new xmlrpcresp($r);
                                        }
                                        else
                                        {
                                        }
                                        else
                                        {
-                                               $r =& new xmlrpcresp(
+                                               $r = new xmlrpcresp(
                                                        0,
                                                        $GLOBALS['xmlrpcerr']['server_error'],
                                                        $GLOBALS['xmlrpcstr']['server_error'] . ": function does not return xmlrpcresp object"
                                                        0,
                                                        $GLOBALS['xmlrpcerr']['server_error'],
                                                        $GLOBALS['xmlrpcstr']['server_error'] . ": function does not return xmlrpcresp object"
                                        // 3rd API convention for method-handling functions: EPI-style
                                        if ($this->functions_parameters_type == 'epivals')
                                        {
                                        // 3rd API convention for method-handling functions: EPI-style
                                        if ($this->functions_parameters_type == 'epivals')
                                        {
-                                               $r = call_user_func_array($func, array($methName, $params, $this->user_data));
+                                               $data = array($methName, $params, $this->user_data);
+                                               $r = call_user_func_array($func, $data);
                                                // mimic EPI behaviour: if we get an array that looks like an error, make it
                                                // an eror response
                                                if (is_array($r) && array_key_exists('faultCode', $r) && array_key_exists('faultString', $r))
                                                {
                                                // mimic EPI behaviour: if we get an array that looks like an error, make it
                                                // an eror response
                                   &n