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

Bug fix: rule deletion

This commit is contained in:
e107steved
2007-10-28 19:04:14 +00:00
parent 56a391c5d8
commit 7ce5661b92
2 changed files with 16 additions and 8 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_admin/frontpage.php,v $ | $Source: /cvs_backup/e107_0.8/e107_admin/frontpage.php,v $
| $Revision: 1.3 $ | $Revision: 1.4 $
| $Date: 2007-06-24 16:30:42 $ | $Date: 2007-10-28 19:04:13 $
| $Author: e107steved $ | $Author: e107steved $
| |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
@@ -206,7 +206,15 @@ if (isset($_POST['fp_delete_rule']))
{ {
if (isset($fp_settings[key($_POST['fp_delete_rule'])])) if (isset($fp_settings[key($_POST['fp_delete_rule'])]))
{ {
unset($fp_settings[key($_POST['fp_delete_rule'])]); $rule_no = key($_POST['fp_delete_rule']);
$array_size = count($fp_settings);
unset($fp_settings[$rule_no]);
while ($rule_no < $array_size)
{ // Move up and renumber any entries after the deleted rule
$fp_settings[$rule_no] = $fp_settings[$rule_no + 1];
$rule_no++;
unset($fp_settings[$rule_no]);
}
$fp_update_prefs = TRUE; $fp_update_prefs = TRUE;
} }
} }
@@ -344,7 +352,7 @@ class frontpage
<tr><td colspan='7' class='fcaption' style='text-align:center;'>".($rule_info['order'] ? FRTLAN_46 : FRTLAN_42)."</td></tr> <tr><td colspan='7' class='fcaption' style='text-align:center;'>".($rule_info['order'] ? FRTLAN_46 : FRTLAN_42)."</td></tr>
<tr> <tr>
<td class='forumheader3' style='text-align:center' colspan='7'> <td class='forumheader3' style='text-align:center' colspan='7'>
".FRTLAN_43.r_userclass('class', $rule_info['class'], 'off', 'guest,member,admin,main,classes')."</td> ".FRTLAN_43.r_userclass('class', $rule_info['class'], 'off', 'public,guest,member,admin,main,classes')."</td>
</tr><tr><td colspan='3' class='fcaption' style='text-align:center;'>".FRTLAN_49."</td><td>&nbsp;</td> </tr><tr><td colspan='3' class='fcaption' style='text-align:center;'>".FRTLAN_49."</td><td>&nbsp;</td>
<td colspan='3' class='fcaption' style='text-align:center;'>".FRTLAN_35."<br />".FRTLAN_50."</td></tr>"; <td colspan='3' class='fcaption' style='text-align:center;'>".FRTLAN_35."<br />".FRTLAN_50."</td></tr>";

View File

@@ -12,9 +12,9 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_handlers/login.php,v $ | $Source: /cvs_backup/e107_0.8/e107_handlers/login.php,v $
| $Revision: 1.5 $ | $Revision: 1.6 $
| $Date: 2007-07-17 15:11:55 $ | $Date: 2007-10-28 19:04:14 $
| $Author: sweetas $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -170,7 +170,7 @@ class userlogin {
{ // We've found the entry of interest { // We've found the entry of interest
if (strlen($fp)) if (strlen($fp))
{ {
$redir = ((strpos($fp, 'http') === FALSE) ? e_BASE : '').$tp -> replaceConstants($fp, TRUE, TRUE); $redir = ((strpos($fp, 'http') === FALSE) ? e_BASE : '').$tp -> replaceConstants($fp, TRUE, FALSE);
if (e_QUERY) $redir .= "?".e_QUERY; if (e_QUERY) $redir .= "?".e_QUERY;
// $admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","Redirect active",$redir,FALSE,FALSE); // $admin_log->e_log_event(4,__FILE__."|".__FUNCTION__."@".__LINE__,"DBG","Redirect active",$redir,FALSE,FALSE);
} }