1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +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 * Administration - Site Maintenance
* *
* $Source: /cvs_backup/e107_0.8/e107_admin/ugflag.php,v $ * $Source: /cvs_backup/e107_0.8/e107_admin/ugflag.php,v $
* $Revision: 1.6 $ * $Revision: 1.7 $
* $Date: 2009-10-28 16:57:51 $ * $Date: 2009-10-28 20:26:04 $
* $Author: marj_nl_fr $ * $Author: marj_nl_fr $
* *
*/ */
@@ -94,7 +94,7 @@ $text .= "
</td> </td>
</tr>"; </tr>";
//TODO multilanguage pref
$text .= " $text .= "
<tr> <tr>
<td class='label'>".UGFLAN_5." <td class='label'>".UGFLAN_5."

View File

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