Changeset 754
- Timestamp:
- Nov 15, 2021 10:58:50 PM (2 years ago)
- Location:
- branches/1.1dev
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.1dev/bin/module_maker/_config.inc.php
r109 r754 20 20 } 21 21 22 $CFG = new stdClass; 22 23 $CFG->enable_session = false; 23 24 $CFG->log_file_priority = false; … … 28 29 29 30 require_once dirname(__FILE__) . '/../../config/boot.inc.php'; 30 31 32 ?> -
branches/1.1dev/config/boot.inc.php
r707 r754 195 195 // Database session handling. 196 196 require_once CODE_BASE . '/lib/MySQLSessionHandler.inc.php'; 197 $sess_mysql['dbh'] =& $dbh; // MySQL link identifyer, if we are already connected to the database197 $sess_mysql['dbh'] =& $dbh; // MySQL link identifier, if we are already connected to the database 198 198 $sess_mysql['hostname'] = 'localhost'; // MySQL hostname 199 199 $sess_mysql['user'] = $CFG->username; // MySQL username … … 218 218 $_SESSION['_messages'] = array(); 219 219 } 220 221 // if (isset($_COOKIE[session_name()])) {222 // logMsg(sprintf('Found session in cookie: %s=%s', session_name(), $_COOKIE[session_name()]), LOG_DEBUG, __FILE__, __LINE__);223 // }224 // if (getPost(session_name())) {225 // logMsg(sprintf('Found session in post: %s=%s', session_name(), getPost(session_name())), LOG_DEBUG, __FILE__, __LINE__);226 // }227 // if (getGet(session_name())) {228 // logMsg(sprintf('Found session in get: %s=%s', session_name(), getGet(session_name())), LOG_DEBUG, __FILE__, __LINE__);229 // }230 // logMsg(sprintf('Using session %s=%s', session_name(), session_id()), LOG_DEBUG, __FILE__, __LINE__);231 232 233 /******************************************************************************234 * LANGUAGE235 *****************************************************************************/236 237 // Set the language.238 if ($lang = getFormData('lang')) {239 $_SESSION['_language'] = $lang;240 } else if (!isset($_SESSION['_language'])) {241 preg_match('/^([-[:alpha:]]+)/i', getenv('HTTP_ACCEPT_LANGUAGE'), $lang);242 if (isset($lang[0]) && isset($CFG->site_langs[$lang[0]])) {243 $_SESSION['_language'] = $lang[0];244 } else {245 $_SESSION['_language'] = 'en';246 }247 }248 249 220 } // end enable sessions ______________________________________________________ 250 221 … … 298 269 ini_set('include_path', 299 270 ini_get('include_path') . PATH_SEPARATOR . 300 SITE_BASE . '/_templates/' . $inc_lang . PATH_SEPARATOR .301 CODE_BASE . '/templates/' . $inc_lang . PATH_SEPARATOR .302 303 SITE_BASE . '/_templates/en' . PATH_SEPARATOR .304 CODE_BASE . '/templates/en' . PATH_SEPARATOR .305 306 271 SITE_BASE . '/_templates' . PATH_SEPARATOR . 307 272 CODE_BASE . '/templates' . PATH_SEPARATOR . … … 309 274 SITE_BASE . '/../lib' 310 275 ); 311 312 ?> -
branches/1.1dev/config/defaults.inc.php
r687 r754 5 5 6 6 /* 7 * This file contains global config ration variables that apply to the underlying7 * This file contains global configuration variables that apply to the underlying 8 8 * codebase framework. These values can be overwritten in a site-specific config 9 9 * file to customize values for a specific site. -
branches/1.1dev/lib/AuthSQL.inc.php
r753 r754 377 377 $remote_ip_is_matched = (isset($_SESSION[$this->_auth_name]['remote_ip']) && $_SESSION[$this->_auth_name]['remote_ip'] == getRemoteAddr() || $user_in_trusted_network); 378 378 } else { 379 logMsg(sprintf('%s%s exempt from remote_ip match.',380 ucfirst($this->_params['auth_name']),381 ($this->getVal('user_id') ? ' ' . $this->getVal('user_id') . ' (' . $this->getVal('username') . ')' : '')382 ), LOG_DEBUG, __FILE__, __LINE__);379 // logMsg(sprintf('%s%s exempt from remote_ip match.', 380 // ucfirst($this->_params['auth_name']), 381 // ($this->getVal('user_id') ? ' ' . $this->getVal('user_id') . ' (' . $this->getVal('username') . ')' : '') 382 // ), LOG_DEBUG, __FILE__, __LINE__); 383 383 $remote_ip_is_matched = true; 384 384 } -
branches/1.1dev/lib/Utilities.inc.php
r753 r754 726 726 } 727 727 728 /* 729 * Generates a base-65-encoded sha512 hash of $string truncated to $length. 730 * 731 * @access public 732 * @param string $string Input string to hash. 733 * @param int $length Length of output hash string. 734 * @return string String of hash. 735 * @author Quinn Comendant <quinn@strangecode.com> 736 * @version 1.0 737 * @since 03 Apr 2016 19:48:49 738 */ 739 function hash64($string, $length=18) 740 { 741 $app =& App::getInstance(); 742 743 return mb_substr(preg_replace('/[^\w]/' . $app->getParam('preg_u'), '', base64_encode(hash('sha512', $string, true))), 0, $length); 744 } 745 728 746 /** 729 747 * Signs a value using md5 and a simple text key. In order for this
Note: See TracChangeset
for help on using the changeset viewer.