Changeset 32990
- Timestamp:
- 06/28/2015 03:26:41 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-ftp-pure.php
r26868 r32990 28 28 class ftp extends ftp_base { 29 29 30 function __construct($verb=FALSE, $le=FALSE) { 31 parent::__construct(false, $verb, $le); 32 } 33 30 34 function ftp($verb=FALSE, $le=FALSE) { 31 35 $this->__construct($verb, $le); 32 }33 34 function __construct($verb=FALSE, $le=FALSE) {35 parent::__construct(false, $verb, $le);36 36 } 37 37 -
trunk/src/wp-admin/includes/class-ftp-sockets.php
r26868 r32990 28 28 class ftp extends ftp_base { 29 29 30 function __construct($verb=FALSE, $le=FALSE) { 31 parent::__construct(true, $verb, $le); 32 } 33 30 34 function ftp($verb=FALSE, $le=FALSE) { 31 35 $this->__construct($verb, $le); 32 }33 34 function __construct($verb=FALSE, $le=FALSE) {35 parent::__construct(true, $verb, $le);36 36 } 37 37 -
trunk/src/wp-admin/includes/class-ftp.php
r30311 r32990 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; … … 156 152 if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') $this->OS_local=FTP_OS_Windows; 157 153 elseif(strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') $this->OS_local=FTP_OS_Mac; 154 } 155 156 function ftp_base($port_mode=FALSE) { 157 $this->__construct($port_mode); 158 158 } 159 159 -
trunk/src/wp-admin/includes/class-pclzip.php
r12042 r32990 213 213 // created. Use create() for that. 214 214 // -------------------------------------------------------------------------------- 215 function PclZip($p_zipname)215 function __construct($p_zipname) 216 216 { 217 217 … … 229 229 // ----- Return 230 230 return; 231 } 232 233 public function PclZip($p_zipname) { 234 self::__construct($p_zipname); 231 235 } 232 236 // -------------------------------------------------------------------------------- -
trunk/src/wp-admin/includes/deprecated.php
r32800 r32990 471 471 472 472 /** 473 * PHP 4Constructor - Sets up the object properties.473 * PHP5 Constructor - Sets up the object properties. 474 474 * 475 475 * @since 2.1.0 … … 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 … … 491 491 $this->query(); 492 492 $this->do_paging(); 493 } 494 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 ); 493 507 } 494 508 -
trunk/src/wp-includes/Text/Diff.php
r24363 r32990 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. … … 55 55 $this->_edits = call_user_func_array(array($diff_engine, 'diff'), $params); 56 56 } 57 58 /** 59 * PHP4 constructor. 60 */ 61 public function Text_Diff( $engine, $params ) { 62 self::__construct( $engine, $params ); 63 } 57 64 58 65 /** … … 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 { … … 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 … … 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)) { … … 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 { … … 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; … … 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 { … … 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; … … 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 { … … 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; … … 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 { -
trunk/src/wp-includes/Text/Diff/Renderer.php
r24362 r32990 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) { … … 43 43 } 44 44 } 45 46 /** 47 * PHP4 constructor. 48 */ 49 public function Text_Diff_Renderer( $params = array() ) { 50 self::__construct( $params ); 51 } 45 52 46 53 /** -
trunk/src/wp-includes/atomlib.php
r32471 r32990 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(); … … 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 } 100 101 /** 102 * PHP4 constructor. 103 */ 104 public function AtomParser() { 105 self::__construct(); 106 } 97 107 98 108 function _p($msg) { -
trunk/src/wp-includes/class-IXR.php
r32964 r32990 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; … … 69 72 } 70 73 } 74 75 /** 76 * PHP4 constructor. 77 */ 78 public function IXR_Value( $data, $type = false ) { 79 self::__construct( $data, $type ); 80 } 71 81 72 82 function calculateType() … … 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 } 214 215 /** 216 * PHP4 constructor. 217 */ 218 public function IXR_Message( $message ) { 219 self::__construct( $message ); 220 } 201 221 202 222 function parse() … … 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(); … … 398 421 } 399 422 } 423 424 /** 425 * PHP4 constructor. 426 */ 427 public function IXR_Server( $callbacks = false, $data = false, $wait = false ) { 428 self::__construct( $callbacks, $data, $wait ); 429 } 400 430 401 431 function serve($data = false) … … 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; … … 620 653 $this->xml .= '</params></methodCall>'; 621 654 } 655 656 /** 657 * PHP4 constructor. 658 */ 659 public function IXR_Request( $method, $args ) { 660 self::__construct( $method, $args ); 661 } 622 662 623 663 function getLength() … … 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) { … … 679 722 $this->timeout = $timeout; 680 723 } 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 } 681 731 682 732 function query() … … 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 } 859 860 /** 861 * PHP4 constructor. 862 */ 863 public function IXR_Error( $code, $message ) { 864 self::__construct( $code, $message ); 865 } 806 866 807 867 function getXml() … … 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 … … 854 917 } 855 918 } 919 920 /** 921 * PHP4 constructor. 922 */ 923 public function IXR_Date( $time ) { 924 self::__construct( $time ); 925 } 856 926 857 927 function parseTimestamp($timestamp) … … 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 } 982 983 /** 984 * PHP4 constructor. 985 */ 986 public function IXR_Base64( $data ) { 987 self::__construct( $data ); 988 } 909 989 910 990 function getXml() … … 925 1005 var $help; 926 1006 927 function IXR_IntrospectionServer() 1007 /** 1008 * PHP5 constructor. 1009 */ 1010 function __construct() 928 1011 { 929 1012 $this->setCallbacks(); … … 958 1041 ); 959 1042 } 1043 1044 /** 1045 * PHP4 constructor. 1046 */ 1047 public function IXR_IntrospectionServer() { 1048 self::__construct(); 1049 } 960 1050 961 1051 function addCallback($method, $callback, $args, $help) … … 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 } 1187 1188 /** 1189 * PHP4 constructor. 1190 */ 1191 public function IXR_ClientMulticall( $server, $path = false, $port = 80 ) { 1192 self::__construct( $server, $path, $port ); 1193 } 1094 1194 1095 1195 function addCall() -
trunk/src/wp-includes/class-json.php
r24587 r32990 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; … … 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; … … 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 … … 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 -
trunk/src/wp-includes/class-phpass.php
r30466 r32990 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'; … … 51 54 52 55 $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compatibility reasons 56 } 57 58 /** 59 * PHP4 constructor. 60 */ 61 public function PasswordHash( $iteration_count_log2, $portable_hashes ) { 62 self::__construct( $iteration_count_log2, $portable_hashes ); 53 63 } 54 64 -
trunk/src/wp-includes/class-pop3.php
r17677 r32990 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) ) { … … 62 65 return true; 63 66 } 67 68 /** 69 * PHP4 constructor. 70 */ 71 public function POP3( $server = '', $timeout = '' ) { 72 self::__construct( $server, $timeout ); 73 } 64 74 65 75 function update_timer () { -
trunk/src/wp-includes/pomo/entry.php
r32672 r32990 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'])) { … … 54 54 if (!is_array($this->references)) $this->references = array(); 55 55 if (!is_array($this->flags)) $this->flags = array(); 56 } 57 58 /** 59 * PHP4 constructor. 60 */ 61 public function Translation_Entry( $args = array() ) { 62 self::__construct( $args ); 56 63 } 57 64 -
trunk/src/wp-includes/pomo/streams.php
r32672 r32990 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; 23 } 24 25 /** 26 * PHP4 constructor. 27 */ 28 public function POMO_Reader() { 29 self::__construct(); 20 30 } 21 31 … … 131 141 * @param string $filename 132 142 */ 133 function POMO_FileReader($filename) {143 function __construct( $filename ) { 134 144 parent::POMO_Reader(); 135 145 $this->_f = fopen($filename, 'rb'); 146 } 147 148 /** 149 * PHP4 constructor. 150 */ 151 public function POMO_FileReader( $filename ) { 152 self::__construct( $filename ); 136 153 } 137 154 … … 197 214 var $_str = ''; 198 215 199 function POMO_StringReader($str = '') { 216 /** 217 * PHP5 constructor. 218 */ 219 function __construct( $str = '' ) { 200 220 parent::POMO_Reader(); 201 221 $this->_str = $str; 202 222 $this->_pos = 0; 223 } 224 225 /** 226 * PHP4 constructor. 227 */ 228 public function POMO_StringReader( $str = '' ) { 229 self::__construct( $str ); 203 230 } 204 231 … … 246 273 */ 247 274 class POMO_CachedFileReader extends POMO_StringReader { 248 function POMO_CachedFileReader($filename) { 275 /** 276 * PHP5 constructor. 277 */ 278 function __construct( $filename ) { 249 279 parent::POMO_StringReader(); 250 280 $this->_str = file_get_contents($filename); … … 253 283 $this->_pos = 0; 254 284 } 285 286 /** 287 * PHP4 constructor. 288 */ 289 public function POMO_CachedFileReader( $filename ) { 290 self::__construct( $filename ); 291 } 255 292 } 256 293 endif; … … 261 298 */ 262 299 class POMO_CachedIntFileReader extends POMO_CachedFileReader { 263 function POMO_CachedIntFileReader($filename) { 300 /** 301 * PHP5 constructor. 302 */ 303 public function __construct( $filename ) { 264 304 parent::POMO_CachedFileReader($filename); 265 305 } 266 } 267 endif; 306 307 /** 308 * PHP4 constructor. 309 */ 310 function POMO_CachedIntFileReader( $filename ) { 311 self::__construct( $filename ); 312 } 313 } 314 endif; 315 -
trunk/src/wp-includes/rss.php
r30201 r32990 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 … … 96 99 97 100 $this->normalize(); 101 } 102 103 /** 104 * PHP4 constructor. 105 */ 106 public function MagpieRSS( $source ) { 107 self::__construct( $source ); 98 108 } 99 109 … … 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 ) { … … 719 732 } 720 733 734 } 735 736 /** 737 * PHP4 constructor. 738 */ 739 public function RSSCache( $base = '', $age = '' ) { 740 self::__construct( $base, $age ); 721 741 } 722 742 -
trunk/src/wp-includes/widgets.php
r32639 r32990 174 174 */ 175 175 public function WP_Widget( $id_base, $name, $widget_options = array(), $control_options = array() ) { 176 _deprecated_constructor( 'WP_Widget', '4.3.0' ); 176 177 WP_Widget::__construct( $id_base, $name, $widget_options, $control_options ); 177 178 } … … 564 565 public $widgets = array(); 565 566 567 /** 568 * PHP5 constructor. 569 */ 570 public function __construct() { 571 add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 ); 572 } 573 574 /** 575 * PHP4 constructor. 576 */ 566 577 public function WP_Widget_Factory() { 567 add_action( 'widgets_init', array( $this, '_register_widgets' ), 100 ); 578 _deprecated_constructor( 'WP_Widget_Factory', '4.2.0' ); 579 self::__construct(); 568 580 } 569 581 -
trunk/tests/phpunit/includes/utils.php
r31046 r32990 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; 34 } 35 36 /** 37 * PHP4 constructor. 38 */ 39 public function MockAction( $debug = 0 ) { 40 self::__construct( $debug ); 31 41 } 32 42 … … 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); … … 137 150 xml_set_character_data_handler($this->xml, array($this, 'dataHandler')); 138 151 $this->parse($in); 152 } 153 154 /** 155 * PHP4 constructor. 156 */ 157 public function testXMLParser( $in ) { 158 self::__construct( $in ); 139 159 } 140 160 -
trunk/tests/phpunit/includes/wp-profiler.php
r29789 r32990 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(); 30 } 31 32 /** 33 * PHP4 constructor. 34 */ 35 public function WPProfiler() { 36 self::__construct(); 28 37 } 29 38 -
trunk/tools/i18n/add-textdomain.php
r25003 r32990 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 ); 23 } 24 25 /** 26 * PHP4 constructor. 27 */ 28 public function AddTextdomain() { 29 _deprecated_constructor( 'AddTextdomain' , '4.3' ); 20 30 } 21 31
Note: See TracChangeset
for help on using the changeset viewer.