From 5d7276af5a03739eb012bbb82eb1499af730aa3a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 10 Feb 2007 12:14:24 +0000 Subject: [PATCH] some 2.0.x fixes for some annoying bugs and some not so annoying ones. git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@6981 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/admin/admin_forums.php | 2 +- phpBB/admin/admin_users.php | 26 ++----- phpBB/docs/CHANGELOG.html | 68 +++++++++++-------- phpBB/groupcp.php | 2 +- phpBB/includes/functions_admin.php | 4 +- phpBB/language/lang_english/lang_admin.php | 4 +- .../subSilver/admin/styles_edit_body.tpl | 62 ++++++++--------- phpBB/templates/subSilver/posting_body.tpl | 4 +- 8 files changed, 84 insertions(+), 88 deletions(-) diff --git a/phpBB/admin/admin_forums.php b/phpBB/admin/admin_forums.php index 58d99750b9..bcaf989697 100644 --- a/phpBB/admin/admin_forums.php +++ b/phpBB/admin/admin_forums.php @@ -626,7 +626,7 @@ if( !empty($mode) ) $vote_ids = ''; do { - $vote_ids = (($vote_ids != '') ? ', ' : '') . $row['vote_id']; + $vote_ids .= (($vote_ids != '') ? ', ' : '') . $row['vote_id']; } while ($row = $db->sql_fetchrow($result)); diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php index 247b362fe8..cdd950ec4d 100644 --- a/phpBB/admin/admin_users.php +++ b/phpBB/admin/admin_users.php @@ -109,30 +109,12 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username']) message_die(GENERAL_ERROR, 'Could not update votes for this user', '', __LINE__, __FILE__, $sql); } - $sql = "SELECT group_id - FROM " . GROUPS_TABLE . " + $sql = "UPDATE " . GROUPS_TABLE . " + SET group_moderator = " . $userdata['user_id'] . " WHERE group_moderator = $user_id"; - if( !($result = $db->sql_query($sql)) ) + if( !$db->sql_query($sql) ) { - message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql); - } - - while ( $row_group = $db->sql_fetchrow($result) ) - { - $group_moderator[] = $row_group['group_id']; - } - - if ( count($group_moderator) ) - { - $update_moderator_id = implode(', ', $group_moderator); - - $sql = "UPDATE " . GROUPS_TABLE . " - SET group_moderator = " . $userdata['user_id'] . " - WHERE group_moderator IN ($update_moderator_id)"; - if( !$db->sql_query($sql) ) - { - message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql); - } + message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . USERS_TABLE . " diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index dd950f797b..428d8c6515 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -32,6 +32,7 @@ p,ul,td {font-size:10pt;}
  1. Changelog
    1. +
    2. Changes since 2.0.22
    3. Changes since 2.0.21
    4. Changes since 2.0.20
    5. Changes since 2.0.19
    6. @@ -67,7 +68,20 @@ p,ul,td {font-size:10pt;}

      This is a non-exhaustive (but still near complete) changelog for phpBB 2.0.x including beta and release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.

      -

      l.i. Changes since 2.0.21

      +

      l.i. Changes since 2.0.22

      + +
        +
      • [Fix] Correctly re-assign group moderator on user deletion (Bug #280)
      • +
      • [Fix] Deleting a forum with multiple polls included (Bug #6740)
      • +
      • [Fix] Fixed postgresql query for obtaining group moderator in groupcp.php (Bug #6550)
      • +
      • [Fix] Selected field on first entry by default for font size within posting_body.tpl (Bug #7124)
      • +
      • [Fix] Adjusted maxlength parameters in admin/styles_edit_body.tpl (Bug #81)
      • +
      • [Fix] Fixed html output in make_forum_select if no forums present (Bug #436)
      • + +
      • [Fix] Fixed spelling error(s) in lang_admin.php (Bug #7172, #6978)
      • +
      + +

      l.ii. Changes since 2.0.21

      • [Fix] Check for user's existence prior to showing email form
      • @@ -83,7 +97,7 @@ p,ul,td {font-size:10pt;}
      • [Sec] Added session checks to various forms - kellanved
      -

      l.ii. Changes since 2.0.20

      +

      l.iii. Changes since 2.0.20

      • [Fix] Changes to random number generator code to explicitly truncate the length of the string
      • @@ -100,7 +114,7 @@ p,ul,td {font-size:10pt;}
      -

      l.iii. Changes since 2.0.19

      +

      l.iv. Changes since 2.0.19

      • [Fix] Prevent login attempts from incrementing for inactive users
      • @@ -133,7 +147,7 @@ p,ul,td {font-size:10pt;}
      -

      l.iv. Changes since 2.0.18

      +

      l.v. Changes since 2.0.18

      • [Fix] corrected index on session keys table under MS SQL
      • @@ -152,7 +166,7 @@ p,ul,td {font-size:10pt;}
      -

      l.v. Changes since 2.0.17

      +

      l.vi. Changes since 2.0.17

      • [Fix] incorrect handling of password resets if admin activation is enabled (Bug #88)
      • @@ -200,7 +214,7 @@ p,ul,td {font-size:10pt;}
      • [Sec] compare imagetype on avatar uploading to match the file extension from uploaded file
      -

      l.vi. Changes since 2.0.16

      +

      l.vii. Changes since 2.0.16

      • Added extra checks to the deletion code in privmsg.php - reported by party_fan
      • @@ -216,7 +230,7 @@ p,ul,td {font-size:10pt;}
      • Correctly set username on posts when deleting a user from the admin panel
      -

      l.vii. Changes since 2.0.15

      +

      l.viii. Changes since 2.0.15

      • Fixed critical issue with highlighting - Discovered and fix provided by Ron van Daal
      • @@ -228,7 +242,7 @@ p,ul,td {font-size:10pt;}
      • Fixed bug in admin re-authentication redirect for servers not having index.php as one of their default files set
      -

      l.viii. Changes since 2.0.14

      +

      l.ix. Changes since 2.0.14

      • Fixed moderator status removal in groupcp.php
      • @@ -250,7 +264,7 @@ p,ul,td {font-size:10pt;}
      • Empty url/img bbcodes no longer get parsed
      -

      l.ix. Changes since 2.0.13

      +

      l.x. Changes since 2.0.13

      • Hardened author and keyword search a bit to not allow very server intensive searches
      • @@ -267,7 +281,7 @@ p,ul,td {font-size:10pt;}
      • Fixed case-sensitivity issues in postgres7.php - R45
      -

      l.x. Changes since 2.0.12

      +

      l.xi. Changes since 2.0.12

      • Ommitted preg_replace warning in viewtopic due to improper working of preg_quote in PHP - originally reported by matrix_killer, fix submitted by another party
      • @@ -275,7 +289,7 @@ p,ul,td {font-size:10pt;}
      • Minimum requirements raised to PHP 4.0.3 or above due to fixing vulnerability issues breaking PHP3 compatibility.
      -

      l.xi. Changes since 2.0.11

      +

      l.xii. Changes since 2.0.11

      • Added confirm table to admin_db_utilities.php
      • @@ -290,7 +304,7 @@ p,ul,td {font-size:10pt;}
      • Fixed path disclosure bug in viewtopic.php caused by a PHP 4.3.10 bug - matrix_killer
      -

      l.xii. Changes since 2.0.10

      +

      l.xiii. Changes since 2.0.10

      • Fixed vulnerability in highlighting code (very high severity, please update your installation as soon as possible)
      • @@ -301,7 +315,7 @@ p,ul,td {font-size:10pt;}
      • Added visual confirmation mod to code base
      -

      l.xiii. Changes since 2.0.9

      +

      l.xiv. Changes since 2.0.9

      • Fixed deleting of styles in admin_styles.php
      • @@ -314,7 +328,7 @@ p,ul,td {font-size:10pt;}
      • Fixed visual confirmation code. The image was not created due to a wrong regular expression.
      -

      l.xiv. Changes since 2.0.8

      +

      l.xv. Changes since 2.0.8

      • Fixed one vulnerability in admin_board.php - Xore
      • @@ -333,7 +347,7 @@ p,ul,td {font-size:10pt;}
      • Fixed problem with SID not delivered to next page in groupcp.php
      -

      l.xv. Changes since 2.0.7

      +

      l.xvi. Changes since 2.0.7

      • Fixed several vulnerabilities in admin pages
      • @@ -345,7 +359,7 @@ p,ul,td {font-size:10pt;}
      • Fixed sql injection vulnerability in privmsg - 2.0.8a
      -

      1.xvi. Changes since 2.0.6

      +

      1.xvii. Changes since 2.0.6

      • Fixed several vulnerabilities in modcp - Robert Lavierck
      • @@ -359,7 +373,7 @@ p,ul,td {font-size:10pt;}
      • Fixed potential vulnerability in avatar gallery
      -

      1.xvii. Changes since 2.0.5

      +

      1.xviii. Changes since 2.0.5

      • Fixed various email issues
      • @@ -375,7 +389,7 @@ p,ul,td {font-size:10pt;}
      • Fixed sql injection with reset date format field in profile - tendor
      -

      1.xviii. Changes since 2.0.4

      +

      1.xix. Changes since 2.0.4

      • Removed user facing session_id checks
      • @@ -447,7 +461,7 @@ p,ul,td {font-size:10pt;}
      • Default English support for visual confirmation - translators are encouraged to support this
      -

      1.xix. Changes since 2.0.3

      +

      1.xx. Changes since 2.0.3

      • Fixed cross-browser scripting issue with highlight param
      • @@ -574,7 +588,7 @@ p,ul,td {font-size:10pt;}
      • Fixed potential SQL vulnerability with marking of private messages - Ulf Harnhammar
      -

      1.xx. Changes since 2.0.2

      +

      1.xxi. Changes since 2.0.2

      • Fixed potential cross-site scripting vulnerability with avatars - Showscout
      • @@ -583,7 +597,7 @@ p,ul,td {font-size:10pt;}
      • Fixed (hopefully) issue with MS Access and multiple pages
      -

      1.xxi. Changes since 2.0.1

      +

      1.xxii. Changes since 2.0.1

      • Fixed missing "username" lang variable in user admin template
      • @@ -618,7 +632,7 @@ p,ul,td {font-size:10pt;}
      • Fix emailer to allow sending emails with language-specific character sets
      -

      1.xxii. Changes since 2.0.0

      +

      1.xxiii. Changes since 2.0.0

      • Fixed delete image bug for normal users
      • @@ -675,7 +689,7 @@ p,ul,td {font-size:10pt;}
      • Added database closure to admin frameset page
      -

      1.xxiii. Changes since RC-4

      +

      1.xxiv. Changes since RC-4

      • Fixed improper report of general error when posting messages containing errors
      • @@ -705,7 +719,7 @@ p,ul,td {font-size:10pt;}
      • Fixed various remaining usergroup display issues
      -

      1.xxiv. Changes since RC-3

      +

      1.xxv. Changes since RC-3

      • Addressed serious security issue with included files
      • @@ -736,7 +750,7 @@ p,ul,td {font-size:10pt;}
      • Fix (hopefully) remaining ICQ overlay issue with view profile in subSilver
      -

      1.xxv. Changes since RC-2

      +

      1.xxvi. Changes since RC-2

      • Fixed infamous install parse error
      • @@ -769,7 +783,7 @@ p,ul,td {font-size:10pt;}
      • Hidden usergroups are now completely hidden from view
      -

      1.xxvi. Changes since RC-1

      +

      1.xxvii. Changes since RC-1

      • Fixed numerous PostgreSQL related issues
      • @@ -789,7 +803,7 @@ p,ul,td {font-size:10pt;}
      • Various other fixes and updates
      -

      1.xxvii. Changes since RC-1 (pre)

      +

      1.xxviii. Changes since RC-1 (pre)

      • Upgrade script completed for initial fully functional release
      • diff --git a/phpBB/groupcp.php b/phpBB/groupcp.php index cdf62749be..f675c79f1e 100644 --- a/phpBB/groupcp.php +++ b/phpBB/groupcp.php @@ -420,7 +420,7 @@ else if ( $group_id ) WHERE aa.group_id = g.group_id ) ) - ORDER BY aa.auth_mod DESC"; + ORDER BY auth_mod DESC"; break; case 'oracle': diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index c7f6d5474c..37f6fef6c4 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -26,7 +26,7 @@ // function make_forum_select($box_name, $ignore_forum = false, $select_forum = '') { - global $db, $userdata; + global $db, $userdata, $lang; $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata); @@ -49,7 +49,7 @@ function make_forum_select($box_name, $ignore_forum = false, $select_forum = '') } } - $forum_list = ( $forum_list == '' ) ? '' : ''; + $forum_list = ( $forum_list == '' ) ? $lang['No_forums'] : ''; return $forum_list; } diff --git a/phpBB/language/lang_english/lang_admin.php b/phpBB/language/lang_english/lang_admin.php index 264f69f943..ed915ca8ee 100644 --- a/phpBB/language/lang_english/lang_admin.php +++ b/phpBB/language/lang_english/lang_admin.php @@ -216,7 +216,7 @@ $lang['Ban_IP_explain'] = 'To specify several different IP addresses or hostname $lang['Ban_email'] = 'Ban one or more email addresses'; $lang['Ban_email_explain'] = 'To specify more than one email address, separate them with commas. To specify a wildcard username, use * like *@hotmail.com'; -$lang['Unban_username'] = 'Un-ban one more specific users'; +$lang['Unban_username'] = 'Un-ban one or more specific users'; $lang['Unban_username_explain'] = 'You can unban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser'; $lang['Unban_IP'] = 'Un-ban one or more IP addresses'; @@ -574,7 +574,7 @@ $lang['Disallow_explain'] = 'Here you can control usernames which will not be al $lang['Delete_disallow'] = 'Delete'; $lang['Delete_disallow_title'] = 'Remove a Disallowed Username'; -$lang['Delete_disallow_explain'] = 'You can remove a disallowed username by selecting the username from this list and clicking submit'; +$lang['Delete_disallow_explain'] = 'You can remove a disallowed username by selecting the username from this list and clicking delete'; $lang['Add_disallow'] = 'Add'; $lang['Add_disallow_title'] = 'Add a disallowed username'; diff --git a/phpBB/templates/subSilver/admin/styles_edit_body.tpl b/phpBB/templates/subSilver/admin/styles_edit_body.tpl index 939f6439ac..71e9e442c5 100755 --- a/phpBB/templates/subSilver/admin/styles_edit_body.tpl +++ b/phpBB/templates/subSilver/admin/styles_edit_body.tpl @@ -9,7 +9,7 @@ {L_THEME_NAME}: - + {L_TEMPLATE}: @@ -64,176 +64,176 @@ {L_TR_COLOR1}: - + {L_TR_COLOR2}: - + {L_TR_COLOR3}: - + {L_TR_CLASS1}: - + {L_TR_CLASS2}: - + {L_TR_CLASS3}: - + {L_TH_COLOR1}: - + {L_TH_COLOR2}: - + {L_TH_COLOR3}: - + {L_TH_CLASS1}: - + {L_TH_CLASS2}: - + {L_TH_CLASS3}: - + {L_TD_COLOR1}: - + {L_TD_COLOR2}: - + {L_TD_COLOR3}: - + {L_TD_CLASS1}: - + {L_TD_CLASS2}: - + {L_TD_CLASS3}: - + {L_FONTFACE_1}: - + {L_FONTFACE_2}: - + {L_FONTFACE_3}: - + {L_FONTSIZE_1}: - + {L_FONTSIZE_2}: - + {L_FONTSIZE_3}: - + {L_FONTCOLOR_1}: - + {L_FONTCOLOR_2}: - + {L_FONTCOLOR_3}: - + {L_SPAN_CLASS_1}: - + {L_SPAN_CLASS_2}: - + {L_SPAN_CLASS_3}: - + diff --git a/phpBB/templates/subSilver/posting_body.tpl b/phpBB/templates/subSilver/posting_body.tpl index 94853d4bd7..a85da8f3e9 100644 --- a/phpBB/templates/subSilver/posting_body.tpl +++ b/phpBB/templates/subSilver/posting_body.tpl @@ -372,11 +372,11 @@ function storeCaret(textEl) { -  {L_FONT_SIZE}:  {L_FONT_SIZE}: