- Timestamp:
- Jun 9, 2022 7:24:04 PM (2 years ago)
- Location:
- trunk/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/App.inc.php
r767 r768 430 430 // DB credentials for CLI scripts stored in a JSON file with read rights given only to the user who will be executing the scripts: -r-------- 431 431 // But not if all DB credentials have been defined already by other means. 432 if ( $this->cli &&'' != $this->getParam('db_auth_file') && (!$this->getParam('db_server') || !$this->getParam('db_name') || !$this->getParam('db_user') || !$this->getParam('db_pass'))) {432 if ('' != $this->getParam('db_auth_file') && (!$this->getParam('db_server') || !$this->getParam('db_name') || !$this->getParam('db_user') || !$this->getParam('db_pass'))) { 433 433 if (false !== ($db_auth_file = stream_resolve_include_path($this->getParam('db_auth_file')))) { 434 434 if (is_readable($db_auth_file)) { … … 664 664 if ($num_queries > 0 && true === $this->getParam('enable_db_pdo')) { 665 665 // If the app wants to use PDO, warn if any legacy db queries are made. 666 $this->logMsg(sprintf('%s queries using legacy DB functions', $num_queries), LOG_ WARNING, __FILE__, __LINE__);666 $this->logMsg(sprintf('%s queries using legacy DB functions', $num_queries), LOG_DEBUG, __FILE__, __LINE__); 667 667 } 668 668 $this->db->close(); -
trunk/lib/Auth_Simple.inc.php
r745 r768 11 11 12 12 // Namespace of this auth object. 13 var$_ns;13 protected $_ns; 14 14 15 15 // Parameters to be configured by setParam. 16 var$_params = array();17 var$_default_params = array(16 protected $_params = array(); 17 protected $_default_params = array( 18 18 19 19 // The URL to the login script. -
trunk/lib/PageNumbers.inc.php
r635 r768 71 71 { 72 72 // Default options for the quantity per page links. 73 $this->per_page_options = array( 25, 50, 100, 200);73 $this->per_page_options = array(50, 100, 250, 1000); 74 74 75 75 // Default options for the page number links. -
trunk/lib/Utilities.inc.php
r765 r768 998 998 } 999 999 return $url_args; 1000 } 1001 1002 /* 1003 * Encode/decode a string that is safe for URLs. 1004 * 1005 * @access public 1006 * @param string $string Input string 1007 * @return string Encoded/decoded string. 1008 * @author Rasmus Schultz <https://www.php.net/manual/en/function.base64-encode.php#123098> 1009 * @since 09 Jun 2022 07:50:49 1010 */ 1011 function base64_encode_url($string) { 1012 return str_replace(['+','/','='], ['-','_',''], base64_encode($string)); 1013 } 1014 function base64_decode_url($string) { 1015 return base64_decode(str_replace(['-','_'], ['+','/'], $string)); 1000 1016 } 1001 1017 -
trunk/lib/Validator.inc.php
r767 r768 348 348 } 349 349 350 if ($strict) { 351 // Strict tests. 352 if (ip2long($domain) === false && function_exists('checkdnsrr') && !checkdnsrr($domain . '.', 'MX') && gethostbyname($domain) == $domain) { 353 // Check domain exists: It's a domain if ip2long fails; checkdnsrr ensures a MX record exists; gethostbyname() ensures the domain exists. 354 $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($val)), $type, $file, $line); 355 return self::EMAIL_MX_FAIL; 356 } 350 if ($strict && getmxrr('checkdnsrr') && !getmxrr($domain)) { 351 // Strict tests: check if MX record exists. 352 $app->logMsg(sprintf('%s (line %s) failed: %s', __METHOD__, __LINE__, getDump($val)), $type, $file, $line); 353 return self::EMAIL_MX_FAIL; 357 354 } 358 355
Note: See TracChangeset
for help on using the changeset viewer.