aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/adm
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/adm')
-rw-r--r--phpBB/adm/admin_board.php4
-rw-r--r--phpBB/adm/admin_forums.php6
-rw-r--r--phpBB/adm/admin_permissions.php14
-rw-r--r--phpBB/adm/index.php2
-rw-r--r--phpBB/adm/pagestart.php14
5 files changed, 30 insertions, 10 deletions
diff --git a/phpBB/adm/admin_board.php b/phpBB/adm/admin_board.php
index 86a3ff9772..fff08ad48e 100644
--- a/phpBB/adm/admin_board.php
+++ b/phpBB/adm/admin_board.php
@@ -80,6 +80,10 @@ switch ($mode)
$l_title = 'MESSAGE_SETTINGS';
$which_auth = 'a_defaults';
break;
+ case 'message':
+ $l_title = 'MESSAGE_SETTINGS';
+ $which_auth = 'a_defaults';
+ break;
default:
return;
}
diff --git a/phpBB/adm/admin_forums.php b/phpBB/adm/admin_forums.php
index fb203999f5..4da3de90f4 100644
--- a/phpBB/adm/admin_forums.php
+++ b/phpBB/adm/admin_forums.php
@@ -75,6 +75,9 @@ if ($update)
delete_forum($forum_id, $action_posts, $action_subforums, $posts_to_id, $subforums_to_id);
+ //
+ $auth->acl_clear_prefetch();
+
trigger_error($user->lang['FORUM_DELETED']);
break;
@@ -118,6 +121,9 @@ if ($update)
break;
}
+ //
+ $auth->acl_clear_prefetch();
+
// Redirect to permissions
$message = ($mode == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], "<a href=\"admin_permissions.$phpEx$SID&amp;mode=forum&amp;submit_usergroups=true&amp;ug_type=forum&amp;action=usergroups&amp;f[forum][]=" . $forum_data['forum_id'] . '">', '</a>');
diff --git a/phpBB/adm/admin_permissions.php b/phpBB/adm/admin_permissions.php
index 7bfed014b4..c8c79960ab 100644
--- a/phpBB/adm/admin_permissions.php
+++ b/phpBB/adm/admin_permissions.php
@@ -308,7 +308,7 @@ switch ($submit)
// Do we need to recache the moderator lists? We do if the mode
// was mod or auth_settings['mod'] is a non-zero size array
- if ($mode == 'mod' || sizeof($auth_settings['mod']))
+ if ($mode == 'mod' || (isset($auth_settings['mod']) && sizeof($auth_settings['mod'])))
{
cache_moderators();
}
@@ -738,7 +738,7 @@ if (in_array($submit, array('add_options', 'edit_options', 'presetsave', 'preset
// Grab the list of options ... if we're in deps mode we want all options,
// else we skip the master options
- $sql_founder = ($user->data['user_founder']) ? ' AND founder_only <> 1' : '';
+ $sql_founder = ($user->data['user_type'] == USER_FOUNDER) ? ' AND founder_only <> 1' : '';
$sql_limit_option = ($mode == 'deps') ? '' : "AND auth_option <> '" . $sql_option_mode . "_'";
$sql = "SELECT auth_option_id, auth_option
FROM " . ACL_OPTIONS_TABLE . "
@@ -760,6 +760,7 @@ if (in_array($submit, array('add_options', 'edit_options', 'presetsave', 'preset
// Now we'll build a list of preset options ...
$preset_options = $preset_js = $preset_update_options = '';
$holding = array();
+ $holding['allow'] = $holding['deny'] = $holding['inherit'] = '';
// Do we have a parent forum? If so offer option to inherit from that
if ($forum_data['parent_id'] != 0)
@@ -830,7 +831,7 @@ if (in_array($submit, array('add_options', 'edit_options', 'presetsave', 'preset
}
$preset_js .= "\tpresets['preset_" . $row['preset_id'] . "'] = new Array();" . "\n";
- $preset_js .= "\tpresets['preset_" . $row['preset_id'] . "'] = new preset_obj('" . $holding['yes'] . "', '" . $holding['no'] . "', '" . $holding['unset'] . "');\n";
+ $preset_js .= "\tpresets['preset_" . $row['preset_id'] . "'] = new preset_obj('" . $holding['allow'] . "', '" . $holding['deny'] . "', '" . $holding['inherit'] . "');\n";
}
while ($row = $db->sql_fetchrow($result));
}
@@ -841,7 +842,7 @@ if (in_array($submit, array('add_options', 'edit_options', 'presetsave', 'preset
// If we aren't looking @ deps then we try and grab existing sessions for
// the given forum and user/group
- if (empty($auth_settings[$which_mode]))
+ if (!is_array($auth_settings) || empty($auth_settings[$which_mode]))
{
if ($which_mode == $mode)
{
@@ -1141,7 +1142,8 @@ if (in_array($submit, array('add_options', 'edit_options', 'presetsave', 'preset
</tr>
<?php
- for($i = 0; $i < sizeof($auth_options); $i++)
+ $row_class = 'row2';
+ for ($i = 0; $i < sizeof($auth_options); $i++)
{
$row_class = ($row_class == 'row1') ? 'row2' : 'row1';
@@ -1317,7 +1319,7 @@ adm_page_footer();
//
function update_foes()
{
- global $db;
+ global $db, $auth;
$perms = array();
foreach ($auth->acl_get_list(false, array('a_', 'm_'), false) as $forum_id => $forum_ary)
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php
index 194d8bf979..c1a5004ac1 100644
--- a/phpBB/adm/index.php
+++ b/phpBB/adm/index.php
@@ -130,7 +130,7 @@ else if ($pane == 'left')
elseif ($pane == 'right')
{
$action = request_var('action', '');
- $mark = implode(', ', request_var('mark', 0));
+ $mark = (isset($_REQUEST['mark'])) ? implode(', ', request_var('mark', 0)) : '';
if ($mark)
{
diff --git a/phpBB/adm/pagestart.php b/phpBB/adm/pagestart.php
index 716d07563f..4621fa67a2 100644
--- a/phpBB/adm/pagestart.php
+++ b/phpBB/adm/pagestart.php
@@ -149,9 +149,9 @@ function adm_page_footer($copyright_html = true)
exit;
}
-function adm_page_message($title, $message, $show_header = false)
+function adm_page_message($title, $message, $show_header = false, $show_prev_info = true)
{
- global $phpEx, $SID, $user;
+ global $phpEx, $SID, $user, $_SERVER, $_ENV;
if ($show_header)
{
@@ -169,6 +169,7 @@ function adm_page_message($title, $message, $show_header = false)
}
+ $page = (!empty($_SERVER['REQUEST_URI'])) ? $_SERVER['REQUEST_URI'] : $_ENV['REQUEST_URI'];
?>
<br /><br />
@@ -178,7 +179,14 @@ function adm_page_message($title, $message, $show_header = false)
<th><?php echo $title; ?></th>
</tr>
<tr>
- <td class="row1" align="center"><?php echo $message; ?></td>
+ <td class="row1" align="center"><?php echo $message; ?>
+<?php
+ if ($page && $show_prev_info)
+ {
+ echo '<br /><br />';
+ echo sprintf($user->lang['RETURN_PAGE'], '<a href="' . $page . '">', '</a>');
+ }
+?> </td>
</tr>
</table>