From e105aa68bbbd2a252322679902864069810fca79 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Mon, 11 Dec 2006 23:30:12 +0000 Subject: - new members of moderator groups should always become moderators [Bug #382] - proper message when replying to non-existant topics [Bug #459] - changed column type of search_array to store more ids [Bug #4058] - fixed annoyance with font-size selector [Bug #4612] git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@6749 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/groupcp.php | 9 ++++++--- phpBB/install/schemas/mysql_schema.sql | 2 +- phpBB/install/update_to_latest.php | 15 ++++++++++++++- phpBB/posting.php | 3 +-- phpBB/templates/subSilver/posting_body.tpl | 3 ++- 5 files changed, 24 insertions(+), 8 deletions(-) diff --git a/phpBB/groupcp.php b/phpBB/groupcp.php index ed10dcb3dd..f81b93dc6b 100644 --- a/phpBB/groupcp.php +++ b/phpBB/groupcp.php @@ -418,21 +418,24 @@ else if ( $group_id ) FROM " . AUTH_ACCESS_TABLE . " aa WHERE aa.group_id = g.group_id ) - )"; + ) + ORDER BY aa.auth_mod DESC"; break; case 'oracle': $sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod FROM " . GROUPS_TABLE . " g, " . AUTH_ACCESS_TABLE . " aa WHERE g.group_id = $group_id - AND aa.group_id (+) = g.group_id"; + AND aa.group_id (+) = g.group_id + ORDER BY aa.auth_mod DESC"; break; default: $sql = "SELECT g.group_moderator, g.group_type, aa.auth_mod FROM ( " . GROUPS_TABLE . " g LEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = g.group_id ) - WHERE g.group_id = $group_id"; + WHERE g.group_id = $group_id + ORDER BY aa.auth_mod DESC"; break; } if ( !($result = $db->sql_query($sql)) ) diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql index 4436df5524..3a31b1b291 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_schema.sql @@ -257,7 +257,7 @@ CREATE TABLE phpbb_search_results ( search_id int(11) UNSIGNED NOT NULL default '0', session_id char(32) NOT NULL default '', search_time int(11) DEFAULT '0' NOT NULL, - search_array text NOT NULL, + search_array mediumtext NOT NULL, PRIMARY KEY (search_id), KEY session_id (session_id) ); diff --git a/phpBB/install/update_to_latest.php b/phpBB/install/update_to_latest.php index 5e20600d7e..4b91c9455b 100644 --- a/phpBB/install/update_to_latest.php +++ b/phpBB/install/update_to_latest.php @@ -657,6 +657,19 @@ switch ($row['config_value']) break; } + break; + + case '.0.21': + + // MySQL only change + switch (SQL_LAYER) + { + case 'mysql': + case 'mysql4': + $sql[] = 'ALTER TABLE ' . SEARCH_TABLE . ' + MODIFY COLUMN search_array MEDIUMTEXT NOT NULL'; + } + break; } @@ -860,7 +873,7 @@ switch ($row['config_value']) if (preg_match("#^lang_#i", $file) && !is_file($phpbb_root_path . $dirname . "/" . $file) && !is_link($phpbb_root_path . $dirname . "/" . $file) && file_exists($phpbb_root_path . $dirname . "/" . $file . '/search_stopwords.txt')) { - $stopword_list = trim(preg_replace('#([\w\.\-_\+\'±µ-ÿ\\\]+?)[ \n\r]*?(,|$)#', '\'\1\'\2', str_replace("'", "\'", implode(', ', file($phpbb_root_path . $dirname . "/" . $file . '/search_stopwords.txt'))))); + $stopword_list = trim(preg_replace('#([\w\.\-_\+\'-\\\]+?)[ \n\r]*?(,|$)#', '\'\1\'\2', str_replace("'", "\'", implode(', ', file($phpbb_root_path . $dirname . "/" . $file . '/search_stopwords.txt'))))); $sql = "SELECT word_id FROM " . SEARCH_WORD_TABLE . " diff --git a/phpBB/posting.php b/phpBB/posting.php index 9237a7d46f..332180000d 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -222,9 +222,8 @@ switch ( $mode ) message_die(GENERAL_MESSAGE, $lang['No_valid_mode']); } -if ( $result = $db->sql_query($sql) ) +if ( ($result = $db->sql_query($sql)) && ($post_info = $db->sql_fetchrow($result)) ) { - $post_info = $db->sql_fetchrow($result); $db->sql_freeresult($result); $forum_id = $post_info['forum_id']; diff --git a/phpBB/templates/subSilver/posting_body.tpl b/phpBB/templates/subSilver/posting_body.tpl index e8700a5e7d..94853d4bd7 100644 --- a/phpBB/templates/subSilver/posting_body.tpl +++ b/phpBB/templates/subSilver/posting_body.tpl @@ -372,7 +372,8 @@ function storeCaret(textEl) { -  {L_FONT_SIZE}:  {L_FONT_SIZE}: