diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_icons.php | 9 |
2 files changed, 6 insertions, 4 deletions
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 { <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> 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 = '<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'); |