projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More readable spacing
[squirrelmail.git]
/
plugins
/
administrator
/
auth.php
diff --git
a/plugins/administrator/auth.php
b/plugins/administrator/auth.php
index dd4560f23164ebdd982438b04224701e77a63dba..aad9344131138a660d175359e12f630311c53c1d 100644
(file)
--- a/
plugins/administrator/auth.php
+++ b/
plugins/administrator/auth.php
@@
-7,7
+7,7
@@
* to the plugin.
*
* @author Philippe Mingo
* to the plugin.
*
* @author Philippe Mingo
- * @copyright © 1999-200
6
The SquirrelMail Project Team
+ * @copyright © 1999-200
7
The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
* @package plugins
@@
-20,8
+20,7
@@
* @return boolean
*/
function adm_check_user() {
* @return boolean
*/
function adm_check_user() {
- global $PHP_SELF, $plugins;
- require_once(SM_PATH . 'functions/global.php');
+ global $plugins;
/* fail if the plugin is not enabled */
if ( !in_array('administrator', $plugins) ) {
/* fail if the plugin is not enabled */
if ( !in_array('administrator', $plugins) ) {
@@
-33,7
+32,9
@@
function adm_check_user() {
}
/* This needs to be first, for all non_options pages */
}
/* This needs to be first, for all non_options pages */
- if (strpos('options.php', $PHP_SELF)) {
+ //if (!defined('PAGE_NAME') || strpos(PAGE_NAME, 'options') === FALSE) {
+ if (!defined('PAGE_NAME')
+ || (PAGE_NAME != 'administrator_options' && PAGE_NAME != 'options')) {
$auth = FALSE;
} else if (file_exists(SM_PATH . 'plugins/administrator/admins')) {
$auths = file(SM_PATH . 'plugins/administrator/admins');
$auth = FALSE;
} else if (file_exists(SM_PATH . 'plugins/administrator/admins')) {
$auths = file(SM_PATH . 'plugins/administrator/admins');
@@
-64,4
+65,3
@@
function adm_check_user() {
function adm_array_trim(&$value,$key) {
$value=trim($value);
}
function adm_array_trim(&$value,$key) {
$value=trim($value);
}
-?>
\ No newline at end of file