diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 7f03f6032a..cff1ea2af4 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -197,6 +197,7 @@ p a {
  • [Fix] Properly cache template files that were stored in the database (Bug #12675)
  • [Fix] Do not count the deletion of an unapproved topic as a decrease in normally viewable posts (Bug #13167)
  • [Fix] Allow column_exists() to return true if the column exists but no data is in the table
  • +
  • [Fix] Allow setting the smiley order via the select. Also allow to add smileys at the top. (Bug #13199)
  • diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index ebf058850f..f37448032e 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -189,6 +189,7 @@ class acp_icons $db->sql_freeresult($result); $order_list = '' . $order_list; + $add_order_list = '' . $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');