mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
fixing some bugs
git-svn-id: file:///svn/phpbb/trunk@7805 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d57a16ad69
commit
f9ea21a083
9 changed files with 42 additions and 18 deletions
|
@ -191,6 +191,10 @@ p a {
|
|||
<li>[Fix] Updater is no longer listing missing language entries and styles if these had been removed (Bug #12655)</li>
|
||||
<li>[Fix] Correct approval of posts in global announcements (Bug #12699)</li>
|
||||
<li>[Sec] Do not allow setup spiders/robots to post, even if permissions are given. We see no reason why this should be possible. (Thanks to Frank Rizzo for convincing us regarding this)</li>
|
||||
<li>[Sec] Do not display the last active column within the memberlist if u_viewonline permission is not given (Bug #12797)</li>
|
||||
<li>[Fix] Display custom profile field "date" based on users language (Bug #12787)</li>
|
||||
<li>[Fix] Allow adding of help language files within subdirectories (Bug #12783)</li>
|
||||
<li>[Fix] Correctly apply smileys on posting having # within their emotion code</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
|
|
@ -469,8 +469,8 @@ class custom_profile
|
|||
// case 'datetime':
|
||||
case 'date':
|
||||
$date = explode('-', $value);
|
||||
$month = (isset($date[0])) ? (int) $date[0] : 0;
|
||||
$day = (isset($date[1])) ? (int) $date[1] : 0;
|
||||
$day = (isset($date[0])) ? (int) $date[0] : 0;
|
||||
$month = (isset($date[1])) ? (int) $date[1] : 0;
|
||||
$year = (isset($date[2])) ? (int) $date[2] : 0;
|
||||
|
||||
if (!$day && !$month && !$year)
|
||||
|
@ -479,7 +479,8 @@ class custom_profile
|
|||
}
|
||||
else if ($day && $month && $year)
|
||||
{
|
||||
return sprintf('%4d-%02d-%02d', $year, $month, $day);
|
||||
global $user;
|
||||
return $user->format_date(mktime(0, 0, 0, $month, $day, $year), $user->lang['DATE_FORMAT'], true);
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
|
|
@ -1229,7 +1229,7 @@ class parse_message extends bbcode_firstpass
|
|||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// (assertion)
|
||||
$match[] = '#(?<=^|[\n .])' . preg_quote($row['code'], '#') . '(?![^<>]*>)#';
|
||||
$match[] = '(?<=^|[\n .])' . preg_quote($row['code'], '#') . '(?![^<>]*>)';
|
||||
$replace[] = '<!-- s' . $row['code'] . ' --><img src="{SMILIES_PATH}/' . $row['smiley_url'] . '" alt="' . $row['code'] . '" title="' . $row['emotion'] . '" /><!-- s' . $row['code'] . ' -->';
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -1239,7 +1239,7 @@ class parse_message extends bbcode_firstpass
|
|||
{
|
||||
if ($max_smilies)
|
||||
{
|
||||
$num_matches = preg_match_all('#' . str_replace('#', '', implode('|', $match)) . '#', $this->message, $matches);
|
||||
$num_matches = preg_match_all('#' . implode('|', $match) . '#', $this->message, $matches);
|
||||
unset($matches);
|
||||
|
||||
if ($num_matches !== false && $num_matches > $max_smilies)
|
||||
|
@ -1249,6 +1249,9 @@ class parse_message extends bbcode_firstpass
|
|||
}
|
||||
}
|
||||
|
||||
// Make sure the delimiter # is added in front and at the end of every element within $match
|
||||
$match = explode(chr(0), '#' . implode('#' . chr(0) . '#', $match) . '#');
|
||||
|
||||
$this->message = trim(preg_replace($match, $replace, $this->message));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1627,9 +1627,18 @@ class user extends session
|
|||
// - add appropriate variables here, name them as they are used within the language file...
|
||||
if (!$use_db)
|
||||
{
|
||||
if ((include($this->lang_path . (($use_help) ? 'help_' : '') . "$lang_file.$phpEx")) === false)
|
||||
if ($use_help && strpos($lang_file, '/') !== false)
|
||||
{
|
||||
trigger_error("Language file {$this->lang_path}" . (($use_help) ? 'help_' : '') . "$lang_file.$phpEx couldn't be opened.", E_USER_ERROR);
|
||||
$language_filename = $this->lang_path . substr($lang_file, 0, stripos($lang_file, '/') + 1) . 'help_' . substr($lang_file, stripos($lang_file, '/') + 1) . '.' . $phpEx;
|
||||
}
|
||||
else
|
||||
{
|
||||
$language_filename = $this->lang_path . (($use_help) ? 'help_' : '') . $lang_file . '.' . $phpEx;
|
||||
}
|
||||
|
||||
if ((include($language_filename)) === false)
|
||||
{
|
||||
trigger_error("Language file $language_filename couldn't be opened.", E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
else if ($use_db)
|
||||
|
|
|
@ -485,16 +485,16 @@ $lang = array_merge($lang, array(
|
|||
|
||||
<h1>Release announcement</h1>
|
||||
|
||||
<p>Please read <a href="%1$s" title="%1$s">the release announcement for the latest version</a> before you continue your update process, it may contain useful information. It also contains full download links as well as the change log.</p>
|
||||
<p>Please read <a href="%1$s" title="%1$s"><strong>the release announcement for the latest version</strong></a> before you continue your update process, it may contain useful information. It also contains full download links as well as the change log.</p>
|
||||
|
||||
<br />
|
||||
|
||||
<h1>How to update your installation</h1>
|
||||
<h1>How to update your installation with the Automatic Update Package</h1>
|
||||
|
||||
<p>The recommended way of updating your installation only takes the following steps:</p>
|
||||
<p>The recommended way of updating your installation listed here is only valid for the automatic update package. You are also able to update your installation using the methods listed within the INSTALL.html document. The steps for updating phpBB3 automatically are:</p>
|
||||
|
||||
<ul style="margin-left: 20px; font-size: 1.1em;">
|
||||
<li>Go to the <a href="http://www.phpbb.com/downloads/" title="http://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the correct "phpBB Update Package" archive.<br /><br /></li>
|
||||
<li>Go to the <a href="http://www.phpbb.com/downloads/" title="http://www.phpbb.com/downloads/">phpBB.com downloads page</a> and download the "Automatic Update Package" archive.<br /><br /></li>
|
||||
<li>Unpack the archive.<br /><br /></li>
|
||||
<li>Upload the complete uncompressed install folder to your phpBB root directory (where your config.php file is).<br /><br /></li>
|
||||
</ul>
|
||||
|
@ -502,7 +502,7 @@ $lang = array_merge($lang, array(
|
|||
<p>Once uploaded your board will be offline for normal users due to the install directory you uploaded now present.<br /><br />
|
||||
<strong><a href="%2$s" title="%2$s">Now start the update process by pointing your browser to the install folder</a>.</strong><br />
|
||||
<br />
|
||||
You will then be guided through the update process. You will be notified after the update is complete.
|
||||
You will then be guided through the update process. You will be notified once the update is complete.
|
||||
</p>
|
||||
',
|
||||
'UPDATE_METHOD' => 'Update method',
|
||||
|
|
|
@ -943,7 +943,7 @@ switch ($mode)
|
|||
$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : '';
|
||||
$sql_where .= (is_numeric($count)) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||
$sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
|
||||
$sql_where .= (sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
|
||||
$sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
|
||||
$sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : '';
|
||||
|
||||
if ($search_group_id)
|
||||
|
@ -1387,11 +1387,12 @@ switch ($mode)
|
|||
'U_SORT_AIM' => $sort_url . '&sk=h&sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_MSN' => $sort_url . '&sk=i&sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_YIM' => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_ACTIVE' => $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&sk=l&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '',
|
||||
'U_SORT_RANK' => $sort_url . '&sk=m&sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
'U_LIST_CHAR' => $sort_url . '&sk=a&sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
|
||||
|
||||
'S_SHOW_GROUP' => ($mode == 'group') ? true : false,
|
||||
'S_VIEWONLINE' => $auth->acl_get('u_viewonline'),
|
||||
'S_MODE_SELECT' => $s_sort_key,
|
||||
'S_ORDER_SELECT' => $s_sort_dir,
|
||||
'S_CHAR_OPTIONS' => $s_char_options,
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
<th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>
|
||||
<th class="info"><a href="{U_SORT_WEBSITE}#memberlist">{L_WEBSITE}</a>{L_COMMA_SEPARATOR}<a href="{U_SORT_LOCATION}">{L_LOCATION}</a></th>
|
||||
<th class="joined"><a href="{U_SORT_JOINED}#memberlist">{L_JOINED}</a></th>
|
||||
<th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th>
|
||||
<!-- IF U_SORT_ACTIVE --><th class="active"><a href="{U_SORT_ACTIVE}#memberlist">{L_LAST_ACTIVE}</a></th><!-- ENDIF -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -106,7 +106,7 @@
|
|||
<th class="posts"> </th>
|
||||
<th class="info"> </th>
|
||||
<th class="joined"> </th>
|
||||
<th class="active"> </th>
|
||||
<!-- IF U_SORT_ACTIVE --><th class="active"> </th><!-- ENDIF -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -119,11 +119,11 @@
|
|||
<td class="posts"><!-- IF memberrow.POSTS --><a href="{memberrow.U_SEARCH_USER}" title="{L_SEARCH_USER_POSTS}">{memberrow.POSTS}</a><!-- ELSE -->{memberrow.POSTS}<!-- ENDIF --></td>
|
||||
<td class="info"><!-- IF memberrow.U_WWW or memberrow.LOCATION --><!-- IF memberrow.U_WWW --><div><a href="{memberrow.U_WWW}" title="{L_VISIT_WEBSITE}: {memberrow.U_WWW}">{memberrow.U_WWW}</a></div><!-- ENDIF --><!-- IF memberrow.LOCATION --><div>{memberrow.LOCATION}</div><!-- ENDIF --><!-- ELSE --> <!-- ENDIF --></td>
|
||||
<td>{memberrow.JOINED}</td>
|
||||
<td>{memberrow.VISITED} </td>
|
||||
<!-- IF S_VIEWONLINE --><td>{memberrow.VISITED} </td><!-- ENDIF -->
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr class="bg1">
|
||||
<td colspan="5">{L_NO_MEMBERS}</td>
|
||||
<td colspan="<!-- IF S_VIEWONLINE -->5<!-- ELSE -->4<!-- ENDIF -->">{L_NO_MEMBERS}</td>
|
||||
</tr>
|
||||
<!-- END memberrow -->
|
||||
</tbody>
|
||||
|
|
|
@ -80,10 +80,12 @@ function insert_single(user)
|
|||
<dt><label for="joined">{L_JOINED}:</label></dt>
|
||||
<dd><select name="joined_select">{S_JOINED_TIME_OPTIONS}</select> <input class="inputbox medium" type="text" name="joined" id="joined" value="{JOINED}" /></dd>
|
||||
</dl>
|
||||
<!-- IF S_VIEWONLINE -->
|
||||
<dl>
|
||||
<dt><label for="active">{L_LAST_ACTIVE}:</label></dt>
|
||||
<dd><select name="active_select">{S_ACTIVE_TIME_OPTIONS}</select> <input class="inputbox medium" type="text" name="active" id="active" value="{ACTIVE}" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="count">{L_POSTS}:</label></dt>
|
||||
<dd><select name="count_select">{S_COUNT_OPTIONS}</select> <input class="inputbox medium" type="text" name="count" id="count" value="{COUNT}" /></dd>
|
||||
|
|
|
@ -96,8 +96,12 @@
|
|||
<td class="row2"><input class="post" type="text" name="yahoo" value="{YAHOO}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<!-- IF S_VIEWONLINE -->
|
||||
<td class="row1"><b class="genmed">{L_LAST_ACTIVE}:</b></td>
|
||||
<td class="row2"><select name="active_select">{S_ACTIVE_TIME_OPTIONS}</select> <input class="post" type="text" name="active" value="{ACTIVE}" /></td>
|
||||
<!-- ELSE -->
|
||||
<td colspan="2" class="row1"> </td>
|
||||
<!-- ENDIF -->
|
||||
<td class="row1"><b class="genmed">{L_MSNM}:</b></td>
|
||||
<td class="row2"><input class="post" type="text" name="msn" value="{MSNM}" /></td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Reference in a new issue