- Timestamp:
- Jul 30, 2014 10:43:49 PM (10 years ago)
- Location:
- trunk/lib
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/ACL.inc.php
r479 r484 40 40 41 41 // A place to keep an object instance for the singleton pattern. 42 pr ivatestatic $instance = null;42 protected static $instance = null; 43 43 44 44 // Configuration parameters for this object. 45 pr ivate$_params = array(45 protected $_params = array( 46 46 // If false nothing will be cached or retrieved. Useful for testing realtime data requests. 47 47 'enable_cache' => true, -
trunk/lib/App.inc.php
r480 r484 43 43 44 44 // A place to keep an object instance for the singleton pattern. 45 pr ivatestatic $instance = null;45 protected static $instance = null; 46 46 47 47 // Namespace of this application instance. 48 pr ivate$_ns;48 protected $_ns; 49 49 50 50 // If $app->start has run successfully. … … 55 55 56 56 // Array of query arguments will be carried persistently between requests. 57 pr ivate$_carry_queries = array();57 protected $_carry_queries = array(); 58 58 59 59 // Dictionary of global application parameters. 60 pr ivate$_params = array();60 protected $_params = array(); 61 61 62 62 // Default parameters. 63 pr ivate$_param_defaults = array(63 protected $_param_defaults = array( 64 64 65 65 // Public name and email address for this application. -
trunk/lib/Auth_File.inc.php
r478 r484 49 49 50 50 // Namespace of this auth object. 51 pr ivate$_ns;51 protected $_ns; 52 52 53 53 // Parameters to be specified by setParam(). 54 pr ivate$_params = array();55 pr ivate$_default_params = array(54 protected $_params = array(); 55 protected $_default_params = array( 56 56 57 57 // Full path to htpasswd file. … … 77 77 78 78 // Associative array of usernames to hashed passwords. 79 pr ivate$_users = array();79 protected $_users = array(); 80 80 81 81 /* … … 350 350 * @since 18 Apr 2006 18:17:48 351 351 */ 352 pr ivatefunction _loadHTPasswdFile()352 protected function _loadHTPasswdFile() 353 353 { 354 354 $app = &App::getInstance(); … … 387 387 * @return string The hashed password. 388 388 */ 389 pr ivatefunction _encrypt($password, $encrypted_password=null)389 protected function _encrypt($password, $encrypted_password=null) 390 390 { 391 391 switch ($this->_params['encryption_type']) { -
trunk/lib/Auth_SQL.inc.php
r479 r484 41 41 42 42 // Namespace of this auth object. 43 pr ivate$_ns;43 protected $_ns; 44 44 45 45 // Static var for test. 46 pr ivate$_authentication_tested;46 protected $_authentication_tested; 47 47 48 48 // Parameters to be configured by setParam. 49 pr ivate$_params = array();50 pr ivate$_default_params = array(49 protected $_params = array(); 50 protected $_default_params = array( 51 51 52 52 // Automatically create table and verify columns. Better set to false after site launch. … … 171 171 // The minimal columns for a table compatable with the Auth_SQL class. 172 172 $db->query("CREATE TABLE IF NOT EXISTS " . $db->escapeString($this->getParam('db_table')) . " ( 173 " . $this->getParam('db_primary_key') . " smallint(11) NOT NULL auto_increment,173 " . $this->getParam('db_primary_key') . " MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 174 174 " . $this->getParam('db_username_column') . " varchar(255) NOT NULL default '', 175 175 userpass VARCHAR(255) NOT NULL DEFAULT '', … … 189 189 added_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 190 190 modified_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 191 PRIMARY KEY (" . $this->getParam('db_primary_key') . "),192 191 KEY " . $this->getParam('db_username_column') . " (" . $this->getParam('db_username_column') . "), 193 192 KEY userpass (userpass), … … 226 225 } 227 226 $db->query("CREATE TABLE IF NOT EXISTS " . $this->getParam('db_login_table') . " ( 228 " . $this->getParam('db_primary_key') . " SMALLINT(11)NOT NULL DEFAULT '0',227 " . $this->getParam('db_primary_key') . " MEDIUMINT UNSIGNED NOT NULL DEFAULT '0', 229 228 login_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 230 229 remote_ip_binary CHAR(32) NOT NULL DEFAULT '', -
trunk/lib/AuthorizeNet.inc.php
r479 r484 62 62 63 63 public $post_url = ''; // The URL to post data to. 64 pr ivate$_results = array();65 pr ivate$_params = array();66 pr ivate$_default_params = array(64 protected $_results = array(); 65 protected $_params = array(); 66 protected $_default_params = array( 67 67 'x_version' => '3.1', 68 68 'x_relay_response' => 'FALSE', … … 80 80 81 81 // Array of response names. Used in the results array. 82 pr ivate$_result_fields = Array(82 protected $_result_fields = Array( 83 83 'x_response_code', 84 84 'x_response_subcode', … … 297 297 * @return integer Transaction result code. 298 298 */ 299 pr ivatefunction _processResult($result)299 protected function _processResult($result) 300 300 { 301 301 $this->_results = Array(); -
trunk/lib/CSS.inc.php
r479 r484 32 32 33 33 // Include these style sheets. 34 pr ivate$_css_files = array('default' => array());34 protected $_css_files = array('default' => array()); 35 35 36 36 // CSS object parameters. 37 pr ivate$_params = array(37 protected $_params = array( 38 38 'character_set' => 'utf-8', 39 39 'cache_css' => false, -
trunk/lib/Cache.inc.php
r480 r484 35 35 36 36 // A place to keep object instances for the singleton pattern. 37 pr ivatestatic $instances = array();37 protected static $instances = array(); 38 38 39 39 // Namespace of this instance of Prefs. 40 pr ivate$_ns;40 protected $_ns; 41 41 42 42 // Configuration parameters for this object. 43 pr ivate$_params = array(43 protected $_params = array( 44 44 45 45 // Type of cache. Currently only 'session' is supported. -
trunk/lib/Cart.inc.php
r479 r484 71 71 72 72 // Namespace of this instance. 73 pr ivate$_ns;73 protected $_ns; 74 74 75 75 // Configuration parameters for this object. 76 pr ivate$_params = array(76 protected $_params = array( 77 77 ); 78 78 -
trunk/lib/Currency.inc.php
r479 r484 41 41 42 42 // Configuration parameters for this object. 43 pr ivate$_params = array(43 protected $_params = array( 44 44 'cache_result' => true, 45 45 'cache_dir' => '', … … 180 180 * @access private 181 181 */ 182 pr ivatefunction _performAPICall($parameters=null)182 protected function _performAPICall($parameters=null) 183 183 { 184 184 $app =& App::getInstance(); -
trunk/lib/DB.inc.php
r479 r484 33 33 34 34 // A place to keep an object instance for the singleton pattern. 35 pr ivatestatic $instance = null;35 protected static $instance = null; 36 36 37 37 // If $db->connect has successfully opened a db connection. 38 pr ivate$_connected = false;38 protected $_connected = false; 39 39 40 40 // Database handle. … … 42 42 43 43 // Count how many queries run during the whole instance. 44 pr ivate$_query_count = 0;44 protected $_query_count = 0; 45 45 46 46 // Hash of DB parameters. 47 pr ivate$_params = array();47 protected $_params = array(); 48 48 49 49 // Default parameters. 50 pr ivate$_param_defaults = array(50 protected $_param_defaults = array( 51 51 52 52 // DB passwords should be set as apache environment variables in httpd.conf, readable only by root. … … 73 73 74 74 // Caches. 75 pr ivate$existing_tables;76 pr ivate$table_columns;75 protected $existing_tables; 76 protected $table_columns; 77 77 78 78 /** … … 147 147 148 148 // Connect to database. Always create a new link to the server. 149 // Connection errors are surpressed so we can do our own error management below. 149 150 if ($this->dbh = @mysql_connect($this->getParam('db_server'), $this->getParam('db_user'), $this->getParam('db_pass'), true)) { 150 151 // Select database … … 222 223 * @since 15 Jan 2007 15:59:00 223 224 */ 224 pr ivatefunction _fail()225 protected function _fail() 225 226 { 226 227 if ($this->getParam('db_die_on_failure')) { 227 header(' ', true, 503); 228 echo _("This page is temporarily unavailable. Please try again in a few minutes."); 228 if (!defined('_CLI')) { 229 // For http requests, send a Service Unavailable header. 230 header(' ', true, 503); 231 echo _("This page is temporarily unavailable. Please try again in a few minutes."); 232 } 229 233 die; 230 234 } else { … … 318 322 $app->logMsg(sprintf('MySQL error %s: %s in query: %s', mysql_errno($this->dbh), mysql_error($this->dbh), $debugqry), LOG_EMERG, __FILE__, __LINE__); 319 323 if ($this->getParam('db_debug')) { 320 echo '<pre style="padding:2em; background:#ddd; font:9px monaco;">' . wordwrap(mysql_error($this->dbh)) . '<hr>' . htmlspecialchars($debugqry) . '</pre>'; 324 if (!defined('_CLI')) { 325 echo '<pre style="padding:2em; background:#ddd; font:9px monaco;">' . wordwrap(mysql_error($this->dbh)) . '<hr>' . htmlspecialchars($debugqry) . '</pre>'; 326 } 321 327 } 322 328 // Die if db_die_on_failure = true, or just continue without connection … … 355 361 return true; 356 362 } else { 357 $app->logMsg(sprintf('Nonexistent DB table: %s.%s', $this->getParam('db_name'), $table), LOG_ ALERT, __FILE__, __LINE__);363 $app->logMsg(sprintf('Nonexistent DB table: %s.%s', $this->getParam('db_name'), $table), LOG_INFO, __FILE__, __LINE__); 358 364 return false; 359 365 } -
trunk/lib/DBSessionHandler.inc.php
r479 r484 34 34 public $db; // DB object. 35 35 36 pr ivate$_params = array(36 protected $_params = array( 37 37 'db_table' => 'session_tbl', 38 38 -
trunk/lib/Email.inc.php
r479 r484 56 56 57 57 // Default parameters, to be overwritten by setParam() and read with getParam() 58 pr ivate$_params = array(58 protected $_params = array( 59 59 'to' => null, 60 60 'from' => null, … … 74 74 75 75 // String that contains the email body. 76 pr ivate$_template;76 protected $_template; 77 77 78 78 // String that contains the email body after replacements. 79 pr ivate$_template_replaced;79 protected $_template_replaced; 80 80 81 81 /** -
trunk/lib/FormValidator.inc.php
r479 r484 61 61 62 62 // Class parameters. 63 pr ivate$_params = array(63 protected $_params = array( 64 64 'error' => ' sc-msg-error ', 65 65 'warning' => ' sc-msg-warning ', -
trunk/lib/Image.inc.php
r479 r484 31 31 32 32 // Object parameters. 33 pr ivate$_params = array();33 protected $_params = array(); 34 34 35 35 /** -
trunk/lib/ImageThumb.inc.php
r479 r484 43 43 44 44 // General object parameters. 45 pr ivate$_params = array(45 protected $_params = array( 46 46 // The location for images to create thumbnails from. 47 47 'source_dir' => null, … … 72 72 73 73 // Default image size specs. 74 pr ivate$_default_image_specs = array(74 protected $_default_image_specs = array( 75 75 // The destination for an image thumbnail size. 76 76 // Use initial / to specify absolute paths, leave off to specify a path relative to source_dir (eg: ../thumbs). … … 108 108 109 109 // Final specifications for image sizes, set with setSpec(). 110 pr ivate$_image_specs = array();110 protected $_image_specs = array(); 111 111 112 112 /** … … 452 452 * @since 19 May 2006 13:55:46 453 453 */ 454 pr ivatefunction _resizeWithNetpbm($source_file, $dest_file, $spec)454 protected function _resizeWithNetpbm($source_file, $dest_file, $spec) 455 455 { 456 456 $app =& App::getInstance(); … … 521 521 * @since 19 May 2006 15:46:02 522 522 */ 523 pr ivatefunction _resizeWithGD($source_file, $dest_file, $spec)523 protected function _resizeWithGD($source_file, $dest_file, $spec) 524 524 { 525 525 $app =& App::getInstance(); … … 754 754 * @return bool True on success, false on failure. 755 755 */ 756 pr ivatefunction _validFileExtension($file_name)756 protected function _validFileExtension($file_name) 757 757 { 758 758 preg_match('/.*?\.(\w+)$/i', $file_name, $ext); … … 766 766 * @return bool true on success, false on failure. 767 767 */ 768 pr ivatefunction _createDestDirs($filename=null)768 protected function _createDestDirs($filename=null) 769 769 { 770 770 $app =& App::getInstance(); … … 824 824 * @param string $line __LINE__. 825 825 */ 826 pr ivatefunction _raiseMsg($message, $type, $file, $line)826 protected function _raiseMsg($message, $type, $file, $line) 827 827 { 828 828 $app =& App::getInstance(); … … 844 844 * @since 15 Nov 2005 20:55:22 845 845 */ 846 pr ivatefunction _glob($pattern, $directory)846 protected function _glob($pattern, $directory) 847 847 { 848 848 $file_list = glob(sprintf('%s/%s', $directory, $pattern)); -
trunk/lib/JS.inc.php
r479 r484 32 32 33 33 // Include these style sheets. 34 pr ivate$_js_files = array('default' => array());34 protected $_js_files = array('default' => array()); 35 35 36 36 // JS object parameters. 37 pr ivate$_params = array(37 protected $_params = array( 38 38 'character_set' => 'utf-8', 39 39 'cache_js' => false, -
trunk/lib/Lock.inc.php
r479 r484 32 32 33 33 // A place to keep an object instance for the singleton pattern. 34 pr ivatestatic $instance = null;34 protected static $instance = null; 35 35 36 36 // Configuration of this object. 37 pr ivate$_params = array(37 protected $_params = array( 38 38 'timeout' => 600, 39 39 'auto_timeout' => 1800, … … 47 47 48 48 // Store lock data from DB. 49 pr ivate$data = array();49 protected $data = array(); 50 50 51 51 // Auth_SQL object from which to access a current user_id. 52 pr ivate$_auth;52 protected $_auth; 53 53 54 54 /** … … 109 109 } 110 110 $db->query("CREATE TABLE IF NOT EXISTS " . $db->escapeString($this->getParam('db_table')) . " ( 111 lock_id int NOT NULL auto_increment,111 lock_id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 112 112 record_table varchar(255) NOT NULL default '', 113 113 record_key varchar(255) NOT NULL default '', … … 116 116 set_by_admin_id smallint(11) NOT NULL default '0', 117 117 lock_datetime datetime NOT NULL default '0000-00-00 00:00:00', 118 PRIMARY KEY (lock_id),119 118 KEY record_table (record_table), 120 119 KEY record_key (record_key), -
trunk/lib/Navigation.inc.php
r479 r484 37 37 38 38 // Configuration parameters for this object. 39 pr ivate$_params = array(39 protected $_params = array( 40 40 'head_title' => true, 41 41 'body_title' => true, -
trunk/lib/PEdit.inc.php
r479 r484 70 70 71 71 // PEdit object parameters. 72 pr ivate$_params = array(72 protected $_params = array( 73 73 'data_dir' => '', 74 74 'character_set' => 'utf-8', … … 77 77 ); 78 78 79 pr ivate$_data = array(); // Array to store loaded data.80 pr ivate$_data_file = ''; // Full file path to the pedit data file.81 pr ivate$_authorized = false; // User is authenticated to see extended functions.82 pr ivate$_data_loaded = false;79 protected $_data = array(); // Array to store loaded data. 80 protected $_data_file = ''; // Full file path to the pedit data file. 81 protected $_authorized = false; // User is authenticated to see extended functions. 82 protected $_data_loaded = false; 83 83 public $op = ''; 84 84 … … 442 442 * @since 12 Apr 2006 10:52:35 443 443 */ 444 pr ivatefunction _fileHash()444 protected function _fileHash() 445 445 { 446 446 $app =& App::getInstance(); … … 457 457 * @since 11 Apr 2006 20:36:26 458 458 */ 459 pr ivatefunction _loadDataFile()459 protected function _loadDataFile() 460 460 { 461 461 $app =& App::getInstance(); … … 496 496 * @since 11 Apr 2006 20:53:42 497 497 */ 498 pr ivatefunction _initializeDataFile()498 protected function _initializeDataFile() 499 499 { 500 500 $app =& App::getInstance(); … … 512 512 * @return bool False if unauthorized or on failure. True on success. 513 513 */ 514 pr ivatefunction _writeData()514 protected function _writeData() 515 515 { 516 516 $app =& App::getInstance(); … … 560 560 * @since 11 Apr 2006 22:48:30 561 561 */ 562 pr ivatefunction _filePutContents($filename, $content)562 protected function _filePutContents($filename, $content) 563 563 { 564 564 $app =& App::getInstance(); … … 610 610 * @return bool False on failure. True on success. 611 611 */ 612 pr ivatefunction _createVersion()612 protected function _createVersion() 613 613 { 614 614 $app =& App::getInstance(); … … 648 648 * @since 12 Apr 2006 11:08:11 649 649 */ 650 pr ivatefunction _deleteOldVersions()650 protected function _deleteOldVersions() 651 651 { 652 652 $app =& App::getInstance(); … … 676 676 * @return array Array of versions. 677 677 */ 678 pr ivatefunction _getVersions()678 protected function _getVersions() 679 679 { 680 680 $version_files = array(); … … 707 707 * @return bool False on failure. True on success. 708 708 */ 709 pr ivatefunction _restoreVersion($version)709 protected function _restoreVersion($version) 710 710 { 711 711 $app =& App::getInstance(); -
trunk/lib/PageNumbers.inc.php
r479 r484 45 45 public $last_item; // The counter for the last item on this page (zero index). 46 46 public $max_num_links = 9; // The max number of links to show on page (odd numbers look best). 47 pr ivate$_num_links; // The number of links to show on page.48 pr ivate$_per_page = 25; // Items per page.47 protected $_num_links; // The number of links to show on page. 48 protected $_per_page = 25; // Items per page. 49 49 50 50 // Flags to ensure all necessary values have been set before calling calculate(). -
trunk/lib/PageSequence.inc.php
r479 r484 342 342 * Deletes all data that are older than auto_timeout. Set current time if not not expired or not set. 343 343 */ 344 pr ivatefunction _auto_timeout()344 protected function _auto_timeout() 345 345 { 346 346 $app =& App::getInstance(); -
trunk/lib/PayPal.inc.php
r479 r484 33 33 34 34 // General object parameters. 35 pr ivate$_params = array(35 protected $_params = array( 36 36 'paypal_url' => 'https://www.paypal.com/cgi-bin/webscr', 37 37 'test_mode' => false, … … 39 39 40 40 // Options used for specific buttons and links. 41 pr ivate$_default_button_options = array();41 protected $_default_button_options = array(); 42 42 43 43 // Array of buttons created by newButton(). 44 pr ivate$_buttons = array();44 protected $_buttons = array(); 45 45 46 46 // Store the response from the last IPN. 47 pr ivate$_ipn_response;47 protected $_ipn_response; 48 48 49 49 /** -
trunk/lib/Prefs.inc.php
r481 r484 55 55 56 56 // Namespace of this instance of Prefs. 57 pr ivate$_ns;57 protected $_ns; 58 58 59 59 // Configuration parameters for this object. 60 pr ivate$_params = array(60 protected $_params = array( 61 61 62 62 // Store preferences in one of the available storage mechanisms: session, cookie, database … … 497 497 * @since 04 Jun 2006 17:12:44 498 498 */ 499 pr ivatefunction _isLoaded()499 protected function _isLoaded() 500 500 { 501 501 if ('database' != $this->getParam('storagetype')) { … … 584 584 * @since 02 May 2014 18:17:04 585 585 */ 586 pr ivatefunction _getCookieName($key)586 protected function _getCookieName($key) 587 587 { 588 588 $app =& App::getInstance(); -
trunk/lib/ScriptTimer.inc.php
r479 r484 27 27 28 28 public $time_format = '%.3f'; 29 pr ivate$_timing_start_times = array();30 pr ivate$_timing_stop_times = array();31 pr ivate$_timing_cumulative_times = array();29 protected $_timing_start_times = array(); 30 protected $_timing_stop_times = array(); 31 protected $_timing_cumulative_times = array(); 32 32 33 33 public function start($name='default') -
trunk/lib/SortOrder.inc.php
r479 r484 37 37 class SortOrder { 38 38 39 pr ivate$_columns;39 protected $_columns; 40 40 public $sort_by; 41 41 public $order; -
trunk/lib/SpellCheck.inc.php
r479 r484 61 61 class SpellCheck { 62 62 63 pr ivate$_params = array(63 protected $_params = array( 64 64 'language' => 'en', 65 65 'personal_wordlist' => '', // Text file to save custom words to. … … 70 70 ); 71 71 72 pr ivate$_pspell_cfg_handle;73 pr ivate$_pspell_handle;74 pr ivate$_use_personal_wordlist = false;75 pr ivate$_errors = array();72 protected $_pspell_cfg_handle; 73 protected $_pspell_handle; 74 protected $_use_personal_wordlist = false; 75 protected $_errors = array(); 76 76 77 77 /** -
trunk/lib/Upload.inc.php
r479 r484 41 41 42 42 // General object parameters. 43 pr ivate$_params = array(43 protected $_params = array( 44 44 45 45 // Which messages do we pass to raiseMsg? -
trunk/lib/Version.inc.php
r479 r484 40 40 41 41 // A place to keep an object instance for the singleton pattern. 42 pr ivatestatic $instance = null;42 protected static $instance = null; 43 43 44 44 // Configuration of this object. 45 pr ivate$_params = array(45 protected $_params = array( 46 46 'max_qty' => 100, // Never have more than this many versions of each record. 47 47 'min_qty' => 25, // Keep at least this many versions of each record. … … 57 57 58 58 // Auth_SQL object from which to access a current user_id. 59 pr ivate$_auth;59 protected $_auth; 60 60 61 61 /** … … 116 116 } 117 117 $db->query("CREATE TABLE IF NOT EXISTS " . $db->escapeString($this->getParam('db_table')) . " ( 118 version_id INT NOT NULLAUTO_INCREMENT,118 version_id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, 119 119 record_table VARCHAR(255) NOT NULL DEFAULT '', 120 120 record_key VARCHAR(255) NOT NULL DEFAULT '', … … 126 126 saved_by_user_id SMALLINT(11) NOT NULL DEFAULT '0', 127 127 version_datetime DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', 128 PRIMARY KEY (version_id),129 128 KEY record_table (record_table), 130 129 KEY record_key (record_key),
Note: See TracChangeset
for help on using the changeset viewer.