aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_icons.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-12-27 17:43:55 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-12-27 17:43:55 +0000
commit945afbc5fa427f6e6fa15f3e2f5c67969121b01e (patch)
tree1742cf822c3339eec48d8d54e6ce08c51316b59b /phpBB/includes/acp/acp_icons.php
parentb9da985180730252133699242ef639f91da2880e (diff)
downloadforums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.tar
forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.tar.gz
forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.tar.bz2
forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.tar.xz
forums-945afbc5fa427f6e6fa15f3e2f5c67969121b01e.zip
Unused Code inside function update_forum_data [Bug #6606]
Copy permissions protection for groups [Bug #6594] HTML issues in ACP [Bug #6580, #6578] Always send the correct encoding [related to bug #6576] Mass email fixes for first loop iteration [Bug #6570] Extension groups to be allowed in PM's and/or Posts [Bug #6558] Extension allowance checking clarified (no longer using forum id 0 for private messaging) Using request_var() array method for some variables [Bug #6556] Added confirmation for deletion of ranks/smilies/icons/word censores [Bug #6548, #6530, #6512, #6466] Only show postable forums in dropdown list for moving posts on forum deletion as well as correct re-indexing [Bug #6510, #6476, #6384] Jabber password being password field in jabber settings screen [Bug #6478] user activity language variable if viewing not own profile [Bug #6432] Show moderator group/user-name colour [Bug #6402] Log rank creation/updating/removing [Bug #6398] Update check permission changed from a_ to a_board [Bug #6392] git-svn-id: file:///svn/phpbb/trunk@6816 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp/acp_icons.php')
-rw-r--r--phpBB/includes/acp/acp_icons.php65
1 files changed, 38 insertions, 27 deletions
diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php
index f5e09582e4..bd942fe27f 100644
--- a/phpBB/includes/acp/acp_icons.php
+++ b/phpBB/includes/acp/acp_icons.php
@@ -203,14 +203,14 @@ class acp_icons
$images = (isset($_POST['image'])) ? array_keys(request_var('image', array('' => 0))) : array();
// Now really get the items
- $image_id = (isset($_POST['id'])) ? array_map('intval', $_POST['id']) : array();
- $image_order = (isset($_POST['order'])) ? array_map('intval', $_POST['order']) : array();
- $image_width = (isset($_POST['width'])) ? array_map('intval', $_POST['width']) : array();
- $image_height = (isset($_POST['height'])) ? array_map('intval', $_POST['height']) : array();
- $image_add = (isset($_POST['add_img'])) ? array_map('intval', $_POST['add_img']) : array();
+ $image_id = (isset($_POST['id'])) ? request_var('id', array(0)) : array();
+ $image_order = (isset($_POST['order'])) ? request_var('order', array(0)) : array();
+ $image_width = (isset($_POST['width'])) ? request_var('width', array(0)) : array();
+ $image_height = (isset($_POST['height'])) ? request_var('height', array(0)) : array();
+ $image_add = (isset($_POST['add_img'])) ? request_var('add_img', array(0)) : array();
$image_emotion = request_var('emotion', array('' => ''));
$image_code = request_var('code', array('' => ''));
- $image_display_on_posting = (isset($_POST['display_on_posting'])) ? array_map('intval', $_POST['display_on_posting']) : array();
+ $image_display_on_posting = (isset($_POST['display_on_posting'])) ? request_var('display_on_posting', array(0)) : array();
foreach ($images as $image)
{
@@ -530,32 +530,43 @@ class acp_icons
case 'delete':
- $sql = "DELETE FROM $table
- WHERE {$fields}_id = $icon_id";
- $db->sql_query($sql);
-
- switch ($mode)
+ if (confirm_box(true))
{
- case 'smilies':
- break;
+ $sql = "DELETE FROM $table
+ WHERE {$fields}_id = $icon_id";
+ $db->sql_query($sql);
- case 'icons':
- // Reset appropriate icon_ids
- $db->sql_query('UPDATE ' . TOPICS_TABLE . "
- SET icon_id = 0
- WHERE icon_id = $icon_id");
+ switch ($mode)
+ {
+ case 'smilies':
+ break;
+
+ case 'icons':
+ // Reset appropriate icon_ids
+ $db->sql_query('UPDATE ' . TOPICS_TABLE . "
+ SET icon_id = 0
+ WHERE icon_id = $icon_id");
+
+ $db->sql_query('UPDATE ' . POSTS_TABLE . "
+ SET icon_id = 0
+ WHERE icon_id = $icon_id");
+ break;
+ }
- $db->sql_query('UPDATE ' . POSTS_TABLE . "
- SET icon_id = 0
- WHERE icon_id = $icon_id");
+ $notice = $user->lang[$lang . '_DELETED'];
- break;
+ $cache->destroy('icons');
+ $cache->destroy('sql', $table);
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'id' => $icon_id,
+ 'action' => 'delete',
+ )));
}
-
- $notice = $user->lang[$lang . '_DELETED'];
-
- $cache->destroy('icons');
- $cache->destroy('sql', $table);
break;