includes/sessions.php
changeset 953 323c4cd1aa37
parent 941 9be6dba92adf
child 985 4ecf46e5eeab
--- a/includes/sessions.php	Mon May 04 23:07:00 2009 -0400
+++ b/includes/sessions.php	Tue May 05 00:10:26 2009 -0400
@@ -670,7 +670,7 @@
           $captcha_good = true;
         }
       }
-      if ( $policy != 'disable' && !$captcha_good )
+      if ( $lockout_data['lockout_policy'] != 'disable' && !$captcha_good )
       {
         if ( $lockout_data['lockout_fails'] >= $lockout_data['lockout_threshold'] )
         {
@@ -2929,12 +2929,6 @@
       return $objcache[$namespace][$page_id];
     }
     
-    //if ( !isset( $paths->pages[$paths->nslist[$namespace] . $page_id] ) )
-    //{
-    //  // Page does not exist
-    //  return false;
-    //}
-    
     $objcache[$namespace][$page_id] = new Session_ACLPageInfo( $page_id, $namespace, $this->acl_types, $this->acl_descs, $this->acl_deps, $this->acl_base_cache );
     $object =& $objcache[$namespace][$page_id];
     
@@ -4384,12 +4378,11 @@
     $this->namespace = $namespace;
     
     $pathskey = $paths->nslist[$this->namespace].sanitize_page_id($this->page_id);
-    $ppwm = 2;
-    if ( isset($paths->pages[$pathskey]) )
-    {
-      if ( isset($paths->pages[$pathskey]['wiki_mode']) )
-        $ppwm = $paths->pages[$pathskey]['wiki_mode'];
-    }
+    $ns = namespace_factory($this->page_id, $this->namespace);
+    $cdata = $ns->get_cdata();
+    $ppwm = $cdata['wiki_mode'];
+    unset($ns, $cdata);
+    
     if ( $ppwm == 1 && ( $session->user_logged_in || getConfig('wiki_mode_require_login') != '1' ) )
       $this->wiki_mode = true;
     else if ( $ppwm == 1 && !$session->user_logged_in && getConfig('wiki_mode_require_login') == '1' )