merge r8829, r8830, r8831, r8832, r8833, r8834, r8835, r8836, r8837, r8838

git-svn-id: file:///svn/phpbb/trunk@8839 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Chris Smith 2008-09-08 13:39:34 +00:00
parent a32f3a6709
commit 0e0100c525
12 changed files with 65 additions and 17 deletions

View file

@ -295,7 +295,7 @@
<p>This update method is the preferred method for updating. This package allows detecting changed files automatically and merges changes if needed.</p>
<p>The automatic update package is holding - contrary to the others - only the update informations for updating the last released version to the latest available version. These package is meant for use with the automatic update tool.</p>
<p>The automatic update package contains - contrary to the others - only the information required to update the previous release version to the latest available version. These packages are meant for use with the automatic update tool.</p>
<p>To perform the update, either follow the instructions from the <code>Administration Control Panel-&gt;System</code> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>

View file

@ -633,7 +633,7 @@ class acp_users
if (sizeof($topic_id_ary))
{
sync('reported', 'topic_id', $topic_id_ary);
sync('topic_reported', 'topic_id', $topic_id_ary);
sync('topic', 'topic_id', $topic_id_ary);
}
@ -1092,7 +1092,7 @@ class acp_users
'website' => array(
array('string', true, 12, 255),
array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
'location' => array('string', true, 2, 255),
'location' => array('string', true, 2, 100),
'occupation' => array('string', true, 2, 500),
'interests' => array('string', true, 2, 500),
'bday_day' => array('num', true, 1, 31),

View file

@ -1986,7 +1986,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
$url = substr($url, 1);
}
$url = $dir . '/' . $url;
$url = (!empty($dir) ? $dir . '/' : '') . $url;
$url = generate_board_url() . '/' . $url;
}
}

View file

@ -551,7 +551,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
'posts' => ($call_delete_posts) ? delete_posts($where_type, $where_ids, false, true, $post_count_sync, false) : 0,
);
$sql = 'SELECT topic_id, forum_id, topic_approved
$sql = 'SELECT topic_id, forum_id, topic_approved, topic_moved_id
FROM ' . TOPICS_TABLE . '
WHERE ' . $where_clause;
$result = $db->sql_query($sql);
@ -561,7 +561,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
$forum_ids[] = $row['forum_id'];
$topic_ids[] = $row['topic_id'];
if ($row['topic_approved'])
if ($row['topic_approved'] && !$row['topic_moved_id'])
{
$approved_topics++;
}

View file

@ -814,6 +814,13 @@ function disapprove_post($post_id_list, $id, $mode)
// If the reason is defined within the language file, we will use the localized version, else just use the database entry...
$disapprove_reason = (strtolower($row['reason_title']) != 'other') ? ((isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])] : $row['reason_description']) : '';
$disapprove_reason .= ($reason) ? "\n\n" . $reason : '';
if (isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]))
{
$disapprove_reason_lang = strtoupper($row['reason_title']);
}
$email_disapprove_reason = $disapprove_reason;
}
}
@ -933,6 +940,8 @@ function disapprove_post($post_id_list, $id, $mode)
// Notify Poster?
if ($notify_poster)
{
$lang_reasons = array();
foreach ($post_info as $post_id => $post_data)
{
if ($post_data['poster_id'] == ANONYMOUS)
@ -940,6 +949,35 @@ function disapprove_post($post_id_list, $id, $mode)
continue;
}
if (isset($disapprove_reason_lang))
{
// Okay we need to get the reason from the posters language
if (!isset($lang_reasons[$post_data['user_lang']]))
{
// Assign the current users translation as the default, this is not ideal but getting the board default adds another layer of complexity.
$lang_reasons[$post_data['user_lang']] = $user->lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang];
// Only load up the language pack if the language is different to the current one
if ($post_data['user_lang'] != $user->lang_name && file_exists($phpbb_root_path . '/language/' . $post_data['user_lang'] . '/mcp.' . $phpEx))
{
// Load up the language pack
$lang = array();
@include($phpbb_root_path . '/language/' . $post_data['user_lang'] . '/mcp.' . $phpEx);
// If we find the reason in this language pack use it
if (isset($lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang]))
{
$lang_reasons[$post_data['user_lang']] = $lang['report_reasons']['DESCRIPTION'][$disapprove_reason_lang];
}
unset($lang); // Free memory
}
}
$email_disapprove_reason = $lang_reasons[$post_data['user_lang']];
$email_disapprove_reason .= ($reason) ? "\n\n" . $reason : '';
}
$email_template = ($post_data['post_id'] == $post_data['topic_first_post_id'] && $post_data['post_id'] == $post_data['topic_last_post_id']) ? 'topic_disapproved' : 'post_disapproved';
$messenger->template($email_template, $post_data['user_lang']);
@ -949,15 +987,17 @@ function disapprove_post($post_id_list, $id, $mode)
$messenger->assign_vars(array(
'USERNAME' => htmlspecialchars_decode($post_data['username']),
'REASON' => htmlspecialchars_decode($disapprove_reason),
'REASON' => htmlspecialchars_decode($email_disapprove_reason),
'POST_SUBJECT' => htmlspecialchars_decode(censor_text($post_data['post_subject'])),
'TOPIC_TITLE' => htmlspecialchars_decode(censor_text($post_data['topic_title'])))
);
$messenger->send($post_data['user_notify_type']);
}
unset($lang_reasons);
}
unset($post_info, $disapprove_reason);
unset($post_info, $disapprove_reason, $email_disapprove_reason, $disapprove_reason_lang);
$messenger->save_queue();

View file

@ -554,7 +554,8 @@ function close_report($report_id_list, $mode, $action)
{
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_reported = 0
WHERE ' . $db->sql_in_set('topic_id', $close_report_topics);
WHERE ' . $db->sql_in_set('topic_id', $close_report_topics) . '
OR ' . $db->sql_in_set('topic_moved_id', $close_report_topics);
$db->sql_query($sql);
}
}

View file

@ -315,7 +315,7 @@ class ucp_profile
'website' => array(
array('string', true, 12, 255),
array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
'location' => array('string', true, 2, 255),
'location' => array('string', true, 2, 100),
'occupation' => array('string', true, 2, 500),
'interests' => array('string', true, 2, 500),
);

View file

@ -283,7 +283,7 @@ $lang = array_merge($lang, array(
'YES_ANON_READ_MARKING' => 'Enable topic marking for guests',
'YES_ANON_READ_MARKING_EXPLAIN' => 'Stores read/unread status information for guests. If disabled posts are always read for guests.',
'YES_BIRTHDAYS' => 'Enable birthday listing',
'YES_BIRTHDAYS_EXPLAIN' => 'If disabled the birthday listing is no longer displayed. To let this setting take effect the birthday feature need to be enabled too.',
'YES_BIRTHDAYS_EXPLAIN' => 'If disabled the birthday listing is no longer displayed. To let this setting take effect the birthday feature needs to be enabled too.',
'YES_JUMPBOX' => 'Enable display of jumpbox',
'YES_MODERATORS' => 'Enable display of moderators',
'YES_ONLINE' => 'Enable online user listings',

View file

@ -50,7 +50,7 @@ $lang = array_merge($lang, array(
<br />
We may also create cookies external to the phpBB software whilst browsing %1$s”, though these are outside the scope of this document which is intended to only cover the pages created by the phpBB software. The second way in which we collect your information is by what you submit to us. This can be, and is not limited to: posting as an anonymous user (hereinafter “anonymous posts”), registering on %1$s” (hereinafter “your account”) and posts submitted by you after registration and whilst logged in (hereinafter “your posts”).<br />
<br />
Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid e-mail address (hereinafter “your e-mail”). Your information for your account at %1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password and your e-mail required by %1$s” during the registration process are at our digression what is mandatory and what is optional. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated e-mails from the phpBB software.<br />
Your account will at a bare minimum contain a uniquely identifiable name (hereinafter “your user name”), a personal password used for logging into your account (hereinafter “your password”) and a personal, valid e-mail address (hereinafter “your e-mail”). Your information for your account at %1$s” is protected by data-protection laws applicable in the country that hosts us. Any information beyond your user name, your password, and your e-mail address required by %1$s” during the registration process is either mandatory or optional, at the discretion of %1$s”. In all cases, you have the option of what information in your account is publicly displayed. Furthermore, within your account, you have the option to opt-in or opt-out of automatically generated e-mails from the phpBB software.<br />
<br />
Your password is ciphered (a one-way hash) so that it is secure. However, it is recommended that you do not reuse the same password across a number of different websites. Your password is the means of accessing your account at %1$s”, so please guard it carefully and under no circumstance will anyone affiliated with %1$s”, phpBB or another 3rd party, legitimately ask you for your password. Should you forget your password for your account, you can use the “I forgot my password” feature provided by the phpBB software. This process will ask you to submit your user name and your e-mail, then the phpBB software will generate a new password to reclaim your account.<br />
',

View file

@ -1209,6 +1209,7 @@ switch ($mode)
// We do not use request_var() here directly to save some calls (not all variables are set)
$check_params = array(
'start' => array('start', 0),
'g' => array('g', 0),
'sk' => array('sk', $default_key),
'sd' => array('sd', 'a'),

View file

@ -923,7 +923,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
// Search forum
$s_forums = '';
$sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id, f.forum_password, fa.user_id
$sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id, f.forum_password, f.enable_indexing, fa.user_id
FROM ' . FORUMS_TABLE . ' f
LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa ON (fa.forum_id = f.forum_id
AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
@ -942,6 +942,12 @@ while ($row = $db->sql_fetchrow($result))
continue;
}
if ($row['forum_type'] == FORUM_POST && ($row['left_id'] + 1 == $row['right_id']) && !$row['enable_indexing'])
{
// Postable forum with no subforums and indexing disabled, don't display
continue;
}
if ($row['forum_type'] == FORUM_LINK || ($row['forum_password'] && !$row['user_id']))
{
// if this forum is a link or password protected (user has not entered the password yet) then skip to the next branch

View file

@ -1084,7 +1084,7 @@ while ($row = $db->sql_fetchrow($result))
'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&amp;action=msnm&amp;u=$poster_id") : '',
'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&amp;.src=pg' : '',
'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid('memberlist', "mode=contact&amp;action=jabber&amp;u=$poster_id") : '',
'search' => ($auth->acl_get('u_search')) ? append_sid('search', 'search_author=' . urlencode($row['username']) .'&amp;sr=posts') : '',
'search' => ($auth->acl_get('u_search')) ? append_sid('search', "author_id=$poster_id&amp;sr=posts") : '',
);
get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']);
@ -1506,8 +1506,8 @@ 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 if this is the first 'page view'
if (isset($user->data['session_page']) && strpos($user->data['session_page'], '&t=' . $topic_id) === false)
// Update topic view and if necessary attachment view counters ... but only for humans and if this is the first 'page view'
if (isset($user->data['session_page']) && !$user->data['is_bot'] && strpos($user->data['session_page'], '&t=' . $topic_id) === false)
{
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "