Révision | 07ed08515585506b222864cb1ceb0a19050e34f7 (tree) |
---|---|
l'heure | 2016-12-16 08:43:58 |
Auteur | night1ynx <night1ynxd@gmai...> |
Commiter | night1ynx |
Fix errors in PHP 7.0+
@@ -0,0 +1,44 @@ | ||
1 | +<?php | |
2 | +/** | |
3 | + * Forward/Backward compatibility layer | |
4 | + * | |
5 | + * @copyright 2016 night1ynx | |
6 | + * @license GPLv2 or later | |
7 | + */ | |
8 | + | |
9 | +/** | |
10 | + * E_USER_DEPRECATED was introduced since PHP 5.3 | |
11 | + */ | |
12 | +if (! defined('E_USER_DEPRECATED')) { | |
13 | + define('E_USER_DEPRECATED', E_USER_WARNING); | |
14 | +} | |
15 | + | |
16 | +if (! function_exists('ereg')) { | |
17 | + /** | |
18 | + * @deprecated | |
19 | + */ | |
20 | + function ereg($pattern, $string, &$regs = array()) { | |
21 | + trigger_error('ereg() was removed in PHP 7.0', E_USER_DEPRECATED); | |
22 | + return mb_ereg($pattern, $string, $regs); | |
23 | + } | |
24 | +} | |
25 | + | |
26 | +if (! function_exists('ereg_replace')) { | |
27 | + /** | |
28 | + * @deprecated | |
29 | + */ | |
30 | + function ereg_replace($pattern, $replacement, $string) { | |
31 | + trigger_error('ereg_replace() was removed in PHP 7.0', E_USER_DEPRECATED); | |
32 | + return mb_ereg_replace($pattern, $replacement, $string); | |
33 | + } | |
34 | +} | |
35 | + | |
36 | +if (! function_exists('split')) { | |
37 | + /** | |
38 | + * @deprecated | |
39 | + */ | |
40 | + function split($pattern, $string, $limit = -1) { | |
41 | + trigger_error('split() was removed in PHP 7.0', E_USER_DEPRECATED); | |
42 | + return mb_split($pattern, $string, $limit); | |
43 | + } | |
44 | +} |
@@ -41,7 +41,7 @@ class Config | ||
41 | 41 | if (! is_page($this->page)) return FALSE; |
42 | 42 | |
43 | 43 | $this->objs = array(); |
44 | - $obj = & new ConfigTable(''); | |
44 | + $obj = new ConfigTable(''); | |
45 | 45 | $matches = array(); |
46 | 46 | |
47 | 47 | foreach (get_source($this->page) as $line) { |
@@ -59,22 +59,22 @@ class Config | ||
59 | 59 | |
60 | 60 | if ($level == 1) { |
61 | 61 | $this->objs[$obj->title] = $obj; |
62 | - $obj = & new ConfigTable($line); | |
62 | + $obj = new ConfigTable($line); | |
63 | 63 | } else { |
64 | 64 | if (! is_a($obj, 'ConfigTable_Direct')) |
65 | - $obj = & new ConfigTable_Direct('', $obj); | |
65 | + $obj = new ConfigTable_Direct('', $obj); | |
66 | 66 | $obj->set_key($line); |
67 | 67 | } |
68 | 68 | |
69 | 69 | } else if ($head == '-' && $level > 1) { |
70 | 70 | if (! is_a($obj, 'ConfigTable_Direct')) |
71 | - $obj = & new ConfigTable_Direct('', $obj); | |
71 | + $obj = new ConfigTable_Direct('', $obj); | |
72 | 72 | $obj->add_value($line); |
73 | 73 | |
74 | 74 | } else if ($head == '|' && preg_match('/^\|(.+)\|\s*$/', $line, $matches)) { |
75 | 75 | // Table row |
76 | 76 | if (! is_a($obj, 'ConfigTable_Sequential')) |
77 | - $obj = & new ConfigTable_Sequential('', $obj); | |
77 | + $obj = new ConfigTable_Sequential('', $obj); | |
78 | 78 | // Trim() each table cell |
79 | 79 | $obj->add_value(array_map('trim', explode('|', $matches[1]))); |
80 | 80 | } else { |
@@ -111,7 +111,7 @@ class Config | ||
111 | 111 | function & get_object($title) |
112 | 112 | { |
113 | 113 | if (! isset($this->objs[$title])) |
114 | - $this->objs[$title] = & new ConfigTable('*' . trim($title) . "\n"); | |
114 | + $this->objs[$title] = new ConfigTable('*' . trim($title) . "\n"); | |
115 | 115 | return $this->objs[$title]; |
116 | 116 | } |
117 | 117 |
@@ -20,7 +20,7 @@ function convert_html($lines) | ||
20 | 20 | |
21 | 21 | if (! is_array($lines)) $lines = explode("\n", $lines); |
22 | 22 | |
23 | - $body = & new Body(++$contents_id); | |
23 | + $body = new Body(++$contents_id); | |
24 | 24 | $body->parse($lines); |
25 | 25 | |
26 | 26 | return $body->toString(); |
@@ -192,7 +192,7 @@ class Inline extends Element | ||
192 | 192 | |
193 | 193 | function & toPara($class = '') |
194 | 194 | { |
195 | - $obj = & new Paragraph('', $class); | |
195 | + $obj = new Paragraph('', $class); | |
196 | 196 | $obj->insert($this); |
197 | 197 | return $obj; |
198 | 198 | } |
@@ -580,7 +580,7 @@ class Table extends Element | ||
580 | 580 | $is_template = ($this->type == 'c'); |
581 | 581 | $row = array(); |
582 | 582 | foreach ($cells as $cell) |
583 | - $row[] = & new TableCell($cell, $is_template); | |
583 | + $row[] = new TableCell($cell, $is_template); | |
584 | 584 | $this->elements[] = $row; |
585 | 585 | } |
586 | 586 |
@@ -860,7 +860,7 @@ class Body extends Element | ||
860 | 860 | function Body($id) |
861 | 861 | { |
862 | 862 | $this->id = $id; |
863 | - $this->contents = & new Element(); | |
863 | + $this->contents = new Element(); | |
864 | 864 | $this->contents_last = & $this->contents; |
865 | 865 | parent::Element(); |
866 | 866 | } |
@@ -621,7 +621,7 @@ function get_glossary_pattern(& $pages, $min_len = -1) | ||
621 | 621 | { |
622 | 622 | global $WikiName, $autoglossary, $nowikiname; |
623 | 623 | |
624 | - $config = &new Config('Glossary'); | |
624 | + $config = new Config('Glossary'); | |
625 | 625 | $config->read(); |
626 | 626 | $ignorepages = $config->get('IgnoreList'); |
627 | 627 | $forceignorepages = $config->get('ForceIgnoreList'); |
@@ -657,7 +657,7 @@ function get_autolink_pattern(& $pages, $min_len = -1) | ||
657 | 657 | { |
658 | 658 | global $WikiName, $autolink, $nowikiname; |
659 | 659 | |
660 | - $config = &new Config('AutoLink'); | |
660 | + $config = new Config('AutoLink'); | |
661 | 661 | $config->read(); |
662 | 662 | $ignorepages = $config->get('IgnoreList'); |
663 | 663 | $forceignorepages = $config->get('ForceIgnoreList'); |
@@ -352,7 +352,7 @@ $BracketName = '(?!\s):?[^\r\n\t\f\[\]<>#&":]+:?(?<!\s)'; | ||
352 | 352 | $InterWikiName = '(\[\[)?((?:(?!\s|:|\]\]).)+):(.+)(?(1)\]\])'; |
353 | 353 | |
354 | 354 | // 注釈 |
355 | -$NotePattern = '/\(\(((?:(?>(?:(?!\(\()(?!\)\)(?:[^\)]|$)).)+)|(?R))*)\)\)/ex'; | |
355 | +$NotePattern = '/\(\(((?:(?>(?:(?!\(\()(?!\)\)(?:[^\)]|$)).)+)|(?R))*)\)\)/x'; | |
356 | 356 | |
357 | 357 | ///////////////////////////////////////////////// |
358 | 358 | // 初期設定(ユーザ定義ルール読み込み) |
@@ -380,5 +380,3 @@ $line_rules = array_merge(array( | ||
380 | 380 | '&(#[0-9]+|#x[0-9a-f]+|' . $entity_pattern . ');' => '&$1;', |
381 | 381 | "\r" => '<br />' . "\n", /* 行末にチルダは改行 */ |
382 | 382 | ), $line_rules); |
383 | - | |
384 | -?> |
@@ -110,7 +110,7 @@ function get_language($level = 0) | ||
110 | 110 | for($i=0; $i < $level; $i++){ |
111 | 111 | if ($i == $level) return DEFAULT_LANG; |
112 | 112 | // 指定関数の実行 |
113 | - $_x = $obj_lng->$lng_func[$i](); | |
113 | + $_x = $obj_lng->{$lng_func[$i]}(); | |
114 | 114 | if (! is_array($_x)) continue; |
115 | 115 | |
116 | 116 | foreach($_x as $_lang) { |
@@ -261,7 +261,7 @@ function & links_get_objects($page, $refresh = FALSE) | ||
261 | 261 | static $obj; |
262 | 262 | |
263 | 263 | if (! isset($obj) || $refresh) |
264 | - $obj = & new InlineConverter(NULL, array('note')); | |
264 | + $obj = new InlineConverter(NULL, array('note')); | |
265 | 265 | |
266 | 266 | $result = $obj->get_objects(join('', preg_grep('/^(?!\/\/|\s)./', get_source($page))), $page); |
267 | 267 | return $result; |
@@ -268,9 +268,9 @@ class Auth_OpenID_Consumer { | ||
268 | 268 | $this->session =& $session; |
269 | 269 | |
270 | 270 | if ($consumer_cls !== null) { |
271 | - $this->consumer =& new $consumer_cls($store); | |
271 | + $this->consumer = new $consumer_cls($store); | |
272 | 272 | } else { |
273 | - $this->consumer =& new Auth_OpenID_GenericConsumer($store); | |
273 | + $this->consumer = new Auth_OpenID_GenericConsumer($store); | |
274 | 274 | } |
275 | 275 | |
276 | 276 | $this->_token_key = $this->session_key_prefix . $this->_token_suffix; |
@@ -1097,7 +1097,7 @@ class Auth_OpenID_CheckIDRequest extends Auth_OpenID_Request { | ||
1097 | 1097 | in OpenID 1.x immediate mode.'); |
1098 | 1098 | } |
1099 | 1099 | |
1100 | - $setup_request =& new Auth_OpenID_CheckIDRequest( | |
1100 | + $setup_request = new Auth_OpenID_CheckIDRequest( | |
1101 | 1101 | $this->identity, |
1102 | 1102 | $this->return_to, |
1103 | 1103 | $this->trust_root, |
@@ -1677,9 +1677,9 @@ class Auth_OpenID_Server { | ||
1677 | 1677 | function Auth_OpenID_Server(&$store, $op_endpoint=null) |
1678 | 1678 | { |
1679 | 1679 | $this->store =& $store; |
1680 | - $this->signatory =& new Auth_OpenID_Signatory($this->store); | |
1681 | - $this->encoder =& new Auth_OpenID_SigningEncoder($this->signatory); | |
1682 | - $this->decoder =& new Auth_OpenID_Decoder($this); | |
1680 | + $this->signatory = new Auth_OpenID_Signatory($this->store); | |
1681 | + $this->encoder = new Auth_OpenID_SigningEncoder($this->signatory); | |
1682 | + $this->decoder = new Auth_OpenID_Decoder($this); | |
1683 | 1683 | $this->op_endpoint = $op_endpoint; |
1684 | 1684 | $this->negotiator =& Auth_OpenID_getDefaultNegotiator(); |
1685 | 1685 | } |
@@ -352,7 +352,7 @@ class Auth_Yadis_XRDS { | ||
352 | 352 | $services = $this->parser->evalXPath('xrd:Service', $this->xrdNode); |
353 | 353 | |
354 | 354 | foreach ($services as $node) { |
355 | - $s =& new Auth_Yadis_Service(); | |
355 | + $s = new Auth_Yadis_Service(); | |
356 | 356 | $s->element = $node; |
357 | 357 | $s->parser =& $this->parser; |
358 | 358 |
@@ -475,4 +475,4 @@ class Auth_Yadis_XRDS { | ||
475 | 475 | } |
476 | 476 | } |
477 | 477 | |
478 | -?> | |
\ No newline at end of file | ||
478 | +?> |
@@ -41,6 +41,7 @@ if (! defined('DATA_HOME')) define('DATA_HOME', ''); | ||
41 | 41 | |
42 | 42 | if (! defined('LIB_DIR')) define('LIB_DIR', ''); |
43 | 43 | |
44 | +require(LIB_DIR . 'compat.php'); | |
44 | 45 | require(LIB_DIR . 'func.php'); |
45 | 46 | require(LIB_DIR . 'file.php'); |
46 | 47 | require(LIB_DIR . 'funcplus.php'); |
@@ -124,7 +124,7 @@ function plugin_attach_convert() | ||
124 | 124 | |
125 | 125 | $ret = ''; |
126 | 126 | if (! $nolist) { |
127 | - $obj = & new AttachPages($page); | |
127 | + $obj = new AttachPages($page); | |
128 | 128 | $ret .= $obj->toString($page, TRUE); |
129 | 129 | } |
130 | 130 | if (! $noform) { |
@@ -199,7 +199,7 @@ function attach_filelist() | ||
199 | 199 | |
200 | 200 | $page = isset($vars['page']) ? $vars['page'] : ''; |
201 | 201 | |
202 | - $obj = & new AttachPages($page, 0); | |
202 | + $obj = new AttachPages($page, 0); | |
203 | 203 | |
204 | 204 | if (! isset($obj->pages[$page])) { |
205 | 205 | return ''; |
@@ -333,7 +333,7 @@ function attach_doupload(&$file, $page, $pass=NULL, $temp='', $copyright=FALSE, | ||
333 | 333 | |
334 | 334 | if ($must_compress && is_uploaded_file($file['tmp_name'])) { |
335 | 335 | if (PLUGIN_ATTACH_COMPRESS_TYPE == 'TGZ' && exist_plugin('dump')) { |
336 | - $obj = & new AttachFile($page, $file['name'] . '.tgz'); | |
336 | + $obj = new AttachFile($page, $file['name'] . '.tgz'); | |
337 | 337 | if ($obj->exist) |
338 | 338 | return array('result'=>FALSE, |
339 | 339 | 'msg'=>$_attach_messages['err_exists']); |
@@ -349,7 +349,7 @@ function attach_doupload(&$file, $page, $pass=NULL, $temp='', $copyright=FALSE, | ||
349 | 349 | @unlink($tar->filename); |
350 | 350 | } else |
351 | 351 | if (PLUGIN_ATTACH_COMPRESS_TYPE == 'GZ' && extension_loaded('zlib')) { |
352 | - $obj = & new AttachFile($page, $file['name'] . '.gz'); | |
352 | + $obj = new AttachFile($page, $file['name'] . '.gz'); | |
353 | 353 | if ($obj->exist) |
354 | 354 | return array('result'=>FALSE, |
355 | 355 | 'msg'=>$_attach_messages['err_exists']); |
@@ -366,7 +366,7 @@ function attach_doupload(&$file, $page, $pass=NULL, $temp='', $copyright=FALSE, | ||
366 | 366 | @unlink($file['tmp_name']); |
367 | 367 | } else |
368 | 368 | if (PLUGIN_ATTACH_COMPRESS_TYPE == 'ZIP' && class_exists('ZipArchive')) { |
369 | - $obj = & new AttachFile($page, $file['name'] . '.zip'); | |
369 | + $obj = new AttachFile($page, $file['name'] . '.zip'); | |
370 | 370 | if ($obj->exist) |
371 | 371 | return array('result'=>FALSE, |
372 | 372 | 'msg'=>$_attach_messages['err_exists']); |
@@ -382,7 +382,7 @@ function attach_doupload(&$file, $page, $pass=NULL, $temp='', $copyright=FALSE, | ||
382 | 382 | } |
383 | 383 | } else { |
384 | 384 | //miko |
385 | - $obj = & new AttachFile($page, $file['name']); | |
385 | + $obj = new AttachFile($page, $file['name']); | |
386 | 386 | if ($obj->exist) |
387 | 387 | return array('result'=>FALSE, |
388 | 388 | 'msg'=>$_attach_messages['err_exists']); |
@@ -506,7 +506,7 @@ function attach_info($err = '') | ||
506 | 506 | |
507 | 507 | check_editable($refer, true, true); |
508 | 508 | |
509 | - $obj = & new AttachFile($refer, $file, $age); | |
509 | + $obj = new AttachFile($refer, $file, $age); | |
510 | 510 | return $obj->getstatus() ? |
511 | 511 | $obj->info($err) : |
512 | 512 | array('msg'=>$_attach_messages['err_notfound']); |
@@ -523,7 +523,7 @@ function attach_delete() | ||
523 | 523 | if (is_freeze($refer) || ! is_editable($refer)) |
524 | 524 | return array('msg'=>$_attach_messages['err_noparm']); |
525 | 525 | |
526 | - $obj = & new AttachFile($refer, $file, $age); | |
526 | + $obj = new AttachFile($refer, $file, $age); | |
527 | 527 | if (! $obj->getstatus()) |
528 | 528 | return array('msg'=>$_attach_messages['err_notfound']); |
529 | 529 |
@@ -542,7 +542,7 @@ function attach_freeze($freeze) | ||
542 | 542 | if (is_freeze($refer) || ! is_editable($refer)) { |
543 | 543 | return array('msg'=>$_attach_messages['err_noparm']); |
544 | 544 | } else { |
545 | - $obj = & new AttachFile($refer, $file, $age); | |
545 | + $obj = new AttachFile($refer, $file, $age); | |
546 | 546 | return $obj->getstatus() ? |
547 | 547 | $obj->freeze($freeze, $pass) : |
548 | 548 | array('msg'=>$_attach_messages['err_notfound']); |
@@ -561,7 +561,7 @@ function attach_rename() | ||
561 | 561 | if (is_freeze($refer) || ! is_editable($refer)) { |
562 | 562 | return array('msg'=>$_attach_messages['err_noparm']); |
563 | 563 | } |
564 | - $obj = & new AttachFile($refer, $file, $age); | |
564 | + $obj = new AttachFile($refer, $file, $age); | |
565 | 565 | if (! $obj->getstatus()) |
566 | 566 | return array('msg'=>$_attach_messages['err_notfound']); |
567 | 567 |
@@ -577,7 +577,7 @@ function attach_open() | ||
577 | 577 | ${$var} = isset($vars[$var]) ? $vars[$var] : ''; |
578 | 578 | } |
579 | 579 | |
580 | - $obj = & new AttachFile($refer, $file, $age); | |
580 | + $obj = new AttachFile($refer, $file, $age); | |
581 | 581 | return $obj->getstatus() ? |
582 | 582 | $obj->open() : |
583 | 583 | array('msg'=>$_attach_messages['err_notfound']); |
@@ -592,7 +592,7 @@ function attach_list() | ||
592 | 592 | |
593 | 593 | $refer = isset($vars['refer']) ? $vars['refer'] : ''; |
594 | 594 | |
595 | - $obj = & new AttachPages($refer); | |
595 | + $obj = new AttachPages($refer); | |
596 | 596 | |
597 | 597 | $msg = $_attach_messages[($refer == '') ? 'msg_listall' : 'msg_listpage']; |
598 | 598 | $body = ($refer == '' || isset($obj->pages[$refer])) ? |
@@ -714,7 +714,7 @@ EOD; | ||
714 | 714 | </form> |
715 | 715 | EOD; |
716 | 716 | if ($listview) { |
717 | - $obj = & new AttachPages($page); | |
717 | + $obj = new AttachPages($page); | |
718 | 718 | $body = ($refer == '' || isset($obj->pages[$page])) ? |
719 | 719 | $obj->toRender($page, FALSE) : |
720 | 720 | $_attach_messages['err_noexist']; |
@@ -1067,7 +1067,7 @@ class AttachFiles | ||
1067 | 1067 | |
1068 | 1068 | function add($file, $age) |
1069 | 1069 | { |
1070 | - $this->files[$file][$age] = & new AttachFile($this->page, $file, $age); | |
1070 | + $this->files[$file][$age] = new AttachFile($this->page, $file, $age); | |
1071 | 1071 | } |
1072 | 1072 | |
1073 | 1073 | // ファイル一覧を取得 |
@@ -1192,7 +1192,7 @@ class AttachPages | ||
1192 | 1192 | $_file = decode($matches[2]); |
1193 | 1193 | $_age = isset($matches[3]) ? $matches[3] : 0; |
1194 | 1194 | if (! isset($this->pages[$_page])) { |
1195 | - $this->pages[$_page] = & new AttachFiles($_page); | |
1195 | + $this->pages[$_page] = new AttachFiles($_page); | |
1196 | 1196 | } |
1197 | 1197 | $this->pages[$_page]->add($_file, $_age); |
1198 | 1198 | } |
@@ -517,7 +517,7 @@ function plugin_dav_maketree0() | ||
517 | 517 | // 現状は、添付ファイル非表示の場合は抑止 |
518 | 518 | if (!$attach_link) return $root; |
519 | 519 | |
520 | - $attaches = & new AttachPages(''); | |
520 | + $attaches = new AttachPages(''); | |
521 | 521 | foreach($attaches->pages as $key => $val){ |
522 | 522 | if(check_non_list($key)) continue; |
523 | 523 | if(!check_readable($key, false, false)) continue; |
@@ -43,13 +43,13 @@ function plugin_map_action() | ||
43 | 43 | // Generate a tree |
44 | 44 | $nodes = array(); |
45 | 45 | foreach ($pages as $page) { |
46 | - $nodes[$page] = & new MapNode($page, $reverse); | |
46 | + $nodes[$page] = new MapNode($page, $reverse); | |
47 | 47 | } |
48 | 48 | |
49 | 49 | // Node not found: Because of filtererd by $non_list |
50 | 50 | if (! isset($nodes[$refer])) { |
51 | 51 | $vars['refer'] = $refer = $defaultpage; |
52 | - $nodes[$refer] = & new MapNode($page, $reverse); | |
52 | + $nodes[$refer] = new MapNode($page, $reverse); | |
53 | 53 | } |
54 | 54 | |
55 | 55 | if ($reverse) { |
@@ -177,7 +177,7 @@ class MapNode | ||
177 | 177 | if ($this->parent_id == 0) $this->parent_id = -1; |
178 | 178 | |
179 | 179 | foreach ($this->rels as $page) { |
180 | - if (! isset($nodes[$page])) $nodes[$page] = & new MapNode($page); | |
180 | + if (! isset($nodes[$page])) $nodes[$page] = new MapNode($page); | |
181 | 181 | if ($nodes[$page]->parent_id == 0) |
182 | 182 | $nodes[$page]->parent_id = $this->id; |
183 | 183 | } |
@@ -102,12 +102,19 @@ function plugin_navi_convert() | ||
102 | 102 | natcasesort($pages); |
103 | 103 | if ($reverse) $pages = array_reverse($pages); |
104 | 104 | |
105 | + $pages = array_values($pages); | |
105 | 106 | $prev = $home; |
106 | - foreach ($pages as $page) { | |
107 | - if ($page == $current) break; | |
107 | + $next = ''; | |
108 | + foreach ($pages as $index => $page) { | |
109 | + if ($page === $current) { | |
110 | + $next_key = $index + 1; | |
111 | + if (array_key_exists($next_key, $pages) { | |
112 | + $next = $pages[$next_key]; | |
113 | + } | |
114 | + break; | |
115 | + } | |
108 | 116 | $prev = $page; |
109 | 117 | } |
110 | - $next = current($pages); | |
111 | 118 | |
112 | 119 | $pos = strrpos($current, '/'); |
113 | 120 | $up = ''; |
@@ -91,7 +91,7 @@ function plugin_tracker_convert() | ||
91 | 91 | } |
92 | 92 | unset($args, $argc, $arg); |
93 | 93 | |
94 | - $tracker_form = & new Tracker_form(); | |
94 | + $tracker_form = new Tracker_form(); | |
95 | 95 | if (! $tracker_form->init($base, $refer, $config, $rel)) { |
96 | 96 | return '#tracker: ' . htmlspecialchars($tracker_form->error) . '<br />'; |
97 | 97 | } |
@@ -204,7 +204,7 @@ function plugin_tracker_action() | ||
204 | 204 | |
205 | 205 | $from = $to = array(); |
206 | 206 | |
207 | - $tracker_form = & new Tracker_form(); | |
207 | + $tracker_form = new Tracker_form(); | |
208 | 208 | if (! $tracker_form->init($base, $refer, $config)) { |
209 | 209 | return array( |
210 | 210 | 'msg' => 'Cannot write', |
@@ -437,7 +437,7 @@ class Tracker_form | ||
437 | 437 | return FALSE; |
438 | 438 | } |
439 | 439 | |
440 | - $this->fields[$fieldname] = & new $class( | |
440 | + $this->fields[$fieldname] = new $class( | |
441 | 441 | $this, // Reference |
442 | 442 | array( |
443 | 443 | $fieldname, |
@@ -957,7 +957,7 @@ function plugin_tracker_list_render($base, $refer, $rel = '', $config = '', $ord | ||
957 | 957 | $tracker_count++; |
958 | 958 | //miko |
959 | 959 | |
960 | - $tracker_list = & new Tracker_list(); | |
960 | + $tracker_list = new Tracker_list(); | |
961 | 961 | |
962 | 962 | if (! $tracker_list->init($base, $refer, $config, $rel) || |
963 | 963 | ! $tracker_list->setSortOrder($order)) { |
@@ -1017,7 +1017,7 @@ class Tracker_list | ||
1017 | 1017 | |
1018 | 1018 | function init($base, $refer, $config = NULL, $relative = '') |
1019 | 1019 | { |
1020 | - $this->form = & new Tracker_form(); | |
1020 | + $this->form = new Tracker_form(); | |
1021 | 1021 | return $this->form->init($base, $refer, $config, $relative); |
1022 | 1022 | } |
1023 | 1023 |
@@ -25,7 +25,7 @@ require_once(GUIEDIT_LIB_PATH . 'guiedit.ini.php'); | ||
25 | 25 | function guiedit_convert_html($lines) { |
26 | 26 | if (! is_array($lines)) $lines = explode("\n", $lines); |
27 | 27 | |
28 | - $body = & new BodyEx(); | |
28 | + $body = new BodyEx(); | |
29 | 29 | $body->parse($lines); |
30 | 30 | |
31 | 31 | return $body->toString(); |
@@ -517,7 +517,7 @@ class InlineEx extends ElementEx | ||
517 | 517 | |
518 | 518 | function & toPara($class = '') |
519 | 519 | { |
520 | - $obj = & new ParagraphEx('', $class); | |
520 | + $obj = new ParagraphEx('', $class); | |
521 | 521 | $obj->insert($this); |
522 | 522 | return $obj; |
523 | 523 | } |
@@ -937,7 +937,7 @@ class TableEx extends ElementEx | ||
937 | 937 | $is_template = ($this->type == 'c'); |
938 | 938 | $row = array(); |
939 | 939 | foreach ($cells as $cell) |
940 | - $row[] = & new TableCellEx($cell, $is_template); | |
940 | + $row[] = new TableCellEx($cell, $is_template); | |
941 | 941 | $this->elements[] = $row; |
942 | 942 | } |
943 | 943 |