Changeset 6157
- Timestamp:
- 12/12/2016 01:51:49 PM (7 years ago)
- Location:
- branches/0.9
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9/bb-admin/class-install.php
r1909 r6157 95 95 * @return boolean 96 96 **/ 97 function BB_Install($caller)97 function __construct($caller) 98 98 { 99 99 $this->caller = $caller; … … 103 103 104 104 return true; 105 } 106 107 function BB_Install($caller) 108 { 109 $this->__construct($caller); 105 110 } 106 111 -
branches/0.9/bb-includes/cache.php
r1221 r6157 6 6 var $flush_time = 172800; // 2 days 7 7 8 function BB_Cache() {8 function __construct() { 9 9 if ( false === bb_get_option( 'use_cache' ) || !is_writable(BB_PATH . 'bb-cache/') ) 10 10 $this->use_cache = false; 11 11 else 12 12 $this->flush_old(); 13 } 14 15 function BB_Cache() { 16 $this->__construct(); 13 17 } 14 18 -
branches/0.9/bb-includes/class-phpass.php
r1078 r6157 31 31 var $random_state; 32 32 33 function PasswordHash($iteration_count_log2, $portable_hashes)33 function __construct($iteration_count_log2, $portable_hashes) 34 34 { 35 35 $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; … … 42 42 43 43 $this->random_state = microtime() . getmypid(); 44 } 45 46 function PasswordHash($iteration_count_log2, $portable_hashes) 47 { 48 $this->__construct($iteration_count_log2, $portable_hashes); 44 49 } 45 50 -
branches/0.9/bb-includes/classes.php
r1894 r6157 17 17 18 18 // Can optionally pass unique id string to help out filters 19 function BB_Query( $type = 'topic', $query = '', $id = '' ) {19 function __construct( $type = 'topic', $query = '', $id = '' ) { 20 20 if ( !empty($query) ) 21 21 $this->query($type, $query, $id); 22 } 23 24 function BB_Query( $type = 'topic', $query = '', $id = '' ) { 25 $this->__construct( $type, $query, $id ); 22 26 } 23 27 … … 782 786 783 787 // Can optionally pass unique id string to help out filters 784 function BB_Query_Form( $type = 'topic', $defaults = '', $allowed = '', $id = '' ) {788 function __construct( $type = 'topic', $defaults = '', $allowed = '', $id = '' ) { 785 789 $this->defaults = wp_parse_args( $defaults ); 786 790 $this->allowed = wp_parse_args( $allowed ); 787 791 if ( !empty($defaults) || !empty($allowed) ) 788 792 $this->query_from_env($type, $defaults, $allowed, $id); 793 } 794 795 function BB_Query_Form( $type = 'topic', $defaults = '', $allowed = '', $id = '' ) { 796 $this->__construct( $type, $defaults, $allowed, $id ); 789 797 } 790 798 … … 933 941 var $_current_file; 934 942 935 function BB_DIR_MAP( $root, $args = '' ) {943 function __construct( $root, $args = '' ) { 936 944 if ( !is_dir( $root ) ) { 937 945 $this->error = new WP_Error( 'bb_dir_map', __('Not a valid directory') ); … … 946 954 $this->_current_root = $this->root = rtrim($root, '/\\'); 947 955 $this->map(); 956 } 957 958 function BB_Dir_Map( $root, $args = '' ) { 959 $this->__construct( $root, $args ); 948 960 } 949 961 … … 1184 1196 } 1185 1197 1186 function BB_Loop( &$elements ) {1198 function __construct( &$elements ) { 1187 1199 $this->elements = $elements; 1188 1200 if ( !is_array($this->elements) || empty($this->elements) ) 1189 1201 return $this->elements = false; 1202 } 1203 1204 function BB_Loop( &$elements ) { 1205 $this->__construct( $elements ); 1190 1206 } 1191 1207 -
branches/0.9/bb-includes/locale.php
r1386 r6157 165 165 } 166 166 167 function BB_Locale() {167 function __construct() { 168 168 $this->init(); 169 169 $this->register_globals(); 170 } 171 172 function BB_Locale() { 173 $this->__construct(); 170 174 } 171 175 } -
branches/0.9/bb-includes/script-loader.php
r1559 r6157 7 7 var $to_print = array(); 8 8 9 function __construct() { 10 $this->default_scripts(); 11 } 12 9 13 function BB_Scripts() { 10 $this-> default_scripts();14 $this->__construct(); 11 15 } 12 16 … … 209 213 var $l10n = array(); 210 214 211 function _ BB_Script() {215 function __construct() { 212 216 @list($this->handle, $this->src, $this->deps, $this->ver ) = func_get_args(); 213 217 if ( !is_array($this->deps) ) … … 215 219 if ( !$this->ver ) 216 220 $this->ver = false; 221 } 222 223 function _BB_Script() { 224 $this->__construct(); 217 225 } 218 226 -
branches/0.9/bb-includes/streams.php
r1363 r6157 56 56 var $_str; 57 57 58 function StringReader($str='') {58 function __construct($str='') { 59 59 $this->_str = $str; 60 60 $this->_pos = 0; 61 } 62 63 function StringReader($str='') { 64 $this->__construct($str); 61 65 } 62 66 … … 93 97 var $_length; 94 98 95 function FileReader($filename) {99 function __construct($filename) { 96 100 if (file_exists($filename)) { 97 101 … … 107 111 return false; 108 112 } 113 } 114 115 function FileReader($filename) { 116 $this->__construct($filename); 109 117 } 110 118 … … 149 157 // over it (it assumes knowledge of StringReader internals) 150 158 class CachedFileReader extends StringReader { 151 function CachedFileReader($filename) {159 function __construct($filename) { 152 160 if (file_exists($filename)) { 153 161 … … 167 175 } 168 176 } 177 178 function CachedFileReader($filename) { 179 $this->__construct($filename); 180 } 169 181 } 170 182 -
branches/0.9/bb-includes/wp-classes.php
r995 r6157 6 6 var $error_data = array(); 7 7 8 function WP_Error($code = '', $message = '', $data = '') {8 function __construct($code = '', $message = '', $data = '') { 9 9 if ( empty($code) ) 10 10 return; … … 14 14 if ( ! empty($data) ) 15 15 $this->error_data[$code] = $data; 16 } 17 18 function WP_Error($code = '', $message = '', $data = '') { 19 $this->__construct($code, $message, $data); 16 20 } 17 21 … … 93 97 var $responses = array(); 94 98 95 function WP_Ajax_Response( $args = '' ) {99 function __construct( $args = '' ) { 96 100 if ( !empty($args) ) 97 101 $this->add($args); 102 } 103 104 function WP_Ajax_Response( $args = '' ) { 105 $this->__construct( $args ); 98 106 } 99 107 -
branches/0.9/bb-plugins/bozo.php
r1386 r6157 278 278 var $title = ''; 279 279 280 function BB_Bozo_Users( $page = '' ) { // constructor280 function __construct( $page = '' ) { // constructor 281 281 $this->raw_page = ( '' == $page ) ? false : (int) $page; 282 282 $this->page = (int) ( '' == $page ) ? 1 : $page; … … 286 286 $this->query(); 287 287 $this->do_paging(); 288 } 289 290 function BB_Bozo_Users( $page = '' ) { 291 $this->__construct( $page ); 288 292 } 289 293
Note: See TracChangeset
for help on using the changeset viewer.