Monday, October 3, 2016 5:00AM to 11:00AM (UTC) Schedouled down time to change site domain
  • R/O
  • R/O (HTTP)
  • R/W (SSH)
  • R/W (HTTPS)

nucleus-jp-ancient: Commit

Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用


Commit MetaInfo

Revision3bdf207ee5bf3199219f0f12beed8a3c1b4548f8 (tree)
Time2012-09-22 13:42:19
Authorsakamocchi <o-takashi@saka...>
Commitersakamocchi

Log Message

FIX: PHP5/MySQL5における文法違反コードの修正

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."

Change Summary

Incremental Difference

--- a/action.php
+++ b/action.php
@@ -27,7 +27,7 @@ require('./config.php');
2727 include_libs('ACTION.php',true,false);
2828
2929 $action = requestVar('action');
30-$a =& new ACTION();
30+$a = new ACTION();
3131 $errorInfo = $a->doAction($action);
3232
3333 if ($errorInfo) {
--- a/createaccount.php
+++ b/createaccount.php
@@ -75,9 +75,17 @@ if ($CONF['AllowMemberCreate']==1) {
7575 <br />
7676 <?php
7777 // add extra fields from Plugins, like NP_Profile
78- $manager->notify('RegistrationFormExtraFields', array('type' => 'createaccount.php', 'prelabel' => '', 'postlabel' => '<br />', 'prefield' => '', 'postfield' => '<br /><br />'));
78+ $param = array(
79+ 'type' => 'createaccount.php',
80+ 'prelabel' => '',
81+ 'postlabel' => '<br />',
82+ 'prefield' => '',
83+ 'postfield' => '<br /><br />'
84+ );
85+ $manager->notify('RegistrationFormExtraFields', $param);
7986 // add a Captcha challenge or something else
80- $manager->notify('FormExtra', array('type' => 'membermailform-notloggedin'));
87+ $param = array('type' => 'membermailform-notloggedin');
88+ $manager->notify('FormExtra', $param);
8189 ?>
8290 <br />
8391 <br />
--- a/install/install.sql
+++ b/install/install.sql
@@ -1,7 +1,7 @@
11 CREATE TABLE `nucleus_actionlog` (
22 `timestamp` datetime NOT NULL default '0000-00-00 00:00:00',
33 `message` varchar(255) NOT NULL default ''
4-) TYPE=MyISAM;
4+) ENGINE=MyISAM;
55
66 CREATE TABLE `nucleus_activation` (
77 `vkey` varchar(40) NOT NULL default '',
@@ -10,13 +10,13 @@ CREATE TABLE `nucleus_activation` (
1010 `vtype` varchar(15) NOT NULL default '',
1111 `vextra` varchar(128) NOT NULL default '',
1212 PRIMARY KEY (`vkey`)
13-) TYPE=MyISAM;
13+) ENGINE=MyISAM;
1414
1515 CREATE TABLE `nucleus_ban` (
1616 `iprange` varchar(15) NOT NULL default '',
1717 `reason` varchar(255) NOT NULL default '',
1818 `blogid` int(11) NOT NULL default '0'
19-) TYPE=MyISAM;
19+) ENGINE=MyISAM;
2020
2121 CREATE TABLE `nucleus_blog` (
2222 `bnumber` int(11) NOT NULL auto_increment,
@@ -40,7 +40,7 @@ CREATE TABLE `nucleus_blog` (
4040 `bfuturepost` tinyint(2) NOT NULL default '0',
4141 PRIMARY KEY (`bnumber`),
4242 UNIQUE KEY `bshortname` (`bshortname`)
43-) TYPE=MyISAM;
43+) ENGINE=MyISAM;
4444
4545 INSERT INTO `nucleus_blog` VALUES (
4646 1, /* bnumber */
@@ -70,7 +70,7 @@ CREATE TABLE `nucleus_category` (
7070 `cname` varchar(200) default NULL,
7171 `cdesc` varchar(200) default NULL,
7272 PRIMARY KEY (`catid`)
73-) TYPE=MyISAM;
73+) ENGINE=MyISAM;
7474
7575 INSERT INTO `nucleus_category` VALUES (1, 1, 'General', 'Items that do not fit in other categories');
7676
@@ -90,13 +90,13 @@ CREATE TABLE `nucleus_comment` (
9090 KEY `citem` (`citem`),
9191 FULLTEXT KEY `cbody` (`cbody`),
9292 INDEX `cblog` (`cblog`)
93-) TYPE=MyISAM;
93+) ENGINE=MyISAM;
9494
9595 CREATE TABLE `nucleus_config` (
9696 `name` varchar(20) NOT NULL default '',
9797 `value` varchar(128) default NULL,
9898 PRIMARY KEY (`name`)
99-) TYPE=MyISAM;
99+) ENGINE=MyISAM;
100100
101101 INSERT INTO `nucleus_config` (`name`, `value`) VALUES
102102 ('DefaultBlog', '1'),
@@ -155,12 +155,12 @@ CREATE TABLE `nucleus_item` (
155155 INDEX `idraft` (`idraft`),
156156 INDEX `icat` (`icat`),
157157 FULLTEXT KEY `ibody` (`ibody`, `ititle`, `imore`)
158-) TYPE=MyISAM PACK_KEYS=0;
158+) ENGINE=MyISAM PACK_KEYS=0;
159159
160160 CREATE TABLE `nucleus_karma` (
161161 `itemid` int(11) NOT NULL default '0',
162162 `ip` char(15) NOT NULL default ''
163-) TYPE=MyISAM;
163+) ENGINE=MyISAM;
164164
165165 CREATE TABLE `nucleus_member` (
166166 `mnumber` int(11) NOT NULL auto_increment,
@@ -177,7 +177,7 @@ CREATE TABLE `nucleus_member` (
177177 `mautosave` tinyint(2) NOT NULL default '1',
178178 PRIMARY KEY (`mnumber`),
179179 UNIQUE KEY `mname` (`mname`)
180-) TYPE=MyISAM;
180+) ENGINE=MyISAM;
181181
182182 INSERT INTO `nucleus_member` VALUES (
183183 1, /* mnumber */
@@ -200,20 +200,20 @@ CREATE TABLE `nucleus_plugin` (
200200 `porder` int(11) NOT NULL default '0',
201201 PRIMARY KEY (`pid`),
202202 KEY `porder` (`porder`)
203-) TYPE=MyISAM;
203+) ENGINE=MyISAM;
204204
205205 CREATE TABLE `nucleus_plugin_event` (
206206 `pid` int(11) NOT NULL default '0',
207207 `event` varchar(40) default NULL,
208208 KEY `pid` (`pid`)
209-) TYPE=MyISAM;
209+) ENGINE=MyISAM;
210210
211211 CREATE TABLE `nucleus_plugin_option` (
212212 `ovalue` text NOT NULL,
213213 `oid` int(11) NOT NULL auto_increment,
214214 `ocontextid` int(11) NOT NULL default '0',
215215 PRIMARY KEY (`oid`, `ocontextid`)
216-) TYPE=MyISAM;
216+) ENGINE=MyISAM;
217217
218218 CREATE TABLE `nucleus_plugin_option_desc` (
219219 `oid` int(11) NOT NULL auto_increment,
@@ -226,14 +226,14 @@ CREATE TABLE `nucleus_plugin_option_desc` (
226226 `oextra` text,
227227 PRIMARY KEY (`opid`, `oname`, `ocontext`),
228228 UNIQUE KEY `oid` (`oid`)
229-) TYPE=MyISAM;
229+) ENGINE=MyISAM;
230230
231231 CREATE TABLE `nucleus_skin` (
232232 `sdesc` int(11) NOT NULL default '0',
233233 `stype` varchar(20) NOT NULL default '',
234234 `scontent` text NOT NULL,
235235 PRIMARY KEY (`sdesc`,`stype`)
236-) TYPE=MyISAM;
236+) ENGINE=MyISAM;
237237
238238 CREATE TABLE `nucleus_skin_desc` (
239239 `sdnumber` int(11) NOT NULL auto_increment,
@@ -244,14 +244,14 @@ CREATE TABLE `nucleus_skin_desc` (
244244 `sdincpref` varchar(50) NOT NULL default '',
245245 PRIMARY KEY (`sdnumber`),
246246 UNIQUE KEY `sdname` (`sdname`)
247-) TYPE=MyISAM;
247+) ENGINE=MyISAM;
248248
249249 CREATE TABLE `nucleus_team` (
250250 `tmember` int(11) NOT NULL default '0',
251251 `tblog` int(11) NOT NULL default '0',
252252 `tadmin` tinyint(2) NOT NULL default '0',
253253 PRIMARY KEY (`tmember`, `tblog`)
254-) TYPE=MyISAM;
254+) ENGINE=MyISAM;
255255
256256 INSERT INTO `nucleus_team` VALUES (1, 1, 1);
257257
@@ -260,7 +260,7 @@ CREATE TABLE `nucleus_template` (
260260 `tpartname` varchar(64) NOT NULL default '',
261261 `tcontent` text NOT NULL,
262262 PRIMARY KEY (`tdesc`, `tpartname`)
263-) TYPE=MyISAM;
263+) ENGINE=MyISAM;
264264
265265 CREATE TABLE `nucleus_template_desc` (
266266 `tdnumber` int(11) NOT NULL auto_increment,
@@ -268,11 +268,11 @@ CREATE TABLE `nucleus_template_desc` (
268268 `tddesc` varchar(200) default NULL,
269269 PRIMARY KEY (`tdnumber`),
270270 UNIQUE KEY `tdname` (`tdname`)
271-) TYPE=MyISAM;
271+) ENGINE=MyISAM;
272272
273273 CREATE TABLE `nucleus_tickets` (
274274 `ticket` varchar(40) NOT NULL default '',
275275 `ctime` datetime NOT NULL default '0000-00-00 00:00:00',
276276 `member` int(11) NOT NULL default '0',
277277 PRIMARY KEY (`ticket`,`member`)
278-) TYPE=MyISAM;
278+) ENGINE=MyISAM;
--- a/nucleus/bookmarklet.php
+++ b/nucleus/bookmarklet.php
@@ -293,7 +293,8 @@ function bm_doEditForm() {
293293 $item =& $manager->getItem($itemid, 1, 1);
294294 $blog =& $manager->getBlog(getBlogIDFromItemID($itemid) );
295295
296- $manager->notify('PrepareItemForEdit', array('item' => &$item) );
296+ $param = array('item' => &$item);
297+ $manager->notify('PrepareItemForEdit', $param);
297298
298299 if ($blog->convertBreaks() ) {
299300 $item['body'] = removeBreaks($item['body']);
--- a/nucleus/libs/ACTION.php
+++ b/nucleus/libs/ACTION.php
@@ -232,7 +232,11 @@ class ACTION
232232 // let plugins do verification (any plugin which thinks the comment is invalid
233233 // can change 'error' to something other than '')
234234 $result = '';
235- $manager->notify('ValidateForm', array('type' => 'membermail', 'error' => &$result) );
235+ $param = array(
236+ 'type' => 'membermail',
237+ 'error' => &$result
238+ );
239+ $manager->notify('ValidateForm', $param);
236240
237241 return $result;
238242
@@ -253,9 +257,12 @@ class ACTION
253257
254258 // evaluate content from FormExtra
255259 $result = 1;
256- $data = array('type' => 'membermail', 'error' => &$result);
257- $manager->notify('ValidateForm', &$data);
258-
260+ $param = array(
261+ 'type' => 'membermail',
262+ 'error' => &$result
263+ );
264+ $manager->notify('ValidateForm', $param);
265+
259266 if ( $result != 1 )
260267 {
261268 return $result;
@@ -280,8 +287,9 @@ class ACTION
280287 $newmem = new MEMBER();
281288 $newmem->readFromName($name);
282289 $newmem->sendActivationLink('register');
283-
284- $manager->notify('PostRegister', array('member' => &$newmem) );
290+
291+ $param = array('member' => &$newmem);
292+ $manager->notify('PostRegister', $param);
285293
286294 if ( postVar('desturl') )
287295 {
--- a/nucleus/libs/ACTIONLOG.php
+++ b/nucleus/libs/ACTIONLOG.php
@@ -53,8 +53,9 @@ class ACTIONLOG {
5353 global $manager;
5454
5555 $query = 'DELETE FROM ' . sql_table('actionlog');
56-
57- $manager->notify('ActionLogCleared',array());
56+
57+ $param = array();
58+ $manager->notify('ActionLogCleared', $param);
5859
5960 return sql_query($query);
6061 }
--- a/nucleus/libs/ACTIONS.php
+++ b/nucleus/libs/ACTIONS.php
@@ -185,7 +185,7 @@ class ACTIONS extends BaseActions {
185185 $params = func_get_args();
186186 array_shift($params);
187187
188- return call_user_func_array(array(&$plugin, 'doIf'), $params);
188+ return call_user_func_array(array($plugin, 'doIf'), $params);
189189 }
190190
191191 /**
@@ -397,7 +397,11 @@ class ACTIONS extends BaseActions {
397397 */
398398 function _preBlogContent($type, &$blog) {
399399 global $manager;
400- $manager->notify('PreBlogContent',array('blog' => &$blog, 'type' => $type));
400+ $param = array(
401+ 'blog' => &$blog,
402+ 'type' => $type
403+ );
404+ $manager->notify('PreBlogContent', $param);
401405 }
402406
403407 /**
@@ -405,7 +409,11 @@ class ACTIONS extends BaseActions {
405409 */
406410 function _postBlogContent($type, &$blog) {
407411 global $manager;
408- $manager->notify('PostBlogContent',array('blog' => &$blog, 'type' => $type));
412+ $param = array(
413+ 'blog' => &$blog,
414+ 'type' => $type
415+ );
416+ $manager->notify('PostBlogContent', $param);
409417 }
410418
411419 /**
@@ -596,7 +604,8 @@ class ACTIONS extends BaseActions {
596604 function parse_callback($eventName, $type)
597605 {
598606 global $manager;
599- $manager->notify($eventName, array('type' => $type));
607+ $param = array('type' => $type);
608+ $manager->notify($eventName, $param);
600609 }
601610
602611 /**
@@ -733,14 +742,14 @@ class ACTIONS extends BaseActions {
733742 $template =& $manager->getTemplate($template);
734743
735744 // create parser object & action handler
736- $actions =& new ITEMACTIONS($blog);
737- $parser =& new PARSER($actions->getDefinedActions(),$actions);
745+ $actions = new ITEMACTIONS($blog);
746+ $parser = new PARSER($actions->getDefinedActions(),$actions);
738747 $actions->setTemplate($template);
739748 $actions->setParser($parser);
740749 $item = ITEM::getitem($itemid, 0, 0);
741750 $actions->setCurrentItem($item);
742751
743- $comments =& new COMMENTS($itemid);
752+ $comments = new COMMENTS($itemid);
744753 $comments->setItemActions($actions);
745754 $comments->showComments($template, -1, 1, $highlight); // shows ALL comments
746755 }
@@ -1175,7 +1184,7 @@ class ACTIONS extends BaseActions {
11751184 // add skin type on front
11761185 array_unshift($params, $this->skintype);
11771186
1178- call_user_func_array(array(&$plugin,'doSkinVar'), $params);
1187+ call_user_func_array(array($plugin,'doSkinVar'), $params);
11791188 }
11801189
11811190 /**
--- a/nucleus/libs/ADMIN.php
+++ b/nucleus/libs/ADMIN.php
@@ -124,7 +124,7 @@ class ADMIN {
124124 }
125125
126126 if (method_exists($this, $methodName))
127- call_user_func(array(&$this, $methodName));
127+ call_user_func(array($this, $methodName));
128128 else
129129 $this->error(_BADACTION . htmlspecialchars(" ($action)"));
130130
@@ -360,7 +360,7 @@ class ADMIN {
360360 $template['now'] = $blog->getCorrectTime(time());
361361
362362 $manager->loadClass("ENCAPSULATE");
363- $navList =& new NAVLIST('itemlist', $start, $amount, 0, 1000, $blogid, $search, 0);
363+ $navList = new NAVLIST('itemlist', $start, $amount, 0, 1000, $blogid, $search, 0);
364364 $navList->showBatchList('item',$query,'table',$template);
365365
366366
@@ -922,7 +922,7 @@ class ADMIN {
922922 $template['now'] = time();
923923
924924 $manager->loadClass("ENCAPSULATE");
925- $navList =& new NAVLIST('browseownitems', $start, $amount, 0, 1000, /*$blogid*/ 0, $search, 0);
925+ $navList = new NAVLIST('browseownitems', $start, $amount, 0, 1000, /*$blogid*/ 0, $search, 0);
926926 $navList->showBatchList('item',$query,'table',$template);
927927
928928 $this->pagefoot();
@@ -978,7 +978,7 @@ class ADMIN {
978978 $template['canAddBan'] = $member->blogAdminRights(getBlogIDFromItemID($itemid));
979979
980980 $manager->loadClass("ENCAPSULATE");
981- $navList =& new NAVLIST('itemcommentlist', $start, $amount, 0, 1000, 0, $search, $itemid);
981+ $navList = new NAVLIST('itemcommentlist', $start, $amount, 0, 1000, 0, $search, $itemid);
982982 $navList->showBatchList('comment',$query,'table',$template,_NOCOMMENTS);
983983
984984 $this->pagefoot();
@@ -1025,7 +1025,7 @@ class ADMIN {
10251025 $template['canAddBan'] = 0; // doesn't make sense to allow banning yourself
10261026
10271027 $manager->loadClass("ENCAPSULATE");
1028- $navList =& new NAVLIST('browseowncomments', $start, $amount, 0, 1000, 0, $search, 0);
1028+ $navList = new NAVLIST('browseowncomments', $start, $amount, 0, 1000, 0, $search, 0);
10291029 $navList->showBatchList('comment',$query,'table',$template,_NOCOMMENTS_YOUR);
10301030
10311031 $this->pagefoot();
@@ -1085,7 +1085,7 @@ class ADMIN {
10851085 $template['canAddBan'] = $member->blogAdminRights($blogid);
10861086
10871087 $manager->loadClass("ENCAPSULATE");
1088- $navList =& new NAVLIST('blogcommentlist', $start, $amount, 0, 1000, $blogid, $search, 0);
1088+ $navList = new NAVLIST('blogcommentlist', $start, $amount, 0, 1000, $blogid, $search, 0);
10891089 $navList->showBatchList('comment',$query,'table',$template, _NOCOMMENTS_BLOG);
10901090
10911091 $this->pagefoot();
@@ -1109,7 +1109,7 @@ class ADMIN {
11091109 $this->pagehead();
11101110
11111111 // generate the add-item form
1112- $formfactory =& new PAGEFACTORY($blogid);
1112+ $formfactory = new PAGEFACTORY($blogid);
11131113 $formfactory->createAddForm('admin');
11141114
11151115 $this->pagefoot();
@@ -1129,7 +1129,8 @@ class ADMIN {
11291129 $item =& $manager->getItem($itemid,1,1);
11301130 $blog =& $manager->getBlog(getBlogIDFromItemID($itemid));
11311131
1132- $manager->notify('PrepareItemForEdit', array('item' => &$item));
1132+ $param = array('item' => &$item);
1133+ $manager->notify('PrepareItemForEdit', $param);
11331134
11341135 if ($blog->convertBreaks()) {
11351136 $item['body'] = removeBreaks($item['body']);
@@ -1138,7 +1139,7 @@ class ADMIN {
11381139
11391140 // form to edit blog items
11401141 $this->pagehead();
1141- $formfactory =& new PAGEFACTORY($blog->getID());
1142+ $formfactory = new PAGEFACTORY($blog->getID());
11421143 $formfactory->createEditForm('admin',$item);
11431144 $this->pagefoot();
11441145 }
@@ -1449,7 +1450,7 @@ class ADMIN {
14491450 $this->action_categoryedit($result['catid'], $blogid, $distURI);
14501451 } else {
14511452 $methodName = 'action_itemList';
1452- call_user_func(array(&$this, $methodName), $blogid);
1453+ call_user_func(array($this, $methodName), $blogid);
14531454 }
14541455 }
14551456
@@ -1465,7 +1466,8 @@ class ADMIN {
14651466
14661467 $comment = COMMENT::getComment($commentid);
14671468
1468- $manager->notify('PrepareCommentForEdit',array('comment' => &$comment));
1469+ $param = array('comment' => &$comment);
1470+ $manager->notify('PrepareCommentForEdit', $param);
14691471
14701472 // change <br /> to \n
14711473 $comment['body'] = str_replace('<br />','',$comment['body']);
@@ -1564,7 +1566,8 @@ class ADMIN {
15641566 $body = COMMENT::prepareBody($body);
15651567
15661568 // call plugins
1567- $manager->notify('PreUpdateComment',array('body' => &$body));
1569+ $param = array('body' => &$body);
1570+ $manager->notify('PreUpdateComment', $param);
15681571
15691572 $query = 'UPDATE '.sql_table('comment')
15701573 . " SET cmail = '" . sql_real_escape_string($url) . "', cemail = '" . sql_real_escape_string($email) . "', cbody = '" . sql_real_escape_string($body) . "'"
@@ -1660,13 +1663,15 @@ class ADMIN {
16601663 if (!$member->canAlterComment($commentid))
16611664 return _ERROR_DISALLOWED;
16621665
1663- $manager->notify('PreDeleteComment', array('commentid' => $commentid));
1666+ $param =array('commentid' => $commentid);
1667+ $manager->notify('PreDeleteComment', $param);
16641668
16651669 // delete the comments associated with the item
16661670 $query = 'DELETE FROM '.sql_table('comment').' WHERE cnumber=' . $commentid;
16671671 sql_query($query);
16681672
1669- $manager->notify('PostDeleteComment', array('commentid' => $commentid));
1673+ $param = array('commentid' => $commentid);
1674+ $manager->notify('PostDeleteComment', $param);
16701675
16711676 return '';
16721677 }
@@ -1695,7 +1700,7 @@ class ADMIN {
16951700 $template['tabindex'] = 10;
16961701
16971702 $manager->loadClass("ENCAPSULATE");
1698- $batch =& new BATCH('member');
1703+ $batch = new BATCH('member');
16991704 $batch->showlist($query,'table',$template);
17001705
17011706 echo '<h3>' . _MEMBERS_NEW .'</h3>';
@@ -1885,12 +1890,8 @@ class ADMIN {
18851890 <?php
18861891 echo '<h3>',_PLUGINS_EXTRA,'</h3>';
18871892
1888- $manager->notify(
1889- 'MemberSettingsFormExtras',
1890- array(
1891- 'member' => &$mem
1892- )
1893- );
1893+ $param = array('member' => &$mem);
1894+ $manager->notify('MemberSettingsFormExtras', $param);
18941895
18951896 $this->pagefoot();
18961897 }
@@ -1944,7 +1945,12 @@ class ADMIN {
19441945 if ($password) {
19451946 $pwdvalid = true;
19461947 $pwderror = '';
1947- $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid));
1948+ $param = array(
1949+ 'password' => $password,
1950+ 'errormessage' => &$pwderror,
1951+ 'valid' => &$pwdvalid
1952+ );
1953+ $manager->notify('PrePasswordSet', $param);
19481954 if (!$pwdvalid) {
19491955 $this->error($pwderror);
19501956 }
@@ -2001,7 +2007,12 @@ class ADMIN {
20012007 // store plugin options
20022008 $aOptions = requestArray('plugoption');
20032009 NucleusPlugin::_applyPluginOptions($aOptions);
2004- $manager->notify('PostPluginOptionsUpdate',array('context' => 'member', 'memberid' => $memberid, 'member' => &$mem));
2010+ $param = array(
2011+ 'context' => 'member',
2012+ 'memberid' => $memberid,
2013+ 'member' => &$mem
2014+ );
2015+ $manager->notify('PostPluginOptionsUpdate', $param);
20052016
20062017 // if email changed, generate new password
20072018 if ($oldEmail != $mem->getEmail())
@@ -2050,7 +2061,8 @@ class ADMIN {
20502061 // fire PostRegister event
20512062 $newmem = new MEMBER();
20522063 $newmem->readFromName(postVar('name'));
2053- $manager->notify('PostRegister',array('member' => &$newmem));
2064+ $param = array('member' => &$newmem);
2065+ $manager->notify('PostRegister', $param);
20542066
20552067 $this->action_usermanagement();
20562068 }
@@ -2143,7 +2155,11 @@ class ADMIN {
21432155 <?php
21442156
21452157 global $manager;
2146- $manager->notify('FormExtra', array('type' => 'activation', 'member' => $mem));
2158+ $param = array(
2159+ 'type' => 'activation',
2160+ 'member' => $mem
2161+ );
2162+ $manager->notify('FormExtra', $param);
21472163
21482164 ?>
21492165 </tr><tr>
@@ -2204,14 +2220,24 @@ class ADMIN {
22042220 $pwderror = '';
22052221
22062222 global $manager;
2207- $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid));
2223+ $param = array(
2224+ 'password' => $password,
2225+ 'errormessage' => &$pwderror,
2226+ 'valid' => &$pwdvalid
2227+ );
2228+ $manager->notify('PrePasswordSet', $param);
22082229
22092230 if (!$pwdvalid) {
22102231 return $this->_showActivationPage($key,$pwderror);
22112232 }
22122233
22132234 $error = '';
2214- $manager->notify('ValidateForm', array('type' => 'activation', 'member' => $mem, 'error' => &$error));
2235+ $param = array(
2236+ 'type' => 'activation',
2237+ 'member' => $mem,
2238+ 'error' => &$error
2239+ );
2240+ $manager->notify('ValidateForm', $param);
22152241 if ($error != '')
22162242 return $this->_showActivationPage($key, $error);
22172243
@@ -2258,7 +2284,7 @@ class ADMIN {
22582284 $template['tabindex'] = 10;
22592285
22602286 $manager->loadClass("ENCAPSULATE");
2261- $batch =& new BATCH('team');
2287+ $batch = new BATCH('team');
22622288 $batch->showlist($query, 'table', $template);
22632289
22642290 ?>
@@ -2382,7 +2408,11 @@ class ADMIN {
23822408 // - (there remains at least one team member)
23832409 $tmem = MEMBER::createFromID($memberid);
23842410
2385- $manager->notify('PreDeleteTeamMember', array('member' => &$tmem, 'blogid' => $blogid));
2411+ $param = array(
2412+ 'member' => &$tmem,
2413+ 'blogid' => $blogid
2414+ );
2415+ $manager->notify('PreDeleteTeamMember', $param);
23862416
23872417 if ($tmem->isBlogAdmin($blogid)) {
23882418 // check if there are more blog members left and at least one admin
@@ -2396,7 +2426,11 @@ class ADMIN {
23962426 $query = 'DELETE FROM '.sql_table('team')." WHERE tblog=$blogid and tmember=$memberid";
23972427 sql_query($query);
23982428
2399- $manager->notify('PostDeleteTeamMember', array('member' => &$tmem, 'blogid' => $blogid));
2429+ $param = array(
2430+ 'member' => &$tmem,
2431+ 'blogid' => $blogid
2432+ );
2433+ $manager->notify('PostDeleteTeamMember', $param);
24002434
24012435 return '';
24022436 }
@@ -2600,7 +2634,7 @@ class ADMIN {
26002634 $template['tabindex'] = 200;
26012635
26022636 $manager->loadClass("ENCAPSULATE");
2603- $batch =& new BATCH('category');
2637+ $batch = new BATCH('category');
26042638 $batch->showlist($query,'table',$template);
26052639
26062640 ?>
@@ -2629,13 +2663,9 @@ class ADMIN {
26292663 <?php
26302664
26312665 echo '<h3>',_PLUGINS_EXTRA,'</h3>';
2632-
2633- $manager->notify(
2634- 'BlogSettingsFormExtras',
2635- array(
2636- 'blog' => &$blog
2637- )
2638- );
2666+
2667+ $param = array('blog' => &$blog);
2668+ $manager->notify('BlogSettingsFormExtras', $param);
26392669
26402670 $this->pagefoot();
26412671 }
@@ -2761,7 +2791,11 @@ class ADMIN {
27612791 // store plugin options
27622792 $aOptions = requestArray('plugoption');
27632793 NucleusPlugin::_applyPluginOptions($aOptions);
2764- $manager->notify('PostPluginOptionsUpdate',array('context' => 'category', 'catid' => $catid));
2794+ $param = array(
2795+ 'context' => 'category',
2796+ 'catid' => $catid
2797+ );
2798+ $manager->notify('PostPluginOptionsUpdate', $param);
27652799
27662800
27672801 if ($desturl) {
@@ -2869,7 +2903,8 @@ class ADMIN {
28692903 if (sql_num_rows($res) == 1)
28702904 return _ERROR_DELETELASTCATEGORY;
28712905
2872- $manager->notify('PreDeleteCategory', array('catid' => $catid));
2906+ $param = array('catid' => $catid);
2907+ $manager->notify('PreDeleteCategory', $param);
28732908
28742909 // change category for all items to the default category
28752910 $query = 'UPDATE '.sql_table('item')." SET icat=$destcatid WHERE icat=$catid";
@@ -2882,7 +2917,8 @@ class ADMIN {
28822917 $query = 'DELETE FROM '.sql_table('category').' WHERE catid=' .$catid;
28832918 sql_query($query);
28842919
2885- $manager->notify('PostDeleteCategory', array('catid' => $catid));
2920+ $param = array('catid' => $catid);
2921+ $manager->notify('PostDeleteCategory', $param);
28862922
28872923 }
28882924
@@ -2919,14 +2955,12 @@ class ADMIN {
29192955 if ($blog->getDefaultCategory() == $catid)
29202956 return _ERROR_MOVEDEFCATEGORY;
29212957
2922- $manager->notify(
2923- 'PreMoveCategory',
2924- array(
2925- 'catid' => &$catid,
2926- 'sourceblog' => &$blog,
2927- 'destblog' => &$destblog
2928- )
2958+ $param = array(
2959+ 'catid' => &$catid,
2960+ 'sourceblog' => &$blog,
2961+ 'destblog' => &$destblog
29292962 );
2963+ $manager->notify('PreMoveCategory', $param);
29302964
29312965 // update comments table (cblog)
29322966 $query = 'SELECT inumber FROM '.sql_table('item').' WHERE icat='.$catid;
@@ -2943,14 +2977,12 @@ class ADMIN {
29432977 $query = 'UPDATE '.sql_table('category').' SET cblog='.$destblogid.' WHERE catid='.$catid;
29442978 sql_query($query);
29452979
2946- $manager->notify(
2947- 'PostMoveCategory',
2948- array(
2949- 'catid' => &$catid,
2950- 'sourceblog' => &$blog,
2951- 'destblog' => $destblog
2952- )
2980+ $param = array(
2981+ 'catid' => &$catid,
2982+ 'sourceblog' => &$blog,
2983+ 'destblog' => $destblog
29532984 );
2985+ $manager->notify('PostMoveCategory', $param);
29542986
29552987 }
29562988
@@ -2982,7 +3014,7 @@ class ADMIN {
29823014
29833015
29843016 if ($notify) {
2985- $not =& new NOTIFICATION($notify);
3017+ $not = new NOTIFICATION($notify);
29863018 if (!$not->validAddresses())
29873019 $this->error(_ERROR_BADNOTIFY);
29883020
@@ -3021,7 +3053,12 @@ class ADMIN {
30213053 // store plugin options
30223054 $aOptions = requestArray('plugoption');
30233055 NucleusPlugin::_applyPluginOptions($aOptions);
3024- $manager->notify('PostPluginOptionsUpdate',array('context' => 'blog', 'blogid' => $blogid, 'blog' => &$blog));
3056+ $param = array(
3057+ 'context' => 'blog',
3058+ 'blogid' => $blogid,
3059+ 'blog' => &$blog
3060+ );
3061+ $manager->notify('PostPluginOptionsUpdate', $param);
30253062
30263063
30273064 $this->action_overview(_MSG_SETTINGSCHANGED);
@@ -3072,7 +3109,8 @@ class ADMIN {
30723109
30733110 $blogid = intRequestVar('blogid');
30743111
3075- $manager->notify('PreDeleteBlog', array('blogid' => $blogid));
3112+ $param = array('blogid' => $blogid);
3113+ $manager->notify('PreDeleteBlog', $param);
30763114
30773115 $member->blogAdminRights($blogid) or $this->disallow();
30783116
@@ -3107,7 +3145,8 @@ class ADMIN {
31073145 $query = 'DELETE FROM '.sql_table('blog').' WHERE bnumber='.$blogid;
31083146 sql_query($query);
31093147
3110- $manager->notify('PostDeleteBlog', array('blogid' => $blogid));
3148+ $param = array('blogid' => $blogid);
3149+ $manager->notify('PostDeleteBlog', $param);
31113150
31123151 $this->action_overview(_DELETED_BLOG);
31133152 }
@@ -3178,7 +3217,8 @@ class ADMIN {
31783217 if (!$mem->canBeDeleted())
31793218 return _ERROR_DELETEMEMBER;
31803219
3181- $manager->notify('PreDeleteMember', array('member' => &$mem));
3220+ $param = array('member' => &$mem);
3221+ $manager->notify('PreDeleteMember', $param);
31823222
31833223 /* unlink comments from memberid */
31843224 if ($memberid) {
@@ -3199,7 +3239,8 @@ class ADMIN {
31993239 // delete all associated plugin options
32003240 NucleusPlugin::_deleteOptionValues('member', $memberid);
32013241
3202- $manager->notify('PostDeleteMember', array('member' => &$mem));
3242+ $param = array('member' => &$mem);
3243+ $manager->notify('PostDeleteMember', $param);
32033244
32043245 return '';
32053246 }
@@ -3309,16 +3350,14 @@ class ADMIN {
33093350 if ($manager->existsBlog($bshortname))
33103351 $this->error(_ERROR_DUPSHORTBLOGNAME);
33113352
3312- $manager->notify(
3313- 'PreAddBlog',
3314- array(
3315- 'name' => &$bname,
3316- 'shortname' => &$bshortname,
3317- 'timeoffset' => &$btimeoffset,
3318- 'description' => &$bdesc,
3319- 'defaultskin' => &$bdefskin
3320- )
3353+ $param = array(
3354+ 'name' => &$bname,
3355+ 'shortname' => &$bshortname,
3356+ 'timeoffset' => &$btimeoffset,
3357+ 'description' => &$bdesc,
3358+ 'defaultskin' => &$bdefskin
33213359 );
3360+ $manager->notify('PreAddBlog', $param);
33223361
33233362
33243363 // add slashes for sql queries
@@ -3358,23 +3397,18 @@ class ADMIN {
33583397 //$blog->additem($blog->getDefaultCategory(),_EBLOG_FIRSTITEM_TITLE,_EBLOG_FIRSTITEM_BODY,'',$blogid, $memberid,$blog->getCorrectTime(),0,0,0);
33593398
33603399
3361-
3362- $manager->notify(
3363- 'PostAddBlog',
3364- array(
3365- 'blog' => &$blog
3366- )
3400+ $param = array(
3401+ 'blog' => &$blog
33673402 );
3368-
3369- $manager->notify(
3370- 'PostAddCategory',
3371- array(
3372- 'blog' => &$blog,
3373- 'name' => _EBLOGDEFAULTCATEGORY_NAME,
3374- 'description' => _EBLOGDEFAULTCATEGORY_DESC,
3375- 'catid' => $catid
3376- )
3403+ $manager->notify('PostAddBlog', $param);
3404+
3405+ $param = array(
3406+ 'blog' => &$blog,
3407+ 'name' => _EBLOGDEFAULTCATEGORY_NAME,
3408+ 'description' => _EBLOGDEFAULTCATEGORY_DESC,
3409+ 'catid' => $catid
33773410 );
3411+ $manager->notify('PostAddCategory', $param);
33783412
33793413 $this->pagehead();
33803414 ?>
@@ -3576,7 +3610,7 @@ selector();
35763610 $skinFileRaw= postVar('skinfile');
35773611 $mode = postVar('mode');
35783612
3579- $importer =& new SKINIMPORT();
3613+ $importer = new SKINIMPORT();
35803614
35813615 // get full filename
35823616 if ($mode == 'file')
@@ -3672,7 +3706,7 @@ selector();
36723706 $skinFile = $skinFileRaw;
36733707 }
36743708
3675- $importer =& new SKINIMPORT();
3709+ $importer = new SKINIMPORT();
36763710
36773711 $error = $importer->readFile($skinFile);
36783712
@@ -3722,7 +3756,7 @@ selector();
37223756
37233757 $info = postVar('info');
37243758
3725- $exporter =& new SKINEXPORT();
3759+ $exporter = new SKINEXPORT();
37263760 foreach ($skinList as $skinId) {
37273761 $exporter->addSkin($skinId);
37283762 }
@@ -3902,7 +3936,8 @@ selector();
39023936 <?php
39033937 $tab = 600;
39043938 $pluginfields = array();
3905- $manager->notify('TemplateExtraFields',array('fields'=>&$pluginfields));
3939+ $param = array('fields'=>&$pluginfields);
3940+ $manager->notify('TemplateExtraFields', $param);
39063941
39073942 foreach ($pluginfields as $pfkey=>$pfvalue) {
39083943 echo "</tr><tr>\n";
@@ -4012,7 +4047,8 @@ selector();
40124047 $this->addToTemplate($templateid, 'IMAGE_CODE', postVar('IMAGE_CODE'));
40134048
40144049 $pluginfields = array();
4015- $manager->notify('TemplateExtraFields',array('fields'=>&$pluginfields));
4050+ $param = array('fields'=>&$pluginfields);
4051+ $manager->notify('TemplateExtraFields', $param);
40164052 foreach ($pluginfields as $pfkey=>$pfvalue) {
40174053 foreach ($pfvalue as $pffield=>$pfdesc) {
40184054 $this->addToTemplate($templateid, $pffield, postVar($pffield));
@@ -4085,7 +4121,8 @@ selector();
40854121
40864122 $member->isAdmin() or $this->disallow();
40874123
4088- $manager->notify('PreDeleteTemplate', array('templateid' => $templateid));
4124+ $param = array('templateid' => $templateid);
4125+ $manager->notify('PreDeleteTemplate', $param);
40894126
40904127 // 1. delete description
40914128 sql_query('DELETE FROM '.sql_table('template_desc').' WHERE tdnumber=' . $templateid);
@@ -4093,7 +4130,8 @@ selector();
40934130 // 2. delete parts
40944131 sql_query('DELETE FROM '.sql_table('template').' WHERE tdesc=' . $templateid);
40954132
4096- $manager->notify('PostDeleteTemplate', array('templateid' => $templateid));
4133+ $param = array('templateid' => $templateid);
4134+ $manager->notify('PostDeleteTemplate', $param);
40974135
40984136 $this->action_templateoverview();
40994137 }
@@ -4236,7 +4274,7 @@ selector();
42364274
42374275 $member->isAdmin() or $this->disallow();
42384276
4239- $skin =& new SKIN($skinid);
4277+ $skin = new SKIN($skinid);
42404278
42414279 $this->pagehead();
42424280 ?>
@@ -4334,7 +4372,7 @@ selector();
43344372 $inc_mode = postVar('inc_mode');
43354373 $inc_prefix = postVar('inc_prefix');
43364374
4337- $skin =& new SKIN($skinid);
4375+ $skin = new SKIN($skinid);
43384376
43394377 // 1. Some checks
43404378 if (!isValidSkinName($name))
@@ -4371,7 +4409,7 @@ selector();
43714409 $this->error(_ERROR_SKIN_PARTS_SPECIAL_FORMAT);
43724410 }
43734411
4374- $skin =& new SKIN($skinid);
4412+ $skin = new SKIN($skinid);
43754413
43764414 $friendlyNames = SKIN::getFriendlyNames();
43774415
@@ -4447,7 +4485,7 @@ selector();
44474485
44484486 $member->isAdmin() or $this->disallow();
44494487
4450- $skin =& new SKIN($skinid);
4488+ $skin = new SKIN($skinid);
44514489 $skin->update($type, $content);
44524490
44534491 $this->action_skinedittype(_SKIN_UPDATED);
@@ -4475,7 +4513,7 @@ selector();
44754513
44764514 $this->pagehead();
44774515
4478- $skin =& new SKIN($skinid);
4516+ $skin = new SKIN($skinid);
44794517 $name = $skin->getName();
44804518 $desc = $skin->getDescription();
44814519
@@ -4516,7 +4554,8 @@ selector();
45164554 if ($o = sql_fetch_object($r))
45174555 $this->error(_ERROR_SKINDEFDELETE .$o->bname);
45184556
4519- $manager->notify('PreDeleteSkin', array('skinid' => $skinid));
4557+ $param = array('skinid' => $skinid);
4558+ $manager->notify('PreDeleteSkin', $param);
45204559
45214560 // 1. delete description
45224561 sql_query('DELETE FROM '.sql_table('skin_desc').' WHERE sdnumber=' . $skinid);
@@ -4524,7 +4563,8 @@ selector();
45244563 // 2. delete parts
45254564 sql_query('DELETE FROM '.sql_table('skin').' WHERE sdesc=' . $skinid);
45264565
4527- $manager->notify('PostDeleteSkin', array('skinid' => $skinid));
4566+ $param = array('skinid' => $skinid);
4567+ $manager->notify('PostDeleteSkin', $param);
45284568
45294569 $this->action_skinoverview();
45304570 }
@@ -4551,7 +4591,7 @@ selector();
45514591
45524592 $this->pagehead();
45534593
4554- $skin =& new SKIN($skinid);
4594+ $skin = new SKIN($skinid);
45554595 $name = $skin->getName();
45564596 $desc = $skin->getDescription();
45574597
@@ -4593,12 +4633,20 @@ selector();
45934633 $this->error(_ERROR_SKIN_PARTS_SPECIAL_DELETE);
45944634 }
45954635
4596- $manager->notify('PreDeleteSkinPart', array('skinid' => $skinid, 'skintype' => $skintype));
4636+ $param = array(
4637+ 'skinid' => $skinid,
4638+ 'skintype' => $skintype
4639+ );
4640+ $manager->notify('PreDeleteSkinPart', $param);
45974641
45984642 // delete part
45994643 sql_query('DELETE FROM '.sql_table('skin').' WHERE sdesc=' . $skinid . ' AND stype=\'' . $skintype . '\'');
46004644
4601- $manager->notify('PostDeleteSkinPart', array('skinid' => $skinid, 'skintype' => $skintype));
4645+ $param = array(
4646+ 'skinid' => $skinid,
4647+ 'skintype' => $skintype
4648+ );
4649+ $manager->notify('PostDeleteSkinPart', $param);
46024650
46034651 $this->action_skinedit();
46044652 }
@@ -4614,7 +4662,7 @@ selector();
46144662 $member->isAdmin() or $this->disallow();
46154663
46164664 // 1. read skin to clone
4617- $skin =& new SKIN($skinid);
4665+ $skin = new SKIN($skinid);
46184666
46194667 $name = "clone_" . $skin->getName();
46204668
@@ -4979,11 +5027,9 @@ selector();
49795027
49805028 <?php
49815029 echo '<h2>',_PLUGINS_EXTRA,'</h2>';
4982-
4983- $manager->notify(
4984- 'GeneralSettingsFormExtras',
4985- array()
4986- );
5030+
5031+ $param = array();
5032+ $manager->notify('GeneralSettingsFormExtras', $param);
49875033
49885034 $this->pagefoot();
49895035 }
@@ -5231,13 +5277,11 @@ selector();
52315277 function pagehead($extrahead = '') {
52325278 global $member, $nucleus, $CONF, $manager;
52335279
5234- $manager->notify(
5235- 'AdminPrePageHead',
5236- array(
5237- 'extrahead' => &$extrahead,
5238- 'action' => $this->action
5239- )
5280+ $param = array(
5281+ 'extrahead' => &$extrahead,
5282+ 'action' => $this->action
52405283 );
5284+ $manager->notify('AdminPrePageHead', $param);
52415285
52425286 $baseUrl = htmlspecialchars($CONF['AdminURL']);
52435287 if (!array_key_exists('AdminCSS',$CONF))
@@ -5310,12 +5354,10 @@ selector();
53105354 function pagefoot() {
53115355 global $action, $member, $manager;
53125356
5313- $manager->notify(
5314- 'AdminPrePageFoot',
5315- array(
5316- 'action' => $this->action
5317- )
5357+ $param = array(
5358+ 'action' => $this->action
53185359 );
5360+ $manager->notify('AdminPrePageFoot', $param);
53195361
53205362 if ($member->isLoggedIn() && ($action != 'showlogin')) {
53215363 ?>
@@ -5404,12 +5446,10 @@ selector();
54045446 }
54055447
54065448 $aPluginExtras = array();
5407- $manager->notify(
5408- 'QuickMenu',
5409- array(
5410- 'options' => &$aPluginExtras
5411- )
5449+ $param = array(
5450+ 'options' => &$aPluginExtras
54125451 );
5452+ $manager->notify('QuickMenu', $param);
54135453 if (count($aPluginExtras) > 0)
54145454 {
54155455 echo '<h2>', _QMENU_PLUGINS, '</h2>';
@@ -6081,12 +6121,10 @@ selector();
60816121 // plugin will be added as last one in the list
60826122 $newOrder = $numCurrent + 1;
60836123
6084- $manager->notify(
6085- 'PreAddPlugin',
6086- array(
6087- 'file' => &$name
6088- )
6124+ $param = array(
6125+ 'file' => &$name
60896126 );
6127+ $manager->notify('PreAddPlugin', $param);
60906128
60916129 // do this before calling getPlugin (in case the plugin id is used there)
60926130 $query = 'INSERT INTO '.sql_table('plugin').' (porder, pfile) VALUES ('.$newOrder.',"'.sql_real_escape_string($name).'")';
@@ -6143,12 +6181,10 @@ selector();
61436181 // call the install method of the plugin
61446182 $plugin->install();
61456183
6146- $manager->notify(
6147- 'PostAddPlugin',
6148- array(
6149- 'plugin' => &$plugin
6150- )
6184+ $param = array(
6185+ 'plugin' => &$plugin
61516186 );
6187+ $manager->notify('PostAddPlugin', $param);
61526188
61536189 // update all events
61546190 $this->action_pluginupdate();
@@ -6269,7 +6305,8 @@ selector();
62696305 }
62706306 }
62716307
6272- $manager->notify('PreDeletePlugin', array('plugid' => $pid));
6308+ $param = array('plugid' => $pid);
6309+ $manager->notify('PreDeletePlugin', $param);
62736310
62746311 // call the unInstall method of the plugin
62756312 if ($callUninstall) {
@@ -6302,7 +6339,8 @@ selector();
63026339 sql_query('DELETE FROM '.sql_table('plugin').' WHERE pid='.$pid);
63036340
63046341 $manager->clearCachedInfo('installedPlugins');
6305- $manager->notify('PostDeletePlugin', array('plugid' => $pid));
6342+ $param = array('plugid' => $pid);
6343+ $manager->notify('PostDeletePlugin', $param);
63066344
63076345 return '';
63086346 }
@@ -6428,7 +6466,12 @@ selector();
64286466 }
64296467
64306468 // call plugins
6431- $manager->notify('PrePluginOptionsEdit',array('context' => 'global', 'plugid' => $pid, 'options'=>&$aOptions));
6469+ $param = array(
6470+ 'context' => 'global',
6471+ 'plugid' => $pid,
6472+ 'options' => &$aOptions
6473+ );
6474+ $manager->notify('PrePluginOptionsEdit', $param);
64326475
64336476 $template['content'] = 'plugoptionlist';
64346477 $amount = showlist($aOptions,'table',$template);
@@ -6460,7 +6503,11 @@ selector();
64606503 $aOptions = requestArray('plugoption');
64616504 NucleusPlugin::_applyPluginOptions($aOptions);
64626505
6463- $manager->notify('PostPluginOptionsUpdate',array('context' => 'global', 'plugid' => $pid));
6506+ $param = array(
6507+ 'context' => 'global',
6508+ 'plugid' => $pid
6509+ );
6510+ $manager->notify('PostPluginOptionsUpdate', $param);
64646511
64656512 $this->action_pluginoptions(_PLUGS_OPTIONS_UPDATED);
64666513 }
@@ -6504,7 +6551,12 @@ selector();
65046551 }
65056552
65066553 global $manager;
6507- $manager->notify('PrePluginOptionsEdit',array('context' => $context, 'contextid' => $contextid, 'options'=>&$aOptions));
6554+ $param = array(
6555+ 'context' => $context,
6556+ 'contextid' => $contextid,
6557+ 'options' => &$aOptions
6558+ );
6559+ $manager->notify('PrePluginOptionsEdit', $param);
65086560
65096561
65106562 $iPrevPid = -1;
--- a/nucleus/libs/BAN.php
+++ b/nucleus/libs/BAN.php
@@ -47,27 +47,23 @@ class BAN {
4747
4848 $blogid = intval($blogid);
4949
50- $manager->notify(
51- 'PreAddBan',
52- array(
53- 'blogid' => $blogid,
54- 'iprange' => &$iprange,
55- 'reason' => &$reason
56- )
50+ $param = array(
51+ 'blogid' => $blogid,
52+ 'iprange' => &$iprange,
53+ 'reason' => &$reason
5754 );
55+ $manager->notify('PreAddBan', $param);
5856
5957 $query = 'INSERT INTO '.sql_table('ban')." (blogid, iprange, reason) VALUES "
6058 . "($blogid,'".sql_real_escape_string($iprange)."','".sql_real_escape_string($reason)."')";
6159 $res = sql_query($query);
6260
63- $manager->notify(
64- 'PostAddBan',
65- array(
66- 'blogid' => $blogid,
67- 'iprange' => $iprange,
68- 'reason' => $reason
69- )
61+ $param = array(
62+ 'blogid' => $blogid,
63+ 'iprange' => $iprange,
64+ 'reason' => $reason
7065 );
66+ $manager->notify('PostAddBan', $param);
7167
7268 return $res ? 1 : 0;
7369 }
@@ -80,14 +76,22 @@ class BAN {
8076 global $manager;
8177 $blogid = intval($blogid);
8278
83- $manager->notify('PreDeleteBan', array('blogid' => $blogid, 'range' => $iprange));
79+ $param = array(
80+ 'blogid' => $blogid,
81+ 'range' => $iprange
82+ );
83+ $manager->notify('PreDeleteBan', $param);
8484
8585 $query = 'DELETE FROM '.sql_table('ban')." WHERE blogid=$blogid and iprange='" .sql_real_escape_string($iprange). "'";
8686 sql_query($query);
8787
8888 $result = (sql_affected_rows() > 0);
8989
90- $manager->notify('PostDeleteBan', array('blogid' => $blogid, 'range' => $iprange));
90+ $param = array(
91+ 'blogid' => $blogid,
92+ 'range' => $iprange
93+ );
94+ $manager->notify('PostDeleteBan', $param);
9195
9296 return $result;
9397 }
--- a/nucleus/libs/BLOG.php
+++ b/nucleus/libs/BLOG.php
@@ -161,8 +161,8 @@ class BLOG {
161161 $template =& $manager->getTemplate($templateName);
162162
163163 // create parser object & action handler
164- $actions =& new ITEMACTIONS($this);
165- $parser =& new PARSER($actions->getDefinedActions(),$actions);
164+ $actions = new ITEMACTIONS($this);
165+ $parser = new PARSER($actions->getDefinedActions(),$actions);
166166 $actions->setTemplate($template);
167167 $actions->setHighlight($highlight);
168168 $actions->setLastVisit($lastVisit);
@@ -189,26 +189,50 @@ class BLOG {
189189 $timestamp = $item->timestamp;
190190 if ($old_date != 0) {
191191 $oldTS = strtotime($old_date);
192- $manager->notify('PreDateFoot',array('blog' => &$this, 'timestamp' => $oldTS));
192+ $param = array(
193+ 'blog' => &$this,
194+ 'timestamp' => $oldTS
195+ );
196+ $manager->notify('PreDateFoot', $param);
193197 $tmp_footer = strftimejp(isset($template['DATE_FOOTER'])?$template['DATE_FOOTER']:'', $oldTS);
194198 $parser->parse($tmp_footer);
195- $manager->notify('PostDateFoot',array('blog' => &$this, 'timestamp' => $oldTS));
199+ $param = array(
200+ 'blog' => &$this,
201+ 'timestamp' => $oldTS
202+ );
203+ $manager->notify('PostDateFoot', $param);
196204 }
197- $manager->notify('PreDateHead',array('blog' => &$this, 'timestamp' => $timestamp));
205+ $param = array(
206+ 'blog' => &$this,
207+ 'timestamp' => $timestamp
208+ );
209+ $manager->notify('PreDateHead', $param);
198210 // note, to use templatvars in the dateheader, the %-characters need to be doubled in
199211 // order to be preserved by strftime
200212 $tmp_header = strftimejp((isset($template['DATE_HEADER']) ? $template['DATE_HEADER'] : null), $timestamp);
201213 $parser->parse($tmp_header);
202- $manager->notify('PostDateHead',array('blog' => &$this, 'timestamp' => $timestamp));
214+ $param = array(
215+ 'blog' => &$this,
216+ 'timestamp' => $timestamp
217+ );
218+ $manager->notify('PostDateHead', $param);
203219 }
204220 $old_date = $new_date;
205221 }
206222
207223 // parse item
208224 $parser->parse($template['ITEM_HEADER']);
209- $manager->notify('PreItem', array('blog' => &$this, 'item' => &$item));
225+ $param = array(
226+ 'blog' => &$this,
227+ 'item' => &$item
228+ );
229+ $manager->notify('PreItem', $param);
210230 $parser->parse($template['ITEM']);
211- $manager->notify('PostItem', array('blog' => &$this, 'item' => &$item));
231+ $param = array(
232+ 'blog' => &$this,
233+ 'item' => &$item
234+ );
235+ $manager->notify('PostItem', $param);
212236 $parser->parse($template['ITEM_FOOTER']);
213237
214238 }
@@ -217,9 +241,17 @@ class BLOG {
217241
218242 // add another date footer if there was at least one item
219243 if (($numrows > 0) && $dateheads) {
220- $manager->notify('PreDateFoot',array('blog' => &$this, 'timestamp' => strtotime($old_date)));
244+ $param = array(
245+ 'blog' => &$this,
246+ 'timestamp' => strtotime($old_date)
247+ );
248+ $manager->notify('PreDateFoot', $param);
221249 $parser->parse($template['DATE_FOOTER']);
222- $manager->notify('PostDateFoot',array('blog' => &$this, 'timestamp' => strtotime($old_date)));
250+ $param = array(
251+ 'blog' => &$this,
252+ 'timestamp' => strtotime($old_date)
253+ );
254+ $manager->notify('PostDateFoot', $param);
223255 }
224256
225257 sql_free_result($items); // free memory
@@ -265,7 +297,18 @@ class BLOG {
265297
266298 $timestamp = date('Y-m-d H:i:s',$timestamp);
267299
268- $manager->notify('PreAddItem',array('title' => &$title, 'body' => &$body, 'more' => &$more, 'blog' => &$this, 'authorid' => &$authorid, 'timestamp' => &$timestamp, 'closed' => &$closed, 'draft' => &$draft, 'catid' => &$catid));
300+ $param = array(
301+ 'title' => &$title,
302+ 'body' => &$body,
303+ 'more' => &$more,
304+ 'blog' => &$this,
305+ 'authorid' => &$authorid,
306+ 'timestamp' => &$timestamp,
307+ 'closed' => &$closed,
308+ 'draft' => &$draft,
309+ 'catid' => &$catid
310+ );
311+ $manager->notify('PreAddItem', $param);
269312
270313 $ititle = sql_real_escape_string($title);
271314 $ibody = sql_real_escape_string($body);
@@ -276,7 +319,8 @@ class BLOG {
276319 sql_query($query);
277320 $itemid = sql_insert_id();
278321
279- $manager->notify('PostAddItem',array('itemid' => $itemid));
322+ $param = array('itemid' => $itemid);
323+ $manager->notify('PostAddItem', $param);
280324
281325 if (!$draft)
282326 $this->updateUpdateFile();
@@ -315,7 +359,7 @@ class BLOG {
315359
316360 $frommail = $member->getNotifyFromMailAddress();
317361
318- $notify =& new NOTIFICATION($this->getNotifyAddress());
362+ $notify = new NOTIFICATION($this->getNotifyAddress());
319363 $notify->notify($mailto_title, $mailto_msg , $frommail);
320364
321365
@@ -356,28 +400,24 @@ class BLOG {
356400 $catName = $catName . $i;
357401 }
358402
359- $manager->notify(
360- 'PreAddCategory',
361- array(
362- 'blog' => &$this,
363- 'name' => &$catName,
364- 'description' => $catDescription
365- )
403+ $param = array(
404+ 'blog' => &$this,
405+ 'name' => &$catName,
406+ 'description' => $catDescription
366407 );
408+ $manager->notify('PreAddCategory', $param);
367409
368410 $query = 'INSERT INTO '.sql_table('category').' (cblog, cname, cdesc) VALUES (' . $this->getID() . ", '" . sql_real_escape_string($catName) . "', '" . sql_real_escape_string($catDescription) . "')";
369411 sql_query($query);
370412 $catid = sql_insert_id();
371413
372- $manager->notify(
373- 'PostAddCategory',
374- array(
375- 'blog' => &$this,
376- 'name' => $catName,
377- 'description' => $catDescription,
378- 'catid' => $catid
379- )
414+ $param = array(
415+ 'blog' => &$this,
416+ 'name' => $catName,
417+ 'description' => $catDescription,
418+ 'catid' => $catid
380419 );
420+ $manager->notify('PostAddCategory', $param);
381421
382422 return $catid;
383423 } else {
@@ -456,7 +496,7 @@ class BLOG {
456496 */
457497 function getSqlSearch($query, $amountMonths = 0, &$highlight, $mode = '')
458498 {
459- $searchclass =& new SEARCH($query);
499+ $searchclass = new SEARCH($query);
460500
461501 $highlight = $searchclass->inclusive;
462502
@@ -619,12 +659,8 @@ class BLOG {
619659 $archive['year'] = $data['year'];
620660 $data['archivelink'] = createArchiveLink($this->getID(),$archivedate,$linkparams);
621661
622- $manager->notify(
623- 'PreArchiveListItem',
624- array(
625- 'listitem' => &$data
626- )
627- );
662+ $param = array('listitem' => &$data);
663+ $manager->notify('PreArchiveListItem', $param);
628664
629665 $temp = TEMPLATE::fill($template['ARCHIVELIST_LISTITEM'],$data);
630666 echo strftimejp($temp,$current->itime);
@@ -732,12 +768,8 @@ class BLOG {
732768 }
733769 }
734770
735- $manager->notify(
736- 'PreCategoryListItem',
737- array(
738- 'listitem' => &$data
739- )
740- );
771+ $param = array('listitem' => &$data);
772+ $manager->notify('PreCategoryListItem', $param);
741773
742774 echo TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
743775 //$temp = TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
@@ -823,12 +855,8 @@ class BLOG {
823855 $list['blogname'] = $data['bname'];
824856 }
825857
826- $manager->notify(
827- 'PreBlogListItem',
828- array(
829- 'listitem' => &$list
830- )
831- );
858+ $param = array('listitem' => &$list);
859+ $manager->notify('PreBlogListItem', $param);
832860
833861 echo TEMPLATE::fill((isset($template['BLOGLIST_LISTITEM']) ? $template['BLOGLIST_LISTITEM'] : null), $list);
834862
@@ -1132,29 +1160,25 @@ class BLOG {
11321160 if ($tmem->isTeamMember($this->getID()))
11331161 return 0;
11341162
1135- $manager->notify(
1136- 'PreAddTeamMember',
1137- array(
1138- 'blog' => &$this,
1139- 'member' => &$tmem,
1140- 'admin' => &$admin
1141- )
1163+ $param = array(
1164+ 'blog' => &$this,
1165+ 'member' => &$tmem,
1166+ 'admin' => &$admin
11421167 );
1168+ $manager->notify('PreAddTeamMember', $param);
11431169
11441170 // add to team
11451171 $query = 'INSERT INTO '.sql_table('team').' (TMEMBER, TBLOG, TADMIN) '
11461172 . 'VALUES (' . $memberid .', '.$this->getID().', "'.$admin.'")';
11471173 sql_query($query);
11481174
1149- $manager->notify(
1150- 'PostAddTeamMember',
1151- array(
1152- 'blog' => &$this,
1153- 'member' => &$tmem,
1154- 'admin' => $admin
1155- )
1156-
1175+
1176+ $param = array(
1177+ 'blog' => &$this,
1178+ 'member' => &$tmem,
1179+ 'admin' => $admin
11571180 );
1181+ $manager->notify('PostAddTeamMember', $param);
11581182
11591183 $logMsg = sprintf(_TEAM_ADD_NEWTEAMMEMBER, $tmem->getDisplayName(), $memberid, $this->getName());
11601184 ACTIONLOG::add(INFO, $logMsg);
@@ -1204,12 +1228,11 @@ class BLOG {
12041228 // This $pinged is allow a plugin to tell other hook to the event that a ping is sent already
12051229 // Note that the plugins's calling order is subject to thri order in the plugin list
12061230 $pinged = false;
1207- $manager->notify(
1208- 'JustPosted',
1209- array('blogid' => $blogid,
1210- 'pinged' => &$pinged
1211- )
1231+ $param = array(
1232+ 'blogid' => $blogid,
1233+ 'pinged' => &$pinged
12121234 );
1235+ $manager->notify('JustPosted', $param);
12131236
12141237 // clear all expired future posts
12151238 sql_query("UPDATE " . sql_table('item') . " SET iposted='1' WHERE iblog=" . $blogid . " AND itime<NOW()");
--- a/nucleus/libs/BODYACTIONS.php
+++ b/nucleus/libs/BODYACTIONS.php
@@ -64,14 +64,14 @@ class BODYACTIONS extends BaseActions {
6464 // add item reference (array_unshift didn't work)
6565 $params = array_merge(array(&$this->currentItem),$params);
6666
67- call_user_func_array(array(&$plugin,'doItemVar'), $params);
67+ call_user_func_array(array($plugin,'doItemVar'), $params);
6868 }
6969
7070 function parse_image() {
7171 // image/popup calls have arguments separated by |
7272 $args = func_get_args();
7373 $args = explode('|',implode($args,', '));
74- call_user_func_array(array(&$this,'createImageCode'),$args);
74+ call_user_func_array(array($this,'createImageCode'), $args);
7575 }
7676
7777 function createImageCode($filename, $width, $height, $text = '') {
@@ -101,7 +101,7 @@ class BODYACTIONS extends BaseActions {
101101 // image/popup calls have arguments separated by |
102102 $args = func_get_args();
103103 $args = explode('|',implode($args,', '));
104- call_user_func_array(array(&$this,'createMediaCode'),$args);
104+ call_user_func_array(array($this,'createMediaCode'), $args);
105105 }
106106
107107 function createMediaCode($filename, $text = '') {
@@ -124,7 +124,7 @@ class BODYACTIONS extends BaseActions {
124124 // image/popup calls have arguments separated by |
125125 $args = func_get_args();
126126 $args = explode('|',implode($args,', '));
127- call_user_func_array(array(&$this,'createPopupCode'),$args);
127+ call_user_func_array(array($this,'createPopupCode'), $args);
128128 }
129129
130130 function createPopupCode($filename, $width, $height, $text = '') {
@@ -390,7 +390,7 @@ class BODYACTIONS extends BaseActions {
390390 $params = func_get_args();
391391 array_shift($params);
392392
393- return call_user_func_array(array(&$plugin, 'doIf'), $params);
393+ return call_user_func_array(array($plugin, 'doIf'), $params);
394394 }
395395 }
396396 ?>
--- a/nucleus/libs/BaseActions.php
+++ b/nucleus/libs/BaseActions.php
@@ -224,7 +224,7 @@ class BaseActions {
224224 $this->_addIfExecute();
225225
226226 $args = func_get_args();
227- $condition = call_user_func_array(array(&$this,'checkCondition'), $args);
227+ $condition = call_user_func_array(array($this,'checkCondition'), $args);
228228 $this->_addIfCondition($condition);
229229 }
230230
@@ -263,7 +263,7 @@ class BaseActions {
263263 } else {
264264 ob_end_clean();
265265 $args = func_get_args();
266- $condition = call_user_func_array(array(&$this,'checkCondition'), $args);
266+ $condition = call_user_func_array(array($this,'checkCondition'), $args);
267267 $this->_addIfCondition($condition);
268268 }
269269 }
@@ -275,7 +275,7 @@ class BaseActions {
275275 $this->_addIfExecute();
276276
277277 $args = func_get_args();
278- $condition = call_user_func_array(array(&$this,'checkCondition'), $args);
278+ $condition = call_user_func_array(array($this,'checkCondition'), $args);
279279 $this->_addIfCondition(!$condition);
280280 }
281281
@@ -295,7 +295,7 @@ class BaseActions {
295295 } else {
296296 ob_end_clean();
297297 $args = func_get_args();
298- $condition = call_user_func_array(array(&$this,'checkCondition'), $args);
298+ $condition = call_user_func_array(array($this,'checkCondition'), $args);
299299 $this->_addIfCondition(!$condition);
300300 }
301301 }
--- a/nucleus/libs/COMMENTACTIONS.php
+++ b/nucleus/libs/COMMENTACTIONS.php
@@ -355,7 +355,7 @@ class COMMENTACTIONS extends BaseActions {
355355 $params = array_merge(array(&$this->currentComment),$params);
356356 $params = array_merge(array(&$this->commentsObj->itemActions->currentItem),$params);
357357
358- call_user_func_array(array(&$plugin,'doTemplateCommentsVar'), $params);
358+ call_user_func_array(array($plugin, 'doTemplateCommentsVar'), $params);
359359 }
360360
361361 /**
@@ -700,7 +700,7 @@ class COMMENTACTIONS extends BaseActions {
700700 $params = func_get_args();
701701 array_shift($params);
702702
703- return call_user_func_array(array(&$plugin, 'doIf'), $params);
703+ return call_user_func_array(array($plugin, 'doIf'), $params);
704704 }
705705
706706 }
--- a/nucleus/libs/COMMENTS.php
+++ b/nucleus/libs/COMMENTS.php
@@ -70,8 +70,8 @@ class COMMENTS {
7070 global $CONF, $manager;
7171
7272 // create parser object & action handler
73- $actions =& new COMMENTACTIONS($this);
74- $parser =& new PARSER($actions->getDefinedActions(),$actions);
73+ $actions = new COMMENTACTIONS($this);
74+ $parser = new PARSER($actions->getDefinedActions(), $actions);
7575 $actions->setTemplate($template);
7676 $actions->setParser($parser);
7777
@@ -106,9 +106,11 @@ class COMMENTS {
106106 $comment['timestamp'] = strtotime($comment['ctime']);
107107 $actions->setCurrentComment($comment);
108108 $actions->setHighlight($highlight);
109- $manager->notify('PreComment', array('comment' => &$comment));
109+ $param = array('comment' => &$comment);
110+ $manager->notify('PreComment', $param);
110111 $parser->parse($template['COMMENTS_BODY']);
111- $manager->notify('PostComment', array('comment' => &$comment));
112+ $param = array('comment' => &$comment);
113+ $manager->notify('PostComment', $param);
112114 }
113115
114116 $parser->parse($template['COMMENTS_FOOTER']);
@@ -256,7 +258,8 @@ class COMMENTS {
256258 $spamcheck['url'] = $comment['userid'];
257259 } // end if
258260
259- $manager->notify('SpamCheck', array('spamcheck' => &$spamcheck) );
261+ $param = array('spamcheck' => &$spamcheck);
262+ $manager->notify('SpamCheck', $param);
260263
261264 if ( !$continue && isset($spamcheck['result']) && $spamcheck['result'] == TRUE )
262265 {
@@ -316,13 +319,17 @@ class COMMENTS {
316319
317320 $frommail = $member->getNotifyFromMailAddress($comment['email']);
318321
319- $notify =& new NOTIFICATION($settings->getNotifyAddress() );
322+ $notify = new NOTIFICATION($settings->getNotifyAddress() );
320323 $notify->notify($mailto_title, $mailto_msg , $frommail);
321324 }
322325
323326 $comment = COMMENT::prepare($comment);
324327
325- $manager->notify('PreAddComment', array('comment' => &$comment, 'spamcheck' => &$spamcheck) );
328+ $param = array(
329+ 'comment' => &$comment,
330+ 'spamcheck' => &$spamcheck
331+ );
332+ $manager->notify('PreAddComment', $param);
326333
327334 $name = sql_real_escape_string($comment['user']);
328335 $url = sql_real_escape_string($comment['userid']);
@@ -356,7 +363,12 @@ class COMMENTS {
356363
357364 // post add comment
358365 $commentid = sql_insert_id();
359- $manager->notify('PostAddComment', array('comment' => &$comment, 'commentid' => &$commentid, 'spamcheck' => &$spamcheck) );
366+ $param = array(
367+ 'comment' => &$comment,
368+ 'commentid' => &$commentid,
369+ 'spamcheck' => &$spamcheck
370+ );
371+ $manager->notify('PostAddComment', $param);
360372
361373 // succeeded !
362374 return TRUE;
@@ -423,7 +435,13 @@ class COMMENTS {
423435 // let plugins do verification (any plugin which thinks the comment is invalid
424436 // can change 'error' to something other than '1')
425437 $result = 1;
426- $manager->notify('ValidateForm', array('type' => 'comment', 'comment' => &$comment, 'error' => &$result, 'spamcheck' => &$spamcheck) );
438+ $param = array(
439+ 'type' => 'comment',
440+ 'comment' => &$comment,
441+ 'error' => &$result,
442+ 'spamcheck' => &$spamcheck
443+ );
444+ $manager->notify('ValidateForm', $param);
427445
428446 return $result;
429447 }
--- a/nucleus/libs/ENCAPSULATE.php
+++ b/nucleus/libs/ENCAPSULATE.php
@@ -67,7 +67,7 @@ class NAVLIST extends ENCAPSULATE {
6767 }
6868
6969 function showBatchList($batchtype, $query, $type, $template, $errorMessage = _LISTS_NOMORE) {
70- $batch =& new BATCH($batchtype);
70+ $batch = new BATCH($batchtype);
7171
7272 $this->doEncapsulate(
7373 array(&$batch, 'showlist'),
--- a/nucleus/libs/ITEM.php
+++ b/nucleus/libs/ITEM.php
@@ -164,7 +164,17 @@ class ITEM {
164164 //Setting the itemOptions
165165 $aOptions = requestArray('plugoption');
166166 NucleusPlugin::_applyPluginOptions($aOptions, $itemid);
167- $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)));
167+ $param = array(
168+ 'context' => 'item',
169+ 'itemid' => $itemid,
170+ 'item' => array(
171+ 'title' => $i_title,
172+ 'body' => $i_body,
173+ 'more' => $i_more,
174+ 'closed' => $i_closed,
175+ 'catid' => $i_catid)
176+ );
177+ $manager->notify('PostPluginOptionsUpdate', $param);
168178
169179 if ($i_draftid > 0) {
170180 // delete permission is checked inside ITEM::delete()
@@ -208,7 +218,16 @@ class ITEM {
208218 }
209219
210220 // call plugins
211- $manager->notify('PreUpdateItem',array('itemid' => $itemid, 'title' => &$title, 'body' => &$body, 'more' => &$more, 'blog' => &$blog, 'closed' => &$closed, 'catid' => &$catid));
221+ $param = array(
222+ ' itemid' => $itemid,
223+ 'title' => &$title,
224+ 'body' => &$body,
225+ 'more' => &$more,
226+ 'blog' => &$blog,
227+ 'closed' => &$closed,
228+ 'catid' => &$catid
229+ );
230+ $manager->notify('PreUpdateItem', $param);
212231
213232 // update item itsself
214233 $query = 'UPDATE '.sql_table('item')
@@ -264,7 +283,8 @@ class ITEM {
264283 // off we go!
265284 sql_query($query);
266285
267- $manager->notify('PostUpdateItem',array('itemid' => $itemid));
286+ $param = array('itemid' => $itemid);
287+ $manager->notify('PostUpdateItem', $param);
268288
269289 // when needed, move item and comments to new blog
270290 if ($moveNeeded)
@@ -273,7 +293,18 @@ class ITEM {
273293 //update the itemOptions
274294 $aOptions = requestArray('plugoption');
275295 NucleusPlugin::_applyPluginOptions($aOptions);
276- $manager->notify('PostPluginOptionsUpdate',array('context' => 'item', 'itemid' => $itemid, 'item' => array('title' => $title, 'body' => $body, 'more' => $more, 'closed' => $closed, 'catid' => $catid)));
296+ $param = array(
297+ 'context' => 'item',
298+ 'itemid' => $itemid,
299+ 'item' => array(
300+ 'title' => $title,
301+ 'body' => $body,
302+ 'more' => $more,
303+ 'closed' => $closed,
304+ 'catid' => $catid
305+ )
306+ );
307+ $manager->notify('PostPluginOptionsUpdate', $param);
277308
278309 }
279310
@@ -290,14 +321,12 @@ class ITEM {
290321
291322 $new_blogid = getBlogIDFromCatID($new_catid);
292323
293- $manager->notify(
294- 'PreMoveItem',
295- array(
296- 'itemid' => $itemid,
297- 'destblogid' => $new_blogid,
298- 'destcatid' => $new_catid
299- )
324+ $param = array(
325+ 'itemid' => $itemid,
326+ 'destblogid' => $new_blogid,
327+ 'destcatid' => $new_catid
300328 );
329+ $manager->notify('PreMoveItem', $param);
301330
302331
303332 // update item table
@@ -308,14 +337,12 @@ class ITEM {
308337 $query = 'UPDATE '.sql_table('comment')." SET cblog=" . $new_blogid." WHERE citem=" . $itemid;
309338 sql_query($query);
310339
311- $manager->notify(
312- 'PostMoveItem',
313- array(
314- 'itemid' => $itemid,
315- 'destblogid' => $new_blogid,
316- 'destcatid' => $new_catid
317- )
340+ $param = array(
341+ 'itemid' => $itemid,
342+ 'destblogid' => $new_blogid,
343+ 'destcatid' => $new_catid
318344 );
345+ $manager->notify('PostMoveItem', $param);
319346 }
320347
321348 /**
@@ -332,8 +359,8 @@ class ITEM {
332359 return 1;
333360 }
334361
335-
336- $manager->notify('PreDeleteItem', array('itemid' => $itemid));
362+ $param = array('itemid' => $itemid);
363+ $manager->notify('PreDeleteItem', $param);
337364
338365 // delete item
339366 $query = 'DELETE FROM '.sql_table('item').' WHERE inumber=' . $itemid;
@@ -346,7 +373,8 @@ class ITEM {
346373 // delete all associated plugin options
347374 NucleusPlugin::_deleteOptionValues('item', $itemid);
348375
349- $manager->notify('PostDeleteItem', array('itemid' => $itemid));
376+ $param = array('itemid' => $itemid);
377+ $manager->notify('PostDeleteItem', $param);
350378
351379 return 0;
352380 }
@@ -448,12 +476,25 @@ class ITEM {
448476 $itemid = $blog->additem($i_catid, $i_title, $i_body, $i_more, $i_blogid, $i_author, $posttime, $i_closed, $i_draft);
449477 }
450478
479+ /*
451480 // No plugin support in AutoSaveDraft yet
452481 //Setting the itemOptions
453- //$aOptions = requestArray('plugoption');
454- //NucleusPlugin::_applyPluginOptions($aOptions, $itemid);
455- //$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)));
456-
482+ $aOptions = requestArray('plugoption');
483+ NucleusPlugin::_applyPluginOptions($aOptions, $itemid);
484+ $param = array(
485+ 'context' => 'item',
486+ 'itemid' => $itemid,
487+ 'item' => array(
488+ 'title' => $i_title,
489+ 'body' => $i_body,
490+ 'more' => $i_more,
491+ 'closed' => $i_closed,
492+ 'catid' => $i_catid
493+ )
494+ );
495+ $manager->notify('PostPluginOptionsUpdate', $param);
496+ */
497+
457498 // success
458499 return array('status' => 'added', 'draftid' => $itemid);
459500 }
--- a/nucleus/libs/ITEMACTIONS.php
+++ b/nucleus/libs/ITEMACTIONS.php
@@ -454,7 +454,7 @@ class ITEMACTIONS extends BaseActions {
454454
455455 // add comments
456456 if ($this->showComments && $this->blog->commentsEnabled()) {
457- $comments =& new COMMENTS($this->currentItem->itemid);
457+ $comments = new COMMENTS($this->currentItem->itemid);
458458 $comments->setItemActions($this);
459459 $comments->showComments($this->template, $maxToShow, $this->currentItem->closed ? 0 : 1, $this->strHighlight);
460460 }
@@ -487,7 +487,7 @@ class ITEMACTIONS extends BaseActions {
487487 // add item reference (array_unshift didn't work)
488488 $params = array_merge(array(&$this->currentItem),$params);
489489
490- call_user_func_array(array(&$plugin,'doTemplateVar'), $params);
490+ call_user_func_array(array($plugin,'doTemplateVar'), $params);
491491 }
492492
493493 /**
@@ -523,8 +523,8 @@ class ITEMACTIONS extends BaseActions {
523523 * 'plugin variables in items' implementation by Andy
524524 */
525525 function highlightAndParse(&$data) {
526- $actions =& new BODYACTIONS($this->blog);
527- $parser =& new PARSER($actions->getDefinedActions(), $actions);
526+ $actions = new BODYACTIONS($this->blog);
527+ $parser = new PARSER($actions->getDefinedActions(), $actions);
528528 $actions->setTemplate($this->template);
529529 $actions->setHighlight($this->strHighlight);
530530 $actions->setCurrentItem($this->currentItem);
@@ -781,7 +781,7 @@ class ITEMACTIONS extends BaseActions {
781781 $params = func_get_args();
782782 array_shift($params);
783783
784- return call_user_func_array(array(&$plugin, 'doIf'), $params);
784+ return call_user_func_array(array($plugin, 'doIf'), $params);
785785 }
786786 }
787787 ?>
\ No newline at end of file
--- a/nucleus/libs/MANAGER.php
+++ b/nucleus/libs/MANAGER.php
@@ -66,7 +66,7 @@ class MANAGER {
6666 function &instance() {
6767 static $instance = array();
6868 if (empty($instance)) {
69- $instance[0] =& new MANAGER();
69+ $instance[0] = new MANAGER();
7070 }
7171 return $instance[0];
7272 }
@@ -142,7 +142,7 @@ class MANAGER {
142142 // load class if needed
143143 $this->_loadClass('BLOG','BLOG.php');
144144 // load blog object
145- $blog =& new BLOG($blogid);
145+ $blog = new BLOG($blogid);
146146 $this->blogs[$blogid] =& $blog;
147147 }
148148 return $blog;
@@ -187,7 +187,7 @@ class MANAGER {
187187 // load class if needed
188188 $this->_loadClass('KARMA','KARMA.php');
189189 // create KARMA object
190- $karma =& new KARMA($itemid);
190+ $karma = new KARMA($itemid);
191191 $this->karma[$itemid] =& $karma;
192192 }
193193 return $karma;
@@ -269,7 +269,7 @@ class MANAGER {
269269 }
270270
271271 // add to plugin array
272- eval('$this->plugins[$name] =& new ' . $name . '();');
272+ eval('$this->plugins[$name] = new ' . $name . '();');
273273
274274 // get plugid
275275 $this->plugins[$name]->plugid = $this->getPidFromName($name);
@@ -426,7 +426,7 @@ class MANAGER {
426426 $this->_loadPlugin($listener);
427427 // do notify (if method exists)
428428 if (isset($this->plugins[$listener]) && method_exists($this->plugins[$listener], 'event_' . $eventName))
429- call_user_func(array(&$this->plugins[$listener],'event_' . $eventName), &$data);
429+ call_user_func(array($this->plugins[$listener], 'event_' . $eventName), $data);
430430 }
431431 }
432432
--- a/nucleus/libs/MEDIA.php
+++ b/nucleus/libs/MEDIA.php
@@ -149,7 +149,12 @@ class MEDIA {
149149 if ($filename === false)
150150 return _ERROR_BADFILETYPE;
151151
152- $manager->notify('PreMediaUpload',array('collection' => &$collection, 'uploadfile' => $uploadfile, 'filename' => &$filename));
152+ $param = array(
153+ 'collection' => &$collection,
154+ 'uploadfile' => $uploadfile,
155+ 'filename' => &$filename
156+ );
157+ $manager->notify('PreMediaUpload', $param);
153158
154159 // don't allow uploads to unknown or forbidden collections
155160 $exceptReadOnly = true;
@@ -194,7 +199,12 @@ class MEDIA {
194199 @chmod($mediadir . $filename, 0644);
195200 umask($oldumask);
196201
197- $manager->notify('PostMediaUpload',array('collection' => $collection, 'mediadir' => $mediadir, 'filename' => $filename));
202+ $param = array(
203+ 'collection' => $collection,
204+ 'mediadir' => $mediadir,
205+ 'filename' => $filename
206+ );
207+ $manager->notify('PostMediaUpload', $param);
198208
199209 return '';
200210
--- a/nucleus/libs/MEMBER.php
+++ b/nucleus/libs/MEMBER.php
@@ -51,7 +51,7 @@ class MEMBER {
5151 * @static
5252 */
5353 function &createFromName($displayname) {
54- $mem =& new MEMBER();
54+ $mem = new MEMBER();
5555 $mem->readFromName($displayname);
5656 return $mem;
5757 }
@@ -62,7 +62,7 @@ class MEMBER {
6262 * @static
6363 */
6464 function &createFromID($id) {
65- $mem =& new MEMBER();
65+ $mem = new MEMBER();
6666 $mem->readFromID($id);
6767 return $mem;
6868 }
@@ -85,7 +85,13 @@ class MEMBER {
8585 $this->loggedin = 0;
8686 $success = 0;
8787 $allowlocal = 1;
88- $manager->notify('CustomLogin', array('login' => &$login, 'password'=>&$password, 'success'=>&$success, 'allowlocal'=>&$allowlocal) );
88+ $param = array(
89+ 'login' => &$login,
90+ 'password' =>&$password,
91+ 'success' =>&$success,
92+ 'allowlocal' =>&$allowlocal
93+ );
94+ $manager->notify('CustomLogin', $param);
8995 if ($success && $this->readFromName($login)) {
9096 $this->loggedin = 1;
9197 return $this->isLoggedIn();
--- a/nucleus/libs/PAGEFACTORY.php
+++ b/nucleus/libs/PAGEFACTORY.php
@@ -101,7 +101,11 @@ class PAGEFACTORY extends BaseActions {
101101 $this->method = 'add';
102102
103103 global $manager;
104- $manager->notify('PreAddItemForm', array('contents' => &$contents, 'blog' => &$this->blog));
104+ $param = array(
105+ 'contents' => &$contents,
106+ 'blog' => &$this->blog
107+ );
108+ $manager->notify('PreAddItemForm', $param);
105109
106110 $this->createForm($contents);
107111 }
@@ -135,7 +139,7 @@ class PAGEFACTORY extends BaseActions {
135139 $template = $this->getTemplateFor($this->type);
136140
137141 // use the PARSER engine to parse that template
138- $parser =& new PARSER($this->actions, $this);
142+ $parser = new PARSER($this->actions, $this);
139143 $parser->parse($template);
140144 }
141145
@@ -245,12 +249,10 @@ class PAGEFACTORY extends BaseActions {
245249
246250 $extrahead = '';
247251
248- $manager->notify(
249- 'BookmarkletExtraHead',
250- array(
251- 'extrahead' => &$extrahead
252- )
252+ $param = array(
253+ 'extrahead' => &$extrahead
253254 );
255+ $manager->notify('BookmarkletExtraHead', $param);
254256
255257 echo $extrahead;
256258 }
@@ -387,20 +389,18 @@ class PAGEFACTORY extends BaseActions {
387389
388390 switch ($this->method) {
389391 case 'add':
390- $manager->notify('AddItemFormExtras',
391- array(
392- 'blog' => &$this->blog
393- )
392+ $param = array(
393+ 'blog' => &$this->blog
394394 );
395+ $manager->notify('AddItemFormExtras', $param);
395396 break;
396397 case 'edit':
397- $manager->notify('EditItemFormExtras',
398- array(
399- 'variables' => $this->variables,
400- 'blog' => &$this->blog,
401- 'itemid' => $this->variables['itemid']
402- )
398+ $PARAM = array(
399+ 'variables' => $this->variables,
400+ 'blog' => &$this->blog,
401+ 'itemid' => $this->variables['itemid']
403402 );
403+ $manager->notify('EditItemFormExtras', $param);
404404 break;
405405 }
406406 }
--- a/nucleus/libs/PARSER.php
+++ b/nucleus/libs/PARSER.php
@@ -111,7 +111,7 @@ class PARSER {
111111 // when using PHP versions lower than 4.0.5, uncomment the line before
112112 // and comment the call_user_func_array call
113113 //$this->call_using_array($action, $this->handler, $params);
114- call_user_func_array(array(&$this->handler,'parse_' . $actionlc), $params);
114+ call_user_func_array(array($this->handler, 'parse_' . $actionlc), $params);
115115 } else {
116116 // redirect to plugin action if possible
117117 if (in_array('plugin', $this->actions) && $manager->pluginInstalled('NP_' . $action)) {
@@ -138,7 +138,7 @@ class PARSER {
138138 return;
139139 }
140140
141- $command = 'call_user_func(array(&$handler,$methodname)';
141+ $command = 'call_user_func(array($handler,$methodname)';
142142 for ($i = 0; $i<count($paramarray); $i++)
143143 $command .= ',$paramarray[' . $i . ']';
144144 $command .= ');';
--- a/nucleus/libs/PLUGIN.php
+++ b/nucleus/libs/PLUGIN.php
@@ -48,14 +48,14 @@
4848 $args = func_get_args();
4949 array_shift($args);
5050 array_unshift($args, 'template');
51- call_user_func_array(array(&$this,'doSkinVar'),$args);
51+ call_user_func_array(array($this,'doSkinVar'), $args);
5252 }
5353 function doTemplateCommentsVar(&$item, &$comment) {
5454 $args = func_get_args();
5555 array_shift($args);
5656 array_shift($args);
5757 array_unshift($args, 'template');
58- call_user_func_array(array(&$this,'doSkinVar'),$args);
58+ call_user_func_array(array($this,'doSkinVar'), $args);
5959 }
6060 function doAction($type) { return _ERROR_PLUGIN_NOSUCHACTION; }
6161 function doIf($key,$value) { return false; }
@@ -663,7 +663,14 @@
663663
664664 //trigger event PrePluginOptionsUpdate to give the plugin the
665665 //possibility to change/validate the new value for the option
666- $manager->notify('PrePluginOptionsUpdate',array('context' => $o->ocontext, 'plugid' => $o->opid, 'optionname' => $o->oname, 'contextid' => $contextid, 'value' => &$value));
666+ $param = array(
667+ 'context' => $o->ocontext,
668+ 'plugid' => $o->opid,
669+ 'optionname' => $o->oname,
670+ 'contextid' => $contextid,
671+ 'value' => &$value
672+ );
673+ $manager->notify('PrePluginOptionsUpdate', $param);
667674
668675 // delete the old value for the option
669676 sql_query('DELETE FROM '.sql_table('plugin_option').' WHERE oid='.intval($oid).' AND ocontextid='.intval($contextid));
--- a/nucleus/libs/SKIN.php
+++ b/nucleus/libs/SKIN.php
@@ -122,31 +122,27 @@ class SKIN {
122122 function createNew($name, $desc, $type = 'text/html', $includeMode = 'normal', $includePrefix = '') {
123123 global $manager;
124124
125- $manager->notify(
126- 'PreAddSkin',
127- array(
128- 'name' => &$name,
129- 'description' => &$desc,
130- 'type' => &$type,
131- 'includeMode' => &$includeMode,
132- 'includePrefix' => &$includePrefix
133- )
125+ $param = array(
126+ 'name' => &$name,
127+ 'description' => &$desc,
128+ 'type' => &$type,
129+ 'includeMode' => &$includeMode,
130+ 'includePrefix' => &$includePrefix
134131 );
132+ $manager->notify('PreAddSkin', $param);
135133
136134 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)."')");
137135 $newid = sql_insert_id();
138136
139- $manager->notify(
140- 'PostAddSkin',
141- array(
142- 'skinid' => $newid,
143- 'name' => $name,
144- 'description' => $desc,
145- 'type' => $type,
146- 'includeMode' => $includeMode,
147- 'includePrefix' => $includePrefix
148- )
137+ $param = array(
138+ 'skinid' => $newid,
139+ 'name' => $name,
140+ 'description' => $desc,
141+ 'type' => $type,
142+ 'includeMode' => $includeMode,
143+ 'includePrefix' => $includePrefix
149144 );
145+ $manager->notify('PostAddSkin', $param);
150146
151147 return $newid;
152148 }
@@ -154,7 +150,11 @@ class SKIN {
154150 function parse($type) {
155151 global $manager, $CONF, $skinid;
156152
157- $manager->notify('InitSkinParse',array('skin' => &$this, 'type' => $type));
153+ $param = array(
154+ 'skin' => &$this,
155+ 'type' => $type
156+ );
157+ $manager->notify('InitSkinParse', $param);
158158 $skinid = $this->id;
159159
160160 // set output type
@@ -168,7 +168,7 @@ class SKIN {
168168
169169 if (!$contents) {
170170 // use base skin if this skin does not have contents
171- $defskin =& new SKIN($CONF['BaseSkin']);
171+ $defskin = new SKIN($CONF['BaseSkin']);
172172 $contents = $defskin->getContent($type);
173173 if (!$contents) {
174174 echo _ERROR_SKIN;
@@ -178,20 +178,29 @@ class SKIN {
178178
179179 $actions = $this->getAllowedActionsForType($type);
180180
181- $manager->notify('PreSkinParse',array('skin' => &$this, 'type' => $type, 'contents' => &$contents));
181+ $param = array(
182+ 'skin' => &$this,
183+ 'type' => $type,
184+ 'contents' => &$contents
185+ );
186+ $manager->notify('PreSkinParse', $param);
182187 $skinid = $this->id;
183188
184189 // set IncludeMode properties of parser
185190 PARSER::setProperty('IncludeMode',$this->getIncludeMode());
186191 PARSER::setProperty('IncludePrefix',$this->getIncludePrefix());
187192
188- $handler =& new ACTIONS($type, $this);
189- $parser =& new PARSER($actions, $handler);
193+ $handler = new ACTIONS($type, $this);
194+ $parser = new PARSER($actions, $handler);
190195 $handler->setParser($parser);
191196 $handler->setSkin($this);
192197 $parser->parse($contents);
193198
194- $manager->notify('PostSkinParse',array('skin' => &$this, 'type' => $type));
199+ $param = array(
200+ 'skin' => &$this,
201+ 'type' => $type
202+ );
203+ $manager->notify('PostSkinParse', $param);
195204 $skinid = $this->id;
196205
197206
--- a/nucleus/libs/TEMPLATE.php
+++ b/nucleus/libs/TEMPLATE.php
@@ -87,25 +87,21 @@ class TEMPLATE {
8787 function createNew($name, $desc) {
8888 global $manager;
8989
90- $manager->notify(
91- 'PreAddTemplate',
92- array(
93- 'name' => &$name,
94- 'description' => &$desc
95- )
90+ $param = array(
91+ 'name' => &$name,
92+ 'description' => &$desc
9693 );
94+ $manager->notify('PreAddTemplate', $param);
9795
9896 sql_query('INSERT INTO '.sql_table('template_desc')." (tdname, tddesc) VALUES ('" . sql_real_escape_string($name) . "','" . sql_real_escape_string($desc) . "')");
9997 $newId = sql_insert_id();
10098
101- $manager->notify(
102- 'PostAddTemplate',
103- array(
104- 'templateid' => $newId,
105- 'name' => $name,
106- 'description' => $desc
107- )
99+ $param = array(
100+ 'templateid' => $newId,
101+ 'name' => $name,
102+ 'description' => $desc
108103 );
104+ $manager->notify('PostAddTemplate', $param);
109105
110106 return $newId;
111107 }
@@ -120,12 +116,11 @@ class TEMPLATE {
120116 */
121117 function read($name) {
122118 global $manager;
123- $manager->notify(
124- 'PreTemplateRead',
125- array(
126- 'template' => &$name
127- )
119+
120+ $param = array(
121+ 'template' => &$name
128122 );
123+ $manager->notify('PreTemplateRead', $param);
129124
130125 $query = 'SELECT tpartname, tcontent'
131126 . ' FROM '.sql_table('template_desc').', '.sql_table('template')
--- a/nucleus/libs/globalfunctions.php
+++ b/nucleus/libs/globalfunctions.php
@@ -290,7 +290,11 @@ if ($action == 'login') {
290290 $action = $nextaction;
291291 }
292292
293- $manager->notify('LoginSuccess', array('member' => &$member, 'username' => $login) );
293+ $param = array(
294+ 'member' => &$member,
295+ 'username' => $login
296+ );
297+ $manager->notify('LoginSuccess', $param);
294298 $errormessage = '';
295299 ACTIONLOG::add(INFO, "Login successful for $login (sharedpc=$shared)");
296300 } else {
@@ -303,8 +307,9 @@ if ($action == 'login') {
303307 else
304308 {
305309 $errormessage = 'Login failed for ' . $login;
306- }
307- $manager->notify('LoginFailed', array('username' => $login) );
310+ }
311+ $param = array('username' => $login);
312+ $manager->notify('LoginFailed', $param);
308313 ACTIONLOG::add(INFO, $errormessage);
309314 }
310315 /*
@@ -317,10 +322,12 @@ Backed out for now: See http://forum.nucleuscms.org/viewtopic.php?t=3684 for det
317322 $pw = serverVar('PHP_AUTH_PW');
318323
319324 if ($member->login($login, $pw) ) {
320- $manager->notify('LoginSuccess',array('member' => &$member));
325+ $param = array('member' => &$member);
326+ $manager->notify('LoginSuccess', $param);
321327 ACTIONLOG::add(INFO, "HTTP authentication successful for $login");
322328 } else {
323- $manager->notify('LoginFailed',array('username' => $login));
329+ $param = array('username' => $login);
330+ $manager->notify('LoginFailed', $param);
324331 ACTIONLOG::add(INFO, 'HTTP authentication failed for ' . $login);
325332
326333 //Since bad credentials, generate an apropriate error page
@@ -335,7 +342,8 @@ Backed out for now: See http://forum.nucleuscms.org/viewtopic.php?t=3684 for det
335342 // remove cookies on logout
336343 setcookie($CONF['CookiePrefix'] . 'user', '', (time() - 2592000), $CONF['CookiePath'], $CONF['CookieDomain'], $CONF['CookieSecure']);
337344 setcookie($CONF['CookiePrefix'] . 'loginkey', '', (time() - 2592000), $CONF['CookiePath'], $CONF['CookieDomain'], $CONF['CookieSecure']);
338- $manager->notify('Logout', array('username' => cookieVar($CONF['CookiePrefix'] . 'user') ) );
345+ $param = array('username' => cookieVar($CONF['CookiePrefix'] . 'user'));
346+ $manager->notify('Logout', $param);
339347 } elseif (cookieVar($CONF['CookiePrefix'] . 'user') ) {
340348 // Cookie Authentication
341349 $ck=cookieVar($CONF['CookiePrefix'] . 'loginkey');
@@ -353,7 +361,8 @@ Backed out for now: See http://forum.nucleuscms.org/viewtopic.php?t=3684 for det
353361 }
354362
355363 // login completed
356-$manager->notify('PostAuthentication', array('loggedIn' => $member->isLoggedIn() ) );
364+$param = array('loggedIn' => $member->isLoggedIn());
365+$manager->notify('PostAuthentication', $param);
357366 ticketForPlugin();
358367
359368 // first, let's see if the site is disabled or not. always allow admin area access.
@@ -459,14 +468,12 @@ if ($CONF['URLMode'] == 'pathinfo') {
459468 }
460469
461470 $parsed = false;
462- $manager->notify(
463- 'ParseURL',
464- array(
465- 'type' => basename(serverVar('SCRIPT_NAME') ), // e.g. item, blog, ...
466- 'info' => $virtualpath,
467- 'complete' => &$parsed
468- )
471+ $param = array(
472+ 'type' => basename(serverVar('SCRIPT_NAME') ), // e.g. item, blog, ...
473+ 'info' => $virtualpath,
474+ 'complete' => &$parsed
469475 );
476+ $manager->notify('ParseURL', $param);
470477
471478 if (!$parsed) {
472479 // default implementation
@@ -548,13 +555,11 @@ if ($CONF['URLMode'] == 'pathinfo') {
548555 the values of something like catid or itemid
549556 New in 3.60
550557 */
551-$manager->notify(
552- 'PostParseURL',
553- array(
554- 'type' => basename(serverVar('SCRIPT_NAME') ), // e.g. item, blog, ...
555- 'info' => $virtualpath
556- )
558+$param = array(
559+ 'type' => basename(serverVar('SCRIPT_NAME') ), // e.g. item, blog, ...
560+ 'info' => $virtualpath
557561 );
562+$manager->notify('PostParseURL', $param);
558563
559564 function include_libs($file,$once=true,$require=true){
560565 global $DIR_LIBS;
@@ -684,14 +689,12 @@ function sendContentType($contenttype, $pagetype = '', $charset = _CHARSET) {
684689 $contenttype = 'text/html';
685690 }
686691
687- $manager->notify(
688- 'PreSendContentType',
689- array(
690- 'contentType' => &$contenttype,
691- 'charset' => &$charset,
692- 'pageType' => $pagetype
693- )
692+ $param = array(
693+ 'contentType' => &$contenttype,
694+ 'charset' => &$charset,
695+ 'pageType' => $pagetype
694696 );
697+ $manager->notify('PreSendContentType', $param);
695698
696699 // strip strange characters
697700 $contenttype = preg_replace('|[^a-z0-9-+./]|i', '', $contenttype);
@@ -1549,7 +1552,7 @@ function createBlogidLink($blogid, $params = '') {
15491552 return createLink('blog', array('blogid' => $blogid, 'extra' => $params) );
15501553 }
15511554
1552-function createLink($type, $params) {
1555+function createLink($type, $args) {
15531556 global $manager, $CONF;
15541557
15551558 $generatedURL = '';
@@ -1559,15 +1562,13 @@ function createLink($type, $params) {
15591562 $created = false;
15601563
15611564 if ($usePathInfo) {
1562- $manager->notify(
1563- 'GenerateURL',
1564- array(
1565- 'type' => $type,
1566- 'params' => $params,
1567- 'completed' => &$created,
1568- 'url' => &$url
1569- )
1565+ $param = array(
1566+ 'type' => $type,
1567+ 'args' => $args,
1568+ 'completed' => &$created,
1569+ 'url' => &$url
15701570 );
1571+ $manager->notify('GenerateURL', $param);
15711572 }
15721573
15731574 // if a plugin created the URL, return it
@@ -1579,58 +1580,58 @@ function createLink($type, $params) {
15791580 switch ($type) {
15801581 case 'item':
15811582 if ($usePathInfo) {
1582- $url = $CONF['ItemURL'] . '/' . $CONF['ItemKey'] . '/' . $params['itemid'];
1583+ $url = $CONF['ItemURL'] . '/' . $CONF['ItemKey'] . '/' . $args['itemid'];
15831584 } else {
1584- $url = $CONF['ItemURL'] . '?itemid=' . $params['itemid'];
1585+ $url = $CONF['ItemURL'] . '?itemid=' . $args['itemid'];
15851586 }
15861587 break;
15871588
15881589 case 'member':
15891590 if ($usePathInfo) {
1590- $url = $CONF['MemberURL'] . '/' . $CONF['MemberKey'] . '/' . $params['memberid'];
1591+ $url = $CONF['MemberURL'] . '/' . $CONF['MemberKey'] . '/' . $args['memberid'];
15911592 } else {
1592- $url = $CONF['MemberURL'] . '?memberid=' . $params['memberid'];
1593+ $url = $CONF['MemberURL'] . '?memberid=' . $args['memberid'];
15931594 }
15941595 break;
15951596
15961597 case 'category':
15971598 if ($usePathInfo) {
1598- $url = $CONF['CategoryURL'] . '/' . $CONF['CategoryKey'] . '/' . $params['catid'];
1599+ $url = $CONF['CategoryURL'] . '/' . $CONF['CategoryKey'] . '/' . $args['catid'];
15991600 } else {
1600- $url = $CONF['CategoryURL'] . '?catid=' . $params['catid'];
1601+ $url = $CONF['CategoryURL'] . '?catid=' . $args['catid'];
16011602 }
16021603 break;
16031604
16041605 case 'archivelist':
1605- if (!$params['blogid']) {
1606- $params['blogid'] = $CONF['DefaultBlog'];
1606+ if (!$args['blogid']) {
1607+ $args['blogid'] = $CONF['DefaultBlog'];
16071608 }
16081609
16091610 if ($usePathInfo) {
1610- $url = $CONF['ArchiveListURL'] . '/' . $CONF['ArchivesKey'] . '/' . $params['blogid'];
1611+ $url = $CONF['ArchiveListURL'] . '/' . $CONF['ArchivesKey'] . '/' . $args['blogid'];
16111612 } else {
1612- $url = $CONF['ArchiveListURL'] . '?archivelist=' . $params['blogid'];
1613+ $url = $CONF['ArchiveListURL'] . '?archivelist=' . $args['blogid'];
16131614 }
16141615 break;
16151616
16161617 case 'archive':
16171618 if ($usePathInfo) {
1618- $url = $CONF['ArchiveURL'] . '/' . $CONF['ArchiveKey'] . '/'.$params['blogid'].'/' . $params['archive'];
1619+ $url = $CONF['ArchiveURL'] . '/' . $CONF['ArchiveKey'] . '/'.$args['blogid'].'/' . $args['archive'];
16191620 } else {
1620- $url = $CONF['ArchiveURL'] . '?blogid='.$params['blogid'].'&amp;archive=' . $params['archive'];
1621+ $url = $CONF['ArchiveURL'] . '?blogid='.$args['blogid'].'&amp;archive=' . $args['archive'];
16211622 }
16221623 break;
16231624
16241625 case 'blog':
16251626 if ($usePathInfo) {
1626- $url = $CONF['BlogURL'] . '/' . $CONF['BlogKey'] . '/' . $params['blogid'];
1627+ $url = $CONF['BlogURL'] . '/' . $CONF['BlogKey'] . '/' . $args['blogid'];
16271628 } else {
1628- $url = $CONF['BlogURL'] . '?blogid=' . $params['blogid'];
1629+ $url = $CONF['BlogURL'] . '?blogid=' . $args['blogid'];
16291630 }
16301631 break;
16311632 }
16321633
1633- return addLinkParams($url, (isset($params['extra'])? $params['extra'] : null));
1634+ return addLinkParams($url, (isset($args['extra'])? $args['extra'] : null));
16341635 }
16351636
16361637 function createBlogLink($url, $params) {
--- a/nucleus/libs/xmlrpc.inc.php
+++ b/nucleus/libs/xmlrpc.inc.php
@@ -556,7 +556,7 @@ $cp1252_to_xmlent =
556556 if ($rebuild_xmlrpcvals)
557557 {
558558 // build the xmlrpc val out of the data received, and substitute it
559- $temp =& new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']);
559+ $temp = new xmlrpcval($GLOBALS['_xh']['value'], $GLOBALS['_xh']['vt']);
560560 // in case we got info about underlying php class, save it
561561 // in the object we're rebuilding
562562 if (isset($GLOBALS['_xh']['php_class']))
@@ -1119,7 +1119,7 @@ $cp1252_to_xmlent =
11191119 }
11201120 elseif(is_string($msg))
11211121 {
1122- $n =& new xmlrpcmsg('');
1122+ $n = new xmlrpcmsg('');
11231123 $n->payload = $msg;
11241124 $msg = $n;
11251125 }
@@ -1345,14 +1345,14 @@ $cp1252_to_xmlent =
13451345 else
13461346 {
13471347 $this->errstr='Connect error: '.$this->errstr;
1348- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')');
1348+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr . ' (' . $this->errno . ')');
13491349 return $r;
13501350 }
13511351
13521352 if(!fputs($fp, $op, strlen($op)))
13531353 {
13541354 $this->errstr='Write error';
1355- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr);
1355+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $this->errstr);
13561356 return $r;
13571357 }
13581358 else
@@ -1403,7 +1403,7 @@ $cp1252_to_xmlent =
14031403 if(!function_exists('curl_init'))
14041404 {
14051405 $this->errstr='CURL unavailable on this install';
1406- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_curl'], $GLOBALS['xmlrpcstr']['no_curl']);
1406+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_curl'], $GLOBALS['xmlrpcstr']['no_curl']);
14071407 return $r;
14081408 }
14091409 if($method == 'https')
@@ -1412,7 +1412,7 @@ $cp1252_to_xmlent =
14121412 ((is_string($info) && strpos($info, 'OpenSSL') === null) || (is_array($info) && !isset($info['ssl_version']))))
14131413 {
14141414 $this->errstr='SSL unavailable on this install';
1415- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_ssl'], $GLOBALS['xmlrpcstr']['no_ssl']);
1415+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_ssl'], $GLOBALS['xmlrpcstr']['no_ssl']);
14161416 return $r;
14171417 }
14181418 }
@@ -1625,7 +1625,7 @@ $cp1252_to_xmlent =
16251625 if(!$result)
16261626 {
16271627 $this->errstr='no response';
1628- $resp=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['curl_fail'], $GLOBALS['xmlrpcstr']['curl_fail']. ': '. curl_error($curl));
1628+ $resp= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['curl_fail'], $GLOBALS['xmlrpcstr']['curl_fail']. ': '. curl_error($curl));
16291629 if(!$keepalive)
16301630 {
16311631 curl_close($curl);
@@ -1695,7 +1695,7 @@ $cp1252_to_xmlent =
16951695 }
16961696 else
16971697 {
1698- $result =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['multicall_error'], $GLOBALS['xmlrpcstr']['multicall_error']);
1698+ $result = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['multicall_error'], $GLOBALS['xmlrpcstr']['multicall_error']);
16991699 }
17001700 }
17011701 }
@@ -1742,17 +1742,17 @@ $cp1252_to_xmlent =
17421742 $calls = array();
17431743 foreach($msgs as $msg)
17441744 {
1745- $call['methodName'] =& new xmlrpcval($msg->method(),'string');
1745+ $call['methodName'] = new xmlrpcval($msg->method(),'string');
17461746 $numParams = $msg->getNumParams();
17471747 $params = array();
17481748 for($i = 0; $i < $numParams; $i++)
17491749 {
17501750 $params[$i] = $msg->getParam($i);
17511751 }
1752- $call['params'] =& new xmlrpcval($params, 'array');
1753- $calls[] =& new xmlrpcval($call, 'struct');
1752+ $call['params'] = new xmlrpcval($params, 'array');
1753+ $calls[] = new xmlrpcval($call, 'struct');
17541754 }
1755- $multicall =& new xmlrpcmsg('system.multicall');
1755+ $multicall = new xmlrpcmsg('system.multicall');
17561756 $multicall->addParam(new xmlrpcval($calls, 'array'));
17571757
17581758 // Attempt RPC call
@@ -1800,7 +1800,7 @@ $cp1252_to_xmlent =
18001800 return false; // Bad value
18011801 }
18021802 // Normal return value
1803- $response[$i] =& new xmlrpcresp($val[0], 0, '', 'phpvals');
1803+ $response[$i] = new xmlrpcresp($val[0], 0, '', 'phpvals');
18041804 break;
18051805 case 2:
18061806 /// @todo remove usage of @: it is apparently quite slow
@@ -1814,7 +1814,7 @@ $cp1252_to_xmlent =
18141814 {
18151815 return false;
18161816 }
1817- $response[$i] =& new xmlrpcresp(0, $code, $str);
1817+ $response[$i] = new xmlrpcresp(0, $code, $str);
18181818 break;
18191819 default:
18201820 return false;
@@ -1847,7 +1847,7 @@ $cp1252_to_xmlent =
18471847 return false; // Bad value
18481848 }
18491849 // Normal return value
1850- $response[$i] =& new xmlrpcresp($val->arraymem(0));
1850+ $response[$i] = new xmlrpcresp($val->arraymem(0));
18511851 break;
18521852 case 'struct':
18531853 $code = $val->structmem('faultCode');
@@ -1860,7 +1860,7 @@ $cp1252_to_xmlent =
18601860 {
18611861 return false;
18621862 }
1863- $response[$i] =& new xmlrpcresp(0, $code->scalarval(), $str->scalarval());
1863+ $response[$i] = new xmlrpcresp(0, $code->scalarval(), $str->scalarval());
18641864 break;
18651865 default:
18661866 return false;
@@ -2224,7 +2224,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
22242224 else
22252225 {
22262226 error_log('XML-RPC: xmlrpcmsg::parseResponse: HTTPS via proxy error, tunnel connection possibly failed');
2227- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (HTTPS via proxy error, tunnel connection possibly failed)');
2227+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (HTTPS via proxy error, tunnel connection possibly failed)');
22282228 return $r;
22292229 }
22302230 }
@@ -2245,7 +2245,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
22452245 {
22462246 $errstr= substr($data, 0, strpos($data, "\n")-1);
22472247 error_log('XML-RPC: xmlrpcmsg::parseResponse: HTTP error, got response: ' .$errstr);
2248- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (' . $errstr . ')');
2248+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (' . $errstr . ')');
22492249 return $r;
22502250 }
22512251
@@ -2367,7 +2367,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
23672367 if(!$data = decode_chunked($data))
23682368 {
23692369 error_log('XML-RPC: xmlrpcmsg::parseResponse: errors occurred when trying to rebuild the chunked data received from server');
2370- $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']);
2370+ $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']);
23712371 return $r;
23722372 }
23732373 }
@@ -2397,14 +2397,14 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
23972397 else
23982398 {
23992399 error_log('XML-RPC: xmlrpcmsg::parseResponse: errors occurred when trying to decode the deflated data received from server');
2400- $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']);
2400+ $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['decompress_fail'], $GLOBALS['xmlrpcstr']['decompress_fail']);
24012401 return $r;
24022402 }
24032403 }
24042404 else
24052405 {
24062406 error_log('XML-RPC: xmlrpcmsg::parseResponse: the server sent deflated data. Your php install must have the Zlib extension compiled in to support this.');
2407- $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['cannot_decompress'], $GLOBALS['xmlrpcstr']['cannot_decompress']);
2407+ $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['cannot_decompress'], $GLOBALS['xmlrpcstr']['cannot_decompress']);
24082408 return $r;
24092409 }
24102410 }
@@ -2436,7 +2436,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
24362436 if($data == '')
24372437 {
24382438 error_log('XML-RPC: xmlrpcmsg::parseResponse: no response received from server.');
2439- $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_data'], $GLOBALS['xmlrpcstr']['no_data']);
2439+ $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['no_data'], $GLOBALS['xmlrpcstr']['no_data']);
24402440 return $r;
24412441 }
24422442
@@ -2496,7 +2496,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
24962496 // if user wants back raw xml, give it to him
24972497 if ($return_type == 'xml')
24982498 {
2499- $r =& new xmlrpcresp($data, 0, '', 'xml');
2499+ $r = new xmlrpcresp($data, 0, '', 'xml');
25002500 $r->hdrs = $GLOBALS['_xh']['headers'];
25012501 $r->_cookies = $GLOBALS['_xh']['cookies'];
25022502 $r->raw_data = $raw_data;
@@ -2557,7 +2557,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
25572557 xml_get_current_line_number($parser), xml_get_current_column_number($parser));
25582558 }
25592559 error_log($errstr);
2560- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'], $GLOBALS['xmlrpcstr']['invalid_return'].' ('.$errstr.')');
2560+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'], $GLOBALS['xmlrpcstr']['invalid_return'].' ('.$errstr.')');
25612561 xml_parser_free($parser);
25622562 if($this->debug)
25632563 {
@@ -2577,7 +2577,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
25772577 /// @todo echo something for user?
25782578 }
25792579
2580- $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
2580+ $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
25812581 $GLOBALS['xmlrpcstr']['invalid_return'] . ' ' . $GLOBALS['_xh']['isf_reason']);
25822582 }
25832583 // third error check: parsing of the response has somehow gone boink.
@@ -2587,7 +2587,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
25872587 // something odd has happened
25882588 // and it's time to generate a client side error
25892589 // indicating something odd went on
2590- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
2590+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['invalid_return'],
25912591 $GLOBALS['xmlrpcstr']['invalid_return']);
25922592 }
25932593 else
@@ -2627,11 +2627,11 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
26272627 $errno = -1;
26282628 }
26292629
2630- $r =& new xmlrpcresp(0, $errno, $errstr);
2630+ $r = new xmlrpcresp(0, $errno, $errstr);
26312631 }
26322632 else
26332633 {
2634- $r=&new xmlrpcresp($v, 0, '', $return_type);
2634+ $r= new xmlrpcresp($v, 0, '', $return_type);
26352635 }
26362636 }
26372637
@@ -2747,10 +2747,10 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
27472747 case 2:
27482748 // we're adding a scalar value to an array here
27492749 //$ar=$this->me['array'];
2750- //$ar[]=&new xmlrpcval($val, $type);
2750+ //$ar[]= new xmlrpcval($val, $type);
27512751 //$this->me['array']=$ar;
27522752 // Faster (?) avoid all the costly array-copy-by-val done here...
2753- $this->me['array'][]=&new xmlrpcval($val, $type);
2753+ $this->me['array'][]= new xmlrpcval($val, $type);
27542754 return 1;
27552755 default:
27562756 // a scalar, so set the value and remember we're scalar
@@ -3296,20 +3296,20 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
32963296 {
32973297 case 'string':
32983298 if (in_array('auto_dates', $options) && preg_match('/^[0-9]{8}T[0-9]{2}:[0-9]{2}:[0-9]{2}$/', $php_val))
3299- $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcDateTime']);
3299+ $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcDateTime']);
33003300 else
3301- $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcString']);
3301+ $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcString']);
33023302 break;
33033303 case 'integer':
3304- $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcInt']);
3304+ $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcInt']);
33053305 break;
33063306 case 'double':
3307- $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcDouble']);
3307+ $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcDouble']);
33083308 break;
33093309 // <G_Giunta_2001-02-29>
33103310 // Add support for encoding/decoding of booleans, since they are supported in PHP
33113311 case 'boolean':
3312- $xmlrpc_val =& new xmlrpcval($php_val, $GLOBALS['xmlrpcBoolean']);
3312+ $xmlrpc_val = new xmlrpcval($php_val, $GLOBALS['xmlrpcBoolean']);
33133313 break;
33143314 // </G_Giunta_2001-02-29>
33153315 case 'array':
@@ -3332,11 +3332,11 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
33323332 }
33333333 if($ko)
33343334 {
3335- $xmlrpc_val =& new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']);
3335+ $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']);
33363336 }
33373337 else
33383338 {
3339- $xmlrpc_val =& new xmlrpcval($arr, $GLOBALS['xmlrpcArray']);
3339+ $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcArray']);
33403340 }
33413341 break;
33423342 case 'object':
@@ -3351,7 +3351,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
33513351 {
33523352 $arr[$k] = php_xmlrpc_encode($v, $options);
33533353 }
3354- $xmlrpc_val =& new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']);
3354+ $xmlrpc_val = new xmlrpcval($arr, $GLOBALS['xmlrpcStruct']);
33553355 if (in_array('encode_php_objs', $options))
33563356 {
33573357 // let's save original class name into xmlrpcval:
@@ -3363,32 +3363,32 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
33633363 case 'NULL':
33643364 if (in_array('extension_api', $options))
33653365 {
3366- $xmlrpc_val =& new xmlrpcval('', $GLOBALS['xmlrpcString']);
3366+ $xmlrpc_val = new xmlrpcval('', $GLOBALS['xmlrpcString']);
33673367 }
33683368 if (in_array('null_extension', $options))
33693369 {
3370- $xmlrpc_val =& new xmlrpcval('', $GLOBALS['xmlrpcNull']);
3370+ $xmlrpc_val = new xmlrpcval('', $GLOBALS['xmlrpcNull']);
33713371 }
33723372 else
33733373 {
3374- $xmlrpc_val =& new xmlrpcval();
3374+ $xmlrpc_val = new xmlrpcval();
33753375 }
33763376 break;
33773377 case 'resource':
33783378 if (in_array('extension_api', $options))
33793379 {
3380- $xmlrpc_val =& new xmlrpcval((int)$php_val, $GLOBALS['xmlrpcInt']);
3380+ $xmlrpc_val = new xmlrpcval((int)$php_val, $GLOBALS['xmlrpcInt']);
33813381 }
33823382 else
33833383 {
3384- $xmlrpc_val =& new xmlrpcval();
3384+ $xmlrpc_val = new xmlrpcval();
33853385 }
33863386 // catch "user function", "unknown type"
33873387 default:
33883388 // giancarlo pinerolo <ping@alt.it>
33893389 // it has to return
33903390 // an empty object in case, not a boolean.
3391- $xmlrpc_val =& new xmlrpcval();
3391+ $xmlrpc_val = new xmlrpcval();
33923392 break;
33933393 }
33943394 return $xmlrpc_val;
@@ -3443,15 +3443,15 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha
34433443 {
34443444 $vc = $v->structmem('faultCode');
34453445 $vs = $v->structmem('faultString');
3446- $r =& new xmlrpcresp(0, $vc->scalarval(), $vs->scalarval());
3446+ $r = new xmlrpcresp(0, $vc->scalarval(), $vs->scalarval());
34473447 }
34483448 else
34493449 {
3450- $r =& new xmlrpcresp($v);
3450+ $r = new xmlrpcresp($v);
34513451 }
34523452 return $r;
34533453 case 'methodcall':
3454- $m =& new xmlrpcmsg($GLOBALS['_xh']['method']);
3454+ $m = new xmlrpcmsg($GLOBALS['_xh']['method']);
34553455 for($i=0; $i < count($GLOBALS['_xh']['params']); $i++)
34563456 {
34573457 $m->addParam($GLOBALS['_xh']['params'][$i]);
--- a/nucleus/libs/xmlrpcs.inc.php
+++ b/nucleus/libs/xmlrpcs.inc.php
@@ -87,13 +87,13 @@
8787 $outAr=array();
8888 foreach($server->dmap as $key => $val)
8989 {
90- $outAr[]=&new xmlrpcval($key, 'string');
90+ $outAr[]= new xmlrpcval($key, 'string');
9191 }
9292 if($server->allow_system_funcs)
9393 {
9494 foreach($GLOBALS['_xmlrpcs_dmap'] as $key => $val)
9595 {
96- $outAr[]=&new xmlrpcval($key, 'string');
96+ $outAr[]= new xmlrpcval($key, 'string');
9797 }
9898 }
9999 return new xmlrpcresp(new xmlrpcval($outAr, 'array'));
@@ -132,22 +132,22 @@
132132 $cursig=array();
133133 foreach($inSig as $sig)
134134 {
135- $cursig[]=&new xmlrpcval($sig, 'string');
135+ $cursig[]= new xmlrpcval($sig, 'string');
136136 }
137- $sigs[]=&new xmlrpcval($cursig, 'array');
137+ $sigs[]= new xmlrpcval($cursig, 'array');
138138 }
139- $r=&new xmlrpcresp(new xmlrpcval($sigs, 'array'));
139+ $r= new xmlrpcresp(new xmlrpcval($sigs, 'array'));
140140 }
141141 else
142142 {
143143 // NB: according to the official docs, we should be returning a
144144 // "none-array" here, which means not-an-array
145- $r=&new xmlrpcresp(new xmlrpcval('undef', 'string'));
145+ $r= new xmlrpcresp(new xmlrpcval('undef', 'string'));
146146 }
147147 }
148148 else
149149 {
150- $r=&new xmlrpcresp(0,$GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']);
150+ $r= new xmlrpcresp(0,$GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']);
151151 }
152152 return $r;
153153 }
@@ -179,16 +179,16 @@
179179 {
180180 if(isset($dmap[$methName]['docstring']))
181181 {
182- $r=&new xmlrpcresp(new xmlrpcval($dmap[$methName]['docstring']), 'string');
182+ $r= new xmlrpcresp(new xmlrpcval($dmap[$methName]['docstring']), 'string');
183183 }
184184 else
185185 {
186- $r=&new xmlrpcresp(new xmlrpcval('', 'string'));
186+ $r= new xmlrpcresp(new xmlrpcval('', 'string'));
187187 }
188188 }
189189 else
190190 {
191- $r=&new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']);
191+ $r= new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['introspect_unknown'], $GLOBALS['xmlrpcstr']['introspect_unknown']);
192192 }
193193 return $r;
194194 }
@@ -209,8 +209,8 @@
209209 $str = $err->faultString();
210210 }
211211 $struct = array();
212- $struct['faultCode'] =& new xmlrpcval($code, 'int');
213- $struct['faultString'] =& new xmlrpcval($str, 'string');
212+ $struct['faultCode'] = new xmlrpcval($code, 'int');
213+ $struct['faultString'] = new xmlrpcval($str, 'string');
214214 return new xmlrpcval($struct, 'struct');
215215 }
216216
@@ -245,7 +245,7 @@
245245 }
246246 $numParams = $params->arraysize();
247247
248- $msg =& new xmlrpcmsg($methName->scalarval());
248+ $msg = new xmlrpcmsg($methName->scalarval());
249249 for($i = 0; $i < $numParams; $i++)
250250 {
251251 if(!$msg->addParam($params->arraymem($i)))
@@ -806,14 +806,14 @@
806806 }
807807 else
808808 {
809- $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_decompress_fail'], $GLOBALS['xmlrpcstr']['server_decompress_fail']);
809+ $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_decompress_fail'], $GLOBALS['xmlrpcstr']['server_decompress_fail']);
810810 return $r;
811811 }
812812 }
813813 else
814814 {
815815 //error_log('The server sent deflated data. Your php install must have the Zlib extension compiled in to support this.');
816- $r =& new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_cannot_decompress'], $GLOBALS['xmlrpcstr']['server_cannot_decompress']);
816+ $r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['server_cannot_decompress'], $GLOBALS['xmlrpcstr']['server_cannot_decompress']);
817817 return $r;
818818 }
819819 }
@@ -932,7 +932,7 @@
932932 if(!xml_parse($parser, $data, 1))
933933 {
934934 // return XML error as a faultCode
935- $r=&new xmlrpcresp(0,
935+ $r= new xmlrpcresp(0,
936936 $GLOBALS['xmlrpcerrxml']+xml_get_error_code($parser),
937937 sprintf('XML error: %s at line %d, column %d',
938938 xml_error_string(xml_get_error_code($parser)),
@@ -942,7 +942,7 @@
942942 elseif ($GLOBALS['_xh']['isf'])
943943 {
944944 xml_parser_free($parser);
945- $r=&new xmlrpcresp(0,
945+ $r= new xmlrpcresp(0,
946946 $GLOBALS['xmlrpcerr']['invalid_request'],
947947 $GLOBALS['xmlrpcstr']['invalid_request'] . ' ' . $GLOBALS['_xh']['isf_reason']);
948948 }
@@ -960,7 +960,7 @@
960960 else
961961 {
962962 // build an xmlrpcmsg object with data parsed from xml
963- $m=&new xmlrpcmsg($GLOBALS['_xh']['method']);
963+ $m= new xmlrpcmsg($GLOBALS['_xh']['method']);
964964 // now add parameters in
965965 for($i=0; $i<count($GLOBALS['_xh']['params']); $i++)
966966 {
@@ -1068,11 +1068,11 @@
10681068 error_log("XML-RPC: xmlrpc_server::execute: function $func registered as method handler does not return an xmlrpcresp object");
10691069 if (is_a($r, 'xmlrpcval'))
10701070 {
1071- $r =& new xmlrpcresp($r);
1071+ $r = new xmlrpcresp($r);
10721072 }
10731073 else
10741074 {
1075- $r =& new xmlrpcresp(
1075+ $r = new xmlrpcresp(
10761076 0,
10771077 $GLOBALS['xmlrpcerr']['server_error'],
10781078 $GLOBALS['xmlrpcstr']['server_error'] . ": function does not return xmlrpcresp object"
@@ -1093,18 +1093,19 @@
10931093 // 3rd API convention for method-handling functions: EPI-style
10941094 if ($this->functions_parameters_type == 'epivals')
10951095 {
1096- $r = call_user_func_array($func, array($methName, $params, $this->user_data));
1096+ $data = array($methName, $params, $this->user_data);
1097+ $r = call_user_func_array($func, $data);
10971098 // mimic EPI behaviour: if we get an array that looks like an error, make it
10981099 // an eror response
10991100 if (is_array($r) && array_key_exists('faultCode', $r) && array_key_exists('faultString', $r))
11001101 {
1101- $r =& new xmlrpcresp(0, (integer)$r['faultCode'], (string)$r['faultString']);
1102+ $r = new xmlrpcresp(0, (integer)$r['faultCode'], (string)$r['faultString']);
11021103 }
11031104 else
11041105 {
11051106 // functions using EPI api should NOT return resp objects,
11061107 // so make sure we encode the return type correctly
1107- $r =& new xmlrpcresp(php_xmlrpc_encode($r, array('extension_api')));
1108+ $r = new xmlrpcresp(php_xmlrpc_encode($r, array('extension_api')));
11081109 }
11091110 }
11101111 else
@@ -1117,7 +1118,7 @@
11171118 {
11181119 // what should we assume here about automatic encoding of datetimes
11191120 // and php classes instances???
1120- $r =& new xmlrpcresp(php_xmlrpc_encode($r, array('auto_dates')));
1121+ $r = new xmlrpcresp(php_xmlrpc_encode($r, array('auto_dates')));
11211122 }
11221123 }
11231124 if($this->debug > 2)
@@ -1167,7 +1168,7 @@
11671168 */
11681169 function echoInput()
11691170 {
1170- $r=&new xmlrpcresp(new xmlrpcval( "'Aha said I: '" . $GLOBALS['HTTP_RAW_POST_DATA'], 'string'));
1171+ $r= new xmlrpcresp(new xmlrpcval( "'Aha said I: '" . $GLOBALS['HTTP_RAW_POST_DATA'], 'string'));
11711172 print $r->serialize();
11721173 }
11731174 }
--- a/nucleus/media.php
+++ b/nucleus/media.php
@@ -283,10 +283,8 @@ function media_choose() {
283283 ?>
284284 <br /><br />
285285 <?php
286- $manager->notify(
287- 'MediaUploadFormExtras',
288- array()
289- );
286+ $param = array();
287+ $manager->notify('MediaUploadFormExtras', $param);
290288 ?>
291289 <br /><br />
292290 <input type="submit" value="<?php echo _UPLOAD_BUTTON?>" />
--- a/nucleus/plugins/NP_SecurityEnforcer.php
+++ b/nucleus/plugins/NP_SecurityEnforcer.php
@@ -39,7 +39,7 @@ class NP_SecurityEnforcer extends NucleusPlugin {
3939 `login` varchar(255),
4040 `fails` int(11) NOT NULL default '0',
4141 `lastfail` bigint NOT NULL default '0',
42- KEY `login` (`login`)) TYPE=MyISAM";
42+ KEY `login` (`login`)) ENGINE=MyISAM";
4343 sql_query($query);
4444 return;
4545 }
--- a/nucleus/upgrades/upgrade0.96.php
+++ b/nucleus/upgrades/upgrade0.96.php
@@ -23,13 +23,13 @@ function upgrade_do96() {
2323
2424 // 1. create nucleus_actionlog
2525 if (!upgrade_checkIfTableExists('actionlog')) {
26- $query = 'CREATE TABLE '.sql_table('actionlog')." (timestamp datetime NOT NULL default '0000-00-00 00:00:00', message varchar(255) NOT NULL default '', PRIMARY KEY (timestamp)) TYPE=MyISAM;";
26+ $query = 'CREATE TABLE '.sql_table('actionlog')." (timestamp datetime NOT NULL default '0000-00-00 00:00:00', message varchar(255) NOT NULL default '', PRIMARY KEY (timestamp)) ENGINE=MyISAM;";
2727 upgrade_query("Creating nucleus_actionlog table",$query);
2828 }
2929
3030 // 2. create nucleus_ban
3131 if (!upgrade_checkIfTableExists('ban')) {
32- $query = 'CREATE TABLE '.sql_table('ban')." ( iprange varchar(15) NOT NULL default '', reason varchar(255) NOT NULL default '', blogid int(11) NOT NULL default '0') TYPE=MyISAM;";
32+ $query = 'CREATE TABLE '.sql_table('ban')." ( iprange varchar(15) NOT NULL default '', reason varchar(255) NOT NULL default '', blogid int(11) NOT NULL default '0') ENGINE=MyISAM;";
3333 upgrade_query("Creating nucleus_ban table",$query);
3434 }
3535
@@ -45,7 +45,7 @@ function upgrade_do96() {
4545 $query = 'CREATE TABLE '.sql_table('karma')." ("
4646 ." itemid int(11) NOT NULL default '0',"
4747 ." ip char(15) NOT NULL default ''"
48- .") TYPE=MyISAM;";
48+ .") ENGINE=MyISAM;";
4949 upgrade_query("Creating nucleus_karma table",$query);
5050 }
5151
--- a/nucleus/upgrades/upgrade1.5.php
+++ b/nucleus/upgrades/upgrade1.5.php
@@ -26,7 +26,7 @@ function upgrade_do150() {
2626 if (upgrade_checkIfTableExists('plugin_events')) {//present in dev version
2727 upgrade_query('Renaming table nucleus_plugins_events','RENAME TABLE '.sql_table('plugins_events').' TO '.sql_table('plugin_event'));
2828 }elseif (!upgrade_checkIfTableExists('plugin_event')) {
29- $query = 'CREATE TABLE '.sql_table('plugin_event').' (pid int(11) NOT NULL, event varchar(40)) TYPE=MyISAM;';
29+ $query = 'CREATE TABLE '.sql_table('plugin_event').' (pid int(11) NOT NULL, event varchar(40)) ENGINE=MyISAM;';
3030 upgrade_query("Creating nucleus_plugin_event table",$query);
3131 }
3232
@@ -34,7 +34,7 @@ function upgrade_do150() {
3434 if (upgrade_checkIfTableExists('plugins')) {//present in dev version
3535 upgrade_query('Renaming table nucleus_plugins','RENAME TABLE '.sql_table('plugins').' TO '.sql_table('plugin'));
3636 }elseif (!upgrade_checkIfTableExists('plugin')) {
37- $query = 'CREATE TABLE '.sql_table('plugin')." (pid int(11) NOT NULL auto_increment, pfile varchar(40) NOT NULL, porder int(11) not null, PRIMARY KEY(pid)) TYPE=MyISAM;";
37+ $query = 'CREATE TABLE '.sql_table('plugin')." (pid int(11) NOT NULL auto_increment, pfile varchar(40) NOT NULL, porder int(11) not null, PRIMARY KEY(pid)) ENGINE=MyISAM;";
3838 upgrade_query("Creating nucleus_plugin table",$query);
3939 }
4040
@@ -116,7 +116,7 @@ function upgrade_do150() {
116116 // create new table: nucleus_plugin_option
117117 global $upgrade_failures;
118118 if (0==$upgrade_failures && !upgrade_checkIfTableExists('plugin_option')) {
119- $query = 'CREATE TABLE '.sql_table('plugin_option')." (opid int(11) NOT NULL, oname varchar(20) NOT NULL, ovalue varchar(128) not null, odesc varchar(255), otype varchar(8), PRIMARY KEY(opid, oname)) TYPE=MyISAM;";
119+ $query = 'CREATE TABLE '.sql_table('plugin_option')." (opid int(11) NOT NULL, oname varchar(20) NOT NULL, ovalue varchar(128) not null, odesc varchar(255), otype varchar(8), PRIMARY KEY(opid, oname)) ENGINE=MyISAM;";
120120 upgrade_query("Creating nucleus_plugin_option table",$query);
121121 }else{
122122 echo "<li>Creating nucleus_plugin_option table ... <span class=\"warning\">NOT EXECUTED</span>\n<blockquote>Errors occurred during upgrade process.</blockquote>";
--- a/nucleus/upgrades/upgrade2.5.php
+++ b/nucleus/upgrades/upgrade2.5.php
@@ -40,7 +40,7 @@ function upgrade_do250() {
4040 ." odef text,"
4141 ." oextra text,"
4242 ." PRIMARY KEY(opid, oname, ocontext)"
43- .") TYPE=MyISAM;";
43+ .") ENGINE=MyISAM;";
4444 upgrade_query('Creating ' . sql_table('plugin_option_desc') . ' table',$query);
4545 }
4646
--- a/nucleus/xmlrpc/api_metaweblog.inc.php
+++ b/nucleus/xmlrpc/api_metaweblog.inc.php
@@ -76,7 +76,11 @@
7676 $trackbacks[] = _getArrayVal($tblist, $i);
7777 }
7878
79- $manager->notify('SendTrackback', array ('tb_id' => $itemid, 'urls' => & $trackbacks));
79+ $param = array(
80+ 'tb_id' => $itemid,
81+ 'urls' => &$trackbacks
82+ );
83+ $manager->notify('SendTrackback', $param);
8084 }
8185
8286 return $res;
@@ -212,7 +216,11 @@
212216 $trackbacks[] = _getArrayVal($tblist, $i);
213217 }
214218
215- $manager->notify('SendTrackback', array ('tb_id' => $itemid, 'urls' => & $trackbacks));
219+ $param = array(
220+ 'tb_id' => $itemid,
221+ 'urls' => &$trackbacks
222+ );
223+ $manager->notify('SendTrackback', $param);
216224 }
217225
218226 return $res;
--- a/nucleus/xmlrpc/api_mt.inc.php
+++ b/nucleus/xmlrpc/api_mt.inc.php
@@ -189,8 +189,12 @@
189189
190190 $trackbacks = array ();
191191 $tbstruct = array ();
192-
193- $manager->notify('RetrieveTrackback', array ('tb_id' => $itemid, 'trackbacks' => & $trackbacks));
192+
193+ $param = array(
194+ 'tb_id' => $itemid,
195+ 'trackbacks' => &$trackbacks
196+ );
197+ $manager->notify('RetrieveTrackback', $param);
194198
195199 while (list(,$v) = each ($trackbacks)) {
196200 $tbstruct[] = new xmlrpcval(
Show on old repository browser