• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

blogger


コミットメタ情報

リビジョン74335459853fd76cdbc9a765e8c8ee93f5cc3c78 (tree)
日時2016-11-06 17:56:43
作者umorigu <umorigu@gmai...>
コミッターumorigu

ログメッセージ

BugTrack/2394 Add PHP4 Compatibility on constructor

PHP7 doesn't show E_DEPRECATED warning on existance of
both constructor() and old style ClassName() constructor.

変更サマリ

差分

--- a/lib/config.php
+++ b/lib/config.php
@@ -1,7 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: config.php,v 1.6 2005/04/29 11:24:20 henoheno Exp $
4-// Copyright (C) 2003-2005 PukiWiki Developers Team
3+// config.php
4+// Copyright 2003-2016 PukiWiki Development Team
55 // License: GPL v2 or (at your option) any later version
66 //
77 // Parse a PukiWiki page as a configuration page
@@ -27,6 +27,10 @@ class Config
2727 var $name, $page; // Page name
2828 var $objs = array();
2929
30+ function Config($name)
31+ {
32+ $this->__construct($name);
33+ }
3034 function __construct($name)
3135 {
3236 $this->name = $name;
@@ -135,6 +139,10 @@ class ConfigTable
135139 var $after = array(); // Page contents (except table ones)
136140 var $values = array(); // Table contents
137141
142+ function ConfigTable($title, $obj = NULL)
143+ {
144+ $this->__construct($title, $obj);
145+ }
138146 function __construct($title, $obj = NULL)
139147 {
140148 if ($obj !== NULL) {
@@ -221,4 +229,3 @@ class ConfigTable_Direct extends ConfigTable
221229 return $retval;
222230 }
223231 }
224-
--- a/lib/convert_html.php
+++ b/lib/convert_html.php
@@ -1,8 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
3-// $Id: convert_html.php,v 1.21 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C)
5-// 2002-2005 PukiWiki Developers Team
3+// convert_html.php
4+// Copyright
5+// 2002-2016 PukiWiki Development Team
66 // 2001-2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -32,6 +32,10 @@ class Element
3232 var $elements; // References of childs
3333 var $last; // Insert new one at the back of the $last
3434
35+ function Element()
36+ {
37+ $this->__construct();
38+ }
3539 function __construct()
3640 {
3741 $this->elements = array();
@@ -165,6 +169,10 @@ function & Factory_Div(& $root, $text)
165169 // Inline elements
166170 class Inline extends Element
167171 {
172+ function Inline($text)
173+ {
174+ $this->__construct($text);
175+ }
168176 function __construct($text)
169177 {
170178 parent::__construct();
@@ -202,6 +210,10 @@ class Paragraph extends Element
202210 {
203211 var $param;
204212
213+ function Paragraph($text, $param = '')
214+ {
215+ $this->__construct($text, $param);
216+ }
205217 function __construct($text, $param = '')
206218 {
207219 parent::__construct();
@@ -234,6 +246,10 @@ class Heading extends Element
234246 var $id;
235247 var $msg_top;
236248
249+ function Heading(& $root, $text)
250+ {
251+ $this->__construct($root, $text);
252+ }
237253 function __construct(& $root, $text)
238254 {
239255 parent::__construct();
@@ -266,6 +282,10 @@ class Heading extends Element
266282 // Horizontal Rule
267283 class HRule extends Element
268284 {
285+ function HRule(& $root, $text)
286+ {
287+ $this->__construct($root, $text);
288+ }
269289 function __construct(& $root, $text)
270290 {
271291 parent::__construct();
@@ -293,6 +313,10 @@ class ListContainer extends Element
293313 var $margin;
294314 var $left_margin;
295315
316+ function ListContainer($tag, $tag2, $head, $text)
317+ {
318+ $this->__construct($tag, $tag2, $head, $text);
319+ }
296320 function __construct($tag, $tag2, $head, $text)
297321 {
298322 parent::__construct();
@@ -361,6 +385,10 @@ class ListContainer extends Element
361385
362386 class ListElement extends Element
363387 {
388+ function ListElement($level, $head)
389+ {
390+ $this->__construct($level, $head);
391+ }
364392 function __construct($level, $head)
365393 {
366394 parent::__construct();
@@ -384,6 +412,10 @@ class ListElement extends Element
384412 // - Three
385413 class UList extends ListContainer
386414 {
415+ function UList(& $root, $text)
416+ {
417+ $this->__construct($root, $text);
418+ }
387419 function __construct(& $root, $text)
388420 {
389421 parent::__construct('ul', 'li', '-', $text);
@@ -395,6 +427,10 @@ class UList extends ListContainer
395427 // + Three
396428 class OList extends ListContainer
397429 {
430+ function OList(& $root, $text)
431+ {
432+ $this->__construct($root, $text);
433+ }
398434 function __construct(& $root, $text)
399435 {
400436 parent::__construct('ol', 'li', '+', $text);
@@ -406,6 +442,10 @@ class OList extends ListContainer
406442 // : definition3 | description3
407443 class DList extends ListContainer
408444 {
445+ function DList($out)
446+ {
447+ $this->__construct($out);
448+ }
409449 function __construct($out)
410450 {
411451 parent::__construct('dl', 'dt', ':', $out[0]);
@@ -421,6 +461,10 @@ class BQuote extends Element
421461 {
422462 var $level;
423463
464+ function BQuote(& $root, $text)
465+ {
466+ $this->__construct($root, $text);
467+ }
424468 function __construct(& $root, $text)
425469 {
426470 parent::__construct();
@@ -484,6 +528,10 @@ class TableCell extends Element
484528 var $rowspan = 1;
485529 var $style; // is array('width'=>, 'align'=>...);
486530
531+ function TableCell($text, $is_template = FALSE)
532+ {
533+ $this->__construct($text, $is_template);
534+ }
487535 function __construct($text, $is_template = FALSE)
488536 {
489537 parent::__construct();
@@ -561,6 +609,10 @@ class Table extends Element
561609 var $types;
562610 var $col; // number of column
563611
612+ function Table($out)
613+ {
614+ $this->__construct($out);
615+ }
564616 function __construct($out)
565617 {
566618 parent::__construct();
@@ -662,6 +714,10 @@ class YTable extends Element
662714 {
663715 var $col; // Number of columns
664716
717+ function YTable($row = array('cell1 ', ' cell2 ', ' cell3'))
718+ {
719+ $this->__construct($row);
720+ }
665721 // TODO: Seems unable to show literal '==' without tricks.
666722 // But it will be imcompatible.
667723 // TODO: Why toString() or toXHTML() here
@@ -738,6 +794,10 @@ class YTable extends Element
738794 // ' 'Space-beginning sentence
739795 class Pre extends Element
740796 {
797+ function Pre(& $root, $text)
798+ {
799+ $this->__construct($root, $text);
800+ }
741801 function __construct(& $root, $text)
742802 {
743803 global $preformat_ltrim;
@@ -769,6 +829,10 @@ class Div extends Element
769829 var $name;
770830 var $param;
771831
832+ function Div($out)
833+ {
834+ $this->__construct($out);
835+ }
772836 function __construct($out)
773837 {
774838 parent::__construct();
@@ -792,6 +856,10 @@ class Align extends Element
792856 {
793857 var $align;
794858
859+ function Align($align)
860+ {
861+ $this->__construct($align);
862+ }
795863 function __construct($align)
796864 {
797865 parent::__construct();
@@ -827,6 +895,10 @@ class Body extends Element
827895 ',' => 'YTable',
828896 '#' => 'Div');
829897
898+ function Body($id)
899+ {
900+ $this->__construct($id);
901+ }
830902 function __construct($id)
831903 {
832904 $this->id = $id;
@@ -979,6 +1051,10 @@ class Body extends Element
9791051
9801052 class Contents_UList extends ListContainer
9811053 {
1054+ function Contents_UList($text, $level, $id)
1055+ {
1056+ $this->__construct($text, $level, $id);
1057+ }
9821058 function __construct($text, $level, $id)
9831059 {
9841060 // Reformatting $text
--- a/lib/diff.php
+++ b/lib/diff.php
@@ -1,8 +1,8 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: diff.php,v 1.10 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C)
5-// 2003-2005, 2007 PukiWiki Developers Team
3+// diff.php
4+// Copyright
5+// 2003-2016 PukiWiki Development Team
66 // 2001-2002 Originally written by yu-ji
77 // License: GPL v2 or (at your option) any later version
88 //
@@ -99,6 +99,10 @@ class line_diff
9999 {
100100 var $arr1, $arr2, $m, $n, $pos, $key, $plus, $minus, $equal, $reverse;
101101
102+ function line_diff($plus = '+', $minus = '-', $equal = ' ')
103+ {
104+ $this->__construct($plus, $minus, $equal);
105+ }
102106 function __construct($plus = '+', $minus = '-', $equal = ' ')
103107 {
104108 $this->plus = $plus;
@@ -254,6 +258,10 @@ class DiffLine
254258 var $text;
255259 var $status;
256260
261+ function DiffLine($text)
262+ {
263+ $this->__construct($text);
264+ }
257265 function __construct($text)
258266 {
259267 $this->text = $text . "\n";
@@ -285,4 +293,3 @@ class DiffLine
285293 return $this->text;
286294 }
287295 }
288-?>
--- a/lib/make_link.php
+++ b/lib/make_link.php
@@ -50,6 +50,10 @@ class InlineConverter
5050 $this->converters = $converters;
5151 }
5252
53+ function InlineConverter($converters = NULL, $excludes = NULL)
54+ {
55+ $this->__construct($converters, $excludes);
56+ }
5357 function __construct($converters = NULL, $excludes = NULL)
5458 {
5559 if ($converters === NULL) {
@@ -150,7 +154,10 @@ class Link
150154 var $body;
151155 var $alias;
152156
153- // Constructor
157+ function Link($start)
158+ {
159+ $this->__construct($start);
160+ }
154161 function __construct($start)
155162 {
156163 $this->start = $start;
@@ -209,6 +216,10 @@ class Link_plugin extends Link
209216 var $pattern;
210217 var $plain,$param;
211218
219+ function Link_plugin($start)
220+ {
221+ $this->__construct($start);
222+ }
212223 function __construct($start)
213224 {
214225 parent::__construct($start);
@@ -278,6 +289,10 @@ EOD;
278289 // Footnotes
279290 class Link_note extends Link
280291 {
292+ function Link_note($start)
293+ {
294+ $this->__construct($start);
295+ }
281296 function __construct($start)
282297 {
283298 parent::__construct($start);
@@ -346,6 +361,10 @@ EOD;
346361 // URLs
347362 class Link_url extends Link
348363 {
364+ function Link_url($start)
365+ {
366+ $this->__construct($start);
367+ }
349368 function __construct($start)
350369 {
351370 parent::__construct($start);
@@ -393,6 +412,10 @@ EOD;
393412 // URLs (InterWiki definition on "InterWikiName")
394413 class Link_url_interwiki extends Link
395414 {
415+ function Link_url_interwiki($start)
416+ {
417+ $this->__construct($start);
418+ }
396419 function __construct($start)
397420 {
398421 parent::__construct($start);
@@ -433,6 +456,10 @@ class Link_mailto extends Link
433456 {
434457 var $is_image, $image;
435458
459+ function Link_mailto($start)
460+ {
461+ $this->__construct($start);
462+ }
436463 function __construct($start)
437464 {
438465 parent::__construct($start);
@@ -475,6 +502,10 @@ class Link_interwikiname extends Link
475502 var $param = '';
476503 var $anchor = '';
477504
505+ function Link_interwikiname($start)
506+ {
507+ $this->__construct($start);
508+ }
478509 function __construct($start)
479510 {
480511 parent::__construct($start);
@@ -544,6 +575,10 @@ class Link_bracketname extends Link
544575 {
545576 var $anchor, $refer;
546577
578+ function Link_bracketname($start)
579+ {
580+ $this->__construct($start);
581+ }
547582 function __construct($start)
548583 {
549584 parent::__construct($start);
@@ -606,6 +641,10 @@ EOD;
606641 // WikiNames
607642 class Link_wikiname extends Link
608643 {
644+ function Link_wikiname($start)
645+ {
646+ $this->__construct($start);
647+ }
609648 function __construct($start)
610649 {
611650 parent::__construct($start);
@@ -647,6 +686,10 @@ class Link_autolink extends Link
647686 var $auto;
648687 var $auto_a; // alphabet only
649688
689+ function Link_autolink($start)
690+ {
691+ $this->__construct($start);
692+ }
650693 function __construct($start)
651694 {
652695 global $autolink;
@@ -693,6 +736,10 @@ class Link_autolink extends Link
693736
694737 class Link_autolink_a extends Link_autolink
695738 {
739+ function Link_autolink_a($start)
740+ {
741+ $this->__construct($start);
742+ }
696743 function __construct($start)
697744 {
698745 parent::__construct($start);
--- a/plugin/attach.inc.php
+++ b/plugin/attach.inc.php
@@ -432,6 +432,10 @@ class AttachFile
432432 var $size_str = '';
433433 var $status = array('count'=>array(0), 'age'=>'', 'pass'=>'', 'freeze'=>FALSE);
434434
435+ function AttachFile($page, $file, $age = 0)
436+ {
437+ $this->__construct($page, $file, $age);
438+ }
435439 function __construct($page, $file, $age = 0)
436440 {
437441 $this->page = $page;
@@ -754,6 +758,10 @@ class AttachFiles
754758 var $page;
755759 var $files = array();
756760
761+ function AttachFiles($page)
762+ {
763+ $this->__construct($page);
764+ }
757765 function __construct($page)
758766 {
759767 $this->page = $page;
@@ -823,6 +831,10 @@ class AttachPages
823831 {
824832 var $pages = array();
825833
834+ function AttachPages($page = '', $age = NULL)
835+ {
836+ $this->__construct($page, $age);
837+ }
826838 function __construct($page = '', $age = NULL)
827839 {
828840
--- a/plugin/dump.inc.php
+++ b/plugin/dump.inc.php
@@ -1,7 +1,8 @@
11 <?php
2-// $Id: dump.inc.php,v 1.41 2007/11/03 15:17:52 henoheno Exp $
3-// Copyright (C)
4-// 2004-2007 PukiWiki Developers Team
2+// PukiWiki - Yet another WikiWikiWeb clone
3+// dump.inc.php
4+// Copyright
5+// 2004-2016 PukiWiki Development Team
56 // 2004 teanan / Interfair Laboratory
67 // License: GPL v2 or (at your option) any later version
78 //
@@ -330,7 +331,9 @@ class tarlib
330331 var $arc_kind;
331332 var $dummydata;
332333
333- // コンストラクタ
334+ function tarlib() {
335+ $this->__construct();
336+ }
334337 function __construct() {
335338 $this->filename = '';
336339 $this->fp = FALSE;
@@ -713,4 +716,3 @@ class tarlib
713716 $this->status = TARLIB_STATUS_INIT;
714717 }
715718 }
716-?>
--- a/plugin/map.inc.php
+++ b/plugin/map.inc.php
@@ -1,7 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone.
3-// $Id: map.inc.php,v 1.18 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C) 2002-2005, 2007 PukiWiki Developers Team
3+// map.inc.php
4+// Copyright 2002-2016 PukiWiki Development Team
55 // License: GPL v2 or (at your option) any later version
66 //
77 // Site map plugin
@@ -104,6 +104,10 @@ class MapNode
104104 var $done;
105105 var $hide_pattern;
106106
107+ function MapNode($page, $reverse = FALSE)
108+ {
109+ $this->__construct($page, $reverse);
110+ }
107111 function __construct($page, $reverse = FALSE)
108112 {
109113 global $script, $non_list;
@@ -203,4 +207,3 @@ class MapNode
203207 return $retval;
204208 }
205209 }
206-
--- a/plugin/showrss.inc.php
+++ b/plugin/showrss.inc.php
@@ -77,6 +77,10 @@ class ShowRSS_html
7777 var $items = array();
7878 var $class = '';
7979
80+ function ShowRSS_html($rss)
81+ {
82+ $this->__construct($rss);
83+ }
8084 function __construct($rss)
8185 {
8286 foreach ($rss as $date=>$items) {
--- a/plugin/tracker.inc.php
+++ b/plugin/tracker.inc.php
@@ -1,7 +1,7 @@
11 <?php
22 // PukiWiki - Yet another WikiWikiWeb clone
3-// $Id: tracker.inc.php,v 1.124 2011/01/25 15:01:01 henoheno Exp $
4-// Copyright (C) 2003-2005, 2007 PukiWiki Developers Team
3+// tracker.inc.php
4+// Copyright 2003-2016 PukiWiki Development Team
55 // License: GPL v2 or (at your option) any later version
66 //
77 // Issue tracker plugin (See Also bugtrack plugin)
@@ -267,6 +267,10 @@ class Tracker_field
267267 var $sort_type = SORT_REGULAR;
268268 var $id = 0;
269269
270+ function Tracker_field($field,$page,$refer,&$config)
271+ {
272+ $this->__construct($field, $page, $refer, $config);
273+ }
270274 function __construct($field,$page,$refer,&$config)
271275 {
272276 global $post;
@@ -373,6 +377,10 @@ class Tracker_field_format extends Tracker_field
373377 var $styles = array();
374378 var $formats = array();
375379
380+ function Tracker_field_format($field,$page,$refer,&$config)
381+ {
382+ $this->__construct($field, $page, $refer, $config);
383+ }
376384 function __construct($field,$page,$refer,&$config)
377385 {
378386 parent::__construct($field,$page,$refer,$config);
@@ -663,6 +671,10 @@ class Tracker_list
663671 var $order;
664672 var $sort_keys;
665673
674+ function Tracker_list($page,$refer,&$config,$list)
675+ {
676+ $this->__construct($page, $refer, $config, $list);
677+ }
666678 function __construct($page,$refer,&$config,$list)
667679 {
668680 $this->page = $page;
@@ -936,4 +948,3 @@ function plugin_tracker_get_source($page)
936948 // #freezeを削除
937949 return preg_replace('/^#freeze\s*$/im', '', $source);
938950 }
939-