includes/sessions.php
changeset 953 323c4cd1aa37
parent 941 9be6dba92adf
child 985 4ecf46e5eeab
equal deleted inserted replaced
952:d52dfa1f08da 953:323c4cd1aa37
   668         if ( strtolower($real_code) === strtolower($captcha_code) )
   668         if ( strtolower($real_code) === strtolower($captcha_code) )
   669         {
   669         {
   670           $captcha_good = true;
   670           $captcha_good = true;
   671         }
   671         }
   672       }
   672       }
   673       if ( $policy != 'disable' && !$captcha_good )
   673       if ( $lockout_data['lockout_policy'] != 'disable' && !$captcha_good )
   674       {
   674       {
   675         if ( $lockout_data['lockout_fails'] >= $lockout_data['lockout_threshold'] )
   675         if ( $lockout_data['lockout_fails'] >= $lockout_data['lockout_threshold'] )
   676         {
   676         {
   677           // ooh boy, somebody's in trouble ;-)
   677           // ooh boy, somebody's in trouble ;-)
   678           $row = $db->fetchrow();
   678           $row = $db->fetchrow();
  2926     
  2926     
  2927     if ( isset($objcache[$namespace][$page_id]) )
  2927     if ( isset($objcache[$namespace][$page_id]) )
  2928     {
  2928     {
  2929       return $objcache[$namespace][$page_id];
  2929       return $objcache[$namespace][$page_id];
  2930     }
  2930     }
  2931     
       
  2932     //if ( !isset( $paths->pages[$paths->nslist[$namespace] . $page_id] ) )
       
  2933     //{
       
  2934     //  // Page does not exist
       
  2935     //  return false;
       
  2936     //}
       
  2937     
  2931     
  2938     $objcache[$namespace][$page_id] = new Session_ACLPageInfo( $page_id, $namespace, $this->acl_types, $this->acl_descs, $this->acl_deps, $this->acl_base_cache );
  2932     $objcache[$namespace][$page_id] = new Session_ACLPageInfo( $page_id, $namespace, $this->acl_types, $this->acl_descs, $this->acl_deps, $this->acl_base_cache );
  2939     $object =& $objcache[$namespace][$page_id];
  2933     $object =& $objcache[$namespace][$page_id];
  2940     
  2934     
  2941     profiler_log("session: fetched ACLs for page {$namespace}:{$page_id}");
  2935     profiler_log("session: fetched ACLs for page {$namespace}:{$page_id}");
  4382     
  4376     
  4383     $this->page_id = $page_id;
  4377     $this->page_id = $page_id;
  4384     $this->namespace = $namespace;
  4378     $this->namespace = $namespace;
  4385     
  4379     
  4386     $pathskey = $paths->nslist[$this->namespace].sanitize_page_id($this->page_id);
  4380     $pathskey = $paths->nslist[$this->namespace].sanitize_page_id($this->page_id);
  4387     $ppwm = 2;
  4381     $ns = namespace_factory($this->page_id, $this->namespace);
  4388     if ( isset($paths->pages[$pathskey]) )
  4382     $cdata = $ns->get_cdata();
  4389     {
  4383     $ppwm = $cdata['wiki_mode'];
  4390       if ( isset($paths->pages[$pathskey]['wiki_mode']) )
  4384     unset($ns, $cdata);
  4391         $ppwm = $paths->pages[$pathskey]['wiki_mode'];
  4385     
  4392     }
       
  4393     if ( $ppwm == 1 && ( $session->user_logged_in || getConfig('wiki_mode_require_login') != '1' ) )
  4386     if ( $ppwm == 1 && ( $session->user_logged_in || getConfig('wiki_mode_require_login') != '1' ) )
  4394       $this->wiki_mode = true;
  4387       $this->wiki_mode = true;
  4395     else if ( $ppwm == 1 && !$session->user_logged_in && getConfig('wiki_mode_require_login') == '1' )
  4388     else if ( $ppwm == 1 && !$session->user_logged_in && getConfig('wiki_mode_require_login') == '1' )
  4396       $this->wiki_mode = true;
  4389       $this->wiki_mode = true;
  4397     else if ( $ppwm == 0 )
  4390     else if ( $ppwm == 0 )