equal
deleted
inserted
replaced
432 * @return bool |
432 * @return bool |
433 */ |
433 */ |
434 |
434 |
435 function on_critical_page($strict = false) |
435 function on_critical_page($strict = false) |
436 { |
436 { |
437 global $title; |
437 global $urlname; |
438 list($page_id, $namespace) = RenderMan::strToPageID($title); |
438 list($page_id, $namespace) = RenderMan::strToPageID($urlname); |
439 list($page_id) = explode('/', $page_id); |
439 list($page_id) = explode('/', $page_id); |
440 |
440 |
441 if ( $strict ) |
441 if ( $strict ) |
442 { |
442 { |
443 return $namespace == 'Special' && in_array($page_id, array('CSS', 'Login', 'Logout')); |
443 return $namespace == 'Special' && in_array($page_id, array('CSS', 'Login', 'Logout', 'LangExportJSON')); |
444 } |
444 } |
445 else |
445 else |
446 { |
446 { |
447 return $namespace == 'Admin' || ($namespace == 'Special' && in_array($page_id, array('CSS', 'Login', 'Logout', 'Administration'))); |
447 return $namespace == 'Admin' || ($namespace == 'Special' && in_array($page_id, array('CSS', 'Login', 'Logout', 'Administration'))); |
448 } |
448 } |
580 |
580 |
581 // make sure we aren't banned |
581 // make sure we aren't banned |
582 $this->check_banlist(); |
582 $this->check_banlist(); |
583 |
583 |
584 // make sure the account is active |
584 // make sure the account is active |
585 if ( !$this->compat && $this->user_logged_in && $userdata['account_active'] != 1 && !$this->on_critical_page() ) |
585 if ( !$this->compat && $this->user_logged_in && $userdata['account_active'] < 1 && !$this->on_critical_page() ) |
586 { |
586 { |
587 $this->show_inactive_error($userdata); |
587 $this->show_inactive_error($userdata); |
588 } |
588 } |
589 |
589 |
590 // Printable page view? Probably the wrong place to control |
590 // Printable page view? Probably the wrong place to control |
2049 foreach ( $code as $cmd ) |
2049 foreach ( $code as $cmd ) |
2050 { |
2050 { |
2051 eval($cmd); |
2051 eval($cmd); |
2052 } |
2052 } |
2053 |
2053 |
2054 // Uncomment to automatically log the user in (WARNING: commented out for a reason - doesn't consider activation and other things) |
|
2055 // $this->register_session($user_orig, $password); |
|
2056 return 'success'; |
2054 return 'success'; |
2057 } |
2055 } |
2058 |
2056 |
2059 /** |
2057 /** |
2060 * Attempts to send an e-mail to the specified user with activation instructions. |
2058 * Attempts to send an e-mail to the specified user with activation instructions. |