修訂 | 74335459853fd76cdbc9a765e8c8ee93f5cc3c78 (tree) |
---|---|
時間 | 2016-11-06 17:56:43 |
作者 | umorigu <umorigu@gmai...> |
Commiter | 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.
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?php |
2 | 2 | // 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 | |
5 | 5 | // License: GPL v2 or (at your option) any later version |
6 | 6 | // |
7 | 7 | // Parse a PukiWiki page as a configuration page |
@@ -27,6 +27,10 @@ class Config | ||
27 | 27 | var $name, $page; // Page name |
28 | 28 | var $objs = array(); |
29 | 29 | |
30 | + function Config($name) | |
31 | + { | |
32 | + $this->__construct($name); | |
33 | + } | |
30 | 34 | function __construct($name) |
31 | 35 | { |
32 | 36 | $this->name = $name; |
@@ -135,6 +139,10 @@ class ConfigTable | ||
135 | 139 | var $after = array(); // Page contents (except table ones) |
136 | 140 | var $values = array(); // Table contents |
137 | 141 | |
142 | + function ConfigTable($title, $obj = NULL) | |
143 | + { | |
144 | + $this->__construct($title, $obj); | |
145 | + } | |
138 | 146 | function __construct($title, $obj = NULL) |
139 | 147 | { |
140 | 148 | if ($obj !== NULL) { |
@@ -221,4 +229,3 @@ class ConfigTable_Direct extends ConfigTable | ||
221 | 229 | return $retval; |
222 | 230 | } |
223 | 231 | } |
224 | - |
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?php |
2 | 2 | // 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 | |
6 | 6 | // 2001-2002 Originally written by yu-ji |
7 | 7 | // License: GPL v2 or (at your option) any later version |
8 | 8 | // |
@@ -32,6 +32,10 @@ class Element | ||
32 | 32 | var $elements; // References of childs |
33 | 33 | var $last; // Insert new one at the back of the $last |
34 | 34 | |
35 | + function Element() | |
36 | + { | |
37 | + $this->__construct(); | |
38 | + } | |
35 | 39 | function __construct() |
36 | 40 | { |
37 | 41 | $this->elements = array(); |
@@ -165,6 +169,10 @@ function & Factory_Div(& $root, $text) | ||
165 | 169 | // Inline elements |
166 | 170 | class Inline extends Element |
167 | 171 | { |
172 | + function Inline($text) | |
173 | + { | |
174 | + $this->__construct($text); | |
175 | + } | |
168 | 176 | function __construct($text) |
169 | 177 | { |
170 | 178 | parent::__construct(); |
@@ -202,6 +210,10 @@ class Paragraph extends Element | ||
202 | 210 | { |
203 | 211 | var $param; |
204 | 212 | |
213 | + function Paragraph($text, $param = '') | |
214 | + { | |
215 | + $this->__construct($text, $param); | |
216 | + } | |
205 | 217 | function __construct($text, $param = '') |
206 | 218 | { |
207 | 219 | parent::__construct(); |
@@ -234,6 +246,10 @@ class Heading extends Element | ||
234 | 246 | var $id; |
235 | 247 | var $msg_top; |
236 | 248 | |
249 | + function Heading(& $root, $text) | |
250 | + { | |
251 | + $this->__construct($root, $text); | |
252 | + } | |
237 | 253 | function __construct(& $root, $text) |
238 | 254 | { |
239 | 255 | parent::__construct(); |
@@ -266,6 +282,10 @@ class Heading extends Element | ||
266 | 282 | // Horizontal Rule |
267 | 283 | class HRule extends Element |
268 | 284 | { |
285 | + function HRule(& $root, $text) | |
286 | + { | |
287 | + $this->__construct($root, $text); | |
288 | + } | |
269 | 289 | function __construct(& $root, $text) |
270 | 290 | { |
271 | 291 | parent::__construct(); |
@@ -293,6 +313,10 @@ class ListContainer extends Element | ||
293 | 313 | var $margin; |
294 | 314 | var $left_margin; |
295 | 315 | |
316 | + function ListContainer($tag, $tag2, $head, $text) | |
317 | + { | |
318 | + $this->__construct($tag, $tag2, $head, $text); | |
319 | + } | |
296 | 320 | function __construct($tag, $tag2, $head, $text) |
297 | 321 | { |
298 | 322 | parent::__construct(); |
@@ -361,6 +385,10 @@ class ListContainer extends Element | ||
361 | 385 | |
362 | 386 | class ListElement extends Element |
363 | 387 | { |
388 | + function ListElement($level, $head) | |
389 | + { | |
390 | + $this->__construct($level, $head); | |
391 | + } | |
364 | 392 | function __construct($level, $head) |
365 | 393 | { |
366 | 394 | parent::__construct(); |
@@ -384,6 +412,10 @@ class ListElement extends Element | ||
384 | 412 | // - Three |
385 | 413 | class UList extends ListContainer |
386 | 414 | { |
415 | + function UList(& $root, $text) | |
416 | + { | |
417 | + $this->__construct($root, $text); | |
418 | + } | |
387 | 419 | function __construct(& $root, $text) |
388 | 420 | { |
389 | 421 | parent::__construct('ul', 'li', '-', $text); |
@@ -395,6 +427,10 @@ class UList extends ListContainer | ||
395 | 427 | // + Three |
396 | 428 | class OList extends ListContainer |
397 | 429 | { |
430 | + function OList(& $root, $text) | |
431 | + { | |
432 | + $this->__construct($root, $text); | |
433 | + } | |
398 | 434 | function __construct(& $root, $text) |
399 | 435 | { |
400 | 436 | parent::__construct('ol', 'li', '+', $text); |
@@ -406,6 +442,10 @@ class OList extends ListContainer | ||
406 | 442 | // : definition3 | description3 |
407 | 443 | class DList extends ListContainer |
408 | 444 | { |
445 | + function DList($out) | |
446 | + { | |
447 | + $this->__construct($out); | |
448 | + } | |
409 | 449 | function __construct($out) |
410 | 450 | { |
411 | 451 | parent::__construct('dl', 'dt', ':', $out[0]); |
@@ -421,6 +461,10 @@ class BQuote extends Element | ||
421 | 461 | { |
422 | 462 | var $level; |
423 | 463 | |
464 | + function BQuote(& $root, $text) | |
465 | + { | |
466 | + $this->__construct($root, $text); | |
467 | + } | |
424 | 468 | function __construct(& $root, $text) |
425 | 469 | { |
426 | 470 | parent::__construct(); |
@@ -484,6 +528,10 @@ class TableCell extends Element | ||
484 | 528 | var $rowspan = 1; |
485 | 529 | var $style; // is array('width'=>, 'align'=>...); |
486 | 530 | |
531 | + function TableCell($text, $is_template = FALSE) | |
532 | + { | |
533 | + $this->__construct($text, $is_template); | |
534 | + } | |
487 | 535 | function __construct($text, $is_template = FALSE) |
488 | 536 | { |
489 | 537 | parent::__construct(); |
@@ -561,6 +609,10 @@ class Table extends Element | ||
561 | 609 | var $types; |
562 | 610 | var $col; // number of column |
563 | 611 | |
612 | + function Table($out) | |
613 | + { | |
614 | + $this->__construct($out); | |
615 | + } | |
564 | 616 | function __construct($out) |
565 | 617 | { |
566 | 618 | parent::__construct(); |
@@ -662,6 +714,10 @@ class YTable extends Element | ||
662 | 714 | { |
663 | 715 | var $col; // Number of columns |
664 | 716 | |
717 | + function YTable($row = array('cell1 ', ' cell2 ', ' cell3')) | |
718 | + { | |
719 | + $this->__construct($row); | |
720 | + } | |
665 | 721 | // TODO: Seems unable to show literal '==' without tricks. |
666 | 722 | // But it will be imcompatible. |
667 | 723 | // TODO: Why toString() or toXHTML() here |
@@ -738,6 +794,10 @@ class YTable extends Element | ||
738 | 794 | // ' 'Space-beginning sentence |
739 | 795 | class Pre extends Element |
740 | 796 | { |
797 | + function Pre(& $root, $text) | |
798 | + { | |
799 | + $this->__construct($root, $text); | |
800 | + } | |
741 | 801 | function __construct(& $root, $text) |
742 | 802 | { |
743 | 803 | global $preformat_ltrim; |
@@ -769,6 +829,10 @@ class Div extends Element | ||
769 | 829 | var $name; |
770 | 830 | var $param; |
771 | 831 | |
832 | + function Div($out) | |
833 | + { | |
834 | + $this->__construct($out); | |
835 | + } | |
772 | 836 | function __construct($out) |
773 | 837 | { |
774 | 838 | parent::__construct(); |
@@ -792,6 +856,10 @@ class Align extends Element | ||
792 | 856 | { |
793 | 857 | var $align; |
794 | 858 | |
859 | + function Align($align) | |
860 | + { | |
861 | + $this->__construct($align); | |
862 | + } | |
795 | 863 | function __construct($align) |
796 | 864 | { |
797 | 865 | parent::__construct(); |
@@ -827,6 +895,10 @@ class Body extends Element | ||
827 | 895 | ',' => 'YTable', |
828 | 896 | '#' => 'Div'); |
829 | 897 | |
898 | + function Body($id) | |
899 | + { | |
900 | + $this->__construct($id); | |
901 | + } | |
830 | 902 | function __construct($id) |
831 | 903 | { |
832 | 904 | $this->id = $id; |
@@ -979,6 +1051,10 @@ class Body extends Element | ||
979 | 1051 | |
980 | 1052 | class Contents_UList extends ListContainer |
981 | 1053 | { |
1054 | + function Contents_UList($text, $level, $id) | |
1055 | + { | |
1056 | + $this->__construct($text, $level, $id); | |
1057 | + } | |
982 | 1058 | function __construct($text, $level, $id) |
983 | 1059 | { |
984 | 1060 | // Reformatting $text |
@@ -1,8 +1,8 @@ | ||
1 | 1 | <?php |
2 | 2 | // 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 | |
6 | 6 | // 2001-2002 Originally written by yu-ji |
7 | 7 | // License: GPL v2 or (at your option) any later version |
8 | 8 | // |
@@ -99,6 +99,10 @@ class line_diff | ||
99 | 99 | { |
100 | 100 | var $arr1, $arr2, $m, $n, $pos, $key, $plus, $minus, $equal, $reverse; |
101 | 101 | |
102 | + function line_diff($plus = '+', $minus = '-', $equal = ' ') | |
103 | + { | |
104 | + $this->__construct($plus, $minus, $equal); | |
105 | + } | |
102 | 106 | function __construct($plus = '+', $minus = '-', $equal = ' ') |
103 | 107 | { |
104 | 108 | $this->plus = $plus; |
@@ -254,6 +258,10 @@ class DiffLine | ||
254 | 258 | var $text; |
255 | 259 | var $status; |
256 | 260 | |
261 | + function DiffLine($text) | |
262 | + { | |
263 | + $this->__construct($text); | |
264 | + } | |
257 | 265 | function __construct($text) |
258 | 266 | { |
259 | 267 | $this->text = $text . "\n"; |
@@ -285,4 +293,3 @@ class DiffLine | ||
285 | 293 | return $this->text; |
286 | 294 | } |
287 | 295 | } |
288 | -?> |
@@ -50,6 +50,10 @@ class InlineConverter | ||
50 | 50 | $this->converters = $converters; |
51 | 51 | } |
52 | 52 | |
53 | + function InlineConverter($converters = NULL, $excludes = NULL) | |
54 | + { | |
55 | + $this->__construct($converters, $excludes); | |
56 | + } | |
53 | 57 | function __construct($converters = NULL, $excludes = NULL) |
54 | 58 | { |
55 | 59 | if ($converters === NULL) { |
@@ -150,7 +154,10 @@ class Link | ||
150 | 154 | var $body; |
151 | 155 | var $alias; |
152 | 156 | |
153 | - // Constructor | |
157 | + function Link($start) | |
158 | + { | |
159 | + $this->__construct($start); | |
160 | + } | |
154 | 161 | function __construct($start) |
155 | 162 | { |
156 | 163 | $this->start = $start; |
@@ -209,6 +216,10 @@ class Link_plugin extends Link | ||
209 | 216 | var $pattern; |
210 | 217 | var $plain,$param; |
211 | 218 | |
219 | + function Link_plugin($start) | |
220 | + { | |
221 | + $this->__construct($start); | |
222 | + } | |
212 | 223 | function __construct($start) |
213 | 224 | { |
214 | 225 | parent::__construct($start); |
@@ -278,6 +289,10 @@ EOD; | ||
278 | 289 | // Footnotes |
279 | 290 | class Link_note extends Link |
280 | 291 | { |
292 | + function Link_note($start) | |
293 | + { | |
294 | + $this->__construct($start); | |
295 | + } | |
281 | 296 | function __construct($start) |
282 | 297 | { |
283 | 298 | parent::__construct($start); |
@@ -346,6 +361,10 @@ EOD; | ||
346 | 361 | // URLs |
347 | 362 | class Link_url extends Link |
348 | 363 | { |
364 | + function Link_url($start) | |
365 | + { | |
366 | + $this->__construct($start); | |
367 | + } | |
349 | 368 | function __construct($start) |
350 | 369 | { |
351 | 370 | parent::__construct($start); |
@@ -393,6 +412,10 @@ EOD; | ||
393 | 412 | // URLs (InterWiki definition on "InterWikiName") |
394 | 413 | class Link_url_interwiki extends Link |
395 | 414 | { |
415 | + function Link_url_interwiki($start) | |
416 | + { | |
417 | + $this->__construct($start); | |
418 | + } | |
396 | 419 | function __construct($start) |
397 | 420 | { |
398 | 421 | parent::__construct($start); |
@@ -433,6 +456,10 @@ class Link_mailto extends Link | ||
433 | 456 | { |
434 | 457 | var $is_image, $image; |
435 | 458 | |
459 | + function Link_mailto($start) | |
460 | + { | |
461 | + $this->__construct($start); | |
462 | + } | |
436 | 463 | function __construct($start) |
437 | 464 | { |
438 | 465 | parent::__construct($start); |
@@ -475,6 +502,10 @@ class Link_interwikiname extends Link | ||
475 | 502 | var $param = ''; |
476 | 503 | var $anchor = ''; |
477 | 504 | |
505 | + function Link_interwikiname($start) | |
506 | + { | |
507 | + $this->__construct($start); | |
508 | + } | |
478 | 509 | function __construct($start) |
479 | 510 | { |
480 | 511 | parent::__construct($start); |
@@ -544,6 +575,10 @@ class Link_bracketname extends Link | ||
544 | 575 | { |
545 | 576 | var $anchor, $refer; |
546 | 577 | |
578 | + function Link_bracketname($start) | |
579 | + { | |
580 | + $this->__construct($start); | |
581 | + } | |
547 | 582 | function __construct($start) |
548 | 583 | { |
549 | 584 | parent::__construct($start); |
@@ -606,6 +641,10 @@ EOD; | ||
606 | 641 | // WikiNames |
607 | 642 | class Link_wikiname extends Link |
608 | 643 | { |
644 | + function Link_wikiname($start) | |
645 | + { | |
646 | + $this->__construct($start); | |
647 | + } | |
609 | 648 | function __construct($start) |
610 | 649 | { |
611 | 650 | parent::__construct($start); |
@@ -647,6 +686,10 @@ class Link_autolink extends Link | ||
647 | 686 | var $auto; |
648 | 687 | var $auto_a; // alphabet only |
649 | 688 | |
689 | + function Link_autolink($start) | |
690 | + { | |
691 | + $this->__construct($start); | |
692 | + } | |
650 | 693 | function __construct($start) |
651 | 694 | { |
652 | 695 | global $autolink; |
@@ -693,6 +736,10 @@ class Link_autolink extends Link | ||
693 | 736 | |
694 | 737 | class Link_autolink_a extends Link_autolink |
695 | 738 | { |
739 | + function Link_autolink_a($start) | |
740 | + { | |
741 | + $this->__construct($start); | |
742 | + } | |
696 | 743 | function __construct($start) |
697 | 744 | { |
698 | 745 | parent::__construct($start); |
@@ -432,6 +432,10 @@ class AttachFile | ||
432 | 432 | var $size_str = ''; |
433 | 433 | var $status = array('count'=>array(0), 'age'=>'', 'pass'=>'', 'freeze'=>FALSE); |
434 | 434 | |
435 | + function AttachFile($page, $file, $age = 0) | |
436 | + { | |
437 | + $this->__construct($page, $file, $age); | |
438 | + } | |
435 | 439 | function __construct($page, $file, $age = 0) |
436 | 440 | { |
437 | 441 | $this->page = $page; |
@@ -754,6 +758,10 @@ class AttachFiles | ||
754 | 758 | var $page; |
755 | 759 | var $files = array(); |
756 | 760 | |
761 | + function AttachFiles($page) | |
762 | + { | |
763 | + $this->__construct($page); | |
764 | + } | |
757 | 765 | function __construct($page) |
758 | 766 | { |
759 | 767 | $this->page = $page; |
@@ -823,6 +831,10 @@ class AttachPages | ||
823 | 831 | { |
824 | 832 | var $pages = array(); |
825 | 833 | |
834 | + function AttachPages($page = '', $age = NULL) | |
835 | + { | |
836 | + $this->__construct($page, $age); | |
837 | + } | |
826 | 838 | function __construct($page = '', $age = NULL) |
827 | 839 | { |
828 | 840 |
@@ -1,7 +1,8 @@ | ||
1 | 1 | <?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 | |
5 | 6 | // 2004 teanan / Interfair Laboratory |
6 | 7 | // License: GPL v2 or (at your option) any later version |
7 | 8 | // |
@@ -330,7 +331,9 @@ class tarlib | ||
330 | 331 | var $arc_kind; |
331 | 332 | var $dummydata; |
332 | 333 | |
333 | - // コンストラクタ | |
334 | + function tarlib() { | |
335 | + $this->__construct(); | |
336 | + } | |
334 | 337 | function __construct() { |
335 | 338 | $this->filename = ''; |
336 | 339 | $this->fp = FALSE; |
@@ -713,4 +716,3 @@ class tarlib | ||
713 | 716 | $this->status = TARLIB_STATUS_INIT; |
714 | 717 | } |
715 | 718 | } |
716 | -?> |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?php |
2 | 2 | // 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 | |
5 | 5 | // License: GPL v2 or (at your option) any later version |
6 | 6 | // |
7 | 7 | // Site map plugin |
@@ -104,6 +104,10 @@ class MapNode | ||
104 | 104 | var $done; |
105 | 105 | var $hide_pattern; |
106 | 106 | |
107 | + function MapNode($page, $reverse = FALSE) | |
108 | + { | |
109 | + $this->__construct($page, $reverse); | |
110 | + } | |
107 | 111 | function __construct($page, $reverse = FALSE) |
108 | 112 | { |
109 | 113 | global $script, $non_list; |
@@ -203,4 +207,3 @@ class MapNode | ||
203 | 207 | return $retval; |
204 | 208 | } |
205 | 209 | } |
206 | - |
@@ -77,6 +77,10 @@ class ShowRSS_html | ||
77 | 77 | var $items = array(); |
78 | 78 | var $class = ''; |
79 | 79 | |
80 | + function ShowRSS_html($rss) | |
81 | + { | |
82 | + $this->__construct($rss); | |
83 | + } | |
80 | 84 | function __construct($rss) |
81 | 85 | { |
82 | 86 | foreach ($rss as $date=>$items) { |
@@ -1,7 +1,7 @@ | ||
1 | 1 | <?php |
2 | 2 | // 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 | |
5 | 5 | // License: GPL v2 or (at your option) any later version |
6 | 6 | // |
7 | 7 | // Issue tracker plugin (See Also bugtrack plugin) |
@@ -267,6 +267,10 @@ class Tracker_field | ||
267 | 267 | var $sort_type = SORT_REGULAR; |
268 | 268 | var $id = 0; |
269 | 269 | |
270 | + function Tracker_field($field,$page,$refer,&$config) | |
271 | + { | |
272 | + $this->__construct($field, $page, $refer, $config); | |
273 | + } | |
270 | 274 | function __construct($field,$page,$refer,&$config) |
271 | 275 | { |
272 | 276 | global $post; |
@@ -373,6 +377,10 @@ class Tracker_field_format extends Tracker_field | ||
373 | 377 | var $styles = array(); |
374 | 378 | var $formats = array(); |
375 | 379 | |
380 | + function Tracker_field_format($field,$page,$refer,&$config) | |
381 | + { | |
382 | + $this->__construct($field, $page, $refer, $config); | |
383 | + } | |
376 | 384 | function __construct($field,$page,$refer,&$config) |
377 | 385 | { |
378 | 386 | parent::__construct($field,$page,$refer,$config); |
@@ -663,6 +671,10 @@ class Tracker_list | ||
663 | 671 | var $order; |
664 | 672 | var $sort_keys; |
665 | 673 | |
674 | + function Tracker_list($page,$refer,&$config,$list) | |
675 | + { | |
676 | + $this->__construct($page, $refer, $config, $list); | |
677 | + } | |
666 | 678 | function __construct($page,$refer,&$config,$list) |
667 | 679 | { |
668 | 680 | $this->page = $page; |
@@ -936,4 +948,3 @@ function plugin_tracker_get_source($page) | ||
936 | 948 | // #freezeを削除 |
937 | 949 | return preg_replace('/^#freeze\s*$/im', '', $source); |
938 | 950 | } |
939 | - |