mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-02 22:02:07 +02:00
fixed problems with updating default values within mssql (update_to_xxx), fixed html-entities match (no longer needed since the html validation changed... -> Related to bug #1267), bug #1374, #1341 - scoot and #1430 fixed too. Some updates related to 2.0.5.
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3597 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
b76e7f7022
commit
0c92a18e16
@ -701,6 +701,8 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
|
||||
|
||||
$gzipcompress = (!empty($HTTP_POST_VARS['gzipcompress'])) ? $HTTP_POST_VARS['gzipcompress'] : ( (!empty($HTTP_GET_VARS['gzipcompress'])) ? $HTTP_GET_VARS['gzipcompress'] : 0 );
|
||||
|
||||
$drop = (!empty($HTTP_POST_VARS['drop'])) ? intval($HTTP_POST_VARS['drop']) : ( (!empty($HTTP_GET_VARS['drop'])) ? intval($HTTP_GET_VARS['drop']) : 0 );
|
||||
|
||||
if(!empty($additional_tables))
|
||||
{
|
||||
if(ereg(",", $additional_tables))
|
||||
@ -856,7 +858,7 @@ if( isset($HTTP_GET_VARS['perform']) || isset($HTTP_POST_VARS['perform']) )
|
||||
break;
|
||||
|
||||
case 'restore':
|
||||
if(!isset($restore_start))
|
||||
if(!isset($HTTP_POST_VARS['restore_start']))
|
||||
{
|
||||
//
|
||||
// Define Template files...
|
||||
|
@ -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.4 :: Install</title>
|
||||
<title>phpBB 2.0.5 :: 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.4 INSTALL</span></td>
|
||||
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.5 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.4 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/guide/phpBB_Users_Guide.html" target="_new">Userguide</a> now available online.</p>
|
||||
<p>A basic overview of running phpBB 2.0.5 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/guide/phpBB_Users_Guide.html" target="_new">Userguide</a> now available online.</p>
|
||||
|
||||
<ol>
|
||||
<li><a href="#quickinstall">Quick Install</a></li>
|
||||
@ -88,7 +88,7 @@ p,ul,td {font-size:10pt;}
|
||||
|
||||
<a name="require"></a><h2 class="h2"><u>2. Requirements</u></h2>
|
||||
|
||||
<p>Installation of phpBB 2.0.4 requires the following:</p>
|
||||
<p>Installation of phpBB 2.0.5 requires the following:</p>
|
||||
<ul>
|
||||
<li>A webserver or web hosting account running on any major Operating System</li>
|
||||
<li>A SQL database system, <b>one of</b>:
|
||||
@ -170,11 +170,11 @@ p,ul,td {font-size:10pt;}
|
||||
|
||||
<p>Upgrading from these versions is generally quite easy. First you should make a copy of your existing <u>config.php</u>, keep it in a safe place! Next delete all the existing phpBB 2 files, do not leave any in place otherwise you may encounter errors later. You can leave alternative templates in-place but you should note they may not function correctly with the final release. It is therefore recommended you switch back to subSilver if you are currently using a different style. With this complete you can upload the new phpBB 2.0.0 files (see <a href="#install">New Installations</a> for details if necessary). Once complete copy back your saved <u>config.php</u>, replacing the new one.</p>
|
||||
|
||||
<p>You should now run <b>install/update_to_204.php</b> which, depending on your previous version, will make a number of database changes. You may receive <u>FAILURES</u> during this procedure, they should not be a cause for concern unless you see an actual <u>ERROR</u>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
|
||||
<p>You should now run <b>install/update_to_205.php</b> which, depending on your previous version, will make a number of database changes. You may receive <u>FAILURES</u> during this procedure, they should not be a cause for concern unless you see an actual <u>ERROR</u>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
|
||||
|
||||
<p><b>RC-2 and below MSSQL users</b>, please note that during the update procedure your existing forums table will be dropped and re-created. All data in standard fields will be retained. However if you have modified the forums table and added additional fields or altered existing ones these changes <b>WILL</b> be lost. If this is a significant issue for you we advise you comment out the "DROP FORUM TABLE" section in update_to_204.php and instead, manually alter the forum_id column to remove the IDENTITY setting (if it exists).</p>
|
||||
<p><b>RC-2 and below MSSQL users</b>, please note that during the update procedure your existing forums table will be dropped and re-created. All data in standard fields will be retained. However if you have modified the forums table and added additional fields or altered existing ones these changes <b>WILL</b> be lost. If this is a significant issue for you we advise you comment out the "DROP FORUM TABLE" section in update_to_205.php and instead, manually alter the forum_id column to remove the IDENTITY setting (if it exists).</p>
|
||||
|
||||
<p>Once the update_to_204 has completed you <b>MUST</b> proceed to the Administration General Configuration panel and check all the values in General Configuration. This is essential if you were running any version before RC-3 since extra information needs to be entered to enable correct URLs to be output in emails.</p>
|
||||
<p>Once the update_to_205 has completed you <b>MUST</b> proceed to the Administration General Configuration panel and check all the values in General Configuration. This is essential if you were running any version before RC-3 since extra information needs to be entered to enable correct URLs to be output in emails.</p>
|
||||
|
||||
<a name="langtempchanges"></a><h3 class="h3">6.i. Changes in language pack format and templates</h3>
|
||||
|
||||
@ -192,21 +192,21 @@ 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 2.0.4. You should select the appropriate archive for your current version, e.g. if you currently have 2.0.3 you should select the phpBB-2.0.3_to_2.0.4.zip/tar.gz file.</p>
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to 2.0.5. You should select the appropriate archive for your current version, e.g. if you currently have 2.0.4 you should select the phpBB-2.0.4_to_2.0.5.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>
|
||||
|
||||
<p>As for the other upgrade procedures you should run <b>install/update_to_204.php</b> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
|
||||
<p>As for the other upgrade procedures you should run <b>install/update_to_205.php</b> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
|
||||
|
||||
<a name="#upgradeSTABLE_patch"></a><h3 class="h3">7.iii. Patch file</h3>
|
||||
|
||||
<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.2 you need the phpBB-2.0.2_to_2.0.4.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 -p0 < [PATCH NAME]</b> (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.2 you need the phpBB-2.0.2_to_2.0.5.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 -p0 < [PATCH NAME]</b> (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>
|
||||
|
||||
<p>You should of course delete the patch file (or files) after use. As for the other upgrade procedures you should run <b>install/update_to_204.php</b> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
|
||||
<p>You should of course delete the patch file (or files) after use. As for the other upgrade procedures you should run <b>install/update_to_205.php</b> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
|
||||
|
||||
<a name="#upgradeSTABLE_all"></a><h3 class="h3">7.iv. All package types</h3>
|
||||
|
||||
@ -214,7 +214,7 @@ p,ul,td {font-size:10pt;}
|
||||
|
||||
<a name="postinstall"></a><h2 class="h2"><u>8. Important (security related) post-Install tasks for all installation methods</u></h2>
|
||||
|
||||
<p>Once you have succssfully installed phpBB 2.0.4 you <b>MUST</b> ensure you remove the entire install/ and contrib/ directories. Leaving these in place is a <u>very serious potential security issue</u> which may lead to deletion or alteration of files, etc. Please note that until these directories are remove phpBB2 will not operate and a warning message will be displayed. Beyond these <b>essential</b> deletions you may also wish to delete the docs/ directories if you wish.</p>
|
||||
<p>Once you have succssfully installed phpBB 2.0.5 you <b>MUST</b> ensure you remove the entire install/ and contrib/ directories. Leaving these in place is a <u>very serious potential security issue</u> which may lead to deletion or alteration of files, etc. Please note that until these directories are remove phpBB2 will not operate and a warning message will be displayed. Beyond these <b>essential</b> deletions you may also wish to delete the docs/ directories if you wish.</p>
|
||||
|
||||
<p>With these directories deleted you should proceed to the administration panel. Depending on how the installation completed you may have been directed there automatically. If not, login as the administrator you specified during install/upgrade and click the "<b>Administration Panel</b>" link at the bottom of any page. Ensure that details specified in General -> Configuration are correct!</p>
|
||||
|
||||
@ -232,7 +232,7 @@ p,ul,td {font-size:10pt;}
|
||||
|
||||
<a name="safemode"></a><h3 class="h3">8.ii. Safe Mode</h3>
|
||||
|
||||
<p>phpBB 2.0.4 includes support for using uploadable avatars on systems running PHP in safe mode. If this applies to your hosting service you will need to create a sub-directory called <u>tmp</u> in the directory you specified for storage of uploaded avatars (by default this is images/avatars as explained above). Give it the same access rights as for uploadable avatars above.</p>
|
||||
<p>phpBB 2.0.5 includes support for using uploadable avatars on systems running PHP in safe mode. If this applies to your hosting service you will need to create a sub-directory called <u>tmp</u> in the directory you specified for storage of uploaded avatars (by default this is images/avatars as explained above). Give it the same access rights as for uploadable avatars above.</p>
|
||||
|
||||
<p>This safe mode support includes compatibility with various directory restrictions your host may impose (assuming they are not too restrictive and that the PHP installed is version 4.0.3 or later). There is generally no need for any manual setup for safe mode support it is typically handled transparantly.</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.4 :: Readme</title>
|
||||
<title>phpBB 2.0.5 :: 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.4 README</span></td>
|
||||
<td align="center" width="100%" valign="middle"><span class="maintitle">phpBB 2.0.5 README</span></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -62,7 +62,7 @@ p,ul,td {font-size:10pt;}
|
||||
|
||||
<p>Installation and upgrade instructions can be found in the <a href="INSTALL.html">INSTALL</a> document contained in this distribution. If you are intending to upgrade from a previous phpBB 1.4.x installation we highly recommend you backup any existing data before proceeding!</p>
|
||||
|
||||
<p><b>Please note</b> that users of Release Candidate (RC) versions of phpBB 2 should run the update_to_204.php script <b>BEFORE</b> attempting to access your board. Failing to do so may result in errors and unexpected behaviour! While these won't do any damage they will prevent you using your board.</p>
|
||||
<p><b>Please note</b> that users of Release Candidate (RC) versions of phpBB 2 should run the update_to_205.php script <b>BEFORE</b> attempting to access your board. Failing to do so may result in errors and unexpected behaviour! While these won't do any damage they will prevent you using your board.</p>
|
||||
|
||||
<p>If you are using RC-1 (pre) you may find some other DB changes have occured and should examine the schemas to see if your installation requires any modifications (note that most of these have already been discussed on the phpBB 2 forums and are handled by the update script). If you are uncomfortable doing any of this we recommend you re-install (you may backup your existing data if you wish, re-install phpBB 2 and then insert your backup).</p>
|
||||
|
||||
@ -84,7 +84,7 @@ p,ul,td {font-size:10pt;}
|
||||
|
||||
<p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed</p>
|
||||
|
||||
<p><b>Please note</b> that users who have upgraded to 2.0.4 from versions prior to RC-3 should will <b>need</b> to download new versions of the language/subSilver image packs. Any package downloaded prior to the availability of RC-3 will <b>not</b> function correctly with this version of phpBB 2.</p>
|
||||
<p><b>Please note</b> that users who have upgraded to 2.0.5 from versions prior to RC-3 should will <b>need</b> to download new versions of the language/subSilver image packs. Any package downloaded prior to the availability of RC-3 will <b>not</b> function correctly with this version of phpBB 2.</p>
|
||||
|
||||
<p>If you have upgraded from 2.0.0 and make use of non-English language packs you will benefit from downloading updated versions which will become available shortly. These introduce a number of strings which went missing from the first version plus a few updates and additions.</p>
|
||||
|
||||
|
@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||
die('Hacking attempt');
|
||||
}
|
||||
|
||||
$html_entities_match = array('#&[a-z]+?;#', '#<#', '#>#');
|
||||
$html_entities_match = array('#&#', '#<#', '#>#');
|
||||
$html_entities_replace = array('&', '<', '>');
|
||||
|
||||
$unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#');
|
||||
|
@ -257,7 +257,7 @@ if (defined('SHOW_ONLINE'))
|
||||
// Obtain number of new private messages
|
||||
// if user is logged in
|
||||
//
|
||||
if ( $userdata['session_logged_in'] )
|
||||
if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) )
|
||||
{
|
||||
if ( $userdata['user_new_privmsg'] )
|
||||
{
|
||||
|
@ -156,4 +156,4 @@ function auto_prune($forum_id = 0)
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
@ -242,7 +242,7 @@ function user_avatar_upload($mode, $avatar_mode, &$current_avatar, &$current_typ
|
||||
return $avatar_sql;
|
||||
}
|
||||
|
||||
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)
|
||||
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popup_pm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)
|
||||
{
|
||||
global $board_config, $db, $template, $lang, $images, $theme;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
@ -318,7 +318,7 @@ function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current
|
||||
}
|
||||
}
|
||||
|
||||
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
|
||||
$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');
|
||||
|
||||
$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" />';
|
||||
|
||||
|
@ -123,7 +123,7 @@ if (
|
||||
$allowviewonline = ( isset($HTTP_POST_VARS['hideonline']) ) ? ( ($HTTP_POST_VARS['hideonline']) ? 0 : TRUE ) : TRUE;
|
||||
$notifyreply = ( isset($HTTP_POST_VARS['notifyreply']) ) ? ( ($HTTP_POST_VARS['notifyreply']) ? TRUE : 0 ) : 0;
|
||||
$notifypm = ( isset($HTTP_POST_VARS['notifypm']) ) ? ( ($HTTP_POST_VARS['notifypm']) ? TRUE : 0 ) : TRUE;
|
||||
$popuppm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
|
||||
$popup_pm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;
|
||||
|
||||
if ( $mode == 'register' )
|
||||
{
|
||||
@ -439,7 +439,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
||||
}
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
|
||||
SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popup_pm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "
|
||||
WHERE user_id = $user_id";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
@ -503,7 +503,7 @@ if ( isset($HTTP_POST_VARS['submit']) )
|
||||
// Get current date
|
||||
//
|
||||
$sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey)
|
||||
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popuppm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
|
||||
VALUES ($user_id, '" . str_replace("\'", "''", $username) . "', " . time() . ", '" . str_replace("\'", "''", $new_password) . "', '" . str_replace("\'", "''", $email) . "', '" . str_replace("\'", "''", $icq) . "', '" . str_replace("\'", "''", $website) . "', '" . str_replace("\'", "''", $occupation) . "', '" . str_replace("\'", "''", $location) . "', '" . str_replace("\'", "''", $interests) . "', '" . str_replace("\'", "''", $signature) . "', '$signature_bbcode_uid', $avatar_sql, $viewemail, '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', '" . str_replace("\'", "''", $yim) . "', '" . str_replace("\'", "''", $msn) . "', $attachsig, $allowsmilies, $allowhtml, $allowbbcode, $allowviewonline, $notifyreply, $notifypm, $popup_pm, $user_timezone, '" . str_replace("\'", "''", $user_dateformat) . "', '" . str_replace("\'", "''", $user_lang) . "', $user_style, 0, 1, ";
|
||||
if ( $board_config['require_activation'] == USER_ACTIVATION_SELF || $board_config['require_activation'] == USER_ACTIVATION_ADMIN || $coppa )
|
||||
{
|
||||
$user_actkey = gen_rand_string(true);
|
||||
@ -697,7 +697,7 @@ else if ( $mode == 'editprofile' && !isset($HTTP_POST_VARS['avatargallery']) &&
|
||||
|
||||
$viewemail = $userdata['user_viewemail'];
|
||||
$notifypm = $userdata['user_notify_pm'];
|
||||
$popuppm = $userdata['user_popup_pm'];
|
||||
$popup_pm = $userdata['user_popup_pm'];
|
||||
$notifyreply = $userdata['user_notify'];
|
||||
$attachsig = $userdata['user_attachsig'];
|
||||
$allowhtml = $userdata['user_allowhtml'];
|
||||
@ -742,7 +742,7 @@ if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
|
||||
|
||||
$allowviewonline = !$allowviewonline;
|
||||
|
||||
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popuppm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
|
||||
display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -852,8 +852,8 @@ else
|
||||
'HIDE_USER_NO' => ( $allowviewonline ) ? 'checked="checked"' : '',
|
||||
'NOTIFY_PM_YES' => ( $notifypm ) ? 'checked="checked"' : '',
|
||||
'NOTIFY_PM_NO' => ( !$notifypm ) ? 'checked="checked"' : '',
|
||||
'POPUP_PM_YES' => ( $popuppm ) ? 'checked="checked"' : '',
|
||||
'POPUP_PM_NO' => ( !$popuppm ) ? 'checked="checked"' : '',
|
||||
'POPUP_PM_YES' => ( $popup_pm ) ? 'checked="checked"' : '',
|
||||
'POPUP_PM_NO' => ( !$popup_pm ) ? 'checked="checked"' : '',
|
||||
'ALWAYS_ADD_SIGNATURE_YES' => ( $attachsig ) ? 'checked="checked"' : '',
|
||||
'ALWAYS_ADD_SIGNATURE_NO' => ( !$attachsig ) ? 'checked="checked"' : '',
|
||||
'NOTIFY_REPLY_YES' => ( $notifyreply ) ? 'checked="checked"' : '',
|
||||
|
@ -447,10 +447,10 @@ switch ($row['config_value'])
|
||||
case 'mssql-odbc':
|
||||
// Add missing defaults to MSSQL post table schema
|
||||
$sql[] = "ALTER TABLE [" . POSTS_TABLE . "] WITH NOCHECK ADD
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_bbcode] DEFAULT (1) FOR [enable_bbcode]
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_html] DEFAULT (0) FOR [enable_html]
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_smilies] DEFAULT (1) FOR [enable_smilies]
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_sig] DEFAULT (1) FOR [enable_sig]
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_bbcode] DEFAULT (1) FOR [enable_bbcode],
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_html] DEFAULT (0) FOR [enable_html],
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_smilies] DEFAULT (1) FOR [enable_smilies],
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_enable_sig] DEFAULT (1) FOR [enable_sig],
|
||||
CONSTRAINT [DF_" . POSTS_TABLE . "_post_edit_count] DEFAULT (0) FOR [post_edit_count]";
|
||||
|
||||
case 'msaccess':
|
||||
|
@ -386,9 +386,8 @@ function inarray($needle, $haystack)
|
||||
|
||||
function end_step($next)
|
||||
{
|
||||
global $debug;
|
||||
|
||||
print "<hr /><a href=\"$PHP_SELF?next=$next\">Next step: <b>$next</b></a><br /><br />\n";
|
||||
exit;
|
||||
}
|
||||
//
|
||||
// End functions
|
||||
|
@ -371,7 +371,7 @@ $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Ru
|
||||
|
||||
if ( $is_auth['auth_mod'] )
|
||||
{
|
||||
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
|
||||
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=" . $start . "&sid=" . $userdata['session_id'] . '">', '</a>');
|
||||
}
|
||||
|
||||
//
|
||||
@ -659,6 +659,8 @@ if( $total_topics )
|
||||
);
|
||||
}
|
||||
|
||||
$topics_count -= $total_announcements;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PAGINATION' => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
|
||||
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $topics_count / $board_config['topics_per_page'] )),
|
||||
@ -690,4 +692,4 @@ $template->pparse('body');
|
||||
//
|
||||
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
|
||||
|
||||
?>
|
||||
?>
|
@ -693,7 +693,7 @@ if ( !empty($forum_topic_data['topic_vote']) )
|
||||
$sql = "SELECT vote_id
|
||||
FROM " . VOTE_USERS_TABLE . "
|
||||
WHERE vote_id = $vote_id
|
||||
AND vote_user_id = " . $userdata['user_id'];
|
||||
AND vote_user_id = " . intval($userdata['user_id']);
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, "Could not obtain user vote data for this topic", '', __LINE__, __FILE__, $sql);
|
||||
|
Loading…
x
Reference in New Issue
Block a user