1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-23 19:45:10 +01:00
git-svn-id: file:///svn/phpbb/trunk@7859 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2007-07-10 11:47:48 +00:00
parent 4fa1a7c827
commit f538d70301
2 changed files with 6 additions and 4 deletions

View File

@ -197,6 +197,7 @@ p a {
<li>[Fix] Properly cache template files that were stored in the database (Bug #12675)</li>
<li>[Fix] Do not count the deletion of an unapproved topic as a decrease in normally viewable posts (Bug #13167)</li>
<li>[Fix] Allow column_exists() to return true if the column exists but no data is in the table</li>
<li>[Fix] Allow setting the smiley order via the select. Also allow to add smileys at the top. (Bug #13199)</li>
</ul>

View File

@ -189,6 +189,7 @@ class acp_icons
$db->sql_freeresult($result);
$order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['FIRST'] . '</option>' . $order_list;
$add_order_list = '<option value="1">' . $user->lang['FIRST'] . '</option>' . $add_order_list;
if ($action == 'add')
{
@ -336,7 +337,7 @@ class acp_icons
}
// Image_order holds the 'new' order value
if (!empty($image_order[$image]) && !empty($$image_id[$image]))
if (!empty($image_order[$image]))
{
$img_sql = array_merge($img_sql, array(
$fields . '_order' => $image_order[$image])
@ -363,19 +364,19 @@ class acp_icons
}
}
if ($action == 'modify')
if ($action == 'modify' && !empty($image_id[$image]))
{
$sql = "UPDATE $table
SET " . $db->sql_build_array('UPDATE', $img_sql) . "
WHERE {$fields}_id = " . $image_id[$image];
$db->sql_query($sql);
}
else
else if ($action !== 'modify')
{
$sql = "INSERT INTO $table " . $db->sql_build_array('INSERT', $img_sql);
$db->sql_query($sql);
}
}
}
}
$cache->destroy('_icons');