mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
- some 2.0.x updates
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@5187 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
6ba1c635cd
commit
8ac5f738e2
18 changed files with 105 additions and 73 deletions
|
@ -414,6 +414,7 @@ if ( isset($HTTP_POST_VARS['submit']) && ( ( $mode == 'user' && $user_id ) || (
|
|||
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug, " . USERS_TABLE . " u
|
||||
WHERE ug.group_id = aa.group_id
|
||||
AND u.user_id = ug.user_id
|
||||
AND ug.user_pending = 0
|
||||
AND u.user_level NOT IN (" . MOD . ", " . ADMIN . ")
|
||||
GROUP BY u.user_id
|
||||
HAVING SUM(aa.auth_mod) > 0";
|
||||
|
@ -568,9 +569,10 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
|
|||
//
|
||||
// Front end
|
||||
//
|
||||
$sql = "SELECT *
|
||||
FROM " . FORUMS_TABLE . " f
|
||||
ORDER BY forum_order";
|
||||
$sql = "SELECT f.*
|
||||
FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c
|
||||
WHERE f.cat_id = c.cat_id
|
||||
ORDER BY c.cat_order, f.forum_order ASC";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Couldn't obtain forum information", "", __LINE__, __FILE__, $sql);
|
||||
|
@ -603,7 +605,7 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
|
|||
}
|
||||
}
|
||||
|
||||
$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
|
||||
$sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE ";
|
||||
$sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
|
@ -831,12 +833,19 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
|
|||
|
||||
if( count($name) )
|
||||
{
|
||||
$t_usergroup_list = '';
|
||||
$t_usergroup_list = $t_pending_list = '';
|
||||
for($i = 0; $i < count($ug_info); $i++)
|
||||
{
|
||||
$ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL;
|
||||
|
||||
$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
|
||||
if (!$ug_info[$i]['user_pending'])
|
||||
{
|
||||
$t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$t_pending_list .= ( ( $t_pending_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -899,7 +908,7 @@ else if ( ( $mode == 'user' && ( isset($HTTP_POST_VARS['username']) || $user_id
|
|||
|
||||
$template->assign_vars(array(
|
||||
'USERNAME' => $t_groupname,
|
||||
'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list)
|
||||
'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list . '<br />' . $lang['Pending_members'] . ' : ' . $t_pending_list)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username'])
|
|||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
$sql = "UPDATE " . POSTS_TABLE . "
|
||||
SET poster_id = " . DELETED . ", post_username = '$username'
|
||||
SET poster_id = " . DELETED . ", post_username = '" . str_replace("\\'", "''", addslashes($this_userdata['username'])) . "'
|
||||
WHERE poster_id = $user_id";
|
||||
if( !$db->sql_query($sql) )
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>phpBB 2.0.16 :: Install</title>
|
||||
<title>phpBB 2.0.x :: Install</title>
|
||||
<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
|
@ -24,7 +24,7 @@ p,ul,td {font-size:10pt;}
|
|||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="phpBB 2 : Creating Communities" vspace="1" /></a></td>
|
||||
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.16 INSTALL</span></td>
|
||||
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.x INSTALL</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@ -33,7 +33,7 @@ p,ul,td {font-size:10pt;}
|
|||
|
||||
<p>Please note these instructions are not fully comprehensive, a more thorough userguide will be available on the phpBB website in the near future. However, this document will walk you through the basics on installing the forum software.</p>
|
||||
|
||||
<p>A basic overview of running phpBB 2.0.16 can be found in the accompanying <a href="README.html">README</a> documentation. Please ensure you read that document in addition to this! For more detailed information on using phpBB 2 you should read <a href="http://www.phpbb.com/support/guide/" target="_new">Userguide</a> now available online.</p>
|
||||
<p>A basic overview of running phpBB 2.0.x can be found in the accompanying <a href="README.html">README</a> documentation. Please ensure you read that document in addition to this! For more detailed information on using phpBB 2 you should read <a href="http://www.phpbb.com/support/guide/" target="_new">Userguide</a> now available online.</p>
|
||||
|
||||
<ol>
|
||||
<li><a href="#quickinstall">Quick Install</a></li>
|
||||
|
@ -194,7 +194,7 @@ p,ul,td {font-size:10pt;}
|
|||
|
||||
<a name="#upgradeSTABLE_files"></a><h3 class="h3">7.ii. Changed files only</h3>
|
||||
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have 2.0.15 you should select the phpBB-2.0.15_to_2.0.16.zip/tar.gz file.</p>
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have 2.0.16 you should select the phpBB-2.0.16_to_2.0.17.zip/tar.gz file.</p>
|
||||
|
||||
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any Mods these files will overwrite the originals possibly destroying them in the process. You will need to re-add Mods to any affected file before uploading.</p>
|
||||
|
||||
|
@ -204,7 +204,7 @@ p,ul,td {font-size:10pt;}
|
|||
|
||||
<p>The patch file is probably the best solution for those with many Mods or other changes who do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <b>patch</b> application.</p>
|
||||
|
||||
<p>A number of patch files are provided to allow you to upgrade from previous stable releases. Select the correct patch, e.g. if your current version is 2.0.15 you need the phpBB-2.0.15_to_2.0.16.patch. Place the correct patch in the parent directory containing the phpBB 2 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <b>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</b> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB2, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
<p>A number of patch files are provided to allow you to upgrade from previous stable releases. Select the correct patch, e.g. if your current version is 2.0.16 you need the phpBB-2.0.16_to_2.0.17.patch. Place the correct patch in the parent directory containing the phpBB 2 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <b>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</b> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB2, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
|
||||
<p>If you do get failures you should look at using the <a href="#upgradeSTABLE_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Mods to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html">
|
||||
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||
<title>phpBB 2.0.16 :: Readme</title>
|
||||
<title>phpBB 2.0.x :: Readme</title>
|
||||
<link rel="stylesheet" href="../templates/subSilver/subSilver.css" type="text/css" />
|
||||
<style type="text/css">
|
||||
<!--
|
||||
|
@ -24,7 +24,7 @@ p,ul,td {font-size:10pt;}
|
|||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="phpBB 2 : Creating Communities" vspace="1" /></a></td>
|
||||
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.16 README</span></td>
|
||||
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.x README</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -200,19 +200,19 @@ function bbencode_second_pass($text, $uid)
|
|||
$replacements[] = $bbcode_tpl['img'];
|
||||
|
||||
// matches a [url]xxxx://www.phpbb.com[/url] code..
|
||||
$patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
|
||||
$patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
|
||||
$replacements[] = $bbcode_tpl['url1'];
|
||||
|
||||
// [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
|
||||
$patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
|
||||
$patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is";
|
||||
$replacements[] = $bbcode_tpl['url2'];
|
||||
|
||||
// [url=xxxx://www.phpbb.com]phpBB[/url] code..
|
||||
$patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
|
||||
$patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
|
||||
$replacements[] = $bbcode_tpl['url3'];
|
||||
|
||||
// [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
|
||||
$patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
|
||||
$patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is";
|
||||
$replacements[] = $bbcode_tpl['url4'];
|
||||
|
||||
// [email]user@domain.tld[/email] code..
|
||||
|
@ -624,13 +624,13 @@ function make_clickable($text)
|
|||
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
|
||||
// xxxx can only be alpha characters.
|
||||
// yyyy is anything up to the first space, newline, comma, double quote or <
|
||||
$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
|
||||
$ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
|
||||
|
||||
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
|
||||
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
|
||||
// zzzz is optional.. will contain everything up to the first space, newline,
|
||||
// comma, double quote or <.
|
||||
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
|
||||
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
|
||||
|
||||
// matches an email@domain type address at the start of a line, or after a space.
|
||||
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
|
||||
|
|
|
@ -117,7 +117,7 @@ function get_userdata($user, $force_str = false)
|
|||
{
|
||||
global $db;
|
||||
|
||||
if (intval($user) == 0 || $force_str)
|
||||
if (!is_numeric($user) || $force_str)
|
||||
{
|
||||
$user = phpbb_clean_username($user);
|
||||
}
|
||||
|
@ -578,7 +578,7 @@ function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '',
|
|||
die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?");
|
||||
}
|
||||
|
||||
define(HAS_DIED, 1);
|
||||
define('HAS_DIED', 1);
|
||||
|
||||
|
||||
$sql_store = $sql;
|
||||
|
|
|
@ -30,11 +30,9 @@ function validate_username($username)
|
|||
global $db, $lang, $userdata;
|
||||
|
||||
// Remove doubled up spaces
|
||||
$username = preg_replace('#\s+#', ' ', $username);
|
||||
// Limit username length
|
||||
$username = substr(str_replace("\'", "'", $username), 0, 25);
|
||||
$username = str_replace("'", "''", $username);
|
||||
|
||||
$username = preg_replace('#\s+#', ' ', trim($username));
|
||||
$username = phpbb_clean_username($username);
|
||||
|
||||
$sql = "SELECT username
|
||||
FROM " . USERS_TABLE . "
|
||||
WHERE LOWER(username) = '" . strtolower($username) . "'";
|
||||
|
|
|
@ -47,6 +47,11 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
}
|
||||
else if ((trim($row['user_actkey']) == trim($HTTP_GET_VARS['act_key'])) && (trim($row['user_actkey']) != ''))
|
||||
{
|
||||
if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $userdata['user_level'] != ADMIN)
|
||||
{
|
||||
message_die(GENERAL_MESSAGE, $lang['Not_Authorised']);
|
||||
}
|
||||
|
||||
$sql_update_pass = ( $row['user_newpasswd'] != '' ) ? ", user_password = '" . str_replace("\'", "''", $row['user_newpasswd']) . "', user_newpasswd = ''" : '';
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
|
|
|
@ -86,6 +86,8 @@ function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename)
|
|||
|
||||
function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename)
|
||||
{
|
||||
global $lang;
|
||||
|
||||
if ( !preg_match('#^(http)|(ftp):\/\/#i', $avatar_filename) )
|
||||
{
|
||||
$avatar_filename = 'http://' . $avatar_filename;
|
||||
|
|
|
@ -165,8 +165,8 @@ $yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config
|
|||
$yim = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
|
||||
|
||||
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts");
|
||||
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
|
||||
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
|
||||
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>';
|
||||
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';
|
||||
|
||||
//
|
||||
// Generate page
|
||||
|
|
Binary file not shown.
|
@ -69,7 +69,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17');
|
||||
|
||||
/*
|
||||
-- Categories
|
||||
|
|
|
@ -62,7 +62,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.myserver.tld');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17');
|
||||
|
||||
|
||||
# -- Categories
|
||||
|
|
|
@ -63,7 +63,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', 'www.yourdomain.tld');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17');
|
||||
|
||||
-- Categories
|
||||
INSERT INTO phpbb_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);
|
||||
|
|
|
@ -59,7 +59,7 @@ include($phpbb_root_path . 'includes/db.'.$phpEx);
|
|||
//
|
||||
//
|
||||
//
|
||||
$updates_to_version = '.0.16';
|
||||
$updates_to_version = '.0.17';
|
||||
//
|
||||
//
|
||||
//
|
||||
|
|
|
@ -698,47 +698,57 @@ else if ( ( $delete && $mark_list ) || $delete_all )
|
|||
}
|
||||
else if ( $confirm )
|
||||
{
|
||||
if ( $delete_all )
|
||||
$delete_sql_id = '';
|
||||
|
||||
if (!$delete_all)
|
||||
{
|
||||
switch($folder)
|
||||
for ($i = 0; $i < count($mark_list); $i++)
|
||||
{
|
||||
case 'inbox':
|
||||
$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
|
||||
privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
|
||||
break;
|
||||
|
||||
case 'outbox':
|
||||
$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
|
||||
break;
|
||||
|
||||
case 'sentbox':
|
||||
$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
|
||||
break;
|
||||
|
||||
case 'savebox':
|
||||
$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . "
|
||||
AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " )
|
||||
OR ( privmsgs_to_userid = " . $userdata['user_id'] . "
|
||||
AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
|
||||
break;
|
||||
$delete_sql_id .= (($delete_sql_id != '') ? ', ' : '') . intval($mark_list[$i]);
|
||||
}
|
||||
|
||||
$sql = "SELECT privmsgs_id
|
||||
FROM " . PRIVMSGS_TABLE . "
|
||||
WHERE $delete_type";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not obtain id list to delete all messages', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$mark_list[] = $row['privmsgs_id'];
|
||||
}
|
||||
|
||||
unset($delete_type);
|
||||
$delete_sql_id = "AND privmsgs_id IN ($delete_sql_id)";
|
||||
}
|
||||
|
||||
switch($folder)
|
||||
{
|
||||
case 'inbox':
|
||||
$delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND (
|
||||
privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
|
||||
break;
|
||||
|
||||
case 'outbox':
|
||||
$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )";
|
||||
break;
|
||||
|
||||
case 'sentbox':
|
||||
$delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL;
|
||||
break;
|
||||
|
||||
case 'savebox':
|
||||
$delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . "
|
||||
AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " )
|
||||
OR ( privmsgs_to_userid = " . $userdata['user_id'] . "
|
||||
AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )";
|
||||
break;
|
||||
}
|
||||
|
||||
$sql = "SELECT privmsgs_id
|
||||
FROM " . PRIVMSGS_TABLE . "
|
||||
WHERE $delete_type $delete_sql_id";
|
||||
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not obtain id list to delete messages', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$mark_list = array();
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$mark_list[] = $row['privmsgs_id'];
|
||||
}
|
||||
|
||||
unset($delete_type);
|
||||
|
||||
if ( count($mark_list) )
|
||||
{
|
||||
$delete_sql_id = '';
|
||||
|
@ -1494,6 +1504,10 @@ else if ( $submit || $refresh || $mode != '' )
|
|||
$mode = 'reply';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$privmsg_subject = $privmsg_message = '';
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -2020,6 +2034,10 @@ if ( $folder != 'outbox' )
|
|||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$inbox_limit_img_length = $inbox_limit_pct = $l_box_size_status = '';
|
||||
}
|
||||
|
||||
//
|
||||
// Dump vars to template
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</tr>
|
||||
<!-- BEGIN faq_row -->
|
||||
<tr>
|
||||
<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#Top">{L_BACK_TO_TOP}</a></span></td>
|
||||
<td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#top">{L_BACK_TO_TOP}</a></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="spaceRow" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||
|
|
|
@ -989,8 +989,8 @@ for($i = 0; $i < $total_posts; $i++)
|
|||
$quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
|
||||
|
||||
$temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts");
|
||||
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>';
|
||||
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
|
||||
$search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>';
|
||||
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>';
|
||||
|
||||
if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue