diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index c577cefacd..358e5a4bf2 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -390,13 +390,16 @@ function validate_config_vars($config_vars, &$cfg_array, &$error) } $validator = explode(':', $config_definition['validate']); + // Validate a bit. ;) (0 = type, 1 = min, 2= max) switch ($validator[$type]) { case 'string': $length = strlen($cfg_array[$config_name]); + // the column is a VARCHAR $validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255; + if (isset($validator[$min]) && $length < $validator[$min]) { $error[] = sprintf($user->lang['SETTING_TOO_SHORT'], $user->lang[$config_definition['lang']], $validator[$min]); @@ -406,14 +409,14 @@ function validate_config_vars($config_vars, &$cfg_array, &$error) $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$config_definition['lang']], $validator[$max]); } break; - + case 'bool': $cfg_array[$config_name] = ($cfg_array[$config_name]) ? 1 : 0; break; case 'int': $cfg_array[$config_name] = (int) $cfg_array[$config_name]; - + if (isset($validator[$min]) && $cfg_array[$config_name] < $validator[$min]) { $error[] = sprintf($user->lang['SETTING_TOO_LOW'], $user->lang[$config_definition['lang']], $validator[$min]); @@ -576,9 +579,8 @@ function validate_range($value_ary, &$error) { $error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max); } - - break; - + break; + case 'int': $min = (isset($column[1])) ? max($column[1],$type['min']) : $type['min']; $max = (isset($column[2])) ? min($column[2],$type['max']) : $type['max']; @@ -590,10 +592,9 @@ function validate_range($value_ary, &$error) { $error[] = sprintf($user->lang['SETTING_TOO_BIG'], $user->lang[$value['lang']], $max); } - break; + break; } } - } ?> \ No newline at end of file diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index a002ad19ac..9573c34248 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -122,11 +122,11 @@ { if (newimage == 'no_image') { - document.image_upload_icon.src = "{PHPBB_ROOT_PATH}images/spacer.gif"; + document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}images/spacer.gif"; } else { - document.image_upload_icon.src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage; + document.getElementById('image_upload_icon').src = "{PHPBB_ROOT_PATH}{IMG_PATH}/" + newimage; } } @@ -192,7 +192,7 @@
-
 src="{PHPBB_ROOT_PATH}images/spacer.gif"src="{UPLOAD_ICON_SRC}" name="image_upload_icon" alt="" title="" /> 
+
 src="{PHPBB_ROOT_PATH}images/spacer.gif"src="{UPLOAD_ICON_SRC}" id="image_upload_icon" alt="" title="" /> 
diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html index a0b0016a11..c81c198fd5 100644 --- a/phpBB/adm/style/acp_bbcodes.html +++ b/phpBB/adm/style/acp_bbcodes.html @@ -103,6 +103,10 @@ {bbcodes.BBCODE_TAG} {ICON_EDIT} {ICON_DELETE} + + + {L_ACP_NO_ITEMS} + diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html index e64c5ed437..ebc76c36a3 100644 --- a/phpBB/adm/style/acp_database.html +++ b/phpBB/adm/style/acp_database.html @@ -7,8 +7,9 @@

{L_ACP_RESTORE_EXPLAIN}

+
- +
{L_RESTORE_OPTIONS}
@@ -16,16 +17,19 @@
- -

-   -   - -

- - {S_FORM_TOKEN} +

+   +   + +

+ {S_FORM_TOKEN}
+ +
+

{L_ACP_NO_ITEMS}

+
+

{L_ACP_BACKUP}

diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index 8bb8257318..86500ae047 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -43,19 +43,19 @@ function toggle_select(icon, display, select) { - var disp = document.getElementById('order_disp[' + icon + ']'); - var nodisp = document.getElementById('order_no_disp[' + icon + ']'); + var disp = document.getElementById('order_disp_' + select); + var nodisp = document.getElementById('order_no_disp_' + select); disp.disabled = !display; nodisp.disabled = display; if (display) { - document.getElementById(select).selectedIndex = 0; + document.getElementById('order_' + select).selectedIndex = 0; nodisp.className = 'disabled-options'; disp.className = ''; } else { - document.getElementById(select).selectedIndex = {S_ORDER_LIST_DISPLAY_COUNT}; + document.getElementById('order_' + select).selectedIndex = {S_ORDER_LIST_DISPLAY_COUNT}; disp.className = 'disabled-options'; nodisp.className = ''; } @@ -111,15 +111,15 @@ - + - + disabled="disabled" class="disabled-options" >{S_ORDER_LIST_DISPLAY} + disabled="disabled" class="disabled-options" >{S_ORDER_LIST_UNDISPLAY} @@ -248,6 +248,10 @@  {ICON_EDIT} {ICON_DELETE} + + + {L_ACP_NO_ITEMS} + diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index 725c7a5ec1..220e7dafbe 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -28,11 +28,11 @@

{L_EXPLAIN}

-
-
» {L_SET_ROLE_PERMISSIONS} + +
{L_ROLE_DETAILS}
@@ -46,6 +46,7 @@

+ {S_FORM_TOKEN}

@@ -57,11 +58,15 @@ +

+ » {L_BACK_TO_TOP}


+

+

{L_ACL_TYPE}

@@ -107,9 +112,9 @@ {auth.mask.PERMISSION} - - - + + + diff --git a/phpBB/adm/style/acp_prune_forums.html b/phpBB/adm/style/acp_prune_forums.html index 890a3ba569..069d2c91c3 100644 --- a/phpBB/adm/style/acp_prune_forums.html +++ b/phpBB/adm/style/acp_prune_forums.html @@ -44,7 +44,7 @@

{L_LOOK_UP_FORUMS_EXPLAIN}

-
+
diff --git a/phpBB/adm/style/acp_styles.html b/phpBB/adm/style/acp_styles.html index 4b3bcddf1d..a1363fce8d 100644 --- a/phpBB/adm/style/acp_styles.html +++ b/phpBB/adm/style/acp_styles.html @@ -459,7 +459,7 @@
-
{COPYRIGHT}
+
{COPYRIGHT}
diff --git a/phpBB/adm/style/acp_words.html b/phpBB/adm/style/acp_words.html index 9bd0bf11a0..3fa4cfc91c 100644 --- a/phpBB/adm/style/acp_words.html +++ b/phpBB/adm/style/acp_words.html @@ -62,6 +62,10 @@ {words.REPLACEMENT}  {ICON_EDIT}  {ICON_DELETE}  + + + {L_ACP_NO_ITEMS} + diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index e489e3b099..154e93c928 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -130,6 +130,16 @@
  • [Change] Remove left join for query used to retrieve already assigned users and groups within permission panel (Bug #20235)
  • [Fix] Correctly return sole whitespaces if used with BBCodes (Bug #19535)
  • [Fix] Quote bbcode parsing adding too much closing tags on special conditions (Bug #20735)
  • +
  • [Change] Added sanity checks to various ACP settings
  • +
  • [Change] Removed minimum form times
  • +
  • [Fix] Check topics_per_page value in acp_forums (Bug #15539)
  • +
  • [Fix] Custom profile fields with date type should be timezone independend (Bug #15003)
  • +
  • [Fix] Fixing some XHTML errors/warnings within the ACP (Bug #22875)
  • +
  • [Fix] Warnings if poll title/options exceed maximum characters per post (Bug #22865)
  • +
  • [Fix] Do not allow selecting non-authorized groups within memberlist by adjusting URL (Bug #22805 - patch provided by ToonArmy)
  • +
  • [Fix] Correctly specify "close report action" (Bug #22685)
  • + + diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 4e607b79c7..c4ce753cfd 100755 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -186,7 +186,7 @@ class mcp_reports $template->assign_vars(array( 'S_MCP_REPORT' => true, - 'S_CLOSE_ACTION' => $this->u_action . '&p=' . $post_id . '&f=' . $forum_id, + 'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $post_info['forum_id'] . '&p=' . $post_id), 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => !$post_info['post_approved'], diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index a923e9fca3..7d3977c507 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1089,7 +1089,7 @@ class parse_message extends bbcode_firstpass if ((!$msg_len && $mode !== 'sig') || $config['max_' . $mode . '_chars'] && $msg_len > $config['max_' . $mode . '_chars']) { $this->warn_msg[] = (!$msg_len) ? $user->lang['TOO_FEW_CHARS'] : sprintf($user->lang['TOO_MANY_CHARS_' . strtoupper($mode)], $msg_len, $config['max_' . $mode . '_chars']); - return $this->warn_msg; + return (!$update_this_message) ? $return_message : $this->warn_msg; } } @@ -1097,7 +1097,7 @@ class parse_message extends bbcode_firstpass if ($mode !== 'sig' && utf8_clean_string($this->message) === '') { $this->warn_msg[] = $user->lang['TOO_FEW_CHARS']; - return $this->warn_msg; + return (!$update_this_message) ? $return_message : $this->warn_msg; } // Prepare BBcode (just prepares some tags for better parsing) @@ -1146,7 +1146,7 @@ class parse_message extends bbcode_firstpass if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls']) { $this->warn_msg[] = sprintf($user->lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']); - return $this->warn_msg; + return (!$update_this_message) ? $return_message : $this->warn_msg; } if (!$update_this_message) @@ -1584,7 +1584,6 @@ class parse_message extends bbcode_firstpass $this->message = $poll['poll_option_text']; $bbcode_bitfield = $this->bbcode_bitfield; - $poll['poll_option_text'] = $this->parse($poll['enable_bbcode'], ($config['allow_post_links']) ? $poll['enable_urls'] : false, $poll['enable_smilies'], $poll['img_status'], false, false, $config['allow_post_links'], false); $bbcode_bitfield = base64_encode(base64_decode($bbcode_bitfield) | base64_decode($this->bbcode_bitfield)); diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 0cc1064916..f328c05882 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -134,7 +134,7 @@ $lang = array_merge($lang, array( 'ACP_POST_SETTINGS_EXPLAIN' => 'Here you can set all default settings for posting.', 'ALLOW_POST_LINKS' => 'Allow links in posts/private messages', 'ALLOW_POST_LINKS_EXPLAIN' => 'If disallowed the [URL] BBCode tag and automatic/magic URLs are disabled.', - 'ALLOW_POST_FLASH' => 'Allow use of [FLASH] BBCode tag in posts. ', + 'ALLOW_POST_FLASH' => 'Allow use of [FLASH] BBCode tag in posts', 'ALLOW_POST_FLASH_EXPLAIN' => 'If disallowed the [FLASH] BBCode tag is disabled in posts. Otherwise the permission system controls which users can use the [FLASH] BBCode tag.', 'BUMP_INTERVAL' => 'Bump interval', @@ -323,7 +323,7 @@ $lang = array_merge($lang, array( 'LDAP_USER' => 'LDAP user dn', 'LDAP_USER_EXPLAIN' => 'Leave blank to use anonymous binding. If filled in phpBB uses the specified distinguished name on login attempts to find the correct user, e.g. uid=Username,ou=MyUnit,o=MyCompany,c=US. Required for Active Directory Servers.', 'LDAP_USER_FILTER' => 'LDAP user filter', - 'LDAP_USER_FILTER_EXPLAIN' => 'Optionally you can further limit the searched objects with additional filters. For example objectClass=posixGroup would result in the use of (&(uid=$username)(objectClass=posixGroup))', + 'LDAP_USER_FILTER_EXPLAIN' => 'Optionally you can further limit the searched objects with additional filters. For example objectClass=posixGroup would result in the use of (&(uid=$username)(objectClass=posixGroup))', )); // Server Settings diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index c3f884bc8e..47cb5de680 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -126,6 +126,8 @@ $lang = array_merge($lang, array( 'ACP_MOD_LOGS' => 'Moderator log', 'ACP_MOD_ROLES' => 'Moderator roles', + 'ACP_NO_ITEMS' => 'There are no items yet.', + 'ACP_ORPHAN_ATTACHMENTS' => 'Orphaned attachments', 'ACP_PERMISSIONS' => 'Permissions', diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index ca71131bc1..968ab322fd 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1237,6 +1237,7 @@ switch ($mode) { $group_selected = request_var('search_group_id', 0); $s_group_select = ''; + $group_ids = array(); if ($auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel')) { @@ -1261,10 +1262,16 @@ switch ($mode) while ($row = $db->sql_fetchrow($result)) { + $group_ids[] = $row['group_id']; $s_group_select .= ''; } $db->sql_freeresult($result); + if ($group_selected !== 0 && !in_array($group_selected, $group_ids)) + { + trigger_error('NO_GROUP'); + } + $template->assign_vars(array( 'USERNAME' => $username, 'EMAIL' => $email, diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index b7c59b9a8b..b4706ec9ac 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -24,7 +24,7 @@ - +
    diff --git a/phpBB/styles/subsilver2/template/mcp_post.html b/phpBB/styles/subsilver2/template/mcp_post.html index 1b16f8e92b..402f25a655 100644 --- a/phpBB/styles/subsilver2/template/mcp_post.html +++ b/phpBB/styles/subsilver2/template/mcp_post.html @@ -1,7 +1,7 @@ - + @@ -39,7 +39,7 @@
    - +