some tiny bugfixes

git-svn-id: file:///svn/phpbb/trunk@8155 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2007-10-08 14:38:44 +00:00
parent b3475ac803
commit e8b2c4128e
8 changed files with 26 additions and 14 deletions

View file

@ -81,7 +81,6 @@
<ul> <ul>
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li> <li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
<li>[Feature] The new exit_handler() function having a check for the function exit_handler_phpbb_hook().</li>
<li>[Feature] Constant PHPBB_ADMIN_PATH introduced, having the same purpose as PHPBB_ROOT_PATH, but for the ACP.</li> <li>[Feature] Constant PHPBB_ADMIN_PATH introduced, having the same purpose as PHPBB_ROOT_PATH, but for the ACP.</li>
<li>[Fix] Further fixing user profile view (please do not forget to update/refresh your template and style) (Bug #14230)</li> <li>[Fix] Further fixing user profile view (please do not forget to update/refresh your template and style) (Bug #14230)</li>
<li>[Fix] Adjust google adsense bot information (Bug #14296)</li> <li>[Fix] Adjust google adsense bot information (Bug #14296)</li>
@ -116,6 +115,7 @@
<li>[Fix] Don't display &quot;Avatars Disabled&quot; message on edit groups in UCP (Bug #14636)</li> <li>[Fix] Don't display &quot;Avatars Disabled&quot; message on edit groups in UCP (Bug #14636)</li>
<li>[Change] Require confirm for deleting inactive users. (Bug #14641)</li> <li>[Change] Require confirm for deleting inactive users. (Bug #14641)</li>
<li>[Fix] Match custom BBCodes in the same way during first and second pass - patch provided by IBBoard (Bug #14268)</li> <li>[Fix] Match custom BBCodes in the same way during first and second pass - patch provided by IBBoard (Bug #14268)</li>
<li>[Fix] Correct quote parsing if opening bracket before opening quote (Bug #14667)</li>
</ul> </ul>
<a name="v30rc4"></a><h3>1.ii. Changes since 3.0.RC4</h3> <a name="v30rc4"></a><h3>1.ii. Changes since 3.0.RC4</h3>

View file

@ -672,6 +672,11 @@ class bbcode_firstpass extends bbcode
{ {
global $config, $user; global $config, $user;
/**
* If you change this code, make sure the cases described within the following reports are still working:
* #3572, #14667
*/
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in))); $in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
if (!$in) if (!$in)
@ -801,12 +806,19 @@ class bbcode_firstpass extends bbcode
{ {
// Search the text for the next tok... if an ending quote comes first, then change tok to [] // Search the text for the next tok... if an ending quote comes first, then change tok to []
$pos1 = strpos($in, '[/quote'); $pos1 = strpos($in, '[/quote');
// If the token ] comes first, we change it to ]
$pos2 = strpos($in, ']'); $pos2 = strpos($in, ']');
// If the token [ comes first, we change it to [
$pos3 = strpos($in, '[');
if ($pos1 !== false && ($pos2 === false || $pos1 < $pos2)) if ($pos1 !== false && ($pos2 === false || $pos1 < $pos2) && ($pos3 === false || $pos1 < $pos3))
{ {
$tok = '[]'; $tok = '[]';
} }
else if ($pos3 !== false && ($pos2 === false || $pos3 < $pos2))
{
$tok = '[';
}
else else
{ {
$tok = ']'; $tok = ']';
@ -1049,7 +1061,7 @@ class parse_message extends bbcode_firstpass
$this->message = preg_replace($match, $replace, trim($this->message)); $this->message = preg_replace($match, $replace, trim($this->message));
// Message length check. -1 disables this check completely. // Message length check. -1 disables this check completely.
if ($config['max_' . $mode . '_chars'] != -1) if ($config['max_' . $mode . '_chars'])
{ {
$msg_len = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message)); $msg_len = ($mode == 'post') ? utf8_strlen($this->message) : utf8_strlen(preg_replace('#\[\/?[a-z\*\+\-]+(=[\S]+)?\]#ius', ' ', $this->message));

View file

@ -146,7 +146,8 @@ class ucp_resend
meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx")); meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
$message = $user->lang['ACTIVATION_EMAIL_SENT'] . '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>'); $message = ($config['require_activation'] == USER_ACTIVATION_ADMIN) ? $user->lang['ACIVATION_EMAIL_SENT_ADMIN'] : $user->lang['ACTIVATION_EMAIL_SENT'];
$message .= '<br /><br />' . sprintf($user->lang['RETURN_INDEX'], '<a href="' . append_sid("{$phpbb_root_path}index.$phpEx") . '">', '</a>');
trigger_error($message); trigger_error($message);
} }

View file

@ -262,8 +262,8 @@ $lang = array_merge($lang, array(
'TRACE_TOTAL' => 'Total', 'TRACE_TOTAL' => 'Total',
'USERS_NOT_ASSIGNED' => 'No user assigned to this role', 'USERS_NOT_ASSIGNED' => 'No user assigned to this role',
'USER_IS_MEMBER_OF_DEFAULT' => 'is a member of the following default groups', 'USER_IS_MEMBER_OF_DEFAULT' => 'is a member of the following pre-defined groups',
'USER_IS_MEMBER_OF_CUSTOM' => 'is a member of the following custom groups', 'USER_IS_MEMBER_OF_CUSTOM' => 'is a member of the following user defined groups',
'VIEW_ASSIGNED_ITEMS' => 'View assigned items', 'VIEW_ASSIGNED_ITEMS' => 'View assigned items',
'VIEW_LOCAL_PERMS' => 'Local permissions', 'VIEW_LOCAL_PERMS' => 'Local permissions',

View file

@ -113,9 +113,9 @@ $lang = array_merge($lang, array(
'USER_CUSTOM_PROFILE_FIELDS' => 'Custom profile fields', 'USER_CUSTOM_PROFILE_FIELDS' => 'Custom profile fields',
'USER_DELETED' => 'User deleted successfully.', 'USER_DELETED' => 'User deleted successfully.',
'USER_GROUP_ADD' => 'Add user to group', 'USER_GROUP_ADD' => 'Add user to group',
'USER_GROUP_NORMAL' => 'Normal groups user is a member of', 'USER_GROUP_NORMAL' => 'User defined groups user is a member of',
'USER_GROUP_PENDING' => 'Groups user is in pending mode', 'USER_GROUP_PENDING' => 'Groups user is in pending mode',
'USER_GROUP_SPECIAL' => 'Special groups user is a member of', 'USER_GROUP_SPECIAL' => 'Pre-defined groups user is a member of',
'USER_NO_ATTACHMENTS' => 'There are no attached files to display.', 'USER_NO_ATTACHMENTS' => 'There are no attached files to display.',
'USER_OVERVIEW_UPDATED' => 'User details updated.', 'USER_OVERVIEW_UPDATED' => 'User details updated.',
'USER_POSTS_DELETED' => 'Successfully removed all posts made by this user.', 'USER_POSTS_DELETED' => 'Successfully removed all posts made by this user.',

View file

@ -68,6 +68,7 @@ $lang = array_merge($lang, array(
'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the e-mail address you provided. Please check your e-mail for further information.', 'ACCOUNT_INACTIVE' => 'Your account has been created. However, this board requires account activation, an activation key has been sent to the e-mail address you provided. Please check your e-mail for further information.',
'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An e-mail has been sent to them and you will be informed when your account has been activated.', 'ACCOUNT_INACTIVE_ADMIN' => 'Your account has been created. However, this board requires account activation by the administrator group. An e-mail has been sent to them and you will be informed when your account has been activated.',
'ACTIVATION_EMAIL_SENT' => 'The activation e-mail has been sent to your e-mail address.', 'ACTIVATION_EMAIL_SENT' => 'The activation e-mail has been sent to your e-mail address.',
'ACTIVATION_EMAIL_SENT_ADMIN' => 'The activation e-mail has been sent to the administrators e-mail addresses.',
'ADD' => 'Add', 'ADD' => 'Add',
'ADD_BCC' => 'Add [BCC]', 'ADD_BCC' => 'Add [BCC]',
'ADD_FOES' => 'Add new foes', 'ADD_FOES' => 'Add new foes',

View file

@ -20,9 +20,8 @@
<ul class="topiclist"> <ul class="topiclist">
<li class="header"> <li class="header">
<dl> <dl>
<dt><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></dt> <dt style="width: 40%"><a href="{U_SORT_FILENAME}">{L_FILENAME}</a></dt>
<dd class="extra"><a href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></dd> <dd class="extra"><a href="{U_SORT_DOWNLOADS}">{L_DOWNLOADS}</a></dd>
<dd class="extra"><a href="{U_SORT_FILESIZE}">{L_FILESIZE}</a></dd>
<dd class="time"><span><a href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></span></dd> <dd class="time"><span><a href="{U_SORT_POST_TIME}">{L_POST_TIME}</a></span></dd>
<dd class="mark">{L_MARK}</dd> <dd class="mark">{L_MARK}</dd>
</dl> </dl>
@ -33,10 +32,9 @@
<!-- BEGIN attachrow --> <!-- BEGIN attachrow -->
<li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->"> <li class="row<!-- IF attachrow.S_ROW_COUNT is odd --> bg1<!-- ELSE --> bg2<!-- ENDIF -->">
<dl> <dl>
<dt><a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a><br /> <dt style="width: 40%"><a href="{attachrow.U_VIEW_ATTACHMENT}" class="topictitle">{attachrow.FILENAME}</a> ({attachrow.SIZE})<br />
<!-- IF attachrow.S_IN_MESSAGE -->{L_PM}: <!-- ELSE -->{L_TOPIC}: <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></dt> <!-- IF attachrow.S_IN_MESSAGE -->{L_PM}: <!-- ELSE -->{L_TOPIC}: <!-- ENDIF --><a href="{attachrow.U_VIEW_TOPIC}">{attachrow.TOPIC_TITLE}</a></dt>
<dd class="extra">{attachrow.DOWNLOAD_COUNT}</dd> <dd class="extra">{attachrow.DOWNLOAD_COUNT}</dd>
<dd class="extra">{attachrow.SIZE}</dd>
<dd class="time"><span>{attachrow.POST_TIME}</span></dd> <dd class="time"><span>{attachrow.POST_TIME}</span></dd>
<dd class="mark"><input type="checkbox" name="attachment[{attachrow.ATTACH_ID}]" value="1" /></dd> <dd class="mark"><input type="checkbox" name="attachment[{attachrow.ATTACH_ID}]" value="1" /></dd>
</dl> </dl>

View file

@ -156,7 +156,7 @@ dd.time {
} }
dd.extra { dd.extra {
width: 65px; width: 12%;
line-height: 200%; line-height: 200%;
text-align: center; text-align: center;
font-size: 1.1em; font-size: 1.1em;