aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/docs/CHANGELOG.html4
-rw-r--r--phpBB/includes/functions_profile_fields.php7
-rw-r--r--phpBB/includes/message_parser.php7
-rw-r--r--phpBB/includes/session.php13
-rwxr-xr-xphpBB/language/en/install.php10
-rw-r--r--phpBB/memberlist.php5
-rw-r--r--phpBB/styles/prosilver/template/memberlist_body.html8
-rw-r--r--phpBB/styles/prosilver/template/memberlist_search.html2
-rw-r--r--phpBB/styles/subsilver2/template/memberlist_search.html4
9 files changed, 42 insertions, 18 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index c762718e33..6827a0c505 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -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 &quotdate&quot; 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>
diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php
index 47d3ae03a9..7c5e39c3a7 100644
--- a/phpBB/includes/functions_profile_fields.php
+++ b/phpBB/includes/functions_profile_fields.php
@@ -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;
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 1a70a7fd80..649708aff3 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -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));
}
}
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index e97f3ac8e6..35edf92749 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -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)
diff --git a/phpBB/language/en/install.php b/phpBB/language/en/install.php
index c81b5c9f7b..9bfb8063f6 100755
--- a/phpBB/language/en/install.php
+++ b/phpBB/language/en/install.php
@@ -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',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index ea13a0b49e..991c73198f 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -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 . '&amp;sk=h&amp;sd=' . (($sort_key == 'h' && $sort_dir == 'a') ? 'd' : 'a'),
'U_SORT_MSN' => $sort_url . '&amp;sk=i&amp;sd=' . (($sort_key == 'i' && $sort_dir == 'a') ? 'd' : 'a'),
'U_SORT_YIM' => $sort_url . '&amp;sk=j&amp;sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
- 'U_SORT_ACTIVE' => $sort_url . '&amp;sk=l&amp;sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a'),
+ 'U_SORT_ACTIVE' => ($auth->acl_get('u_viewonline')) ? $sort_url . '&amp;sk=l&amp;sd=' . (($sort_key == 'l' && $sort_dir == 'a') ? 'd' : 'a') : '',
'U_SORT_RANK' => $sort_url . '&amp;sk=m&amp;sd=' . (($sort_key == 'm' && $sort_dir == 'a') ? 'd' : 'a'),
'U_LIST_CHAR' => $sort_url . '&amp;sk=a&amp;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,
diff --git a/phpBB/styles/prosilver/template/memberlist_body.html b/phpBB/styles/prosilver/template/memberlist_body.html
index 081352924e..0f9d1cb792 100644
--- a/phpBB/styles/prosilver/template/memberlist_body.html
+++ b/phpBB/styles/prosilver/template/memberlist_body.html
@@ -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">&nbsp;</th>
<th class="info">&nbsp;</th>
<th class="joined">&nbsp;</th>
- <th class="active">&nbsp;</th>
+ <!-- IF U_SORT_ACTIVE --><th class="active">&nbsp;</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 -->&nbsp;<!-- ENDIF --></td>
<td>{memberrow.JOINED}</td>
- <td>{memberrow.VISITED}&nbsp;</td>
+ <!-- IF S_VIEWONLINE --><td>{memberrow.VISITED}&nbsp;</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>
diff --git a/phpBB/styles/prosilver/template/memberlist_search.html b/phpBB/styles/prosilver/template/memberlist_search.html
index ac7ac9821d..1061d30628 100644
--- a/phpBB/styles/prosilver/template/memberlist_search.html
+++ b/phpBB/styles/prosilver/template/memberlist_search.html
@@ -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>
diff --git a/phpBB/styles/subsilver2/template/memberlist_search.html b/phpBB/styles/subsilver2/template/memberlist_search.html
index 253fff9ecf..4d943e348d 100644
--- a/phpBB/styles/subsilver2/template/memberlist_search.html
+++ b/phpBB/styles/subsilver2/template/memberlist_search.html
@@ -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">&nbsp;</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>