1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

review some comments

This commit is contained in:
marj
2009-10-28 20:26:04 +00:00
parent d4f929ab17
commit 91c0cbb273
2 changed files with 167 additions and 168 deletions

View File

@@ -9,8 +9,8 @@
* Administration - Site Maintenance
*
* $Source: /cvs_backup/e107_0.8/e107_admin/ugflag.php,v $
* $Revision: 1.6 $
* $Date: 2009-10-28 16:57:51 $
* $Revision: 1.7 $
* $Date: 2009-10-28 20:26:04 $
* $Author: marj_nl_fr $
*
*/
@@ -94,7 +94,7 @@ $text .= "
</td>
</tr>";
//TODO multilanguage pref
$text .= "
<tr>
<td class='label'>".UGFLAN_5."

View File

@@ -1,21 +1,21 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| Copyright (C) 2001-2009 e107 Inc
| http://e107.org
|
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/redirection_class.php,v $
| $Revision: 1.5 $
| $Date: 2009-10-28 20:16:12 $
| $Author: marj_nl_fr $
+----------------------------------------------------------------------------+
*/
+ ----------------------------------------------------------------------------+
| e107 website system
|
| Copyright (C) 2001-2009 e107 Inc
| http://e107.org
|
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/redirection_class.php,v $
| $Revision: 1.6 $
| $Date: 2009-10-28 20:26:04 $
| $Author: marj_nl_fr $
+----------------------------------------------------------------------------+
*/
/**
* Redirection class
@@ -29,14 +29,14 @@
class redirection
{
/**
* List of pages to not check agaist e_SELF
* List of pages to not check against e_SELF
*
* @var array
*/
protected $self_exceptions = array();
/**
* List of pages to not check agaist e_PAGE
* List of pages to not check against e_PAGE
*
* @var array
*/
@@ -68,11 +68,10 @@ class redirection
if(e107::getPref('maintainance_flag'))
{
// if not admin
if(!ADMIN
|| (e_UC_MAINADMIN == e107::getPref('maintainance_flag')
&& !getperms('0')
)
)
// or if not mainadmin - ie e_UC_MAINADMIN
|| (e_UC_MAINADMIN == e107::getPref('maintainance_flag') && !getperms('0')))
{
// 307 Temporary Redirect
$this->redirect(SITEURL.'sitedown.php', TRUE, 307);
@@ -98,31 +97,31 @@ class redirection
return;
}
if (USER && !e_AJAX_REQUEST)
if(USER && !e_AJAX_REQUEST)
{
$this->restoreMembersOnlyUrl();
return;
}
if (e_AJAX_REQUEST)
if(e_AJAX_REQUEST)
{
return;
}
if (strpos(e_PAGE, 'admin') !== FALSE)
if(strpos(e_PAGE, 'admin') !== FALSE)
{
return;
}
if (in_array(e_SELF, $this->self_exceptions))
if(in_array(e_SELF, $this->self_exceptions))
{
return;
}
if (in_array(e_PAGE, $this->page_exceptions))
if(in_array(e_PAGE, $this->page_exceptions))
{
return;
}
foreach (e107::getPref('membersonly_exceptions') as $val)
{
$srch = trim($val);
if (strpos(e_SELF, $srch) !== FALSE)
if(strpos(e_SELF, $srch) !== FALSE)
{
return;
}
@@ -154,7 +153,7 @@ class redirection
*/
private function restoreMembersOnlyUrl()
{
if (USER && ($_SESSION[e_COOKIE.'_afterlogin'] || $_COOKIE[e_COOKIE.'_afterlogin']))
if(USER && ($_SESSION[e_COOKIE.'_afterlogin'] || $_COOKIE[e_COOKIE.'_afterlogin']))
{
$url = ($_SESSION[e_COOKIE.'_afterlogin']) ? $_SESSION[e_COOKIE.'_afterlogin'] : $_COOKIE[e_COOKIE.'_afterlogin'];
session_set(e_COOKIE.'_afterlogin', FALSE, -1000);