aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2006-08-10 13:33:06 +0000
committerNils Adermann <naderman@naderman.de>2006-08-10 13:33:06 +0000
commit83e6dcb1ce086c2d01060ce37c2a921c80632cb0 (patch)
tree3584018174c26f846e9563392779c75694a55dc9 /phpBB/includes/acp
parent53085a4c78b3004d1e4adf8e06b0617f7f8a288b (diff)
downloadforums-83e6dcb1ce086c2d01060ce37c2a921c80632cb0.tar
forums-83e6dcb1ce086c2d01060ce37c2a921c80632cb0.tar.gz
forums-83e6dcb1ce086c2d01060ce37c2a921c80632cb0.tar.bz2
forums-83e6dcb1ce086c2d01060ce37c2a921c80632cb0.tar.xz
forums-83e6dcb1ce086c2d01060ce37c2a921c80632cb0.zip
- removed a useless line [Bug #3656]
- do not reuse session ids [Bug #3626] - Bug #3684 - added refresh imageset option git-svn-id: file:///svn/phpbb/trunk@6257 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acp')
-rw-r--r--phpBB/includes/acp/acp_search.php4
-rw-r--r--phpBB/includes/acp/acp_styles.php66
2 files changed, 67 insertions, 3 deletions
diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php
index 5eb180398b..b7c37772ed 100644
--- a/phpBB/includes/acp/acp_search.php
+++ b/phpBB/includes/acp/acp_search.php
@@ -274,7 +274,7 @@ class acp_search
$result = $db->sql_query($sql);
$ids = $posters = array();
- while (false !== ($row = $db->sql_fetchrow($result)))
+ while ($row = $db->sql_fetchrow($result))
{
$ids[] = $row['post_id'];
$posters[] = $row['poster_id'];
@@ -325,7 +325,7 @@ class acp_search
AND post_id < ' . (int) ($post_counter + $this->batch_size);
$result = $db->sql_query($sql);
- while (false !== ($row = $db->sql_fetchrow($result)))
+ while ($row = $db->sql_fetchrow($result))
{
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['post_encoding'], $row['poster_id'], $row['forum_id']);
}
diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php
index 56c8369176..00789fceec 100644
--- a/phpBB/includes/acp/acp_styles.php
+++ b/phpBB/includes/acp/acp_styles.php
@@ -335,6 +335,7 @@ pagination_sep = \'{PAGINATION_SEP}\'
$cache->destroy('sql', STYLES_THEME_TABLE);
+ add_log('admin', 'LOG_THEME_REFRESHED', $theme_row['theme_name']);
trigger_error($user->lang['THEME_REFRESHED'] . adm_back_link($this->u_action));
}
}
@@ -354,7 +355,70 @@ pagination_sep = \'{PAGINATION_SEP}\'
break;
case 'imageset':
- $this->frontend('imageset', array('edit', 'details'), array('export', 'delete'));
+
+ switch ($action)
+ {
+ case 'refresh':
+
+ $sql = 'SELECT *
+ FROM ' . STYLES_IMAGESET_TABLE . "
+ WHERE imageset_id = $style_id";
+ $result = $db->sql_query($sql);
+ $imageset_row = $db->sql_fetchrow($result);
+ $db->sql_freeresult($result);
+
+ if (!$imageset_row)
+ {
+ trigger_error($user->lang['NO_IMAGESET'] . adm_back_link($this->u_action));
+ }
+
+ if (confirm_box(true))
+ {
+ $sql_ary = array();
+
+ $cfg_data = parse_cfg_file("{$phpbb_root_path}styles/{$imageset_row['imageset_path']}/imageset/imageset.cfg");
+
+ $imageset_definitions = array();
+ foreach ($this->imageset_keys as $topic => $key_array)
+ {
+ $imageset_definitions = array_merge($imageset_definitions, $key_array);
+ }
+
+ foreach ($cfg_data as $key => $value)
+ {
+ if (strpos($key, 'img_') === 0)
+ {
+ $key = substr($key, 4);
+ if (in_array($key, $imageset_definitions))
+ {
+ $sql_ary[$key] = str_replace('{PATH}', "styles/{$imageset_row['imageset_path']}/imageset/", trim($value));
+ }
+ }
+ }
+ unset($cfg_data);
+
+ $sql = 'UPDATE ' . STYLES_IMAGESET_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
+ WHERE imageset_id = $style_id";
+ $db->sql_query($sql);
+
+ $cache->destroy('sql', STYLES_IMAGESET_TABLE);
+
+ add_log('admin', 'LOG_IMAGESET_REFRESHED', $imageset_row['imageset_name']);
+ trigger_error($user->lang['IMAGESET_REFRESHED'] . adm_back_link($this->u_action));
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_IMAGESET_REFRESH'], build_hidden_fields(array(
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => $action,
+ 'id' => $style_id
+ )));
+ }
+ break;
+ }
+
+ $this->frontend('imageset', array('edit', 'details'), array('refresh', 'export', 'delete'));
break;
}
}