-
diff --git src/wp-admin/includes/class-ftp-pure.php src/wp-admin/includes/class-ftp-pure.php
index bb7742a..7146c96 100644
|
|
|
|
| 27 | 27 | */ |
| 28 | 28 | class ftp extends ftp_base { |
| 29 | 29 | |
| 30 | | function ftp($verb=FALSE, $le=FALSE) { |
| 31 | | $this->__construct($verb, $le); |
| 32 | | } |
| 33 | | |
| 34 | 30 | function __construct($verb=FALSE, $le=FALSE) { |
| 35 | 31 | parent::__construct(false, $verb, $le); |
| 36 | 32 | } |
| 37 | 33 | |
| | 34 | function ftp($verb=FALSE, $le=FALSE) { |
| | 35 | $this->__construct($verb, $le); |
| | 36 | } |
| | 37 | |
| 38 | 38 | // <!-- --------------------------------------------------------------------------------------- --> |
| 39 | 39 | // <!-- Private functions --> |
| 40 | 40 | // <!-- --------------------------------------------------------------------------------------- --> |
-
diff --git src/wp-admin/includes/class-ftp-sockets.php src/wp-admin/includes/class-ftp-sockets.php
index f9ea6cd..6bf94eb 100644
|
|
|
|
| 27 | 27 | */ |
| 28 | 28 | class ftp extends ftp_base { |
| 29 | 29 | |
| 30 | | function ftp($verb=FALSE, $le=FALSE) { |
| 31 | | $this->__construct($verb, $le); |
| 32 | | } |
| 33 | | |
| 34 | 30 | function __construct($verb=FALSE, $le=FALSE) { |
| 35 | 31 | parent::__construct(true, $verb, $le); |
| 36 | 32 | } |
| 37 | 33 | |
| | 34 | function ftp($verb=FALSE, $le=FALSE) { |
| | 35 | $this->__construct($verb, $le); |
| | 36 | } |
| | 37 | |
| 38 | 38 | // <!-- --------------------------------------------------------------------------------------- --> |
| 39 | 39 | // <!-- Private functions --> |
| 40 | 40 | // <!-- --------------------------------------------------------------------------------------- --> |
-
diff --git src/wp-admin/includes/class-ftp.php src/wp-admin/includes/class-ftp.php
index 01e585b..c9d9656 100644
|
|
|
class ftp_base {
|
| 121 | 121 | var $AutoAsciiExt; |
| 122 | 122 | |
| 123 | 123 | /* Constructor */ |
| 124 | | function ftp_base($port_mode=FALSE) { |
| 125 | | $this->__construct($port_mode); |
| 126 | | } |
| 127 | | |
| 128 | 124 | function __construct($port_mode=FALSE, $verb=FALSE, $le=FALSE) { |
| 129 | 125 | $this->LocalEcho=$le; |
| 130 | 126 | $this->Verbose=$verb; |
| … |
… |
class ftp_base {
|
| 157 | 153 | elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') $this->OS_local=FTP_OS_Mac; |
| 158 | 154 | } |
| 159 | 155 | |
| | 156 | function ftp_base($port_mode=FALSE) { |
| | 157 | $this->__construct($port_mode); |
| | 158 | } |
| | 159 | |
| 160 | 160 | // <!-- --------------------------------------------------------------------------------------- --> |
| 161 | 161 | // <!-- Public functions --> |
| 162 | 162 | // <!-- --------------------------------------------------------------------------------------- --> |
-
diff --git src/wp-admin/includes/class-pclzip.php src/wp-admin/includes/class-pclzip.php
index 5e6a619..f36a4a3 100644
|
|
|
|
| 212 | 212 | // Note that no real action is taken, if the archive does not exist it is not |
| 213 | 213 | // created. Use create() for that. |
| 214 | 214 | // -------------------------------------------------------------------------------- |
| 215 | | function PclZip($p_zipname) |
| | 215 | function __construct($p_zipname) |
| 216 | 216 | { |
| 217 | 217 | |
| 218 | 218 | // ----- Tests the zlib |
| … |
… |
|
| 229 | 229 | // ----- Return |
| 230 | 230 | return; |
| 231 | 231 | } |
| | 232 | |
| | 233 | public function PclZip($p_zipname) { |
| | 234 | self::__construct($p_zipname); |
| | 235 | } |
| 232 | 236 | // -------------------------------------------------------------------------------- |
| 233 | 237 | |
| 234 | 238 | // -------------------------------------------------------------------------------- |
-
diff --git src/wp-admin/includes/deprecated.php src/wp-admin/includes/deprecated.php
index 59140b7..0eee11b 100644
|
|
|
class WP_User_Search {
|
| 470 | 470 | var $paging_text; |
| 471 | 471 | |
| 472 | 472 | /** |
| 473 | | * PHP4 Constructor - Sets up the object properties. |
| | 473 | * PHP5 Constructor - Sets up the object properties. |
| 474 | 474 | * |
| 475 | 475 | * @since 2.1.0 |
| 476 | 476 | * |
| … |
… |
class WP_User_Search {
|
| 479 | 479 | * @param string $role Role name. |
| 480 | 480 | * @return WP_User_Search |
| 481 | 481 | */ |
| 482 | | function WP_User_Search ($search_term = '', $page = '', $role = '') { |
| | 482 | function __construct( $search_term = '', $page = '', $role = '' ) { |
| 483 | 483 | _deprecated_function( __FUNCTION__, '3.1', 'WP_User_Query' ); |
| 484 | 484 | |
| 485 | 485 | $this->search_term = wp_unslash( $search_term ); |
| … |
… |
class WP_User_Search {
|
| 493 | 493 | } |
| 494 | 494 | |
| 495 | 495 | /** |
| | 496 | * PHP4 Constructor - Sets up the object properties. |
| | 497 | * |
| | 498 | * @since 2.1.0 |
| | 499 | * |
| | 500 | * @param string $search_term Search terms string. |
| | 501 | * @param int $page Optional. Page ID. |
| | 502 | * @param string $role Role name. |
| | 503 | * @return WP_User_Search |
| | 504 | */ |
| | 505 | public function WP_User_Search( $search_term = '', $page = '', $role = '' ) { |
| | 506 | self::__construct( $search_term, $page, $role ); |
| | 507 | } |
| | 508 | |
| | 509 | /** |
| 496 | 510 | * {@internal Missing Short Description}} |
| 497 | 511 | * |
| 498 | 512 | * {@internal Missing Long Description}} |
-
diff --git src/wp-includes/Text/Diff.php src/wp-includes/Text/Diff.php
index dc24b67..edcdd3a 100644
|
|
|
class Text_Diff {
|
| 33 | 33 | * Normally an array of two arrays, each |
| 34 | 34 | * containing the lines from a file. |
| 35 | 35 | */ |
| 36 | | function Text_Diff($engine, $params) |
| | 36 | function __construct( $engine, $params ) |
| 37 | 37 | { |
| 38 | 38 | // Backward compatibility workaround. |
| 39 | 39 | if (!is_string($engine)) { |
| … |
… |
class Text_Diff {
|
| 55 | 55 | $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params); |
| 56 | 56 | } |
| 57 | 57 | |
| | 58 | /** |
| | 59 | * PHP4 constructor. |
| | 60 | */ |
| | 61 | public function Text_Diff( $engine, $params ) { |
| | 62 | self::__construct( $engine, $params ); |
| | 63 | } |
| | 64 | |
| 58 | 65 | /** |
| 59 | 66 | * Returns the array of differences. |
| 60 | 67 | */ |
| … |
… |
class Text_MappedDiff extends Text_Diff {
|
| 304 | 311 | * @param array $mapped_to_lines This array should have the same number |
| 305 | 312 | * of elements as $to_lines. |
| 306 | 313 | */ |
| 307 | | function Text_MappedDiff($from_lines, $to_lines, |
| | 314 | function __construct($from_lines, $to_lines, |
| 308 | 315 | $mapped_from_lines, $mapped_to_lines) |
| 309 | 316 | { |
| 310 | 317 | assert(count($from_lines) == count($mapped_from_lines)); |
| … |
… |
class Text_MappedDiff extends Text_Diff {
|
| 328 | 335 | } |
| 329 | 336 | } |
| 330 | 337 | |
| | 338 | /** |
| | 339 | * PHP4 constructor. |
| | 340 | */ |
| | 341 | public function Text_MappedDiff( $from_lines, $to_lines, |
| | 342 | $mapped_from_lines, $mapped_to_lines ) { |
| | 343 | self::__construct( $from_lines, $to_lines, |
| | 344 | $mapped_from_lines, $mapped_to_lines ); |
| | 345 | } |
| | 346 | |
| 331 | 347 | } |
| 332 | 348 | |
| 333 | 349 | /** |
| … |
… |
class Text_Diff_Op {
|
| 366 | 382 | */ |
| 367 | 383 | class Text_Diff_Op_copy extends Text_Diff_Op { |
| 368 | 384 | |
| 369 | | function Text_Diff_Op_copy($orig, $final = false) |
| | 385 | /** |
| | 386 | * PHP5 constructor. |
| | 387 | */ |
| | 388 | function __construct( $orig, $final = false ) |
| 370 | 389 | { |
| 371 | 390 | if (!is_array($final)) { |
| 372 | 391 | $final = $orig; |
| … |
… |
class Text_Diff_Op_copy extends Text_Diff_Op {
|
| 375 | 394 | $this->final = $final; |
| 376 | 395 | } |
| 377 | 396 | |
| | 397 | /** |
| | 398 | * PHP4 constructor. |
| | 399 | */ |
| | 400 | public function Text_Diff_Op_copy( $orig, $final = false ) { |
| | 401 | self::__construct( $orig, $final ); |
| | 402 | } |
| | 403 | |
| 378 | 404 | function &reverse() |
| 379 | 405 | { |
| 380 | 406 | $reverse = new Text_Diff_Op_copy($this->final, $this->orig); |
| … |
… |
class Text_Diff_Op_copy extends Text_Diff_Op {
|
| 391 | 417 | */ |
| 392 | 418 | class Text_Diff_Op_delete extends Text_Diff_Op { |
| 393 | 419 | |
| 394 | | function Text_Diff_Op_delete($lines) |
| | 420 | /** |
| | 421 | * PHP5 constructor. |
| | 422 | */ |
| | 423 | function __construct( $lines ) |
| 395 | 424 | { |
| 396 | 425 | $this->orig = $lines; |
| 397 | 426 | $this->final = false; |
| 398 | 427 | } |
| 399 | 428 | |
| | 429 | /** |
| | 430 | * PHP4 constructor. |
| | 431 | */ |
| | 432 | public function Text_Diff_Op_delete( $lines ) { |
| | 433 | self::__construct( $lines ); |
| | 434 | } |
| | 435 | |
| 400 | 436 | function &reverse() |
| 401 | 437 | { |
| 402 | 438 | $reverse = new Text_Diff_Op_add($this->orig); |
| … |
… |
class Text_Diff_Op_delete extends Text_Diff_Op {
|
| 413 | 449 | */ |
| 414 | 450 | class Text_Diff_Op_add extends Text_Diff_Op { |
| 415 | 451 | |
| 416 | | function Text_Diff_Op_add($lines) |
| | 452 | /** |
| | 453 | * PHP5 constructor. |
| | 454 | */ |
| | 455 | function __construct( $lines ) |
| 417 | 456 | { |
| 418 | 457 | $this->final = $lines; |
| 419 | 458 | $this->orig = false; |
| 420 | 459 | } |
| 421 | 460 | |
| | 461 | /** |
| | 462 | * PHP4 constructor. |
| | 463 | */ |
| | 464 | public function Text_Diff_Op_add( $lines ) { |
| | 465 | self::__construct( $lines ); |
| | 466 | } |
| | 467 | |
| 422 | 468 | function &reverse() |
| 423 | 469 | { |
| 424 | 470 | $reverse = new Text_Diff_Op_delete($this->final); |
| … |
… |
class Text_Diff_Op_add extends Text_Diff_Op {
|
| 435 | 481 | */ |
| 436 | 482 | class Text_Diff_Op_change extends Text_Diff_Op { |
| 437 | 483 | |
| 438 | | function Text_Diff_Op_change($orig, $final) |
| | 484 | /** |
| | 485 | * PHP5 constructor. |
| | 486 | */ |
| | 487 | function __construct( $orig, $final ) |
| 439 | 488 | { |
| 440 | 489 | $this->orig = $orig; |
| 441 | 490 | $this->final = $final; |
| 442 | 491 | } |
| 443 | 492 | |
| | 493 | /** |
| | 494 | * PHP4 constructor. |
| | 495 | */ |
| | 496 | public function Text_Diff_Op_change( $orig, $final ) { |
| | 497 | self::__construct( $orig, $final ); |
| | 498 | } |
| | 499 | |
| 444 | 500 | function &reverse() |
| 445 | 501 | { |
| 446 | 502 | $reverse = new Text_Diff_Op_change($this->final, $this->orig); |
-
diff --git src/wp-includes/Text/Diff/Renderer.php src/wp-includes/Text/Diff/Renderer.php
index 95c6db4..712d985 100644
|
|
|
class Text_Diff_Renderer {
|
| 33 | 33 | /** |
| 34 | 34 | * Constructor. |
| 35 | 35 | */ |
| 36 | | function Text_Diff_Renderer($params = array()) |
| | 36 | function __construct( $params = array() ) |
| 37 | 37 | { |
| 38 | 38 | foreach ($params as $param => $value) { |
| 39 | 39 | $v = '_' . $param; |
| … |
… |
class Text_Diff_Renderer {
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
| | 46 | /** |
| | 47 | * PHP4 constructor. |
| | 48 | */ |
| | 49 | public function Text_Diff_Renderer( $params = array() ) { |
| | 50 | self::__construct( $params ); |
| | 51 | } |
| | 52 | |
| 46 | 53 | /** |
| 47 | 54 | * Get any renderer parameters. |
| 48 | 55 | * |
-
diff --git src/wp-includes/atomlib.php src/wp-includes/atomlib.php
index 9d34276..9284ef0 100644
|
|
|
class AtomParser {
|
| 87 | 87 | var $feed; |
| 88 | 88 | var $current; |
| 89 | 89 | |
| 90 | | function AtomParser() { |
| | 90 | /** |
| | 91 | * PHP5 constructor. |
| | 92 | */ |
| | 93 | function __construct() { |
| 91 | 94 | |
| 92 | 95 | $this->feed = new AtomFeed(); |
| 93 | 96 | $this->current = null; |
| … |
… |
class AtomParser {
|
| 95 | 98 | $this->map_xmlns_func = create_function('$p,$n', '$xd = "xmlns"; if(strlen($n[0])>0) $xd .= ":{$n[0]}"; return "{$xd}=\"{$n[1]}\"";'); |
| 96 | 99 | } |
| 97 | 100 | |
| | 101 | /** |
| | 102 | * PHP4 constructor. |
| | 103 | */ |
| | 104 | public function AtomParser() { |
| | 105 | self::__construct(); |
| | 106 | } |
| | 107 | |
| 98 | 108 | function _p($msg) { |
| 99 | 109 | if($this->debug) { |
| 100 | 110 | print str_repeat(" ", $this->depth * $this->indent) . $msg ."\n"; |
-
diff --git src/wp-includes/class-IXR.php src/wp-includes/class-IXR.php
index 5930f56..43f9006 100644
|
|
|
class IXR_Value {
|
| 49 | 49 | var $data; |
| 50 | 50 | var $type; |
| 51 | 51 | |
| 52 | | function IXR_Value($data, $type = false) |
| | 52 | /** |
| | 53 | * PHP5 constructor. |
| | 54 | */ |
| | 55 | function __construct( $data, $type = false ) |
| 53 | 56 | { |
| 54 | 57 | $this->data = $data; |
| 55 | 58 | if (!$type) { |
| … |
… |
class IXR_Value {
|
| 69 | 72 | } |
| 70 | 73 | } |
| 71 | 74 | |
| | 75 | /** |
| | 76 | * PHP4 constructor. |
| | 77 | */ |
| | 78 | public function IXR_Value( $data, $type = false ) { |
| | 79 | self::__construct( $data, $type ); |
| | 80 | } |
| | 81 | |
| 72 | 82 | function calculateType() |
| 73 | 83 | { |
| 74 | 84 | if ($this->data === true || $this->data === false) { |
| … |
… |
class IXR_Message
|
| 194 | 204 | // The XML parser |
| 195 | 205 | var $_parser; |
| 196 | 206 | |
| 197 | | function IXR_Message($message) |
| | 207 | /** |
| | 208 | * PHP5 constructor. |
| | 209 | */ |
| | 210 | function __construct( $message ) |
| 198 | 211 | { |
| 199 | 212 | $this->message =& $message; |
| 200 | 213 | } |
| 201 | 214 | |
| | 215 | /** |
| | 216 | * PHP4 constructor. |
| | 217 | */ |
| | 218 | public function IXR_Message( $message ) { |
| | 219 | self::__construct( $message ); |
| | 220 | } |
| | 221 | |
| 202 | 222 | function parse() |
| 203 | 223 | { |
| 204 | 224 | // first remove the XML declaration |
| … |
… |
class IXR_Server
|
| 386 | 406 | var $message; |
| 387 | 407 | var $capabilities; |
| 388 | 408 | |
| 389 | | function IXR_Server($callbacks = false, $data = false, $wait = false) |
| | 409 | /** |
| | 410 | * PHP5 constructor. |
| | 411 | */ |
| | 412 | function __construct( $callbacks = false, $data = false, $wait = false ) |
| 390 | 413 | { |
| 391 | 414 | $this->setCapabilities(); |
| 392 | 415 | if ($callbacks) { |
| … |
… |
class IXR_Server
|
| 398 | 421 | } |
| 399 | 422 | } |
| 400 | 423 | |
| | 424 | /** |
| | 425 | * PHP4 constructor. |
| | 426 | */ |
| | 427 | public function IXR_Server( $callbacks = false, $data = false, $wait = false ) { |
| | 428 | self::__construct( $callbacks, $data, $wait ); |
| | 429 | } |
| | 430 | |
| 401 | 431 | function serve($data = false) |
| 402 | 432 | { |
| 403 | 433 | if (!$data) { |
| … |
… |
class IXR_Request
|
| 600 | 630 | var $args; |
| 601 | 631 | var $xml; |
| 602 | 632 | |
| 603 | | function IXR_Request($method, $args) |
| | 633 | /** |
| | 634 | * PHP5 constructor. |
| | 635 | */ |
| | 636 | function __construct($method, $args) |
| 604 | 637 | { |
| 605 | 638 | $this->method = $method; |
| 606 | 639 | $this->args = $args; |
| … |
… |
EOD;
|
| 620 | 653 | $this->xml .= '</params></methodCall>'; |
| 621 | 654 | } |
| 622 | 655 | |
| | 656 | /** |
| | 657 | * PHP4 constructor. |
| | 658 | */ |
| | 659 | public function IXR_Request( $method, $args ) { |
| | 660 | self::__construct( $method, $args ); |
| | 661 | } |
| | 662 | |
| 623 | 663 | function getLength() |
| 624 | 664 | { |
| 625 | 665 | return strlen($this->xml); |
| … |
… |
class IXR_Client
|
| 653 | 693 | // Storage place for an error message |
| 654 | 694 | var $error = false; |
| 655 | 695 | |
| 656 | | function IXR_Client($server, $path = false, $port = 80, $timeout = 15) |
| | 696 | /** |
| | 697 | * PHP5 constructor. |
| | 698 | */ |
| | 699 | function __construct( $server, $path = false, $port = 80, $timeout = 15 ) |
| 657 | 700 | { |
| 658 | 701 | if (!$path) { |
| 659 | 702 | // Assume we have been given a URL instead |
| … |
… |
class IXR_Client
|
| 679 | 722 | $this->timeout = $timeout; |
| 680 | 723 | } |
| 681 | 724 | |
| | 725 | /** |
| | 726 | * PHP4 constructor. |
| | 727 | */ |
| | 728 | public function IXR_Client( $server, $path = false, $port = 80, $timeout = 15 ) { |
| | 729 | self::__construct( $server, $path, $port, $timeout ); |
| | 730 | } |
| | 731 | |
| 682 | 732 | function query() |
| 683 | 733 | { |
| 684 | 734 | $args = func_get_args(); |
| … |
… |
class IXR_Error
|
| 798 | 848 | var $code; |
| 799 | 849 | var $message; |
| 800 | 850 | |
| 801 | | function IXR_Error($code, $message) |
| | 851 | /** |
| | 852 | * PHP5 constructor. |
| | 853 | */ |
| | 854 | function __construct( $code, $message ) |
| 802 | 855 | { |
| 803 | 856 | $this->code = $code; |
| 804 | 857 | $this->message = htmlspecialchars($message); |
| 805 | 858 | } |
| 806 | 859 | |
| | 860 | /** |
| | 861 | * PHP4 constructor. |
| | 862 | */ |
| | 863 | public function IXR_Error( $code, $message ) { |
| | 864 | self::__construct( $code, $message ); |
| | 865 | } |
| | 866 | |
| 807 | 867 | function getXml() |
| 808 | 868 | { |
| 809 | 869 | $xml = <<<EOD |
| … |
… |
class IXR_Date {
|
| 844 | 904 | var $second; |
| 845 | 905 | var $timezone; |
| 846 | 906 | |
| 847 | | function IXR_Date($time) |
| | 907 | /** |
| | 908 | * PHP5 constructor. |
| | 909 | */ |
| | 910 | function __construct( $time ) |
| 848 | 911 | { |
| 849 | 912 | // $time can be a PHP timestamp or an ISO one |
| 850 | 913 | if (is_numeric($time)) { |
| … |
… |
class IXR_Date {
|
| 854 | 917 | } |
| 855 | 918 | } |
| 856 | 919 | |
| | 920 | /** |
| | 921 | * PHP4 constructor. |
| | 922 | */ |
| | 923 | public function IXR_Date( $time ) { |
| | 924 | self::__construct( $time ); |
| | 925 | } |
| | 926 | |
| 857 | 927 | function parseTimestamp($timestamp) |
| 858 | 928 | { |
| 859 | 929 | $this->year = date('Y', $timestamp); |
| … |
… |
class IXR_Base64
|
| 902 | 972 | { |
| 903 | 973 | var $data; |
| 904 | 974 | |
| 905 | | function IXR_Base64($data) |
| | 975 | /** |
| | 976 | * PHP5 constructor. |
| | 977 | */ |
| | 978 | function __construct( $data ) |
| 906 | 979 | { |
| 907 | 980 | $this->data = $data; |
| 908 | 981 | } |
| 909 | 982 | |
| | 983 | /** |
| | 984 | * PHP4 constructor. |
| | 985 | */ |
| | 986 | public function IXR_Base64( $data ) { |
| | 987 | self::__construct( $data ); |
| | 988 | } |
| | 989 | |
| 910 | 990 | function getXml() |
| 911 | 991 | { |
| 912 | 992 | return '<base64>'.base64_encode($this->data).'</base64>'; |
| … |
… |
class IXR_IntrospectionServer extends IXR_Server
|
| 924 | 1004 | var $signatures; |
| 925 | 1005 | var $help; |
| 926 | 1006 | |
| 927 | | function IXR_IntrospectionServer() |
| | 1007 | /** |
| | 1008 | * PHP5 constructor. |
| | 1009 | */ |
| | 1010 | function __construct() |
| 928 | 1011 | { |
| 929 | 1012 | $this->setCallbacks(); |
| 930 | 1013 | $this->setCapabilities(); |
| … |
… |
class IXR_IntrospectionServer extends IXR_Server
|
| 958 | 1041 | ); |
| 959 | 1042 | } |
| 960 | 1043 | |
| | 1044 | /** |
| | 1045 | * PHP4 constructor. |
| | 1046 | */ |
| | 1047 | public function IXR_IntrospectionServer() { |
| | 1048 | self::__construct(); |
| | 1049 | } |
| | 1050 | |
| 961 | 1051 | function addCallback($method, $callback, $args, $help) |
| 962 | 1052 | { |
| 963 | 1053 | $this->callbacks[$method] = $callback; |
| … |
… |
class IXR_ClientMulticall extends IXR_Client
|
| 1086 | 1176 | { |
| 1087 | 1177 | var $calls = array(); |
| 1088 | 1178 | |
| 1089 | | function IXR_ClientMulticall($server, $path = false, $port = 80) |
| | 1179 | /** |
| | 1180 | * PHP5 constructor. |
| | 1181 | */ |
| | 1182 | function __construct( $server, $path = false, $port = 80 ) |
| 1090 | 1183 | { |
| 1091 | 1184 | parent::IXR_Client($server, $path, $port); |
| 1092 | 1185 | $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)'; |
| 1093 | 1186 | } |
| 1094 | 1187 | |
| | 1188 | /** |
| | 1189 | * PHP4 constructor. |
| | 1190 | */ |
| | 1191 | public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) { |
| | 1192 | self::__construct( $server, $path, $port ); |
| | 1193 | } |
| | 1194 | |
| 1095 | 1195 | function addCall() |
| 1096 | 1196 | { |
| 1097 | 1197 | $args = func_get_args(); |
-
diff --git src/wp-includes/class-json.php src/wp-includes/class-json.php
index 417592f..1861b52 100644
|
|
|
class Services_JSON
|
| 140 | 140 | * strings or numbers, if you return an object, make sure it does |
| 141 | 141 | * not have a toJSON method, otherwise an error will occur. |
| 142 | 142 | */ |
| 143 | | function Services_JSON($use = 0) |
| | 143 | function __construct( $use = 0 ) |
| 144 | 144 | { |
| 145 | 145 | $this->use = $use; |
| 146 | 146 | $this->_mb_strlen = function_exists('mb_strlen'); |
| 147 | 147 | $this->_mb_convert_encoding = function_exists('mb_convert_encoding'); |
| 148 | 148 | $this->_mb_substr = function_exists('mb_substr'); |
| 149 | 149 | } |
| | 150 | |
| | 151 | /** |
| | 152 | * PHP4 constructor. |
| | 153 | */ |
| | 154 | public function Services_JSON( $use = 0 ) { |
| | 155 | self::__construct( $use ); |
| | 156 | } |
| 150 | 157 | // private - cache the mbstring lookup results.. |
| 151 | 158 | var $_mb_strlen = false; |
| 152 | 159 | var $_mb_substr = false; |
| … |
… |
if (class_exists('PEAR_Error')) {
|
| 910 | 917 | |
| 911 | 918 | class Services_JSON_Error extends PEAR_Error |
| 912 | 919 | { |
| 913 | | function Services_JSON_Error($message = 'unknown error', $code = null, |
| | 920 | function __construct($message = 'unknown error', $code = null, |
| 914 | 921 | $mode = null, $options = null, $userinfo = null) |
| 915 | 922 | { |
| 916 | 923 | parent::PEAR_Error($message, $code, $mode, $options, $userinfo); |
| 917 | 924 | } |
| | 925 | |
| | 926 | public function Services_JSON_Error($message = 'unknown error', $code = null, |
| | 927 | $mode = null, $options = null, $userinfo = null) { |
| | 928 | self::__construct($message = 'unknown error', $code = null, |
| | 929 | $mode = null, $options = null, $userinfo = null); |
| | 930 | } |
| 918 | 931 | } |
| 919 | 932 | |
| 920 | 933 | } else { |
| … |
… |
if (class_exists('PEAR_Error')) {
|
| 924 | 937 | */ |
| 925 | 938 | class Services_JSON_Error |
| 926 | 939 | { |
| 927 | | function Services_JSON_Error($message = 'unknown error', $code = null, |
| 928 | | $mode = null, $options = null, $userinfo = null) |
| | 940 | /** |
| | 941 | * PHP5 constructor. |
| | 942 | */ |
| | 943 | function __construct( $message = 'unknown error', $code = null, |
| | 944 | $mode = null, $options = null, $userinfo = null ) |
| 929 | 945 | { |
| 930 | 946 | |
| 931 | 947 | } |
| | 948 | |
| | 949 | /** |
| | 950 | * PHP4 constructor. |
| | 951 | */ |
| | 952 | public function Services_JSON_Error( $message = 'unknown error', $code = null, |
| | 953 | $mode = null, $options = null, $userinfo = null ) { |
| | 954 | self::__construct( $message, $code, $mode, $options, $userinfo ); |
| | 955 | } |
| 932 | 956 | } |
| 933 | 957 | |
| 934 | 958 | } |
-
diff --git src/wp-includes/class-phpass.php src/wp-includes/class-phpass.php
index f2dadae..ccd1796 100644
|
|
|
class PasswordHash {
|
| 39 | 39 | var $portable_hashes; |
| 40 | 40 | var $random_state; |
| 41 | 41 | |
| 42 | | function PasswordHash($iteration_count_log2, $portable_hashes) |
| | 42 | /** |
| | 43 | * PHP5 constructor. |
| | 44 | */ |
| | 45 | function __construct( $iteration_count_log2, $portable_hashes ) |
| 43 | 46 | { |
| 44 | 47 | $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; |
| 45 | 48 | |
| … |
… |
class PasswordHash {
|
| 52 | 55 | $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compatibility reasons |
| 53 | 56 | } |
| 54 | 57 | |
| | 58 | /** |
| | 59 | * PHP4 constructor. |
| | 60 | */ |
| | 61 | public function PasswordHash( $iteration_count_log2, $portable_hashes ) { |
| | 62 | self::__construct( $iteration_count_log2, $portable_hashes ); |
| | 63 | } |
| | 64 | |
| 55 | 65 | function get_random_bytes($count) |
| 56 | 66 | { |
| 57 | 67 | $output = ''; |
-
diff --git src/wp-includes/class-pop3.php src/wp-includes/class-pop3.php
index d0455d7..7d641bf 100644
|
|
|
class POP3 {
|
| 44 | 44 | // This must be set to true |
| 45 | 45 | // manually |
| 46 | 46 | |
| 47 | | function POP3 ( $server = '', $timeout = '' ) { |
| | 47 | /** |
| | 48 | * PHP5 constructor. |
| | 49 | */ |
| | 50 | function __construct ( $server = '', $timeout = '' ) { |
| 48 | 51 | settype($this->BUFFER,"integer"); |
| 49 | 52 | if( !empty($server) ) { |
| 50 | 53 | // Do not allow programs to alter MAILSERVER |
| … |
… |
class POP3 {
|
| 62 | 65 | return true; |
| 63 | 66 | } |
| 64 | 67 | |
| | 68 | /** |
| | 69 | * PHP4 constructor. |
| | 70 | */ |
| | 71 | public function POP3( $server = '', $timeout = '' ) { |
| | 72 | self::__construct( $server, $timeout ); |
| | 73 | } |
| | 74 | |
| 65 | 75 | function update_timer () { |
| 66 | 76 | if (!ini_get('safe_mode')) |
| 67 | 77 | set_time_limit($this->TIMEOUT); |
-
diff --git src/wp-includes/pomo/entry.php src/wp-includes/pomo/entry.php
index 097e92c..b93eca6 100644
|
|
|
class Translation_Entry {
|
| 40 | 40 | * - references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form |
| 41 | 41 | * - flags (array) -- flags like php-format |
| 42 | 42 | */ |
| 43 | | function Translation_Entry($args=array()) { |
| | 43 | function __construct( $args = array() ) { |
| 44 | 44 | // if no singular -- empty object |
| 45 | 45 | if (!isset($args['singular'])) { |
| 46 | 46 | return; |
| … |
… |
class Translation_Entry {
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
| | 59 | * PHP4 constructor. |
| | 60 | */ |
| | 61 | public function Translation_Entry( $args = array() ) { |
| | 62 | self::__construct( $args ); |
| | 63 | } |
| | 64 | |
| | 65 | /** |
| 59 | 66 | * Generates a unique key for this entry |
| 60 | 67 | * |
| 61 | 68 | * @return string|bool the key or false if the entry is empty |
-
diff --git src/wp-includes/pomo/streams.php src/wp-includes/pomo/streams.php
index 8e50ab4..45e1d36 100644
|
|
|
class POMO_Reader {
|
| 14 | 14 | var $endian = 'little'; |
| 15 | 15 | var $_post = ''; |
| 16 | 16 | |
| 17 | | function POMO_Reader() { |
| | 17 | /** |
| | 18 | * PHP5 constructor. |
| | 19 | */ |
| | 20 | function __construct() { |
| 18 | 21 | $this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr'); |
| 19 | 22 | $this->_pos = 0; |
| 20 | 23 | } |
| 21 | 24 | |
| 22 | 25 | /** |
| | 26 | * PHP4 constructor. |
| | 27 | */ |
| | 28 | public function POMO_Reader() { |
| | 29 | self::__construct(); |
| | 30 | } |
| | 31 | |
| | 32 | /** |
| 23 | 33 | * Sets the endianness of the file. |
| 24 | 34 | * |
| 25 | 35 | * @param $endian string 'big' or 'little' |
| … |
… |
class POMO_FileReader extends POMO_Reader {
|
| 122 | 132 | /** |
| 123 | 133 | * @param string $filename |
| 124 | 134 | */ |
| 125 | | function POMO_FileReader($filename) { |
| | 135 | function __construct( $filename ) { |
| 126 | 136 | parent::POMO_Reader(); |
| 127 | 137 | $this->_f = fopen($filename, 'rb'); |
| 128 | 138 | } |
| 129 | 139 | |
| 130 | 140 | /** |
| | 141 | * PHP4 constructor. |
| | 142 | */ |
| | 143 | public function POMO_FileReader( $filename ) { |
| | 144 | self::__construct( $filename ); |
| | 145 | } |
| | 146 | |
| | 147 | /** |
| 131 | 148 | * @param int $bytes |
| 132 | 149 | */ |
| 133 | 150 | function read($bytes) { |
| … |
… |
class POMO_StringReader extends POMO_Reader {
|
| 176 | 193 | |
| 177 | 194 | var $_str = ''; |
| 178 | 195 | |
| 179 | | function POMO_StringReader($str = '') { |
| | 196 | /** |
| | 197 | * PHP5 constructor. |
| | 198 | */ |
| | 199 | function __construct( $str = '' ) { |
| 180 | 200 | parent::POMO_Reader(); |
| 181 | 201 | $this->_str = $str; |
| 182 | 202 | $this->_pos = 0; |
| 183 | 203 | } |
| 184 | 204 | |
| 185 | 205 | /** |
| | 206 | * PHP4 constructor. |
| | 207 | */ |
| | 208 | public function POMO_StringReader( $str = '' ) { |
| | 209 | self::__construct( $str ); |
| | 210 | } |
| | 211 | |
| | 212 | /** |
| 186 | 213 | * @param string $bytes |
| 187 | 214 | * @return string |
| 188 | 215 | */ |
| … |
… |
if ( !class_exists( 'POMO_CachedFileReader' ) ):
|
| 219 | 246 | * Reads the contents of the file in the beginning. |
| 220 | 247 | */ |
| 221 | 248 | class POMO_CachedFileReader extends POMO_StringReader { |
| 222 | | function POMO_CachedFileReader($filename) { |
| | 249 | /** |
| | 250 | * PHP5 constructor. |
| | 251 | */ |
| | 252 | function __construct( $filename ) { |
| 223 | 253 | parent::POMO_StringReader(); |
| 224 | 254 | $this->_str = file_get_contents($filename); |
| 225 | 255 | if (false === $this->_str) |
| 226 | 256 | return false; |
| 227 | 257 | $this->_pos = 0; |
| 228 | 258 | } |
| | 259 | |
| | 260 | /** |
| | 261 | * PHP4 constructor. |
| | 262 | */ |
| | 263 | public function POMO_CachedFileReader( $filename ) { |
| | 264 | self::__construct( $filename ); |
| | 265 | } |
| 229 | 266 | } |
| 230 | 267 | endif; |
| 231 | 268 | |
| … |
… |
if ( !class_exists( 'POMO_CachedIntFileReader' ) ):
|
| 234 | 271 | * Reads the contents of the file in the beginning. |
| 235 | 272 | */ |
| 236 | 273 | class POMO_CachedIntFileReader extends POMO_CachedFileReader { |
| 237 | | function POMO_CachedIntFileReader($filename) { |
| | 274 | /** |
| | 275 | * PHP5 constructor. |
| | 276 | */ |
| | 277 | public function __construct( $filename ) { |
| 238 | 278 | parent::POMO_CachedFileReader($filename); |
| 239 | 279 | } |
| | 280 | |
| | 281 | /** |
| | 282 | * PHP4 constructor. |
| | 283 | */ |
| | 284 | function POMO_CachedIntFileReader( $filename ) { |
| | 285 | self::__construct( $filename ); |
| | 286 | } |
| 240 | 287 | } |
| 241 | | endif; |
| 242 | | No newline at end of file |
| | 288 | endif; |
| | 289 | |
-
diff --git src/wp-includes/rss.php src/wp-includes/rss.php
index a7c43f4..67bac6b 100644
|
|
|
class MagpieRSS {
|
| 55 | 55 | |
| 56 | 56 | var $_CONTENT_CONSTRUCTS = array('content', 'summary', 'info', 'title', 'tagline', 'copyright'); |
| 57 | 57 | |
| 58 | | function MagpieRSS ($source) { |
| | 58 | /** |
| | 59 | * PHP5 constructor. |
| | 60 | */ |
| | 61 | function __construct( $source ) { |
| 59 | 62 | |
| 60 | 63 | # if PHP xml isn't compiled in, die |
| 61 | 64 | # |
| … |
… |
class MagpieRSS {
|
| 97 | 100 | $this->normalize(); |
| 98 | 101 | } |
| 99 | 102 | |
| | 103 | /** |
| | 104 | * PHP4 constructor. |
| | 105 | */ |
| | 106 | public function MagpieRSS( $source ) { |
| | 107 | self::__construct( $source ); |
| | 108 | } |
| | 109 | |
| 100 | 110 | function feed_start_element($p, $element, &$attrs) { |
| 101 | 111 | $el = $element = strtolower($element); |
| 102 | 112 | $attrs = array_change_key_case($attrs, CASE_LOWER); |
| … |
… |
class RSSCache {
|
| 709 | 719 | var $MAX_AGE = 43200; // when are files stale, default twelve hours |
| 710 | 720 | var $ERROR = ''; // accumulate error messages |
| 711 | 721 | |
| 712 | | function RSSCache ($base='', $age='') { |
| | 722 | /** |
| | 723 | * PHP5 constructor. |
| | 724 | */ |
| | 725 | function __construct( $base = '', $age = '' ) { |
| 713 | 726 | $this->BASE_CACHE = WP_CONTENT_DIR . '/cache'; |
| 714 | 727 | if ( $base ) { |
| 715 | 728 | $this->BASE_CACHE = $base; |
| … |
… |
class RSSCache {
|
| 720 | 733 | |
| 721 | 734 | } |
| 722 | 735 | |
| | 736 | /** |
| | 737 | * PHP4 constructor. |
| | 738 | */ |
| | 739 | public function RSSCache( $base = '', $age = '' ) { |
| | 740 | self::__construct( $base, $age ); |
| | 741 | } |
| | 742 | |
| 723 | 743 | /*=======================================================================*\ |
| 724 | 744 | Function: set |
| 725 | 745 | Purpose: add an item to the cache, keyed on url |
-
diff --git src/wp-includes/widgets.php src/wp-includes/widgets.php
index a488a90..bdda525 100644
|
|
|
class WP_Widget {
|
| 544 | 544 | class WP_Widget_Factory { |
| 545 | 545 | public $widgets = array(); |
| 546 | 546 | |
| 547 | | public function WP_Widget_Factory() { |
| | 547 | /** |
| | 548 | * PHP5 constructor. |
| | 549 | */ |
| | 550 | public function __construct() { |
| 548 | 551 | add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 ); |
| 549 | 552 | } |
| 550 | 553 | |
| 551 | 554 | /** |
| | 555 | * PHP4 constructor. |
| | 556 | */ |
| | 557 | public function WP_Widget_Factory() { |
| | 558 | self::__construct(); |
| | 559 | } |
| | 560 | |
| | 561 | /** |
| 552 | 562 | * Register a widget subclass. |
| 553 | 563 | * |
| 554 | 564 | * @since 2.8.0 |
-
diff --git tests/phpunit/includes/utils.php tests/phpunit/includes/utils.php
index d6ea45c..cd9d69d 100644
|
|
|
class MockAction {
|
| 25 | 25 | var $events; |
| 26 | 26 | var $debug; |
| 27 | 27 | |
| 28 | | function MockAction($debug=0) { |
| | 28 | /** |
| | 29 | * PHP5 constructor. |
| | 30 | */ |
| | 31 | function __construct( $debug = 0 ) { |
| 29 | 32 | $this->reset(); |
| 30 | 33 | $this->debug = $debug; |
| 31 | 34 | } |
| 32 | 35 | |
| | 36 | /** |
| | 37 | * PHP4 constructor. |
| | 38 | */ |
| | 39 | public function MockAction( $debug = 0 ) { |
| | 40 | self::__construct( $debug ); |
| | 41 | } |
| | 42 | |
| 33 | 43 | function reset() { |
| 34 | 44 | $this->events = array(); |
| 35 | 45 | } |
| … |
… |
class testXMLParser {
|
| 129 | 139 | var $xml; |
| 130 | 140 | var $data = array(); |
| 131 | 141 | |
| 132 | | function testXMLParser($in) { |
| | 142 | /** |
| | 143 | * PHP5 constructor. |
| | 144 | */ |
| | 145 | function __construct( $in ) { |
| 133 | 146 | $this->xml = xml_parser_create(); |
| 134 | 147 | xml_set_object($this->xml, $this); |
| 135 | 148 | xml_parser_set_option($this->xml,XML_OPTION_CASE_FOLDING, 0); |
| … |
… |
class testXMLParser {
|
| 138 | 151 | $this->parse($in); |
| 139 | 152 | } |
| 140 | 153 | |
| | 154 | /** |
| | 155 | * PHP4 constructor. |
| | 156 | */ |
| | 157 | public function testXMLParser( $in ) { |
| | 158 | self::__construct( $in ); |
| | 159 | } |
| | 160 | |
| 141 | 161 | function parse($in) { |
| 142 | 162 | $parse = xml_parse($this->xml, $in, sizeof($in)); |
| 143 | 163 | if (!$parse) { |
-
diff --git tests/phpunit/includes/wp-profiler.php tests/phpunit/includes/wp-profiler.php
index 7e28937..18ef53e 100644
|
|
|
class WPProfiler {
|
| 21 | 21 | var $stack; |
| 22 | 22 | var $profile; |
| 23 | 23 | |
| 24 | | // constructor |
| 25 | | function WPProfiler() { |
| | 24 | /** |
| | 25 | * PHP5 constructor. |
| | 26 | */ |
| | 27 | function __construct() { |
| 26 | 28 | $this->stack = array(); |
| 27 | 29 | $this->profile = array(); |
| 28 | 30 | } |
| 29 | 31 | |
| | 32 | /** |
| | 33 | * PHP4 constructor. |
| | 34 | */ |
| | 35 | public function WPProfiler() { |
| | 36 | self::__construct(); |
| | 37 | } |
| | 38 | |
| 30 | 39 | function start($name) { |
| 31 | 40 | $time = $this->microtime(); |
| 32 | 41 | |
-
diff --git tools/i18n/add-textdomain.php tools/i18n/add-textdomain.php
index f030415..9eb1df2 100644
|
|
|
class AddTextdomain {
|
| 14 | 14 | var $modified_contents = ''; |
| 15 | 15 | var $funcs; |
| 16 | 16 | |
| 17 | | function AddTextdomain() { |
| | 17 | /** |
| | 18 | * PHP5 constructor. |
| | 19 | */ |
| | 20 | function __construct() { |
| 18 | 21 | $makepot = new MakePOT; |
| 19 | 22 | $this->funcs = array_keys( $makepot->rules ); |
| 20 | 23 | } |
| 21 | 24 | |
| | 25 | /** |
| | 26 | * PHP4 constructor. |
| | 27 | */ |
| | 28 | public function AddTextdomain() { |
| | 29 | self::__construct(); |
| | 30 | } |
| | 31 | |
| 22 | 32 | function usage() { |
| 23 | 33 | $usage = "Usage: php add-textdomain.php [-i] <domain> <file>\n\nAdds the string <domain> as a last argument to all i18n function calls in <file>\nand prints the modified php file on standard output.\n\nOptions:\n -i Modifies the PHP file in place, instead of printing it to standard output.\n"; |
| 24 | 34 | fwrite(STDERR, $usage); |