mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge changes made in revisions #r9405 to #r9467
2009-04-18 git-svn-id: file:///svn/phpbb/trunk@9468 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
e3d98fe77b
commit
1042152a55
61 changed files with 376 additions and 154 deletions
|
@ -70,8 +70,8 @@
|
|||
</dl>
|
||||
<dl>
|
||||
<dt><label for="where">{L_ACTION}:</label></dt>
|
||||
<dd><label><input type="radio" class="radio" name="where" value="store_and_download" id="where" checked="checked" /> {L_STORE_AND_DOWNLOAD}</label>
|
||||
<label><input type="radio" class="radio" name="where" value="store" /> {L_STORE_LOCAL}</label>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="where" value="store" checked="checked" /> {L_STORE_LOCAL}</label>
|
||||
<label><input type="radio" class="radio" name="where" value="download" /> {L_DOWNLOAD}</label></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</dl>
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_EMAIL}" />
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_EMAIL}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
<!-- IF S_SELECT_VICTIM -->
|
||||
|
||||
<!-- IF U_BACK --><a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a><!-- ENDIF -->
|
||||
|
||||
<h1>{L_TITLE}</h1>
|
||||
|
||||
<p>{L_EXPLAIN}</p>
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
<dt><label for="min_search_author_chars">{L_MIN_SEARCH_AUTHOR_CHARS}:</label><br /><span>{L_MIN_SEARCH_AUTHOR_CHARS_EXPLAIN}</span></dt>
|
||||
<dd><input id="min_search_author_chars" type="text" size="4" maxlength="4" name="config[min_search_author_chars]" value="{MIN_SEARCH_AUTHOR_CHARS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="max_num_search_keywords">{L_MAX_NUM_SEARCH_KEYWORDS}:</label><br /><span>{L_MAX_NUM_SEARCH_KEYWORDS_EXPLAIN}</span></dt>
|
||||
<dd><input id="max_num_search_keywords" type="text" size="4" maxlength="4" name="config[max_num_search_keywords]" value="{MAX_NUM_SEARCH_KEYWORDS}" /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="search_store_results">{L_SEARCH_STORE_RESULTS}:</label><br /><span>{L_SEARCH_STORE_RESULTS_EXPLAIN}</span></dt>
|
||||
<dd><input id="search_store_results" type="text" size="4" maxlength="6" name="config[search_store_results]" value="{SEARCH_STORE_RESULTS}" /> {L_SECONDS}</dd>
|
||||
|
|
|
@ -28,10 +28,17 @@ function jumpto()
|
|||
{
|
||||
var page = prompt(jump_page, on_page);
|
||||
|
||||
if (page !== null && !isNaN(page) && page > 0)
|
||||
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
|
||||
{
|
||||
if (base_url.indexOf('?') == -1)
|
||||
{
|
||||
document.location.href = base_url + '?start=' + ((page - 1) * per_page);
|
||||
}
|
||||
else
|
||||
{
|
||||
document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,10 +39,17 @@ function jumpto()
|
|||
{
|
||||
var page = prompt(jump_page, on_page);
|
||||
|
||||
if (page !== null && !isNaN(page) && page > 0)
|
||||
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
|
||||
{
|
||||
if (base_url.indexOf('?') == -1)
|
||||
{
|
||||
document.location.href = base_url + '?start=' + ((page - 1) * per_page);
|
||||
}
|
||||
else
|
||||
{
|
||||
document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
|
||||
<!-- add entry about common UTF8 problems (for example wrong uploading, editing) -->
|
||||
<ul>
|
||||
<li><a href="#install">I cannot install this it is too difficult! Will you do it?</a></li>
|
||||
<li><a href="#install">I am finding phpBB too difficult to install. Will you do it for me?</a></li>
|
||||
<li><a href="#legal">I am having problems with the admin at a certain board, help!</a></li>
|
||||
<li><a href="#legal">A board has ripped off my graphics/software/etc., stop them!</a></li>
|
||||
<li><a href="#legal">A board is dealing in warez/porn/etc., you need to prevent them doing this!</a></li>
|
||||
|
@ -62,7 +62,7 @@
|
|||
<li><a href="#mail">I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</a></li>
|
||||
<li><a href="#mail_language">My users are complaining that emails are not in their selected language!</a></li>
|
||||
<li><a href="#aol_browser">My AOL based users keep getting logged out!</a></li>
|
||||
<li><a href="#avatars">No matter what I set the uploadable avatars to I cannot upload one from my computer!</a></li>
|
||||
<li><a href="#avatars">I am unable to upload avatars from my computer, regardless of the settings.</a></li>
|
||||
<li><a href="#gallery_avatars">I just cannot get gallery avatars to appear!</a></li>
|
||||
<li><a href="#permissions">How do I use/set permissions?</a></li>
|
||||
<li><a href="#login_issues">I (or my users) cannot stay logged in to the forum!</a></li>
|
||||
|
@ -78,7 +78,7 @@
|
|||
|
||||
<hr />
|
||||
|
||||
<a name="install"></a><h2>I cannot install this it is too difficult! Will you do it?</h2>
|
||||
<a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
@ -205,7 +205,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
|||
|
||||
<hr />
|
||||
|
||||
<a name="avatars"></a><h2>No matter what I set the uploadable avatars to I cannot upload one from my computer!</h2>
|
||||
<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
|
|
@ -349,7 +349,7 @@ function send_avatar_to_browser($file, $browser)
|
|||
}
|
||||
else
|
||||
{
|
||||
header('HTTP/1.0 404 not found');
|
||||
header('HTTP/1.0 404 Not Found');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -631,8 +631,9 @@ function set_modified_headers($stamp, $browser)
|
|||
{
|
||||
if ($last_load !== false && $last_load <= $stamp)
|
||||
{
|
||||
if (@php_sapi_name() === 'CGI')
|
||||
if (substr(strtolower(@php_sapi_name()),0,3) === 'cgi')
|
||||
{
|
||||
// in theory, we shouldn't need that due to php doing it. Reality offers a differing opinion, though
|
||||
header('Status: 304 Not Modified', true, 304);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php
|
||||
18.04.2009<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
|
@ -509,12 +509,12 @@ class bbcode
|
|||
else if (is_numeric($type))
|
||||
{
|
||||
$tpl = 'olist_open';
|
||||
$type = 'arabic-numbers';
|
||||
$type = 'decimal';
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl = 'olist_open';
|
||||
$type = 'arabic-numbers';
|
||||
$type = 'decimal';
|
||||
}
|
||||
|
||||
return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl));
|
||||
|
|
|
@ -29,6 +29,8 @@ abstract class phpbb_default_captcha implements phpbb_captcha_plugin
|
|||
protected $type;
|
||||
protected $solved = false;
|
||||
|
||||
protected $min_chars = 4;
|
||||
protected $max_chars = 7;
|
||||
|
||||
function init($type)
|
||||
{
|
||||
|
@ -46,7 +48,7 @@ abstract class phpbb_default_captcha implements phpbb_captcha_plugin
|
|||
|
||||
function execute_demo()
|
||||
{
|
||||
$this->code = gen_rand_string(mt_rand(5, 8));
|
||||
$this->code = gen_rand_string(mt_rand($this->min_chars, $this->max_chars));
|
||||
$this->seed = hexdec(substr(unique_id(), 4, 10));
|
||||
|
||||
// compute $seed % 0x7fffffff
|
||||
|
@ -188,10 +190,11 @@ abstract class phpbb_default_captcha implements phpbb_captcha_plugin
|
|||
*/
|
||||
protected function generate_code()
|
||||
{
|
||||
$this->code = gen_rand_string(mt_rand(5, 8));
|
||||
$this->code = gen_rand_string(mt_rand($this->min_chars, $this->max_chars));
|
||||
$this->confirm_id = md5(unique_id(phpbb::$user->ip));
|
||||
$this->seed = hexdec(substr(unique_id(), 4, 10));
|
||||
$this->solved = false;
|
||||
|
||||
// compute $seed % 0x7fffffff
|
||||
$this->seed -= 0x7fffffff * floor($this->seed / 0x7fffffff);
|
||||
|
||||
|
|
|
@ -420,6 +420,15 @@ abstract class phpbb_session
|
|||
}
|
||||
}
|
||||
|
||||
// Something quite important: session_page always holds the *last* page visited, except for the *first* visit.
|
||||
// We are not able to simply have an empty session_page btw, therefore we need to tell phpBB how to detect this special case.
|
||||
// If the session id is empty, we have a completely new one and will set an "identifier" here. This identifier is able to be checked later.
|
||||
if (empty($this->data['session_id']))
|
||||
{
|
||||
// This is a temporary variable, only set for the very first visit
|
||||
$this->data['session_created'] = true;
|
||||
}
|
||||
|
||||
$this->session_id = $this->data['session_id'] = md5(phpbb::$security->unique_id());
|
||||
|
||||
$sql_ary['session_id'] = (string) $this->session_id;
|
||||
|
|
|
@ -187,8 +187,8 @@ class phpbb_template_filter extends php_user_filter
|
|||
$this->compile_language_tags($text_blocks);
|
||||
|
||||
// This will handle the remaining root-level varrefs
|
||||
$text_blocks = preg_replace('#\{([a-z0-9\-_]*)\}#is', "<?php echo (isset(\$_rootref['\\1'])) ? \$_rootref['\\1'] : ''; ?>", $text_blocks);
|
||||
$text_blocks = preg_replace('#\{\$([a-z0-9\-_]*)\}#is', "<?php echo (isset(\$_tpldata['DEFINE']['.']['\\1'])) ? \$_tpldata['DEFINE']['.']['\\1'] : ''; ?>", $text_blocks);
|
||||
$text_blocks = preg_replace('#\{([A-Z0-9\-_]+)\}#', "<?php echo (isset(\$_rootref['\\1'])) ? \$_rootref['\\1'] : ''; ?>", $text_blocks);
|
||||
$text_blocks = preg_replace('#\{\$([A-Z0-9\-_]+)\}#', "<?php echo (isset(\$_tpldata['DEFINE']['.']['\\1'])) ? \$_tpldata['DEFINE']['.']['\\1'] : ''; ?>", $text_blocks);
|
||||
|
||||
return $text_blocks;
|
||||
}
|
||||
|
@ -201,14 +201,14 @@ class phpbb_template_filter extends php_user_filter
|
|||
// transform vars prefixed by L_ into their language variable pendant if nothing is set within the tpldata array
|
||||
if (strpos($text_blocks, '{L_') !== false)
|
||||
{
|
||||
$text_blocks = preg_replace('#\{L_([a-z0-9\-_]*)\}#is', "<?php echo (isset(\$_rootref['L_\\1'])) ? \$_rootref['L_\\1'] : (isset(\$_lang['\\1']) ? \$_lang['\\1'] : '{ \\1 }'); ?>", $text_blocks);
|
||||
$text_blocks = preg_replace('#\{L_([A-Z0-9\-_]+)\}#', "<?php echo ((isset(\$_rootref['L_\\1'])) ? \$_rootref['L_\\1'] : ((isset(\$_lang['\\1'])) ? \$_lang['\\1'] : '{ \\1 }')); ?>", $text_blocks);
|
||||
}
|
||||
|
||||
// Handle addslashed language variables prefixed with LA_
|
||||
// If a template variable already exist, it will be used in favor of it...
|
||||
if (strpos($text_blocks, '{LA_') !== false)
|
||||
{
|
||||
$text_blocks = preg_replace('#\{LA_([a-z0-9\-_]*)\}#is', "<?php echo (isset(\$_rootref['LA_\\1'])) ? \$_rootref['LA_\\1'] : ((isset(\$_rootref['L_\\1'])) ? addslashes(\$_rootref['L_\\1']) : (isset(\$_lang['\\1']) ? addslashes(\$_lang['\\1']) : '{ \\1 }')); ?>", $text_blocks);
|
||||
$text_blocks = preg_replace('#\{LA_([A-Z0-9\-_]+)\}#', "<?php echo ((isset(\$_rootref['LA_\\1'])) ? \$_rootref['LA_\\1'] : ((isset(\$_rootref['L_\\1'])) ? addslashes(\$_rootref['L_\\1']) : ((isset(\$_lang['\\1'])) ? addslashes(\$_lang['\\1']) : '{ \\1 }'))); ?>", $text_blocks);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -953,7 +953,7 @@ class phpbb_user extends phpbb_session
|
|||
return $img_data;
|
||||
}
|
||||
|
||||
$img_data['src'] = PHPBB_ROOT_PATH . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename'];
|
||||
$img_data['src'] = PHPBB_ROOT_PATH . 'styles/' . rawurlencode($this->theme['imageset_path']) . '/imageset/' . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename'];
|
||||
$img_data['width'] = $this->img_array[$img]['image_width'];
|
||||
$img_data['height'] = $this->img_array[$img]['image_height'];
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
|||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.1.0-dev');
|
||||
define('PHPBB_VERSION', '3.1.0-dev1');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
|
|
@ -107,6 +107,9 @@ class phpbb_system extends phpbb_plugin_support
|
|||
|
||||
if ($this->chmod_info['process'])
|
||||
{
|
||||
$file_uid = fileowner($filename);
|
||||
$file_gid = filegroup($filename);
|
||||
|
||||
// Change owner
|
||||
if (@chown($filename, $this->chmod_info['common_owner']))
|
||||
{
|
||||
|
|
|
@ -633,7 +633,24 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
|||
return false;
|
||||
}
|
||||
|
||||
$where_clause = phpbb::$db->sql_in_set($where_type, array_map('intval', $where_ids));
|
||||
$where_ids = array_map('intval', $where_ids);
|
||||
|
||||
// Split post deletion into chunks to overcome database limitations
|
||||
if (sizeof($where_ids) >= 1001)
|
||||
{
|
||||
// Split into chunks of 1000
|
||||
$chunks = array_chunk($where_ids, 1000);
|
||||
$removed_posts = 0;
|
||||
|
||||
foreach ($chunks as $_where_ids)
|
||||
{
|
||||
$removed_posts += delete_posts($where_type, $_where_ids, $auto_sync, $posted_sync, $post_count_sync, $call_delete_topics);
|
||||
}
|
||||
|
||||
return $removed_posts;
|
||||
}
|
||||
|
||||
$where_clause = phpbb::$db->sql_in_set($where_type, $where_ids);
|
||||
}
|
||||
|
||||
$approved_posts = 0;
|
||||
|
@ -646,10 +663,10 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
|||
|
||||
while ($row = phpbb::$db->sql_fetchrow($result))
|
||||
{
|
||||
$post_ids[] = $row['post_id'];
|
||||
$poster_ids[] = $row['poster_id'];
|
||||
$topic_ids[] = $row['topic_id'];
|
||||
$forum_ids[] = $row['forum_id'];
|
||||
$post_ids[] = (int) $row['post_id'];
|
||||
$poster_ids[] = (int) $row['poster_id'];
|
||||
$topic_ids[] = (int) $row['topic_id'];
|
||||
$forum_ids[] = (int) $row['forum_id'];
|
||||
|
||||
if ($row['post_postcount'] && $post_count_sync && $row['post_approved'])
|
||||
{
|
||||
|
|
|
@ -1108,7 +1108,7 @@ function truncate_string($string, $max_length = 60, $max_store_length = 255, $al
|
|||
array_pop($chars);
|
||||
$string = implode('', $chars);
|
||||
}
|
||||
while (utf8_strlen($string) > $max_store_length || !sizeof($chars));
|
||||
while (!empty($chars) && utf8_strlen($string) > $max_store_length);
|
||||
}
|
||||
|
||||
if ($strip_reply)
|
||||
|
|
|
@ -234,7 +234,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
|||
// Handle marking posts
|
||||
if ($mark_read == 'forums' || $mark_read == 'all')
|
||||
{
|
||||
$redirect = phpbb::$url->build_url('mark', 'hash');
|
||||
$redirect = phpbb::$url->build_url(array('mark', 'hash'));
|
||||
$token = request_var('hash', '');
|
||||
|
||||
if (phpbb::$security->check_link($token, 'global'))
|
||||
|
|
|
@ -176,7 +176,8 @@ class messenger
|
|||
|
||||
if (empty($this->tpl_msg[$template_lang . $template_file]))
|
||||
{
|
||||
$tpl_file = PHPBB_ROOT_PATH . "language/$template_lang/email/$template_file.txt";
|
||||
$tpl_file = (!empty(phpbb::$user->lang_path)) ? phpbb::$user->lang_path : PHPBB_ROOT_PATH . 'language/';
|
||||
$tpl_file .= $template_lang . "/email/$template_file.txt";
|
||||
|
||||
if (!file_exists($tpl_file))
|
||||
{
|
||||
|
@ -1401,9 +1402,10 @@ function mail_encode($str)
|
|||
// define start delimimter, end delimiter and spacer
|
||||
$start = "=?UTF-8?B?";
|
||||
$end = "?=";
|
||||
$spacer = $end . ' ' . $start;
|
||||
$split_length = 64;
|
||||
$delimiter = "\r\n ";
|
||||
|
||||
// Maximum length is 75. $split_length *must* be a multiple of 4, but <= 75 - strlen($start . $delimiter . $end)!!!
|
||||
$split_length = 60;
|
||||
$encoded_str = base64_encode($str);
|
||||
|
||||
// If encoded string meets the limits, we just return with the correct data.
|
||||
|
@ -1415,7 +1417,7 @@ function mail_encode($str)
|
|||
// If there is only ASCII data, we just return what we want, correctly splitting the lines.
|
||||
if (strlen($str) === utf8_strlen($str))
|
||||
{
|
||||
return $start . implode($spacer, str_split($encoded_str, $split_length)) . $end;
|
||||
return $start . implode($end . $delimiter . $start, str_split($encoded_str, $split_length)) . $end;
|
||||
}
|
||||
|
||||
// UTF-8 data, compose encoded lines
|
||||
|
@ -1426,16 +1428,15 @@ function mail_encode($str)
|
|||
{
|
||||
$text = '';
|
||||
|
||||
while (sizeof($array) && intval((strlen($text . current($array)) + 2) / 3) << 2 <= $split_length)
|
||||
while (sizeof($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length)
|
||||
{
|
||||
$text .= current($array);
|
||||
unset($array[key($array)]);
|
||||
$text .= array_shift($array);
|
||||
}
|
||||
|
||||
$str .= $start . base64_encode($text) . $end . ' ';
|
||||
$str .= $start . base64_encode($text) . $end . $delimiter;
|
||||
}
|
||||
|
||||
return substr($str, 0, -1);
|
||||
return substr($str, 0, -strlen($delimiter));
|
||||
}
|
||||
|
||||
?>
|
|
@ -600,7 +600,7 @@ function create_thumbnail($source, $destination, $mimetype)
|
|||
list($new_width, $new_height) = get_img_size_format($width, $height);
|
||||
|
||||
// Do not create a thumbnail if the resulting width/height is bigger than the original one
|
||||
if ($new_width > $width && $new_height > $height)
|
||||
if ($new_width >= $width && $new_height >= $height)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1101,7 +1101,7 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
|||
|
||||
if (!$topic_notification && !$forum_notification)
|
||||
{
|
||||
trigger_error('WRONG_NOTIFICATION_MODE');
|
||||
trigger_error('NO_MODE');
|
||||
}
|
||||
|
||||
if (($topic_notification && !phpbb::$config['allow_topic_notify']) || ($forum_notification && !phpbb::$config['allow_forum_notify']))
|
||||
|
@ -1708,6 +1708,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
$sql_data[TOPICS_TABLE]['sql'] = array(
|
||||
'topic_poster' => (int) phpbb::$user->data['user_id'],
|
||||
'topic_time' => $current_time,
|
||||
'topic_last_view_time' => $current_time,
|
||||
'forum_id' => ($topic_type == POST_GLOBAL) ? 0 : $data['forum_id'],
|
||||
'icon_id' => $data['icon_id'],
|
||||
'topic_approved' => $post_approval,
|
||||
|
@ -1755,7 +1756,13 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
break;
|
||||
|
||||
case 'reply':
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies_real = topic_replies_real + 1, topic_bumped = 0, topic_bumper = 0' . (($post_approval) ? ', topic_replies = topic_replies + 1' : '') . ((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : '');
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_last_view_time = ' . $current_time . ',
|
||||
topic_replies_real = topic_replies_real + 1,
|
||||
topic_bumped = 0,
|
||||
topic_bumper = 0' .
|
||||
(($post_approval) ? ', topic_replies = topic_replies + 1' : '') .
|
||||
((!empty($data['attachment_data']) || (isset($data['topic_attachment']) && $data['topic_attachment'])) ? ', topic_attachment = 1' : '');
|
||||
|
||||
$sql_data[USERS_TABLE]['stat'][] = "user_lastpost_time = $current_time" . ((phpbb::$acl->acl_get('f_postcount', $data['forum_id']) && $post_approval) ? ', user_posts = user_posts + 1' : '');
|
||||
|
||||
if ($post_approval && $topic_type != POST_GLOBAL)
|
||||
|
@ -1794,6 +1801,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
'poll_max_options' => (isset($poll['poll_options'])) ? $poll['poll_max_options'] : 1,
|
||||
'poll_length' => (isset($poll['poll_options'])) ? $poll_length : 0,
|
||||
'poll_vote_change' => (isset($poll['poll_vote_change'])) ? $poll['poll_vote_change'] : 0,
|
||||
'topic_last_view_time' => $current_time,
|
||||
|
||||
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : (isset($data['topic_attachment']) ? $data['topic_attachment'] : 0),
|
||||
);
|
||||
|
@ -1837,7 +1845,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
|||
// Correctly set back the topic replies and forum posts... but only if the post was approved before.
|
||||
if (!$post_approval && $data['post_approved'])
|
||||
{
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1';
|
||||
$sql_data[TOPICS_TABLE]['stat'][] = 'topic_replies = topic_replies - 1, topic_last_view_time = ' . $current_time;
|
||||
$sql_data[FORUMS_TABLE]['stat'][] = 'forum_posts = forum_posts - 1';
|
||||
|
||||
set_config_count('num_posts', -1, true);
|
||||
|
|
|
@ -1731,8 +1731,14 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
|||
$url = append_sid('ucp', 'i=pm');
|
||||
$next_history_pm = $previous_history_pm = $prev_id = 0;
|
||||
|
||||
foreach ($rowset as $id => $row)
|
||||
// Re-order rowset to be able to get the next/prev message rows...
|
||||
$rowset = array_values($rowset);
|
||||
|
||||
for ($i = 0, $size = sizeof($rowset); $i < $size; $i++)
|
||||
{
|
||||
$row = &$rowset[$i];
|
||||
$id = (int) $row['msg_id'];
|
||||
|
||||
$author_id = $row['author_id'];
|
||||
$folder_id = (int) $row['folder_id'];
|
||||
|
||||
|
@ -1763,8 +1769,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
|||
|
||||
if ($id == $msg_id)
|
||||
{
|
||||
$next_history_pm = next($rowset);
|
||||
$next_history_pm = (sizeof($next_history_pm)) ? (int) $next_history_pm['msg_id'] : 0;
|
||||
$next_history_pm = (isset($rowset[$i + 1])) ? (int) $rowset[$i + 1]['msg_id'] : 0;
|
||||
$previous_history_pm = $prev_id;
|
||||
}
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ class transfer
|
|||
$directory = $this->root_path . str_replace(PHPBB_ROOT_PATH, '', $directory);
|
||||
|
||||
$this->_chdir($directory);
|
||||
$result = $this->_ls('');
|
||||
$result = $this->_ls();
|
||||
|
||||
if ($result !== false && is_array($result))
|
||||
{
|
||||
|
@ -442,7 +442,24 @@ class ftp extends transfer
|
|||
*/
|
||||
private function _ls($dir = './')
|
||||
{
|
||||
return @ftp_nlist($this->connection, $dir);
|
||||
$list = @ftp_nlist($this->connection, $dir);
|
||||
|
||||
// Remove path if prepended
|
||||
foreach ($list as $key => $item)
|
||||
{
|
||||
// Use same separator for item and dir
|
||||
$item = str_replace('\\', '/', $item);
|
||||
$dir = str_replace('\\', '/', $dir);
|
||||
|
||||
if (strpos($item, $dir) === 0)
|
||||
{
|
||||
$item = substr($item, strlen($dir));
|
||||
}
|
||||
|
||||
$list[$key] = $item;
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -690,6 +707,24 @@ class ftp_fsock extends transfer
|
|||
}
|
||||
$this->_close_data_connection();
|
||||
|
||||
// Clear buffer
|
||||
$this->_check_command();
|
||||
|
||||
// Remove path if prepended
|
||||
foreach ($list as $key => $item)
|
||||
{
|
||||
// Use same separator for item and dir
|
||||
$item = str_replace('\\', '/', $item);
|
||||
$dir = str_replace('\\', '/', $dir);
|
||||
|
||||
if (strpos($item, $dir) === 0)
|
||||
{
|
||||
$item = substr($item, strlen($dir));
|
||||
}
|
||||
|
||||
$list[$key] = $item;
|
||||
}
|
||||
|
||||
return $list;
|
||||
}
|
||||
|
||||
|
|
|
@ -588,7 +588,18 @@ class fileupload
|
|||
// PHP Upload filesize exceeded
|
||||
if ($file->get('filename') == 'none')
|
||||
{
|
||||
$file->error[] = (@ini_get('upload_max_filesize') == '') ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf(phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], @ini_get('upload_max_filesize'));
|
||||
$max_filesize = @ini_get('upload_max_filesize');
|
||||
$unit = 'MB';
|
||||
|
||||
if (!empty($max_filesize))
|
||||
{
|
||||
$unit = strtolower(substr($max_filesize, -1, 1));
|
||||
$max_filesize = (int) $max_filesize;
|
||||
|
||||
$unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
|
||||
}
|
||||
|
||||
$file->error[] = (empty($max_filesize)) ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : phpbb::$user->lang($this->error_prefix . 'PHP_SIZE_OVERRUN', $max_filesize, phpbb::$user->lang[$unit]);
|
||||
return $file;
|
||||
}
|
||||
|
||||
|
@ -662,7 +673,18 @@ class fileupload
|
|||
// PHP Upload filesize exceeded
|
||||
if ($file->get('filename') == 'none')
|
||||
{
|
||||
$file->error[] = (@ini_get('upload_max_filesize') == '') ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf(phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], @ini_get('upload_max_filesize'));
|
||||
$max_filesize = @ini_get('upload_max_filesize');
|
||||
$unit = 'MB';
|
||||
|
||||
if (!empty($max_filesize))
|
||||
{
|
||||
$unit = strtolower(substr($max_filesize, -1, 1));
|
||||
$max_filesize = (int) $max_filesize;
|
||||
|
||||
$unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
|
||||
}
|
||||
|
||||
$file->error[] = (empty($max_filesize)) ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : phpbb::$user->lang($this->error_prefix . 'PHP_SIZE_OVERRUN', $max_filesize, phpbb::$user->lang[$unit]);
|
||||
return $file;
|
||||
}
|
||||
|
||||
|
@ -806,7 +828,18 @@ class fileupload
|
|||
switch ($errorcode)
|
||||
{
|
||||
case 1:
|
||||
$error = (@ini_get('upload_max_filesize') == '') ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : sprintf(phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_OVERRUN'], @ini_get('upload_max_filesize'));
|
||||
$max_filesize = @ini_get('upload_max_filesize');
|
||||
$unit = 'MB';
|
||||
|
||||
if (!empty($max_filesize))
|
||||
{
|
||||
$unit = strtolower(substr($max_filesize, -1, 1));
|
||||
$max_filesize = (int) $max_filesize;
|
||||
|
||||
$unit = ($unit == 'k') ? 'KB' : (($unit == 'g') ? 'GB' : 'MB');
|
||||
}
|
||||
|
||||
$error = (empty($max_filesize)) ? phpbb::$user->lang[$this->error_prefix . 'PHP_SIZE_NA'] : phpbb::$user->lang($this->error_prefix . 'PHP_SIZE_OVERRUN', $max_filesize, phpbb::$user->lang[$unit]);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
|
|
|
@ -2686,13 +2686,14 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
|||
$temp_ary = array();
|
||||
while ($row = phpbb::$db->sql_fetchrow($result))
|
||||
{
|
||||
if ($default_groups[$row['user_id']] == $group_id && (!isset($temp_ary[$row['user_id']]) || array_search($row['group_name_clean'], $clean_group_order) < $temp_ary[$row['user_id']]))
|
||||
if ($default_groups[$row['user_id']] == $group_id && (!isset($temp_ary[$row['user_id']]) || $group_order_id[$row['group_name']] < $temp_ary[$row['user_id']]))
|
||||
{
|
||||
$temp_ary[$row['user_id']] = $row['group_id'];
|
||||
}
|
||||
}
|
||||
phpbb::$db->sql_freeresult($result);
|
||||
|
||||
// sql_where_ary holds the new default groups and their users
|
||||
$sql_where_ary = array();
|
||||
foreach ($temp_ary as $uid => $gid)
|
||||
{
|
||||
|
@ -2704,7 +2705,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
|||
{
|
||||
if (isset($sql_where_ary[$gid]) && sizeof($sql_where_ary[$gid]))
|
||||
{
|
||||
remove_default_rank($group_id, $sql_where_ary[$gid]);
|
||||
remove_default_rank($gid, $sql_where_ary[$gid]);
|
||||
remove_default_avatar($group_id, $sql_where_ary[$gid]);
|
||||
group_set_user_default($gid, $sql_where_ary[$gid], $default_data_ary);
|
||||
}
|
||||
|
|
|
@ -1037,12 +1037,8 @@ class parse_message extends bbcode_firstpass
|
|||
{
|
||||
// Init BBCode UID
|
||||
$this->bbcode_uid = substr(base_convert(unique_id(), 16, 36), 0, BBCODE_UID_LEN);
|
||||
|
||||
if ($message)
|
||||
{
|
||||
$this->message = $message;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse Message
|
||||
|
|
|
@ -110,6 +110,12 @@ class fulltext_mysql extends search_backend
|
|||
preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);
|
||||
$this->split_words = $matches[1];
|
||||
|
||||
// We limit the number of allowed keywords to minimize load on the database
|
||||
if (phpbb::$config['max_num_search_keywords'] && sizeof($this->split_words) > phpbb::$config['max_num_search_keywords'])
|
||||
{
|
||||
trigger_error(phpbb::$user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', phpbb::$config['max_num_search_keywords'], sizeof($this->split_words)));
|
||||
}
|
||||
|
||||
// to allow phrase search, we need to concatenate quoted words
|
||||
$tmp_split_words = array();
|
||||
$phrase = '';
|
||||
|
|
|
@ -163,6 +163,13 @@ class fulltext_native extends search_backend
|
|||
);
|
||||
|
||||
$keywords = preg_replace($match, $replace, $keywords);
|
||||
$num_keywords = sizeof(explode(' ', $keywords));
|
||||
|
||||
// We limit the number of allowed keywords to minimize load on the database
|
||||
if (phpbb::$config['max_num_search_keywords'] && $num_keywords > phpbb::$config['max_num_search_keywords'])
|
||||
{
|
||||
trigger_error(phpbb::$user->lang('MAX_NUM_SEARCH_KEYWORDS_REFINE', phpbb::$config['max_num_search_keywords'], $num_keywords));
|
||||
}
|
||||
|
||||
// $keywords input format: each word separated by a space, words in a bracket are not separated
|
||||
|
||||
|
@ -637,7 +644,11 @@ class fulltext_native extends search_backend
|
|||
|
||||
if (phpbb::$db->dbms_type === 'mysql')
|
||||
{
|
||||
$sql_array['SELECT'] = 'SQL_CALC_FOUND_ROWS ' . $sql_array['SELECT'];
|
||||
$sql_array_copy = $sql_array;
|
||||
|
||||
// $sql_array['SELECT'] = 'SQL_CALC_FOUND_ROWS ' . $sql_array['SELECT'];
|
||||
$sql_array_copy['SELECT'] = 'SQL_CALC_FOUND_ROWS p.post_id ';
|
||||
|
||||
$is_mysql = true;
|
||||
}
|
||||
else
|
||||
|
@ -710,8 +721,14 @@ class fulltext_native extends search_backend
|
|||
}
|
||||
|
||||
// if we use mysql and the total result count is not cached yet, retrieve it from the db
|
||||
if (!$total_results && $is_mysql)
|
||||
if (!$total_results && $is_mysql && !empty($sql_array_copy))
|
||||
{
|
||||
$sql = phpbb::$db->sql_build_query('SELECT', $sql_array_copy);
|
||||
unset($sql_array_copy);
|
||||
|
||||
phpbb::$db->sql_query($sql);
|
||||
phpbb::$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT FOUND_ROWS() as total_results';
|
||||
$result = phpbb::$db->sql_query($sql);
|
||||
$total_results = (int) phpbb::$db->sql_fetchfield('total_results');
|
||||
|
@ -831,7 +848,7 @@ class fulltext_native extends search_backend
|
|||
{
|
||||
if (phpbb::$db->dbms_type === 'mysql')
|
||||
{
|
||||
$select = 'SQL_CALC_FOUND_ROWS ' . $select;
|
||||
// $select = 'SQL_CALC_FOUND_ROWS ' . $select;
|
||||
$is_mysql = true;
|
||||
}
|
||||
else
|
||||
|
@ -923,6 +940,12 @@ class fulltext_native extends search_backend
|
|||
|
||||
if (!$total_results && $is_mysql)
|
||||
{
|
||||
// Count rows for the executed queries. Replace $select within $sql with SQL_CALC_FOUND_ROWS, and run it.
|
||||
$sql = str_replace('SELECT ' . $select, 'SELECT DISTINCT SQL_CALC_FOUND_ROWS p.post_id', $sql);
|
||||
|
||||
phpbb::$db->sql_query($sql);
|
||||
phpbb::$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT FOUND_ROWS() as total_results';
|
||||
$result = phpbb::$db->sql_query($sql);
|
||||
$total_results = (int) phpbb::$db->sql_fetchfield('total_results');
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
$updates_to_version = '3.1.0';
|
||||
$updates_to_version = '3.1.0-dev1';
|
||||
|
||||
// Enter any version to update from to test updates. The version within the db will not be updated.
|
||||
$debug_from_version = false;
|
||||
|
@ -55,8 +55,8 @@ $inline_update = (request_var('type', 0)) ? true : false;
|
|||
// Only an example, but also commented out
|
||||
$database_update_info = array(
|
||||
|
||||
// No changes from 3.0.3-RC1 to 3.0.3
|
||||
'3.0.3-RC1' => array(),
|
||||
// Changes from 3.0.5 to 3.1.0-dev1
|
||||
'3.0.5' => array(),
|
||||
);
|
||||
|
||||
$error_ary = array();
|
||||
|
@ -340,6 +340,9 @@ function change_database_data($version)
|
|||
switch ($version)
|
||||
{
|
||||
default:
|
||||
// Changes from 3.0.5 to 3.1.0-dev1
|
||||
case '3.0.5':
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -206,6 +206,7 @@ $schema_data[] = array(
|
|||
array('max_filesize_pm', '262144'),
|
||||
array('max_login_attempts', '3'),
|
||||
array('max_name_chars', '20'),
|
||||
array('max_num_search_keywords', '10'),
|
||||
array('max_pass_chars', '30'),
|
||||
array('max_poll_options', '10'),
|
||||
array('max_poll_chars', '60000'),
|
||||
|
@ -268,7 +269,7 @@ $schema_data[] = array(
|
|||
array('tpl_allow_php', '0'),
|
||||
array('upload_icons_path', 'images/upload_icons'),
|
||||
array('upload_path', 'files'),
|
||||
array('version', '3.1.0'),
|
||||
array('version', '3.1.0-dev1'),
|
||||
array('warnings_expire_days', '90'),
|
||||
array('warnings_gc', '14400'),
|
||||
),
|
||||
|
|
|
@ -269,8 +269,8 @@ $lang = array_merge($lang, array(
|
|||
'VISUAL_CONFIRM_POST_EXPLAIN' => 'Requires anonymous users to enter a random code matching an image to help prevent mass postings.',
|
||||
'VISUAL_CONFIRM_REG' => 'Enable visual confirmation for registrations',
|
||||
'VISUAL_CONFIRM_REG_EXPLAIN' => 'Requires new users to enter a random code matching an image to help prevent mass registrations.',
|
||||
'VISUAL_CONFIRM_REFRESH' => 'Enable users to request new images',
|
||||
'VISUAL_CONFIRM_REFRESH_EXPLAIN' => 'Allows users to request new images, if they are unable to solve the VC during registration.',
|
||||
'VISUAL_CONFIRM_REFRESH' => 'Enable users to refresh the confirmation image',
|
||||
'VISUAL_CONFIRM_REFRESH_EXPLAIN' => 'Allows users to request new confirmation codes, if they are unable to solve the VC during registration.',
|
||||
));
|
||||
|
||||
// Cookie Settings
|
||||
|
|
|
@ -83,10 +83,10 @@ $lang = array_merge($lang, array(
|
|||
'ACP_GLOBAL_MODERATORS_EXPLAIN' => 'Here you can assign global moderator permissions to users or groups. These moderators are like ordinary moderators except they have access to every forum on your board.',
|
||||
'ACP_GROUPS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to groups.',
|
||||
'ACP_GROUPS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to groups - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. Individual users permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.',
|
||||
'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
|
||||
'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
|
||||
'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
|
||||
'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change it’s permissions too.',
|
||||
'ACP_ADMIN_ROLES_EXPLAIN' => 'Here you are able to manage the roles for administrative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
|
||||
'ACP_FORUM_ROLES_EXPLAIN' => 'Here you are able to manage the roles for forum permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
|
||||
'ACP_MOD_ROLES_EXPLAIN' => 'Here you are able to manage the roles for moderative permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
|
||||
'ACP_USER_ROLES_EXPLAIN' => 'Here you are able to manage the roles for user permissions. Roles are effective permissions, if you change a role the items having this role assigned will change its permissions too.',
|
||||
'ACP_USERS_FORUM_PERMISSIONS_EXPLAIN' => 'Here you can assign forum permissions to users.',
|
||||
'ACP_USERS_PERMISSIONS_EXPLAIN' => 'Here you can assign global permissions to users - user permissions, global moderator permissions and administrator permissions. User permissions include capabilities such as the use of avatars, sending private messages, et cetera; global moderator permissions such as approving posts, manage topics, manage bans, et cetera and lastly administrator permissions such as altering permissions, define custom BBCodes, manage forums, et cetera. To alter these settings for large numbers of users the Group permissions system is the preferred method. User’s permissions should only be changed in rare occasions, the preferred method is putting users in groups and assigning the group’s permissions.',
|
||||
'ACP_VIEW_ADMIN_PERMISSIONS_EXPLAIN' => 'Here you can view the effective administrative permissions assigned to the selected users/groups.',
|
||||
|
|
|
@ -68,6 +68,8 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'MAX_SEARCH_CHARS' => 'Max characters indexed by search',
|
||||
'MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching.',
|
||||
'MAX_NUM_SEARCH_KEYWORDS' => 'Maximum number of allowed keywords',
|
||||
'MAX_NUM_SEARCH_KEYWORDS_EXPLAIN' => 'Maximum number of words the user is able to search for. A value of 0 allows an unlimited number of words.',
|
||||
'MIN_SEARCH_CHARS' => 'Min characters indexed by search',
|
||||
'MIN_SEARCH_CHARS_EXPLAIN' => 'Words with at least this many characters will be indexed for searching.',
|
||||
'MIN_SEARCH_AUTHOR_CHARS' => 'Min author name characters',
|
||||
|
|
|
@ -87,7 +87,7 @@ $lang = array_merge($lang, array(
|
|||
'AVATAR_NO_SIZE' => 'The width or height of the linked avatar could not be determined. Please enter them manually.',
|
||||
'AVATAR_PARTIAL_UPLOAD' => 'The specified file was only partially uploaded.',
|
||||
'AVATAR_PHP_SIZE_NA' => 'The avatar’s filesize is too large.<br />The maximum allowed filesize set in php.ini could not be determined.',
|
||||
'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large. The maximum allowed upload size is %d MB.<br />Please note this is set in php.ini and cannot be overridden.',
|
||||
'AVATAR_PHP_SIZE_OVERRUN' => 'The avatar’s filesize is too large. The maximum allowed upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
|
||||
'AVATAR_URL_INVALID' => 'The URL you specified is invalid.',
|
||||
'AVATAR_URL_NOT_FOUND' => 'The file specified could not be found.',
|
||||
'AVATAR_WRONG_FILESIZE' => 'The avatar’s filesize must be between 0 and %1d %2s.',
|
||||
|
@ -163,7 +163,7 @@ $lang = array_merge($lang, array(
|
|||
),
|
||||
|
||||
'EDIT_POST' => 'Edit post',
|
||||
'EMAIL' => 'E-mail',
|
||||
'EMAIL' => 'E-mail', // Short form for EMAIL_ADDRESS
|
||||
'EMAIL_ADDRESS' => 'E-mail address',
|
||||
'EMAIL_SMTP_ERROR_RESPONSE' => 'Ran into problems sending e-mail at <strong>Line %1$s</strong>. Response: %2$s.',
|
||||
'EMPTY_SUBJECT' => 'You must specify a subject when posting a new topic.',
|
||||
|
@ -233,6 +233,8 @@ $lang = array_merge($lang, array(
|
|||
'FTP_USERNAME_EXPLAIN' => 'Username used to connect to your server.',
|
||||
|
||||
'GENERAL_ERROR' => 'General Error',
|
||||
'GB' => 'GB',
|
||||
'GIB' => 'GiB',
|
||||
'GO' => 'Go',
|
||||
'GOTO_PAGE' => 'Go to page',
|
||||
'GROUP' => 'Group',
|
||||
|
@ -535,7 +537,7 @@ $lang = array_merge($lang, array(
|
|||
'SELECT_ALL_CODE' => 'Select all',
|
||||
'SELECT_DESTINATION_FORUM' => 'Please select a destination forum',
|
||||
'SELECT_FORUM' => 'Select a forum',
|
||||
'SEND_EMAIL' => 'E-mail',
|
||||
'SEND_EMAIL' => 'E-mail', // Used for submit buttons
|
||||
'SEND_EMAIL_USER' => 'E-mail', // Used as: {L_SEND_EMAIL_USER} {USERNAME} -> E-mail UserX
|
||||
'SEND_PRIVATE_MESSAGE' => 'Send private message',
|
||||
'SETTINGS' => 'Settings',
|
||||
|
|
|
@ -76,7 +76,7 @@ $help = array(
|
|||
),
|
||||
array(
|
||||
0 => 'Creating an Ordered list',
|
||||
1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: arabic-numbers"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>'
|
||||
1 => 'The second type of list, an ordered list, gives you control over what is output before each item. To create an ordered list you use <strong>[list=1][/list]</strong> to create a numbered list or alternatively <strong>[list=a][/list]</strong> for an alphabetical list. As with the unordered list, items are specified using <strong>[*]</strong>. For example:<br /><br /><strong>[list=1]</strong><br /><strong>[*]</strong>Go to the shops<br /><strong>[*]</strong>Buy a new computer<br /><strong>[*]</strong>Swear at computer when it crashes<br /><strong>[/list]</strong><br /><br />will generate the following:<ol style="list-style-type: decimal;"><li>Go to the shops</li><li>Buy a new computer</li><li>Swear at computer when it crashes</li></ol>Whereas for an alphabetical list you would use:<br /><br /><strong>[list=a]</strong><br /><strong>[*]</strong>The first possible answer<br /><strong>[*]</strong>The second possible answer<br /><strong>[*]</strong>The third possible answer<br /><strong>[/list]</strong><br /><br />giving<ol style="list-style-type: lower-alpha"><li>The first possible answer</li><li>The second possible answer</li><li>The third possible answer</li></ol>'
|
||||
),
|
||||
array(
|
||||
0 => '--',
|
||||
|
|
|
@ -141,7 +141,7 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'PARTIAL_UPLOAD' => 'The uploaded file was only partially uploaded.',
|
||||
'PHP_SIZE_NA' => 'The attachment’s file size is too large.<br />Could not determine the maximum size defined by PHP in php.ini.',
|
||||
'PHP_SIZE_OVERRUN' => 'The attachment’s file size is too large, the maximum upload size is %d MB.<br />Please note this is set in php.ini and cannot be overridden.',
|
||||
'PHP_SIZE_OVERRUN' => 'The attachment’s file size is too large, the maximum upload size is %1$d %2$s.<br />Please note this is set in php.ini and cannot be overridden.',
|
||||
'PLACE_INLINE' => 'Place inline',
|
||||
'POLL_DELETE' => 'Delete poll',
|
||||
'POLL_FOR' => 'Run poll for',
|
||||
|
|
|
@ -54,6 +54,8 @@ $lang = array_merge($lang, array(
|
|||
|
||||
'LOGIN_EXPLAIN_EGOSEARCH' => 'The board requires you to be registered and logged in to view your own posts.',
|
||||
|
||||
'MAX_NUM_SEARCH_KEYWORDS_REFINE' => 'You specified too many words to search for. Please do not enter more than %1$d words.',
|
||||
|
||||
'NO_KEYWORDS' => 'You must specify at least one word to search for. Each word must consist of at least %d characters and must not contain more than %d characters excluding wildcards.',
|
||||
'NO_RECENT_SEARCHES' => 'No searches have been carried out recently.',
|
||||
'NO_SEARCH' => 'Sorry but you are not permitted to use the search system.',
|
||||
|
|
|
@ -122,8 +122,8 @@ $lang = array_merge($lang, array(
|
|||
'CONFIRM_EMAIL' => 'Confirm e-mail address',
|
||||
'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your e-mail address.',
|
||||
'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.',
|
||||
'VC_REFRESH' => 'New Image',
|
||||
'VC_REFRESH_EXPLAIN' => 'If you cannot read the code, then you can request a new one by clicking the button.',
|
||||
'VC_REFRESH' => 'Refresh confirmation code',
|
||||
'VC_REFRESH_EXPLAIN' => 'If you cannot read the code you can request a new one by clicking the button.',
|
||||
|
||||
'CONFIRM_PASSWORD' => 'Confirm password',
|
||||
'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above.',
|
||||
|
|
|
@ -169,6 +169,13 @@ if ($quickmod)
|
|||
break;
|
||||
|
||||
case 'topic_logs':
|
||||
// Reset start parameter if we jumped from the quickmod dropdown
|
||||
if (request_var('start', 0))
|
||||
{
|
||||
phpbb_request::overwrite('start', 0, phpbb_request::GET);
|
||||
phpbb_request::overwrite('start', 0, phpbb_request::REQUEST);
|
||||
}
|
||||
|
||||
$module->set_active('logs', 'topic_logs');
|
||||
break;
|
||||
|
||||
|
|
|
@ -890,6 +890,8 @@ switch ($mode)
|
|||
|
||||
phpbb::$template->assign_vars(array(
|
||||
'ERROR_MESSAGE' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'SUBJECT' => $subject,
|
||||
'MESSAGE' => $message,
|
||||
));
|
||||
|
||||
break;
|
||||
|
|
|
@ -78,7 +78,7 @@ class acp_database
|
|||
$schema_data = true;
|
||||
}
|
||||
|
||||
@set_time_limit(1200);
|
||||
@set_time_limit(0);
|
||||
|
||||
$time = time();
|
||||
|
||||
|
@ -420,27 +420,37 @@ class acp_database
|
|||
$dir = PHPBB_ROOT_PATH . 'store/';
|
||||
$dh = @opendir($dir);
|
||||
|
||||
$backup_files = array();
|
||||
|
||||
if ($dh)
|
||||
{
|
||||
while (($file = readdir($dh)) !== false)
|
||||
{
|
||||
if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
||||
{
|
||||
$supported = in_array($matches[2], $methods);
|
||||
|
||||
if ($supported == 'true')
|
||||
if (in_array($matches[2], $methods))
|
||||
{
|
||||
phpbb::$template->assign_block_vars('files', array(
|
||||
'FILE' => $file,
|
||||
'NAME' => gmdate("d-m-Y H:i:s", $matches[1]),
|
||||
'SUPPORTED' => $supported,
|
||||
));
|
||||
$backup_files[gmdate("d-m-Y H:i:s", $matches[1])] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($dh);
|
||||
}
|
||||
|
||||
if (!empty($backup_files))
|
||||
{
|
||||
krsort($backup_files);
|
||||
|
||||
foreach ($backup_files as $name => $file)
|
||||
{
|
||||
phpbb::$template->assign_block_vars('files', array(
|
||||
'FILE' => $file,
|
||||
'NAME' => $name,
|
||||
'SUPPORTED' => true,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
phpbb::$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action . '&action=submit',
|
||||
));
|
||||
|
@ -540,6 +550,7 @@ class base_extractor
|
|||
function write_end()
|
||||
{
|
||||
static $close;
|
||||
|
||||
if ($this->store)
|
||||
{
|
||||
if ($close === null)
|
||||
|
|
|
@ -743,7 +743,7 @@ class acp_permissions
|
|||
|
||||
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_ids, $forum_ids);
|
||||
|
||||
trigger_error(phpbb::$user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
trigger_error(phpbb::$user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&forum_id[]=' . implode('&forum_id[]=', $forum_ids)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -806,7 +806,7 @@ class acp_permissions
|
|||
|
||||
$this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : array(0 => 0)));
|
||||
|
||||
trigger_error(phpbb::$user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
trigger_error(phpbb::$user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&forum_id[]=' . implode('&forum_id[]=', $forum_id)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -58,6 +58,7 @@ class acp_search
|
|||
'load_search' => 'bool',
|
||||
'limit_search_load' => 'float',
|
||||
'min_search_author_chars' => 'integer',
|
||||
'max_num_search_keywords' => 'integer',
|
||||
'search_store_results' => 'integer',
|
||||
);
|
||||
|
||||
|
@ -211,6 +212,7 @@ class acp_search
|
|||
'SEARCH_INTERVAL' => (float) phpbb::$config['search_interval'],
|
||||
'SEARCH_GUEST_INTERVAL' => (float) phpbb::$config['search_anonymous_interval'],
|
||||
'SEARCH_STORE_RESULTS' => (int) phpbb::$config['search_store_results'],
|
||||
'MAX_NUM_SEARCH_KEYWORDS' => (int) phpbb::$config['max_num_search_keywords'],
|
||||
|
||||
'S_SEARCH_TYPES' => $search_options,
|
||||
'S_YES_SEARCH' => (bool) phpbb::$config['load_search'],
|
||||
|
|
|
@ -34,7 +34,10 @@ class acp_styles
|
|||
// Hardcoded template bitfield to add for new templates
|
||||
$bitfield = new bitfield();
|
||||
$bitfield->set(0);
|
||||
$bitfield->set(1);
|
||||
$bitfield->set(2);
|
||||
$bitfield->set(3);
|
||||
$bitfield->set(4);
|
||||
$bitfield->set(8);
|
||||
$bitfield->set(9);
|
||||
$bitfield->set(11);
|
||||
|
|
|
@ -1843,6 +1843,16 @@ class acp_users
|
|||
}
|
||||
|
||||
$error = array();
|
||||
|
||||
// The delete action was successful - therefore update the user row...
|
||||
$sql = 'SELECT u.*, s.*
|
||||
FROM ' . USERS_TABLE . ' u
|
||||
LEFT JOIN ' . SESSIONS_TABLE . ' s ON (s.session_user_id = u.user_id)
|
||||
WHERE u.user_id = ' . $user_id . '
|
||||
ORDER BY s.session_time DESC';
|
||||
$result = $db->sql_query($sql);
|
||||
$user_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -775,7 +775,8 @@ class ucp_main
|
|||
$folder_img = $folder_alt = $topic_type = '';
|
||||
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
|
||||
|
||||
$view_topic_url = append_sid('viewtopic', "f=$forum_id&t=$topic_id");
|
||||
$view_topic_url_params = "f=$forum_id&t=$topic_id";
|
||||
$view_topic_url = append_sid('viewtopic', $view_topic_url_params);
|
||||
|
||||
// Send vars to template
|
||||
phpbb::$template->assign_block_vars('topicrow', array(
|
||||
|
@ -818,8 +819,8 @@ class ucp_main
|
|||
'S_USER_POSTED' => (!empty($row['topic_posted'])) ? true : false,
|
||||
'S_UNREAD_TOPIC' => $unread_topic,
|
||||
|
||||
'U_NEWEST_POST' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
|
||||
'U_NEWEST_POST' => append_sid('viewtopic', $view_topic_url_params . '&view=unread') . '#unread',
|
||||
'U_LAST_POST' => append_sid('viewtopic', $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_VIEW_TOPIC' => $view_topic_url,
|
||||
'U_VIEW_FORUM' => append_sid('viewforum', 'f=' . $forum_id),
|
||||
));
|
||||
|
|
|
@ -839,10 +839,10 @@ function compose_pm($id, $mode, $action)
|
|||
|
||||
$forward_text = array();
|
||||
$forward_text[] = phpbb::$user->lang['FWD_ORIGINAL_MESSAGE'];
|
||||
$forward_text[] = sprintf(phpbb::$user->lang['FWD_SUBJECT'], censor_text($message_subject));
|
||||
$forward_text[] = sprintf(phpbb::$user->lang['FWD_DATE'], phpbb::$user->format_date($message_time));
|
||||
$forward_text[] = sprintf(phpbb::$user->lang['FWD_FROM'], $quote_username_text);
|
||||
$forward_text[] = sprintf(phpbb::$user->lang['FWD_TO'], implode(', ', $fwd_to_field['to']));
|
||||
$forward_text[] = phpbb::$user->lang('FWD_SUBJECT', censor_text($message_subject));
|
||||
$forward_text[] = phpbb::$user->lang('FWD_DATE', phpbb::$user->format_date($message_time, false, true));
|
||||
$forward_text[] = phpbb::$user->lang('FWD_FROM', $quote_username_text);
|
||||
$forward_text[] = phpbb::$user->lang('FWD_TO', implode(', ', $fwd_to_field['to']));
|
||||
|
||||
$message_parser->message = implode("\n", $forward_text) . "\n\n[quote="{$quote_username}"]\n" . censor_text(trim($message_parser->message)) . "\n[/quote]";
|
||||
$message_subject = ((!preg_match('/^Fwd:/', $message_subject)) ? 'Fwd: ' : '') . censor_text($message_subject);
|
||||
|
|
|
@ -325,7 +325,7 @@ function view_folder($id, $mode, $folder_id, $folder)
|
|||
$data[] = array(
|
||||
'subject' => censor_text($row['message_subject']),
|
||||
'sender' => $row['username'],
|
||||
'date' => phpbb::$user->format_date($row['message_time']),
|
||||
'date' => phpbb::$user->format_date($row['message_time'], 'c', true), // ISO 8601 date.
|
||||
'to' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? $address[$message_id] : '',
|
||||
'message' => $message_row['message_text']
|
||||
);
|
||||
|
@ -497,7 +497,7 @@ function get_pm_from($folder_id, $folder, $user_id)
|
|||
'PAGE_NUMBER' => on_page($pm_count, phpbb::$config['topics_per_page'], $start),
|
||||
'TOTAL_MESSAGES' => (($pm_count == 1) ? phpbb::$user->lang['VIEW_PM_MESSAGE'] : sprintf(phpbb::$user->lang['VIEW_PM_MESSAGES'], $pm_count)),
|
||||
|
||||
'POST_IMG' => (!phpbb::$acl->acl_get('u_sendpm')) ? phpbb::$user->img('button_topic_locked', 'PM_LOCKED') : phpbb::$user->img('button_pm_new', 'POST_PM'),
|
||||
'POST_IMG' => (!phpbb::$acl->acl_get('u_sendpm')) ? phpbb::$user->img('button_topic_locked', 'POST_PM_LOCKED') : phpbb::$user->img('button_pm_new', 'POST_NEW_PM'),
|
||||
|
||||
'L_NO_MESSAGES' => (!phpbb::$acl->acl_get('u_sendpm')) ? phpbb::$user->lang['POST_PM_LOCKED'] : phpbb::$user->lang['NO_MESSAGES'],
|
||||
|
||||
|
|
|
@ -55,7 +55,8 @@ if (phpbb::$config['enable_post_confirm'] && !phpbb::$user->is_registered)
|
|||
// Was cancel pressed? If so then redirect to the appropriate page
|
||||
if ($cancel || ($current_time - $lastclick < 2 && $submit))
|
||||
{
|
||||
$redirect = ($post_id) ? append_sid('viewtopic', 'p=' . $post_id) . '#p' . $post_id : (($topic_id) ? append_sid('viewtopic', 't=' . $topic_id) : (($forum_id) ? append_sid('viewforum', 'f=' . $forum_id) : append_sid('index')));
|
||||
$f = ($forum_id) ? 'f=' . $forum_id . '&' : '';
|
||||
$redirect = ($post_id) ? append_sid('viewtopic', $f . 'p=' . $post_id) . '#p' . $post_id : (($topic_id) ? append_sid('viewtopic', $f . 't=' . $topic_id) : (($forum_id) ? append_sid('viewforum', 'f=' . $forum_id) : append_sid('index')));
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
|
|
|
@ -767,7 +767,8 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
$u_forum_id = $forum_id;
|
||||
}
|
||||
|
||||
$view_topic_url = append_sid('viewtopic', "f=$u_forum_id&t=$result_topic_id" . (($u_hilit) ? "&hilit=$u_hilit" : ''));
|
||||
$view_topic_url_params = "f=$u_forum_id&t=$result_topic_id" . (($u_hilit) ? "&hilit=$u_hilit" : '');
|
||||
$view_topic_url = append_sid('viewtopic', $view_topic_url_params);
|
||||
|
||||
$replies = (phpbb::$acl->acl_get('m_approve', $forum_id)) ? $row['topic_replies_real'] : $row['topic_replies'];
|
||||
|
||||
|
@ -825,10 +826,10 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved,
|
||||
|
||||
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST' => append_sid('viewtopic', $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'U_NEWEST_POST' => $view_topic_url . '&view=unread#unread',
|
||||
'U_NEWEST_POST' => append_sid('viewtopic', $view_topic_url_params . '&view=unread') . '#unread',
|
||||
'U_MCP_REPORT' => append_sid('mcp', 'i=reports&mode=reports&t=' . $result_topic_id, true, phpbb::$user->session_id),
|
||||
'U_MCP_QUEUE' => $u_mcp_queue,
|
||||
);
|
||||
|
|
|
@ -16,7 +16,6 @@ var is_ie = ((clientPC.indexOf('msie') != -1) && (clientPC.indexOf('opera') == -
|
|||
var is_win = ((clientPC.indexOf('win') != -1) || (clientPC.indexOf('16bit') != -1));
|
||||
|
||||
var baseHeight;
|
||||
onload_functions.push('initInsertions()');
|
||||
|
||||
/**
|
||||
* Shows the help messages in the helpline window
|
||||
|
|
|
@ -23,10 +23,17 @@ function jumpto()
|
|||
{
|
||||
var page = prompt(jump_page, on_page);
|
||||
|
||||
if (page !== null && !isNaN(page) && page > 0)
|
||||
if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0)
|
||||
{
|
||||
if (base_url.indexOf('?') == -1)
|
||||
{
|
||||
document.location.href = base_url + '?start=' + ((page - 1) * per_page);
|
||||
}
|
||||
else
|
||||
{
|
||||
document.location.href = base_url.replace(/&/g, '&') + '&start=' + ((page - 1) * per_page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -135,7 +135,7 @@
|
|||
</div>
|
||||
|
||||
<div id="message-box">
|
||||
<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
|
||||
<textarea <!-- IF S_UCP_ACTION and not S_PRIVMSGS and not S_EDIT_DRAFT -->name="signature" id="signature" style="height: 9em;"<!-- ELSE -->name="message" id="message"<!-- ENDIF --> rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" onfocus="initInsertions();" class="inputbox">{MESSAGE}{DRAFT_MESSAGE}{SIGNATURE}</textarea>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<dd>
|
||||
<ul class="profile-icons">
|
||||
<!-- IF U_PM --><li class="pm-icon"><a href="{U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_EMAIL}"><span>{L_EMAIL}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF U_EMAIL --><li class="email-icon"><a href="{U_EMAIL}" title="{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}"><span>{L_SEND_EMAIL_USER} {MESSAGE_AUTHOR}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF U_WWW --><li class="web-icon"><a href="{U_WWW}" title="{L_VISIT_WEBSITE}: {U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF U_MSN --><li class="msnm-icon"><a href="{U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF U_ICQ --><li class="icq-icon"><a href="{U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
||||
<!-- IF not S_USER_LOGGED_IN -->
|
||||
<!-- IF not S_USER_LOGGED_IN and not S_IS_BOT -->
|
||||
|
||||
<form action="{S_LOGIN_ACTION}" method="post">
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@
|
|||
<dd>
|
||||
<ul class="profile-icons">
|
||||
<!-- IF postrow.U_PM --><li class="pm-icon"><a href="{postrow.U_PM}" title="{L_PRIVATE_MESSAGE}"><span>{L_PRIVATE_MESSAGE}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_EMAIL}"><span>{L_EMAIL}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF postrow.U_EMAIL --><li class="email-icon"><a href="{postrow.U_EMAIL}" title="{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}"><span>{L_SEND_EMAIL_USER} {postrow.POST_AUTHOR}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF postrow.U_WWW --><li class="web-icon"><a href="{postrow.U_WWW}" title="{L_VISIT_WEBSITE}: {postrow.U_WWW}"><span>{L_WEBSITE}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF postrow.U_MSN --><li class="msnm-icon"><a href="{postrow.U_MSN}" onclick="popup(this.href, 550, 320); return false;" title="{L_MSNM}"><span>{L_MSNM}</span></a></li><!-- ENDIF -->
|
||||
<!-- IF postrow.U_ICQ --><li class="icq-icon"><a href="{postrow.U_ICQ}" onclick="popup(this.href, 550, 320); return false;" title="{L_ICQ}"><span>{L_ICQ}</span></a></li><!-- ENDIF -->
|
||||
|
|
|
@ -719,4 +719,7 @@
|
|||
* tweaks.css
|
||||
*/
|
||||
|
||||
|
||||
/** Reference: Bug #27155 */
|
||||
.rtl #wrap, .rtl .headerbar, .rtl #site-description, .rtl .navbar {
|
||||
position: relative;
|
||||
}
|
||||
|
|
|
@ -882,7 +882,7 @@ dl.mini dt {
|
|||
border-color: #5D8FBD;
|
||||
}
|
||||
|
||||
pmlist li.pm_foe_colour, .pm_foe_colour {
|
||||
.pmlist li.pm_foe_colour, .pm_foe_colour {
|
||||
border-color: #000000;
|
||||
}
|
||||
|
||||
|
|
|
@ -599,7 +599,7 @@ div.rules {
|
|||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
div.rules ul {
|
||||
div.rules ul, div.rules ol {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
|
|
@ -612,7 +612,8 @@ if (sizeof($topic_list))
|
|||
topic_status($row, $replies, $unread_topic, $folder_img, $folder_alt, $topic_type);
|
||||
|
||||
// Generate all the URIs ...
|
||||
$view_topic_url = append_sid('viewtopic', 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id);
|
||||
$view_topic_url_params = 'f=' . (($row['forum_id']) ? $row['forum_id'] : $forum_id) . '&t=' . $topic_id;
|
||||
$view_topic_url = append_sid('viewtopic', $view_topic_url_params);
|
||||
|
||||
$topic_unapproved = (!$row['topic_approved'] && phpbb::$acl->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$posts_unapproved = ($row['topic_approved'] && $row['topic_replies'] < $row['topic_replies_real'] && phpbb::$acl->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
|
@ -664,8 +665,8 @@ if (sizeof($topic_list))
|
|||
'S_TOPIC_LOCKED' => ($row['topic_status'] == ITEM_LOCKED) ? true : false,
|
||||
'S_TOPIC_MOVED' => ($row['topic_status'] == ITEM_MOVED) ? true : false,
|
||||
|
||||
'U_NEWEST_POST' => $view_topic_url . '&view=unread#unread',
|
||||
'U_LAST_POST' => $view_topic_url . '&p=' . $row['topic_last_post_id'] . '#p' . $row['topic_last_post_id'],
|
||||
'U_NEWEST_POST' => append_sid('viewtopic', $view_topic_url_params . '&view=unread') . '#unread',
|
||||
'U_LAST_POST' => append_sid('viewtopic', $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
'U_TOPIC_AUTHOR' => get_username_string('profile', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||
'U_VIEW_TOPIC' => $view_topic_url,
|
||||
|
|
|
@ -186,7 +186,7 @@ while ($row = phpbb::$db->sql_fetchrow($result))
|
|||
continue;
|
||||
}
|
||||
|
||||
preg_match('#^([a-z/]+)#i', $row['session_page'], $on_page);
|
||||
preg_match('#^([a-z/_]+)#i', $row['session_page'], $on_page);
|
||||
if (!sizeof($on_page))
|
||||
{
|
||||
$on_page[1] = '';
|
||||
|
|
|
@ -262,9 +262,9 @@ phpbb::$db->sql_freeresult($result);
|
|||
if (!$topic_data)
|
||||
{
|
||||
// If post_id was submitted, we try at least to display the topic as a last resort...
|
||||
if ($post_id && $forum_id && $topic_id)
|
||||
if ($post_id && $topic_id)
|
||||
{
|
||||
redirect(append_sid('viewtopic', "f=$forum_id&t=$topic_id"));
|
||||
redirect(append_sid('viewtopic', "t=$topic_id" . (($forum_id) ? "&f=$forum_id" : '')));
|
||||
}
|
||||
|
||||
trigger_error('NO_TOPIC');
|
||||
|
@ -605,7 +605,7 @@ phpbb::$template->assign_vars(array(
|
|||
'S_SINGLE_MODERATOR' => (!empty($forum_moderators[$forum_id]) && sizeof($forum_moderators[$forum_id]) > 1) ? false : true,
|
||||
'S_TOPIC_ACTION' => append_sid('viewtopic', "f=$forum_id&t=$topic_id&start=$start"),
|
||||
'S_TOPIC_MOD' => ($topic_mod != '') ? '<select name="action" id="quick-mod-select">' . $topic_mod . '</select>' : '',
|
||||
'S_MOD_ACTION' => append_sid('mcp', "f=$forum_id&t=$topic_id&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, phpbb::$user->session_id),
|
||||
'S_MOD_ACTION' => append_sid('mcp', "f=$forum_id&t=$topic_id&start=$start&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id),
|
||||
|
||||
'S_VIEWTOPIC' => true,
|
||||
'S_DISPLAY_SEARCHBOX' => (phpbb::$acl->acl_get('u_search') && phpbb::$acl->acl_get('f_search', $forum_id) && phpbb::$config['load_search']) ? true : false,
|
||||
|
@ -1144,7 +1144,10 @@ phpbb::$db->sql_freeresult($result);
|
|||
// Load custom profile fields
|
||||
if (phpbb::$config['load_cpf_viewtopic'])
|
||||
{
|
||||
if (!class_exists('custom_profile'))
|
||||
{
|
||||
include(PHPBB_ROOT_PATH . 'includes/functions_profile_fields.' . PHP_EXT);
|
||||
}
|
||||
$cp = new custom_profile();
|
||||
|
||||
// Grab all profile fields from users in id cache for later use - similar to the poster cache
|
||||
|
@ -1422,7 +1425,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
|||
'POSTER_WARNINGS' => $user_cache[$poster_id]['warnings'],
|
||||
'POSTER_AGE' => $user_cache[$poster_id]['age'],
|
||||
|
||||
'POST_DATE' => phpbb::$user->format_date($row['post_time']),
|
||||
'POST_DATE' => phpbb::$user->format_date($row['post_time'], false, ($view == 'print') ? true : false),
|
||||
'POST_SUBJECT' => $row['post_subject'],
|
||||
'MESSAGE' => $message,
|
||||
'SIGNATURE' => ($row['enable_sig']) ? $user_cache[$poster_id]['sig'] : '',
|
||||
|
@ -1515,7 +1518,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
|||
unset($rowset, $user_cache);
|
||||
|
||||
// Update topic view and if necessary attachment view counters ... but only for humans and if this is the first 'page view'
|
||||
if (isset(phpbb::$user->data['session_page']) && !phpbb::$user->is_bot && strpos(phpbb::$user->data['session_page'], '&t=' . $topic_id) === false)
|
||||
if (isset(phpbb::$user->data['session_page']) && !phpbb::$user->is_bot && (strpos(phpbb::$user->data['session_page'], '&t=' . $topic_id) === false || isset(phpbb::$user->data['session_created'])))
|
||||
{
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "
|
||||
|
|
Loading…
Add table
Reference in a new issue