# HG changeset patch # User Dan # Date 1262758699 18000 # Node ID c922ef08167a61e8101c6e01a4c0cef64a208623 # Parent eaab1c22e2374a12279e5eacc284f81fba2540a8 Sessions: fixed on_critical_page(), it referenced the wrong global; enabled better extensible behavior in the account_active column diff -r eaab1c22e237 -r c922ef08167a includes/sessions.php --- a/includes/sessions.php Tue Jan 05 09:56:21 2010 -0500 +++ b/includes/sessions.php Wed Jan 06 01:18:19 2010 -0500 @@ -434,13 +434,13 @@ function on_critical_page($strict = false) { - global $title; - list($page_id, $namespace) = RenderMan::strToPageID($title); + global $urlname; + list($page_id, $namespace) = RenderMan::strToPageID($urlname); list($page_id) = explode('/', $page_id); if ( $strict ) { - return $namespace == 'Special' && in_array($page_id, array('CSS', 'Login', 'Logout')); + return $namespace == 'Special' && in_array($page_id, array('CSS', 'Login', 'Logout', 'LangExportJSON')); } else { @@ -582,7 +582,7 @@ $this->check_banlist(); // make sure the account is active - if ( !$this->compat && $this->user_logged_in && $userdata['account_active'] != 1 && !$this->on_critical_page() ) + if ( !$this->compat && $this->user_logged_in && $userdata['account_active'] < 1 && !$this->on_critical_page() ) { $this->show_inactive_error($userdata); } @@ -2051,8 +2051,6 @@ eval($cmd); } - // Uncomment to automatically log the user in (WARNING: commented out for a reason - doesn't consider activation and other things) - // $this->register_session($user_orig, $password); return 'success'; }