From 3899e337e6c089b8399c7d3f8609bc467c64ab74 Mon Sep 17 00:00:00 2001 From: David M Date: Tue, 22 May 2007 21:32:26 +0000 Subject: [PATCH] #11255 #11259 #11291 #11335 #11457 #11473 #11475 #11511 #11523 #11527 git-svn-id: file:///svn/phpbb/trunk@7663 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_styles.html | 6 ++--- phpBB/adm/style/permission_trace.html | 4 +-- phpBB/docs/CHANGELOG.html | 10 ++++++- phpBB/includes/acp/acp_bbcodes.php | 7 +++++ phpBB/includes/acp/acp_styles.php | 27 ++++++++++--------- phpBB/includes/auth.php | 2 +- phpBB/includes/db/oracle.php | 3 ++- phpBB/includes/mcp/mcp_main.php | 4 +-- phpBB/language/en/acp/posting.php | 1 + phpBB/language/en/mcp.php | 2 +- phpBB/language/en/posting.php | 2 +- phpBB/mcp.php | 9 ++++++- .../prosilver/template/login_forum.html | 2 +- .../styles/prosilver/template/mcp_queue.html | 2 +- .../prosilver/template/memberlist_im.html | 1 + .../subsilver2/template/login_forum.html | 2 +- .../styles/subsilver2/template/mcp_queue.html | 2 +- 17 files changed, 56 insertions(+), 30 deletions(-) diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 2b067cb292..26d0a6af4a 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -65,8 +65,8 @@ {L_SELECT_IMAGE} {L_SELECT_IMAGE}:   @@ -80,7 +80,7 @@
-
+
diff --git a/phpBB/adm/style/permission_trace.html b/phpBB/adm/style/permission_trace.html index 96e18c396a..7f7079cc8f 100644 --- a/phpBB/adm/style/permission_trace.html +++ b/phpBB/adm/style/permission_trace.html @@ -46,6 +46,6 @@
- - + + diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 28e8cd63db..c56fa29653 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -185,7 +185,15 @@ p a {
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index ee1decea1c..2fdbdbdbd1 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -383,6 +383,13 @@ class acp_bbcodes // Lowercase tags $bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match); + + if (!preg_match('/^[a-zA-Z0-9_-]+=?$/', $bbcode_tag)) + { + global $user; + trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); + } + $fp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_match); $fp_replace = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $fp_replace); $sp_match = preg_replace('#\[/?' . $bbcode_tag . '#ie', "strtolower('\$0')", $sp_match); diff --git a/phpBB/includes/acp/acp_styles.php b/phpBB/includes/acp/acp_styles.php index b876cc2d65..582b25f5c5 100644 --- a/phpBB/includes/acp/acp_styles.php +++ b/phpBB/includes/acp/acp_styles.php @@ -1355,19 +1355,17 @@ parse_css_file = {PARSE_CSS_FILE} { $dp2 = @opendir("$dir/$imgnamelang"); - if (!$dp2) + if ($dp2) { - continue; - } - - while (($file2 = readdir($dp2)) !== false) - { - if (preg_match('#\.(?:gif|jpg|png)$#', $file2)) + while (($file2 = readdir($dp2)) !== false) { - $imagesetlist['lang'][] = "$imgnamelang/$file2"; + if (preg_match('#\.(?:gif|jpg|png)$#', $file2)) + { + $imagesetlist['lang'][] = "$imgnamelang/$file2"; + } } + closedir($dp2); } - closedir($dp2); } closedir($dp); } @@ -1408,7 +1406,8 @@ parse_css_file = {PARSE_CSS_FILE} sort($imagesetlist['lang']); sort($imagesetlist['nolang']); - $imagesetlist_options = ''; + $image_found = false; + $img_val = ''; foreach ($imagesetlist as $type => $img_ary) { if ($type !== 'lang' || $sql_extra) @@ -1424,7 +1423,8 @@ parse_css_file = {PARSE_CSS_FILE} $selected = (!empty($imgname) && strpos($image_filename, $imgtext) !== false); if ($selected) { - $template->assign_var('IMAGE_SELECT', true); + $image_found = true; + $img_val = htmlspecialchars($img); } $template->assign_block_vars('imagesetlist.images', array( 'SELECTED' => $selected, @@ -1442,13 +1442,14 @@ parse_css_file = {PARSE_CSS_FILE} 'L_TITLE' => $user->lang[$this->page_title], 'L_EXPLAIN' => $user->lang[$this->page_title . '_EXPLAIN'], 'IMAGE_OPTIONS' => $img_options, - 'IMAGELIST_OPTIONS' => $imagesetlist_options, 'IMAGE_SIZE' => $imgsize_bool, 'IMAGE_REQUEST' => $image_request, 'U_ACTION' => $this->u_action . "&action=edit&id=$imageset_id", 'U_BACK' => $this->u_action, 'NAME' => $imageset_name, - 'ERROR' => !$valid_name + 'ERROR' => !$valid_name, + 'IMG_SRC' => ($image_found) ? '../styles/' . $imageset_path . '/imageset/' . $img_val : 'images/no_image.png', + 'IMAGE_SELECT' => $image_found )); } diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 3b05652a87..0f0349a6f3 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -127,7 +127,7 @@ class auth } } } - + return !$negate; // Founder always has all global options set to true... return ($negate) ? !$this->cache[$f][$opt] : $this->cache[$f][$opt]; } diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php index 9c0491d8c8..1d2a097e04 100644 --- a/phpBB/includes/db/oracle.php +++ b/phpBB/includes/db/oracle.php @@ -110,10 +110,11 @@ class dbal_oracle extends dbal $in_transaction = true; } + $array = array(); + // We overcome Oracle's 4000 char limit by binding vars if (strlen($query) > 4000) { - $array = array(); if (preg_match('/^(INSERT INTO[^(]+)\\(([^()]+)\\) VALUES[^(]+\\((.*?)\\)$/s', $query, $regs)) { diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 687900e646..758c0b22c2 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -1146,7 +1146,7 @@ function mcp_fork_topic($topic_ids) } // Sync new topics, parent forums and board stats - sync('topic', 'topic_id', $new_topic_id_list, true); + sync('topic', 'topic_id', $new_topic_id_list); $sync_sql = array(); @@ -1162,7 +1162,7 @@ function mcp_fork_topic($topic_ids) $db->sql_query($sql); } - sync('forum', 'forum_id', $to_forum_id, true); + sync('forum', 'forum_id', $to_forum_id); set_config('num_topics', $config['num_topics'] + sizeof($new_topic_id_list), true); set_config('num_posts', $config['num_posts'] + $total_posts, true); diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index c543c5f246..ebed47b56d 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -43,6 +43,7 @@ $lang = array_merge($lang, array( 'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouse over text of the BBCode.', 'BBCODE_HELPLINE_TEXT' => 'Help line text', 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected already exists.', + 'BBCODE_INVALID' => 'Your BBCode is constructed in an invalid form.', 'BBCODE_OPEN_ENDED_TAG' => 'Your custom BBCode must contain both an opening and a closing tag.', 'BBCODE_TAG' => 'Tag', 'BBCODE_TAG_TOO_LONG' => 'The tag name you selected is too long.', diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 89b57d5d65..33e626f452 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -222,7 +222,7 @@ $lang = array_merge($lang, array( 'NO_REPORT_SELECTED' => 'You must select at least one report to perform this action.', 'NO_TOPIC_ICON' => 'None', 'NO_TOPIC_SELECTED' => 'You must select at least one topic to perform this action.', - 'NO_TOPICS_QUEUE' => 'No topics', + 'NO_TOPICS_QUEUE' => 'There are no topics waiting for approval.', 'ONLY_TOPIC' => 'Only topic "%s"', 'OTHER_USERS' => 'Other users posting from this IP', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index 480a95c392..edba14a434 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -49,7 +49,7 @@ $lang = array_merge($lang, array( 'BBCODE_IS_ON' => '%sBBCode%s is ON', 'BBCODE_I_HELP' => 'Italic text: [i]text[/i]', 'BBCODE_L_HELP' => 'List: [list]text[/list]', - 'BBCODE_LISTITEM_HELP' => 'List item: [*]text[/*]', + 'BBCODE_LISTITEM_HELP' => 'List item: [*]text[/*]', 'BBCODE_O_HELP' => 'Ordered list: [list=]text[/list]', 'BBCODE_P_HELP' => 'Insert image: [img]http://image_url[/img]', 'BBCODE_Q_HELP' => 'Quote text: [quote]text[/quote]', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index a8042c5b57..8874ef7f33 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -267,7 +267,9 @@ function _module_warn_url($mode, &$module_row) { if ($mode == 'front' || $mode == 'list') { - return ''; + global $forum_id; + + return ($forum_id) ? "&f=$forum_id" : ''; } if ($mode == 'warn_post') @@ -307,6 +309,11 @@ function _module_queue_url($mode, &$module_row) return extra_url(); } +function _module_reports_url($mode, &$module_row) +{ + return extra_url(); +} + function extra_url() { global $forum_id, $topic_id, $post_id, $user_id; diff --git a/phpBB/styles/prosilver/template/login_forum.html b/phpBB/styles/prosilver/template/login_forum.html index f47586f469..46544339f5 100644 --- a/phpBB/styles/prosilver/template/login_forum.html +++ b/phpBB/styles/prosilver/template/login_forum.html @@ -2,7 +2,7 @@

{L_LOGIN} {FORUM_NAME}

-
+
diff --git a/phpBB/styles/prosilver/template/mcp_queue.html b/phpBB/styles/prosilver/template/mcp_queue.html index 096ed8243a..2db8f88640 100644 --- a/phpBB/styles/prosilver/template/mcp_queue.html +++ b/phpBB/styles/prosilver/template/mcp_queue.html @@ -77,7 +77,7 @@ -

{L_NO_TOPICS_QUEUE}{L_NO_POSTS}

+

{L_NO_TOPICS_QUEUE}{L_UNAPPROVED_POSTS_ZERO_TOTAL}

diff --git a/phpBB/styles/prosilver/template/memberlist_im.html b/phpBB/styles/prosilver/template/memberlist_im.html index 7ebe1e3472..96d165228e 100644 --- a/phpBB/styles/prosilver/template/memberlist_im.html +++ b/phpBB/styles/prosilver/template/memberlist_im.html @@ -49,6 +49,7 @@
{L_IM_ADD_CONTACT}
{L_IM_SEND_MESSAGE}
+ diff --git a/phpBB/styles/subsilver2/template/login_forum.html b/phpBB/styles/subsilver2/template/login_forum.html index 5a194d209d..06a26666e7 100644 --- a/phpBB/styles/subsilver2/template/login_forum.html +++ b/phpBB/styles/subsilver2/template/login_forum.html @@ -2,7 +2,7 @@
- + diff --git a/phpBB/styles/subsilver2/template/mcp_queue.html b/phpBB/styles/subsilver2/template/mcp_queue.html index d85f0c3b49..65c8adbbc8 100644 --- a/phpBB/styles/subsilver2/template/mcp_queue.html +++ b/phpBB/styles/subsilver2/template/mcp_queue.html @@ -27,7 +27,7 @@ - +
{L_NO_TOPICS_QUEUE}{L_NO_POSTS}{L_NO_TOPICS_QUEUE}{L_UNAPPROVED_POSTS_ZERO_TOTAL}