Changeset 242 for trunk


Ignore:
Timestamp:
Apr 5, 2007 12:16:27 AM (17 years ago)
Author:
quinn
Message:

Fixed some warnings in Prefs.
Fixed boomerang=\w+ removal code.
Added feature to disable trans_sess_id.

This will be the last changes of final version 2.1

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r203 r242  
    6363        // Use php sessions?
    6464        'enable_session' => false,
    65         'session_name' => 'Strangecode',
     65        'session_name' => '_session',
    6666        'session_use_cookies' => true,
     67        'session_use_trans_sid' => false,
    6768
    6869        // Use database?
     
    670671        $delim = strpos($url, '?') !== false ? ini_get('arg_separator.output') : '?';
    671672
    672 
    673673        $q = '';
    674674        if ($do_carry_queries) {
     
    700700                        || !$this->getParam('session_use_cookies')
    701701                    )
     702                    && $this->getParam('session_use_trans_sid')
    702703                    && $this->getParam('enable_session')
    703704                    && isMyDomain($url)
    704                     &&
    705                     (
     705                    && (
    706706                        !ini_get('session.use_trans_sid')
    707707                        || preg_match('!^(http|https)://!i', $url)
     
    908908
    909909        if ('' != $url && is_string($url)) {
    910             // Delete any boomerang request keys in the query string.
    911             $url = preg_replace('/[&?]?boomerang=[\w]+/', '', $url);
     910            // Delete any boomerang request keys in the query string (along with any trailing delimiters after the deletion).
     911            $url = preg_replace(array('/([&?])boomerang=\w+[&?]?/', '/[&?]$/'), array('$1', ''), $url);
    912912
    913913            if (isset($_SESSION['_app'][$this->_ns]['boomerang']['url']) && is_array($_SESSION['_app'][$this->_ns]['boomerang']['url']) && !empty($_SESSION['_app'][$this->_ns]['boomerang']['url'])) {
  • trunk/lib/Prefs.inc.php

    r241 r242  
    203203    {
    204204        $app =& App::getInstance();
    205         if (array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['persistent'])) {
     205        if (isset($_SESSION['_prefs'][$this->_ns]['persistent']) && array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['persistent'])) {
    206206            $app->logMsg(sprintf('Found %s in persistent', $key), LOG_DEBUG, __FILE__, __LINE__);
    207207            return $_SESSION['_prefs'][$this->_ns]['persistent'][$key];
    208         } else if (array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['defaults'])) {
     208        } else if (isset($_SESSION['_prefs'][$this->_ns]['defaults']) && array_key_exists($key, $_SESSION['_prefs'][$this->_ns]['defaults'])) {
    209209            $app->logMsg(sprintf('Found %s in defaults', $key), LOG_DEBUG, __FILE__, __LINE__);
    210210            return $_SESSION['_prefs'][$this->_ns]['defaults'][$key];
Note: See TracChangeset for help on using the changeset viewer.