You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(193) |
Nov
(393) |
Dec
(347) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(401) |
Feb
(232) |
Mar
(343) |
Apr
(129) |
May
(129) |
Jun
(116) |
Jul
(189) |
Aug
(129) |
Sep
(68) |
Oct
(172) |
Nov
(298) |
Dec
(148) |
| 2003 |
Jan
(264) |
Feb
(210) |
Mar
(322) |
Apr
(309) |
May
(234) |
Jun
(188) |
Jul
(215) |
Aug
(161) |
Sep
(234) |
Oct
(163) |
Nov
(110) |
Dec
(7) |
| 2004 |
Jan
(95) |
Feb
(107) |
Mar
(55) |
Apr
(3) |
May
(49) |
Jun
(35) |
Jul
(57) |
Aug
(43) |
Sep
(56) |
Oct
(40) |
Nov
(25) |
Dec
(21) |
| 2005 |
Jan
(93) |
Feb
(25) |
Mar
(22) |
Apr
(72) |
May
(45) |
Jun
(24) |
Jul
(29) |
Aug
(20) |
Sep
(50) |
Oct
(93) |
Nov
(69) |
Dec
(183) |
| 2006 |
Jan
(185) |
Feb
(143) |
Mar
(402) |
Apr
(260) |
May
(322) |
Jun
(367) |
Jul
(234) |
Aug
(299) |
Sep
(206) |
Oct
(288) |
Nov
(338) |
Dec
(307) |
| 2007 |
Jan
(296) |
Feb
(250) |
Mar
(261) |
Apr
(434) |
May
(539) |
Jun
(274) |
Jul
(440) |
Aug
(190) |
Sep
(128) |
Oct
(249) |
Nov
(86) |
Dec
(51) |
| 2008 |
Jan
(177) |
Feb
(67) |
Mar
(61) |
Apr
(48) |
May
(56) |
Jun
(97) |
Jul
(60) |
Aug
(64) |
Sep
(151) |
Oct
(79) |
Nov
(109) |
Dec
(123) |
| 2009 |
Jan
(70) |
Feb
(70) |
Mar
(73) |
Apr
(80) |
May
(22) |
Jun
(193) |
Jul
(191) |
Aug
(181) |
Sep
(120) |
Oct
(48) |
Nov
(24) |
Dec
|
|
From: Jonathan H. <the...@us...> - 2001-12-05 21:55:23
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv14273/language/lang_english Modified Files: lang_admin.php Log Message: Ok commiting modified install/upgrade integration, but there's still a weird problem I'm working on... I'll post more in the forum.. Index: lang_admin.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_admin.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** lang_admin.php 2001/12/03 00:56:48 1.17 --- lang_admin.php 2001/12/05 21:55:20 1.18 *************** *** 634,637 **** --- 634,639 ---- $lang['DB_config'] = "Database Configuration"; $lang['Admin_config'] = "Admin Configuration"; + $lang['continue_upgrade'] = "Once you have downloaded your config file to your local machine you may\"Continue Upgrade\" button below to move forward with the upgrade process. Please wait to upload the config file until the upgrade process is complete."; + $lang['upgrade_submit'] = "Continue Upgrade"; $lang['Installer_Error'] = "An error has occurred during installation"; *************** *** 682,684 **** // ------------------------------------------------- ! ?> \ No newline at end of file --- 684,686 ---- // ------------------------------------------------- ! ?> |
|
From: Jonathan H. <the...@us...> - 2001-12-05 21:55:23
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv14273/templates/subSilver
Modified Files:
install.tpl
Log Message:
Ok commiting modified install/upgrade integration, but there's still a weird problem I'm working on... I'll post more in the forum..
Index: install.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/install.tpl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** install.tpl 2001/11/06 16:54:15 1.5
--- install.tpl 2001/12/05 21:55:20 1.6
***************
*** 220,223 ****
--- 220,231 ----
</tr>
<!-- END switch_common_install -->
+ <!-- BEGIN switch_upgrade_install -->
+ <tr>
+ <td class="cat" align="center" colspan="2">{L_UPGRADE_INST}</td>
+ </tr>
+ <tr>
+ <td class="cat" align="center" colspan="2"><input type="submit" name="upgrade_now" value="{L_UPGRADE_SUBMIT}" /></td>
+ </tr>
+ <!-- END switch_upgrade_install -->
</table></form></td>
</tr>
|
|
From: Jonathan H. <the...@us...> - 2001-12-05 21:55:23
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv14273
Modified Files:
install.php
Log Message:
Ok commiting modified install/upgrade integration, but there's still a weird problem I'm working on... I'll post more in the forum..
Index: install.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/install.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** install.php 2001/12/02 23:54:25 1.18
--- install.php 2001/12/05 21:55:20 1.19
***************
*** 91,99 ****
/***************************************************************************
! * Install Customization Section
*
! * This section can be modified to set up some basic default information
* used by the install script. Specifically the default theme data
! * and the default template.
*
**************************************************************************/
--- 91,99 ----
/***************************************************************************
! * Install Customization Section
*
! * This section can be modified to set up some basic default information
* used by the install script. Specifically the default theme data
! * and the default template.
*
**************************************************************************/
***************
*** 208,211 ****
--- 208,213 ----
$upgrade = ( !empty($HTTP_POST_VARS['upgrade']) ) ? $HTTP_POST_VARS['upgrade']: '';
+ $upgrade_now = ( !empty($HTTP_POST_VARS['upgrade_now']) ) ? $HTTP_POST_VARS['upgrade_now']:'';
+
$dbms = isset($HTTP_POST_VARS['dbms']) ? $HTTP_POST_VARS['dbms'] : "";
$language = ( !empty($HTTP_POST_VARS['language']) ) ? $HTTP_POST_VARS['language'] : $default_language;
***************
*** 247,256 ****
$template = new Template($phpbb_root_path . "templates/" . $default_template);
if( $upgrade == 1 )
{
! require('upgrade.'.$phpEx);
$install_step = 1;
}
!
//
// Load default template for install
--- 249,264 ----
$template = new Template($phpbb_root_path . "templates/" . $default_template);
+ //
+ // Ok for the time being I'm commenting this out whilst I'm working on
+ // better integration of the install with upgrade as per Bart's request
+ // JLH
+ //
+
if( $upgrade == 1 )
{
! // require('upgrade.'.$phpEx);
$install_step = 1;
}
!
//
// Load default template for install
***************
*** 333,337 ****
//
//
! if( !empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 1 && !defined("PHPBB_INSTALLED") )
{
header("Content-Type: text/x-delimtext; name=\"config.php\"");
--- 341,345 ----
//
//
! if( !empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 1 && !defined("PHPBB_INSTALLED") && empty($HTTP_POST_VARS['upgrade_now']) )
{
header("Content-Type: text/x-delimtext; name=\"config.php\"");
***************
*** 362,366 ****
$template->assign_block_vars("switch_ftp_file", array());
$template->assign_block_vars("switch_common_install", array());
!
$template->assign_vars(array(
"L_INSTRUCTION_TEXT" => $lang['ftp_instructs'],
--- 370,377 ----
$template->assign_block_vars("switch_ftp_file", array());
$template->assign_block_vars("switch_common_install", array());
! if( $upgrade == 1 )
! {
! $s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />';
! }
$template->assign_vars(array(
"L_INSTRUCTION_TEXT" => $lang['ftp_instructs'],
***************
*** 397,403 ****
$s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars($config_data) . '" />';
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />';
!
$template->assign_block_vars("switch_common_install", array());
!
$template->assign_vars(array(
"L_INSTRUCTION_TEXT" => $lang['NoFTP_config'],
--- 408,430 ----
$s_hidden_fields = '<input type="hidden" name="config_data" value="' . htmlspecialchars($config_data) . '" />';
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />';
! if( $upgrade == 1 )
! {
! $s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />';
! $s_hidden_fields .= '<input type="hidden" name="dbms" value="'.$dmbs.'" />';
! $s_hidden_fields .= '<input type="hidden" name="dbhost" value="'.$dbhost.'" />';
! $s_hidden_fields .= '<input type="hidden" name="dbname" value="'.$dbname.'" />';
! $s_hidden_fields .= '<input type="hidden" name="dbuser" value="'.$dbuser.'" />';
! $s_hidden_fields .= '<input type="hidden" name="dbpasswd" value="'.$dbpasswd.'" />';
! $s_hidden_fields .= '<input type="hidden" name="install_step" value="1" />';
! $s_hidden_fields .= '<input type="hidden" name="admin_pass1" value="1" />';
! $s_hidden_fields .= '<input type="hidden" name="admin_pass2" value="1" />';
! $template->assign_block_vars("switch_upgrade_install", array());
! $template->assign_vars(array(
! "L_UPGRADE_INST" => $lang['continue_upgrade'],
! "L_UPGRADE_SUBMIT" => $lang['upgrade_submit'])
! );
! }
$template->assign_block_vars("switch_common_install", array());
!
$template->assign_vars(array(
"L_INSTRUCTION_TEXT" => $lang['NoFTP_config'],
***************
*** 437,441 ****
unlink($tmpfname);
!
//
// Ok we are basically done with the install process let's go on
--- 464,472 ----
unlink($tmpfname);
! if( $upgrade == 1 )
! {
! require('upgrade.'.$phpEx);
! exit;
! }
//
// Ok we are basically done with the install process let's go on
***************
*** 577,582 ****
$language = $userdata['user_lang'];
}
! else if( isset($dbms) )
{
include($phpbb_root_path.'includes/db.'.$phpEx);
}
--- 608,615 ----
$language = $userdata['user_lang'];
}
! else if( isset($dbms) )
{
+ echo $dbms;
+ exit;
include($phpbb_root_path.'includes/db.'.$phpEx);
}
***************
*** 746,750 ****
}
! if( !$reinstall )
{
$template->assign_block_vars("switch_common_install", array());
--- 779,783 ----
}
! if( !$reinstall && ! $upgrade_now )
{
$template->assign_block_vars("switch_common_install", array());
***************
*** 792,796 ****
--- 825,847 ----
$s_hidden_fields .= '<input type="hidden" name="send_file" value="1" />';
}
+ if( $upgrade == 1 )
+ {
+ $s_hidden_fields .= '<input type="hidden" name="upgrade" value="1" />';
+ $s_hidden_fields .= '<input type="hidden" name="dbms" value="'.$dbms.'" />';
+ $s_hidden_fields .= '<input type="hidden" name="dbhost" value="'.$dbhost.'" />';
+ $s_hidden_fields .= '<input type="hidden" name="dbname" value="'.$dbname.'" />';
+ $s_hidden_fields .= '<input type="hidden" name="dbuser" value="'.$dbuser.'" />';
+ $s_hidden_fields .= '<input type="hidden" name="dbpasswd" value="'.$dbpasswd.'" />';
+ $s_hidden_fields .= '<input type="hidden" name="install_step" value="1" />';
+ $s_hidden_fields .= '<input type="hidden" name="admin_pass1" value="1" />';
+ $s_hidden_fields .= '<input type="hidden" name="admin_pass2" value="1" />';
+ $template->assign_block_vars("switch_upgrade_install", array());
+ $template->assign_vars(array(
+ "L_UPGRADE_INST" => $lang['continue_upgrade'],
+ "L_UPGRADE_SUBMIT" => $lang['upgrade_submit'])
+ );
+ }
+
$template->assign_vars(array(
"L_INSTRUCTION_TEXT" => $lang['Unwriteable_config'],
***************
*** 809,812 ****
--- 860,864 ----
@fclose($fp);
+ $upgrade_now = $lang['upgrade_submit'];
}
else
***************
*** 815,818 ****
--- 867,878 ----
}
+ //
+ // First off let's check and see if we are supposed to be doing an upgrade.
+ //
+ if ( $upgrade == 1 && $upgrade_now == $lang['upgrade_submit'] )
+ {
+ require('upgrade.'.$phpEx);
+ exit;
+ }
//
// Ok we are basically done with the install process let's go on
***************
*** 848,850 ****
}
! ?>
\ No newline at end of file
--- 908,910 ----
}
! ?>
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 17:54:57
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv4385
Modified Files:
profile.php
Log Message:
Various issues, removed META upon successfull registration, rank changes, etc.
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.152
retrieving revision 1.153
diff -C2 -r1.152 -r1.153
*** profile.php 2001/12/03 17:37:52 1.152
--- profile.php 2001/12/05 17:54:54 1.153
***************
*** 272,276 ****
}
! if( $profiledata['user_avatar_type'] )
{
switch( $profiledata['user_avatar_type'] )
--- 272,276 ----
}
! if( $profiledata['user_avatar_type'] && $profiledata['user_allowavatar'] )
{
switch( $profiledata['user_avatar_type'] )
***************
*** 299,303 ****
for($j = 0; $j < count($ranksrow); $j++)
{
! if( $profiledata['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'])
{
$poster_rank = $ranksrow[$j]['rank_title'];
--- 299,303 ----
for($j = 0; $j < count($ranksrow); $j++)
{
! if( $profiledata['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
***************
*** 310,314 ****
for($j = 0; $j < count($ranksrow); $j++)
{
! if( $profiledata['user_posts'] > $ranksrow[$j]['rank_min'] && $profiledata['user_posts'] < $ranksrow[$j]['rank_max'] && !$ranksrow[$j]['rank_special'])
{
$poster_rank = $ranksrow[$j]['rank_title'];
--- 310,314 ----
for($j = 0; $j < count($ranksrow); $j++)
{
! if( $profiledata['user_posts'] > $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
***************
*** 694,699 ****
$avatar_sql = "";
! if( $board_config['allow_avatar_upload'] && !$error )
{
//
// Only allow one type of upload, either a
--- 694,710 ----
$avatar_sql = "";
! if( isset($HTTP_POST_VARS['avatardel']) && $mode == "editprofile" )
{
+ if( $userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $userdata['user_avatar'] != "" )
+ {
+ if( @file_exists("./" . $board_config['avatar_path'] . "/" . $userdata['user_avatar']) )
+ {
+ @unlink("./" . $board_config['avatar_path'] . "/" . $userdata['user_avatar']);
+ }
+ }
+ $avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
+ }
+ else if( $board_config['allow_avatar_upload'] && !$error )
+ {
//
// Only allow one type of upload, either a
***************
*** 710,725 ****
}
! if( isset($HTTP_POST_VARS['avatardel']) && $mode == "editprofile" )
! {
! if( $userdata['user_avatar_type'] == USER_AVATAR_UPLOAD && $userdata['user_avatar'] != "" )
! {
! if( @file_exists("./" . $board_config['avatar_path'] . "/" . $userdata['user_avatar']) )
! {
! @unlink("./" . $board_config['avatar_path'] . "/" . $userdata['user_avatar']);
! }
! }
! $avatar_sql = ", user_avatar = '', user_avatar_type = " . USER_AVATAR_NONE;
! }
! else if( $user_avatar_loc != "" && $board_config['allow_avatar_upload'] )
{
if( file_exists($user_avatar_loc) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) )
--- 721,725 ----
}
! if( $user_avatar_loc != "" && $board_config['allow_avatar_upload'] )
{
if( file_exists($user_avatar_loc) && ereg(".jpg$|.gif$|.png$", $user_avatar_name) )
***************
*** 804,808 ****
// exist assume port 80 (http)
//
! preg_match("/^(http:\/\/)?([a-z0-9\.]+)\:?([0-9]*)\/(.*)$/", $user_avatar_url, $url_ary);
if( !empty($url_ary[4]) )
--- 804,808 ----
// exist assume port 80 (http)
//
! preg_match("/^(http:\/\/)?([\w\-\.]+)\:?([0-9]*)\/(.*)$/", $user_avatar_url, $url_ary);
if( !empty($url_ary[4]) )
***************
*** 933,938 ****
}
}
!
! if( $board_config['allow_avatar_remote'] && !$error )
{
if($user_avatar_remoteurl != "" && $avatar_sql == "")
--- 933,937 ----
}
}
! else if( $board_config['allow_avatar_remote'] && !$error )
{
if($user_avatar_remoteurl != "" && $avatar_sql == "")
***************
*** 954,959 ****
}
}
!
! if( $board_config['allow_avatar_local'] && !$error )
{
if( $user_avatar_local != "" && $avatar_sql == "" )
--- 953,957 ----
}
}
! else if( $board_config['allow_avatar_local'] && !$error )
{
if( $user_avatar_local != "" && $avatar_sql == "" )
***************
*** 1057,1061 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
--- 1055,1059 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
);
***************
*** 1196,1203 ****
}
- $template->assign_vars(array(
- "META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
- );
-
$message = $message . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a>");
--- 1194,1197 ----
***************
*** 1634,1638 ****
// it works well :)
//
! if( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] )
{
$template->assign_block_vars("avatarblock", array() );
--- 1628,1632 ----
// it works well :)
//
! if( $userdata['user_allowavatar'] && ( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] ) )
{
$template->assign_block_vars("avatarblock", array() );
***************
*** 1650,1654 ****
$template->assign_block_vars("avatarblock.avatargallery", array() );
}
-
}
}
--- 1644,1647 ----
***************
*** 1733,1737 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
);
--- 1726,1730 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
***************
*** 1832,1836 ****
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
);
--- 1825,1829 ----
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
***************
*** 1840,1844 ****
{
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.$phpEx") . '">')
);
--- 1833,1837 ----
{
$template->assign_vars(array(
! "META" => '<meta http-equiv="refresh" content="10;url=' . append_sid("index.$phpEx") . '">')
);
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 17:51:44
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv3663/admin
Modified Files:
admin_users.php
Log Message:
Fix bugs #487774 and #487773
Index: admin_users.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_users.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** admin_users.php 2001/11/29 11:25:04 1.33
--- admin_users.php 2001/12/05 17:51:41 1.34
***************
*** 83,92 ****
if($website != "")
{
! if( !ereg("^http\:\/\/", $website) )
{
$website = "http://" . $website;
}
! if (!preg_match("#^http\\:\\/\\/[a-z0-9]+\.[a-z0-9]+#i", $website))
{
$website = "";
[...1030 lines suppressed...]
! if( $board_config['allow_avatar_upload'] || $board_config['allow_avatar_local'] || $board_config['allow_avatar_remote'] )
! {
! $template->assign_block_vars("avatarblock", array() );
!
! if($board_config['allow_avatar_upload'])
! {
! $template->assign_block_vars("avatarblock.avatarupload", array() );
! }
! if($board_config['allow_avatar_remote'])
! {
! $template->assign_block_vars("avatarblock.avatarremote", array() );
! }
! if($board_config['allow_avatar_local'])
! {
! $template->assign_block_vars("avatarblock.avatargallery", array() );
! }
! }
! }
$template->pparse("body");
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 17:51:44
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver/admin
In directory usw-pr-cvs1:/tmp/cvs-serv3663/templates/subSilver/admin
Modified Files:
user_edit_body.tpl
Added Files:
user_avatar_gallery.tpl
Log Message:
Fix bugs #487774 and #487773
--- NEW FILE ---
<h1>{L_USER_TITLE}</h1>
<p>{L_USER_EXPLAIN}</p>
<form action="{S_PROFILE_ACTION}" method="post">
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline">
<tr>
<th class="thHead" colspan="{S_COLSPAN}" height="25" valign="middle">{L_AVATAR_GALLERY}</th>
</tr>
<tr>
<td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_CATEGORY}: <select name="avatarcategory">{S_OPTIONS_CATEGORIES}</select> <input type="submit" class="liteoption" value="{L_GO}" name="avatargallery" /></span></td>
</tr>
<!-- BEGIN avatar_row -->
<tr>
<!-- BEGIN avatar_column -->
<td class="row1" align="center"><img src="{avatar_row.avatar_column.AVATAR_IMAGE}" /></td>
<!-- END avatar_column -->
</tr>
<tr>
<!-- BEGIN avatar_option_column -->
<td class="row2" align="center"><input type="radio" name="avatarselect" value="{avatar_row.avatar_option_column.S_OPTIONS_AVATAR}" /></td>
<!-- END avatar_option_column -->
</tr>
<!-- END avatar_row -->
<tr>
<td class="catBottom" colspan="{S_COLSPAN}" align="center" height="28">{S_HIDDEN_FIELDS}
<input type="submit" name="submitavatar" value="{L_SELECT_AVATAR}" class="mainoption" />
<input type="submit" name="cancelavatar" value="{L_RETURN_PROFILE}" class="liteoption" />
</td>
</tr>
</table>
</form>
Index: user_edit_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/admin/user_edit_body.tpl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** user_edit_body.tpl 2001/11/21 13:02:36 1.6
--- user_edit_body.tpl 2001/12/05 17:51:41 1.7
***************
*** 6,10 ****
{ERROR_BOX}
! <form action="{S_PROFILE_ACTION}" method="post"><table width="98%" cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="2">{L_REGISTRATION_INFO}</th>
--- 6,10 ----
{ERROR_BOX}
! <form action="{S_PROFILE_ACTION}" enctype="multipart/form-data" method="post"><table width="98%" cellspacing="1" cellpadding="4" border="0" align="center" class="forumline">
<tr>
<th class="thHead" colspan="2">{L_REGISTRATION_INFO}</th>
***************
*** 130,133 ****
--- 130,141 ----
</tr>
<tr>
+ <td class="row1"><span class="gen">{L_NOTIFY_ON_REPLY}:</span></td>
+ <td class="row2">
+ <input type="radio" name="notifyreply" value="1" {NOTIFY_REPLY_YES} />
+ <span class="gen">{L_YES}</span>
+ <input type="radio" name="notifyreply" value="0" {NOTIFY_REPLY_NO} />
+ <span class="gen">{L_NO}</span></td>
+ </tr>
+ <tr>
<td class="row1"><span class="gen">{L_NOTIFY_ON_PRIVMSG}:</span></td>
<td class="row2">
***************
*** 199,207 ****
<td class="catSides" colspan="2"><span class="cattitle"> </span></td>
</tr>
<tr>
! <th class="thSides" colspan="2">{L_AVATAR_PANEL}</th>
</tr>
! <tr>
! <td class="row1" colspan="2" align="center">
<table width="70%" cellspacing="2" cellpadding="0" border="0">
<tr>
--- 207,216 ----
<td class="catSides" colspan="2"><span class="cattitle"> </span></td>
</tr>
+ <!-- BEGIN avatarblock -->
<tr>
! <th class="thSides" colspan="2" height="12" valign="middle">{L_AVATAR_PANEL}</th>
</tr>
! <tr align="center">
! <td class="row1" colspan="2">
<table width="70%" cellspacing="2" cellpadding="0" border="0">
<tr>
***************
*** 215,218 ****
--- 224,260 ----
</td>
</tr>
+ <!-- BEGIN avatarupload -->
+ <tr>
+ <td class="row1"><span class="gen">{L_UPLOAD_AVATAR_FILE}:</span></td>
+ <td class="row2">
+ <input type="hidden" name="MAX_FILE_SIZE" value="{AVATAR_SIZE}" />
+ <input type="file" name="avatar" class="post"style="width: 200px" />
+ </td>
+ </tr>
+ <tr>
+ <td class="row1"><span class="gen">{L_UPLOAD_AVATAR_URL}:</span></td>
+ <td class="row2">
+ <input type="text" name="avatarurl" size="40" class="post"style="width: 200px" />
+ </td>
+ </tr>
+ <!-- END avatarupload -->
+ <!-- BEGIN avatarremote -->
+ <tr>
+ <td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}:</span></td>
+ <td class="row2">
+ <input type="text" name="avatarremoteurl" size="40" class="post"style="width: 200px" />
+ </td>
+ </tr>
+ <!-- END avatarremote -->
+ <!-- BEGIN avatargallery -->
+ <tr>
+ <td class="row1"><span class="gen">{L_AVATAR_GALLERY}:</span></td>
+ <td class="row2">
+ <input type="submit" name="avatargallery" value="{L_SHOW_GALLERY}" class="liteoption" />
+ </td>
+ </tr>
+ <!-- END avatargallery -->
+ <!-- END avatarblock -->
+ <tr>
<tr>
<td class="catSides" colspan="2"> </td>
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 14:38:40
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv16544/admin
Modified Files:
admin_ranks.php
Log Message:
Removed max setting for ranks as per poll and feedback
Index: admin_ranks.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_ranks.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** admin_ranks.php 2001/11/24 01:51:35 1.5
--- admin_ranks.php 2001/12/05 14:38:37 1.6
***************
*** 107,112 ****
"SPECIAL_RANK" => $rank_is_special,
"NOT_SPECIAL_RANK" => $rank_is_not_special,
! "MINIMUM" => $rank_info['rank_min'],
! "MAXIMUM" => $rank_info['rank_max'],
"IMAGE" => ( $rank_info['rank_image'] != "" ) ? $rank_info['rank_image'] : "",
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="' . $rank_info['rank_image'] . '" />' : "",
--- 107,111 ----
"SPECIAL_RANK" => $rank_is_special,
"NOT_SPECIAL_RANK" => $rank_is_not_special,
! "MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],
"IMAGE" => ( $rank_info['rank_image'] != "" ) ? $rank_info['rank_image'] : "",
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="' . $rank_info['rank_image'] . '" />' : "",
***************
*** 117,121 ****
"L_RANK_SPECIAL" => $lang['Rank_special'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
- "L_RANK_MAXIMUM" => $lang['Rank_maximum'],
"L_RANK_IMAGE" => $lang['Rank_image'],
"L_RANK_IMAGE_EXPLAIN" => $lang['Rank_image_explain'],
--- 116,119 ----
***************
*** 137,149 ****
$rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;
! $rank_title = ( isset($HTTP_POST_VARS['title']) ) ? $HTTP_POST_VARS['title'] : "";
$special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;
- $max_posts = ( isset($HTTP_POST_VARS['max_posts']) ) ? intval($HTTP_POST_VARS['max_posts']) : -1;
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
! $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? $HTTP_POST_VARS['rank_image'] : "";
if( $rank_title == "" )
{
! message_die(GENERAML_MESSAGE, $lang['Must_select_rank']);
}
--- 135,146 ----
$rank_id = ( isset($HTTP_POST_VARS['id']) ) ? intval($HTTP_POST_VARS['id']) : 0;
! $rank_title = ( isset($HTTP_POST_VARS['title']) ) ? trim($HTTP_POST_VARS['title']) : "";
$special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
! $rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? trim($HTTP_POST_VARS['rank_image']) : "";
if( $rank_title == "" )
{
! message_die(GENERAL_MESSAGE, $lang['Must_select_rank']);
}
***************
*** 168,177 ****
{
$sql = "UPDATE " . RANKS_TABLE . "
! SET
! rank_title = '$rank_title',
! rank_special = '$special_rank',
! rank_max = '$max_posts',
! rank_min = '$min_posts',
! rank_image = '$rank_image'
WHERE rank_id = $rank_id";
--- 165,169 ----
{
$sql = "UPDATE " . RANKS_TABLE . "
! SET rank_title = '$rank_title', rank_special = $special_rank, rank_max = 0, rank_min = $min_posts, rank_image = '$rank_image'
WHERE rank_id = $rank_id";
***************
*** 180,187 ****
else
{
! $sql = "INSERT INTO " . RANKS_TABLE . "
! (rank_title, rank_special, rank_max, rank_min, rank_image)
! VALUES
! ('$rank_title', '$special_rank', '$max_posts', '$min_posts', '$rank_image')";
$message = $lang['Rank_added'];
--- 172,177 ----
else
{
! $sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_max, rank_min, rank_image)
! VALUES ('$rank_title', $special_rank, 0, $min_posts, '$rank_image')";
$message = $lang['Rank_added'];
***************
*** 223,227 ****
}
! $message .= "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
--- 213,217 ----
}
! $message = $lang['Rank_removed'] . "<br /><br />" . sprintf($lang['Click_return_rankadmin'], "<a href=\"" . append_sid("admin_ranks.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
message_die(GENERAL_MESSAGE, $message);
***************
*** 244,248 ****
$sql = "SELECT * FROM " . RANKS_TABLE . "
! ORDER BY rank_min ASC, rank_special ASC";
if( !$result = $db->sql_query($sql) )
{
--- 234,238 ----
$sql = "SELECT * FROM " . RANKS_TABLE . "
! ORDER BY rank_min, rank_title";
if( !$result = $db->sql_query($sql) )
{
***************
*** 258,262 ****
"L_RANK" => $lang['Rank'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
- "L_RANK_MAXIMUM" => $lang['Rank_maximum'],
"L_SPECIAL_RANK" => $lang['Special_rank'],
"L_EDIT" => $lang['Edit'],
--- 248,251 ----
***************
*** 274,278 ****
$rank_id = $rank_rows[$i]['rank_id'];
$rank_min = $rank_rows[$i]['rank_min'];
- $rank_max = $rank_rows[$i]['rank_max'];
if($special_rank)
--- 263,266 ----
***************
*** 289,293 ****
"RANK" => $rank,
"RANK_MIN" => $rank_min,
- "RANK_MAX" => $rank_max,
"SPECIAL_RANK" => ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'],
--- 277,280 ----
***************
*** 323,327 ****
"L_RANK" => $lang['Rank_title'],
"L_RANK_MINIMUM" => $lang['Rank_minimum'],
- "L_RANK_MAXIMUM" => $lang['Rank_maximum'],
"L_SPECIAL_RANK" => $lang['Rank_special'],
"L_EDIT" => $lang['Edit'],
--- 310,313 ----
***************
*** 339,345 ****
$rank_id = $rank_rows[$i]['rank_id'];
$rank_min = $rank_rows[$i]['rank_min'];
- $rank_max = $rank_rows[$i]['rank_max'];
! if($special_rank == "1")
{
$rank_min = $rank_max = "-";
--- 325,330 ----
$rank_id = $rank_rows[$i]['rank_id'];
$rank_min = $rank_rows[$i]['rank_min'];
! if( $special_rank == 1 )
{
$rank_min = $rank_max = "-";
***************
*** 357,361 ****
"SPECIAL_RANK" => $rank_is_special,
"RANK_MIN" => $rank_min,
- "RANK_MAX" => $rank_max,
"U_RANK_EDIT" => append_sid("admin_ranks.$phpEx?mode=edit&id=$rank_id"),
--- 342,345 ----
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 14:38:40
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver/admin
In directory usw-pr-cvs1:/tmp/cvs-serv16544/templates/subSilver/admin
Modified Files:
ranks_edit_body.tpl ranks_list_body.tpl
Log Message:
Removed max setting for ranks as per poll and feedback
Index: ranks_edit_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/admin/ranks_edit_body.tpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ranks_edit_body.tpl 2001/10/19 23:17:15 1.3
--- ranks_edit_body.tpl 2001/12/05 14:38:37 1.4
***************
*** 21,28 ****
</tr>
<tr>
- <td class="row1" width="38%"><span class="gen">{L_RANK_MAXIMUM}:</span></td>
- <td class="row2"><input type="text" name="max_posts" size="5" maxlength="10" value="{MAXIMUM}" /></td>
- </tr>
- <tr>
<td class="row1" width="38%"><span class="gen">{L_RANK_IMAGE}:</span><br />
<span class="gensmall">{L_RANK_IMAGE_EXPLAIN}</span></td>
--- 21,24 ----
Index: ranks_list_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/admin/ranks_list_body.tpl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** ranks_list_body.tpl 2001/10/19 23:17:15 1.3
--- ranks_list_body.tpl 2001/12/05 14:38:37 1.4
***************
*** 8,12 ****
<th class="thCornerL">{L_RANK}</th>
<th class="thTop">{L_RANK_MINIMUM}</th>
- <th class="thTop">{L_RANK_MAXIMUM}</th>
<th class="thTop">{L_SPECIAL_RANK}</th>
<th class="thTop">{L_EDIT}</th>
--- 8,11 ----
***************
*** 17,21 ****
<td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK}</td>
<td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK_MIN}</td>
- <td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK_MAX}</td>
<td class="{ranks.ROW_CLASS}" align="center">{ranks.SPECIAL_RANK}</td>
<td class="{ranks.ROW_CLASS}" align="center"><a href="{ranks.U_RANK_EDIT}">{L_EDIT}</td>
--- 16,19 ----
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 00:50:15
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv23541/includes
Modified Files:
functions.php
Log Message:
Fixed bug #488016
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -r1.88 -r1.89
*** functions.php 2001/12/03 12:46:32 1.88
--- functions.php 2001/12/05 00:50:12 1.89
***************
*** 148,165 ****
$boxstring = '<select name="' . POST_FORUM_URL . '" onChange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>';
- for($i = 0; $i < $total_categories; $i++)
- {
- $boxstring .= '<option value="-1"> </option>';
- $boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>';
- $boxstring .= '<option value="-1">----------------</option>';
! if($total_forums)
! {
for($j = 0; $j < $total_forums; $j++)
{
! if( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && !$forum_rows[$j]['auth_view'] )
{
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? "selected=\"selected\"" : "";
! $boxstring .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
//
--- 148,163 ----
$boxstring = '<select name="' . POST_FORUM_URL . '" onChange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>';
! if( $total_forums )
! {
! for($i = 0; $i < $total_categories; $i++)
! {
! $boxstring_forums = "";
for($j = 0; $j < $total_forums; $j++)
{
! if( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG )
{
$selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? "selected=\"selected\"" : "";
! $boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>';
//
***************
*** 174,179 ****
--- 172,186 ----
}
}
+
+ if( $boxstring_forums != "" )
+ {
+ $boxstring .= '<option value="-1"> </option>';
+ $boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>';
+ $boxstring .= '<option value="-1">----------------</option>';
+ $boxstring .= $boxstring_forums;
+ }
}
}
+
$boxstring .= '</select>';
}
***************
*** 1170,1172 ****
}
! ?>
--- 1177,1179 ----
}
! ?>
\ No newline at end of file
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 00:21:00
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv16782/includes
Modified Files:
page_header.php sessions.php
Log Message:
New session code, probably still dodgy, fix for login failed message, search updates, highlighting URI messup fixes, max limit for ranks
Index: page_header.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/page_header.php,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -r1.74 -r1.75
*** page_header.php 2001/11/27 17:36:04 1.74
--- page_header.php 2001/12/05 00:20:56 1.75
***************
*** 242,246 ****
"PRIVATE_MESSAGE_INFO_UNREAD" => $l_privmsgs_text_unread,
"PRIVATE_MESSAGE_NEW_FLAG" => $s_privmsg_new,
! "LAST_VISIT_DATE" => sprintf($lang['You_last_visit'], $s_last_visit),
"PRIVMSG_IMG" => $icon_pm,
--- 242,247 ----
"PRIVATE_MESSAGE_INFO_UNREAD" => $l_privmsgs_text_unread,
"PRIVATE_MESSAGE_NEW_FLAG" => $s_privmsg_new,
! "LAST_VISIT_DATE" => sprintf($lang['You_last_visit'], $s_last_visit),
! "CURRENT_TIME" => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
"PRIVMSG_IMG" => $icon_pm,
***************
*** 294,299 ****
"L_BY" => $lang['by'],
"L_LOGIN_LOGOUT" => $l_login_logout,
- "L_SEARCH_UNANSWERED" => $lang['Search_unanswered'],
- "L_SEARCH_SELF" => $lang['Search_your_posts'],
"U_INDEX" => append_sid("index.".$phpEx),
--- 295,298 ----
***************
*** 310,315 ****
"U_MEMBERSLIST" => append_sid("memberlist.".$phpEx),
"U_GROUP_CP" => append_sid("groupcp.".$phpEx),
- "U_SEARCH_UNANSWERED" => append_sid("search.".$phpEx."?search_id=unanswered"),
- "U_SEARCH_SELF" => append_sid("search.".$phpEx."?search_id=egosearch"),
"S_CONTENT_DIRECTION" => $lang['DIRECTION'],
--- 309,312 ----
***************
*** 319,323 ****
"S_TIMEZONE" => sprintf($lang['All_times'], $lang[$board_config['board_timezone']]),
"S_LOGIN_ACTION" => append_sid("login.$phpEx"),
- "S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['board_timezone']),
"T_HEAD_STYLESHEET" => $theme['head_stylesheet'],
--- 316,319 ----
***************
*** 390,392 ****
$template->pparse("overall_header");
! ?>
--- 386,388 ----
$template->pparse("overall_header");
! ?>
\ No newline at end of file
Index: sessions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/sessions.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** sessions.php 2001/11/29 02:26:29 1.38
--- sessions.php 2001/12/05 00:20:56 1.39
***************
*** 27,34 ****
// Returns the new session ID on success.
//
! function session_begin($user_id, $user_ip, $page_id, $session_length, $login = 0, $autologin = 0)
{
! global $db, $lang, $board_config, $phpEx;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
--- 27,34 ----
// Returns the new session ID on success.
//
! function session_begin($user_id, $user_ip, $page_id, $session_length, $auto_create = 0, $enable_autologin = 0)
{
! global $db, $board_config;
global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
***************
*** 38,44 ****
$cookiesecure = $board_config['cookie_secure'];
! if( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename]) )
{
! $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename]) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename])) : "";
$session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? stripslashes($HTTP_COOKIE_VARS[$cookiename . '_sid']) : "";
--- 38,44 ----
$cookiesecure = $board_config['cookie_secure'];
! if( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )
{
! $sessiondata = isset($HTTP_COOKIE_VARS[$cookiename . '_data']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : "";
$session_id = isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) ? stripslashes($HTTP_COOKIE_VARS[$cookiename . '_sid']) : "";
***************
*** 69,73 ****
if (!$result)
{
! message_die(CRITICAL_ERROR, "Couldn't obtain ban information.", __LINE__, __FILE__, $sql);
}
--- 69,73 ----
if (!$result)
{
! message_die(CRITICAL_ERROR, "Couldn't obtain ban information.", "", __LINE__, __FILE__, $sql);
}
***************
*** 83,99 ****
else
{
- if( $user_id == ANONYMOUS )
- {
- $login = 0;
- $autologin = 0;
- }
-
//
// Try and pull the last time stored
// in a cookie, if it exists
//
! if( $sessionmethod == SESSION_METHOD_GET && $user_id != ANONYMOUS )
{
! $sql = "SELECT user_lastvisit
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
--- 83,99 ----
else
{
//
// Try and pull the last time stored
// in a cookie, if it exists
//
! if( $user_id != ANONYMOUS )
{
! //
! // This is a 'work-around' since I managed to
! // freeze the schema without re-visiting sessions,
! // what's needed is a session timer in the user table
! // + the user_lastvisit ... damn damn damn damn and blast
! //
! $sql = "SELECT user_autologin_key, user_lastvisit
FROM " . USERS_TABLE . "
WHERE user_id = $user_id";
***************
*** 105,121 ****
$row = $db->sql_fetchrow($result);
! $sessiondata['lastvisit'] = $row['user_lastvisit'];
}
else
{
! $sessiondata['lastvisit'] = (!empty($sessiondata['sessiontime'])) ? $sessiondata['sessiontime'] : $current_time;
}
$sql = "UPDATE " . SESSIONS_TABLE . "
! SET session_user_id = $user_id, session_start = $current_time, session_time = $current_time, session_page = $page_id, session_logged_in = $login
! WHERE (session_id = '" . $session_id . "')
! AND (session_ip = '$user_ip')";
$result = $db->sql_query($sql);
--- 105,155 ----
$row = $db->sql_fetchrow($result);
+
+ $sessiondata['lastvisit'] = $row['user_lastvisit'];
+
+ if( $auto_create )
+ {
+ if( isset($sessiondata['autologinid']) )
+ {
+ if( $sessiondata['autologinid'] == $row['user_autologin_key'] )
+ {
+ $login = 1;
+ $enable_autologin = 1;
+ }
+ else
+ {
+ $login = 0;
+ $enable_autologin = 0;
+ $user_id = ANONYMOUS;
! $sessiondata['lastvisit'] = ( !empty($sessiondata['lastvisit']) ) ? $sessiondata['lastvisit'] : $current_time;
! }
! }
! else
! {
! $login = 0;
! $enable_autologin = 0;
! $user_id = ANONYMOUS;
+ $sessiondata['lastvisit'] = ( !empty($sessiondata['lastvisit']) ) ? $sessiondata['lastvisit'] : $current_time;
+ }
+ }
+ else
+ {
+ $login = 1;
+ }
}
else
{
! $login = 0;
! $enable_autologin = 0;
!
! $sessiondata['lastvisit'] = ( !empty($sessiondata['lastvisit']) ) ? $sessiondata['lastvisit'] : $current_time;
}
$sql = "UPDATE " . SESSIONS_TABLE . "
! SET session_user_id = $user_id, session_start = $current_time, session_last_visit = " . $sessiondata['lastvisit'] . ", session_time = $current_time, session_page = $page_id, session_logged_in = $login
! WHERE session_id = '" . $session_id . "'
! AND session_ip = '$user_ip'";
$result = $db->sql_query($sql);
***************
*** 130,160 ****
if(!$result)
{
! message_die(CRITICAL_ERROR, "Error creating new session : session_begin", __LINE__, __FILE__, $sql);
}
}
! if( $autologin && $sessionmethod = SESSION_METHOD_COOKIE )
{
! mt_srand( (double) microtime() * 1000000);
! $autologin_key = md5(uniqid(mt_rand()));
! $sql_auto = "UPDATE " . USERS_TABLE . "
! SET user_autologin_key = '$autologin_key'
WHERE user_id = $user_id";
$result = $db->sql_query($sql_auto);
if(!$result)
{
! message_die(CRITICAL_ERROR, "Couldn't update users autologin key : session_begin", __LINE__, __FILE__, $sql);
}
-
- $sessiondata['autologinid'] = $autologin_key;
}
$sessiondata['userid'] = $user_id;
- $sessiondata['sessionstart'] = $current_time;
- $sessiondata['sessiontime'] = $current_time;
$serialised_cookiedata = serialize($sessiondata);
! setcookie($cookiename, $serialised_cookiedata, ($current_time + 31536000), $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
--- 164,197 ----
if(!$result)
{
! message_die(CRITICAL_ERROR, "Error creating new session : session_begin", "", __LINE__, __FILE__, $sql);
}
}
! if( $user_id != ANONYMOUS )
{
! $autologin_sql = "";
! if( $enable_autologin && $sessionmethod = SESSION_METHOD_COOKIE )
! {
! mt_srand( (double) microtime() * 1000000);
! $autologin_key = md5(uniqid(mt_rand()));
! $sessiondata['autologinid'] = $autologin_key;
! $autologin_sql = ", user_autologin_key = '$autologin_key'";
! }
!
! $sql_auto = "UPDATE " . USERS_TABLE . "
! SET user_lastvisit = " . time() . $autologin_sql . "
WHERE user_id = $user_id";
$result = $db->sql_query($sql_auto);
if(!$result)
{
! message_die(CRITICAL_ERROR, "Couldn't update users autologin key : session_begin", "", __LINE__, __FILE__, $sql);
}
}
$sessiondata['userid'] = $user_id;
$serialised_cookiedata = serialize($sessiondata);
! setcookie($cookiename . '_data', $serialised_cookiedata, ($current_time + 31536000), $cookiepath, $cookiedomain, $cookiesecure);
setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
***************
*** 181,187 ****
$cookiesecure = $board_config['cookie_secure'];
! if( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename]) )
{
! $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename])) : "";
$session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? stripslashes($HTTP_COOKIE_VARS[$cookiename . '_sid']) : "";
--- 218,227 ----
$cookiesecure = $board_config['cookie_secure'];
! $current_time = time();
! unset($userdata);
!
! if( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )
{
! $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : "";
$session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? stripslashes($HTTP_COOKIE_VARS[$cookiename . '_sid']) : "";
***************
*** 190,199 ****
else
{
! $session_id = (isset($HTTP_GET_VARS['sid'])) ? $HTTP_GET_VARS['sid'] : "";
$sessionmethod = SESSION_METHOD_GET;
}
- $current_time = time();
- unset($userdata);
//
--- 230,237 ----
else
{
! $session_id = ( isset($HTTP_GET_VARS['sid']) ) ? $HTTP_GET_VARS['sid'] : "";
$sessionmethod = SESSION_METHOD_GET;
}
//
***************
*** 212,218 ****
AND u.user_id = s.session_user_id";
$result = $db->sql_query($sql);
! if (!$result)
{
! message_die(CRITICAL_ERROR, "Error doing DB query userdata row fetch : session_pagestart", __LINE__, __FILE__, $sql);
}
--- 250,256 ----
AND u.user_id = s.session_user_id";
$result = $db->sql_query($sql);
! if( !$result )
{
! message_die(CRITICAL_ERROR, "Error doing DB query userdata row fetch : session_pagestart", "", __LINE__, __FILE__, $sql);
}
***************
*** 224,233 ****
if( isset($userdata['user_id']) )
{
! $SID = ($sessionmethod == SESSION_METHOD_GET) ? "sid=" . $session_id : "";
! $sessiondata['sessiontime'] = $current_time;
! $serialised_cookiedata = serialize($sessiondata);
! setcookie($cookiename, $serialised_cookiedata, ($current_time + 31536000), $cookiepath, $cookiedomain, $cookiesecure);
//
// Only update session DB a minute or so after last update
--- 262,282 ----
if( isset($userdata['user_id']) )
{
! $SID = ( $sessionmethod == SESSION_METHOD_GET ) ? "sid=" . $session_id : "";
! if( empty($HTTP_COOKIE_VARS[$cookiename . '_data']) )
! {
! if( !empty($userdata['user_autologin']) && $sessionmethod = SESSION_METHOD_COOKIE )
! {
! $sessiondata['autologinid'] = $autologin_key;
! }
! $sessiondata['userid'] = $user_id;
! $sessiondata['lastvisit'] = $userdata['session_last_visit'];
+ $serialised_cookiedata = serialize($sessiondata);
+ // session_send_cookie("_data", $serialised_cookiedata, ($current_time + 31536000));
+ setcookie($board_config['cookie_name'] . "_data", $serialised_cookiedata, ($current_time + 31536000), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
+ setcookie($board_config['cookie_name'] . "_sid", $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_sid"], 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
+ }
+
//
// Only update session DB a minute or so after last update
***************
*** 241,250 ****
AND session_user_id = " . $userdata['user_id'];
$result = $db->sql_query($sql);
! if(!$result)
{
! message_die(CRITICAL_ERROR, "Error updating sessions table : session_pagestart", __LINE__, __FILE__, $sql);
}
! if( $sessionmethod == SESSION_METHOD_GET )
{
$sql = "UPDATE " . USERS_TABLE . "
--- 290,299 ----
AND session_user_id = " . $userdata['user_id'];
$result = $db->sql_query($sql);
! if( !$result )
{
! message_die(CRITICAL_ERROR, "Error updating sessions table : session_pagestart", "", __LINE__, __FILE__, $sql);
}
! if( $user_id != ANONYMOUS )
{
$sql = "UPDATE " . USERS_TABLE . "
***************
*** 252,273 ****
WHERE user_id = " . $userdata['user_id'];
$result = $db->sql_query($sql);
! if(!$result)
{
! message_die(CRITICAL_ERROR, "Error updating users table : session_pagestart (GET)", __LINE__, __FILE__, $sql);
}
}
- $userdata['session_time'] = $current_time;
-
//
// Delete expired sessions
//
$expiry_time = $current_time - $board_config['session_length'];
! $sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_time < $expiry_time";
$result = $db->sql_query($sql);
! if(!$result)
{
! message_die(CRITICAL_ERROR, "Error clearing sessions table : session_pagestart", __LINE__, __FILE__, $sql);
}
--- 301,320 ----
WHERE user_id = " . $userdata['user_id'];
$result = $db->sql_query($sql);
! if( !$result )
{
! message_die(CRITICAL_ERROR, "Error updating users table : session_pagestart (GET)", "", __LINE__, __FILE__, $sql);
}
}
//
// Delete expired sessions
//
$expiry_time = $current_time - $board_config['session_length'];
! $sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_time < $expiry_time";
$result = $db->sql_query($sql);
! if( !$result )
{
! message_die(CRITICAL_ERROR, "Error clearing sessions table : session_pagestart", "", __LINE__, __FILE__, $sql);
}
***************
*** 282,285 ****
--- 329,335 ----
}
}
+ else
+ {
+ }
//
// If we reach here then no (valid) session exists. So we'll create a new one,
***************
*** 287,342 ****
//
! $login = 0;
! $autologin = 0;
! if( isset($sessiondata['userid']) && isset($sessiondata['autologinid']) )
{
! $sql = "SELECT user_id, user_autologin_key
! FROM " . USERS_TABLE . "
! WHERE user_id = " . $sessiondata['userid'];
! $result = $db->sql_query($sql);
! if (!$result)
! {
! message_die(CRITICAL_ERROR, "Error doing DB query userdata row fetch (non-session) : session_pagestart", __LINE__, __FILE__, $sql);
! }
!
! $userdata = $db->sql_fetchrow($result);
!
! if($userdata['user_autologin_key'])
! {
! if($userdata['user_autologin_key'] == $sessiondata['autologinid'])
! {
! //
! // We have a match, and not the kind you light ...
! //
! $login = 1;
! $autologin = 1;
! $user_id = $sessiondata['userid'];
! }
! else
! {
! unset($userdata);
! $user_id = ANONYMOUS;
! }
! }
! else
! {
! unset($userdata);
! $user_id = ANONYMOUS;
! }
}
else
{
- unset($userdata);
- $user_id = ANONYMOUS;
- }
-
- $result_id = session_begin($user_id, $user_ip, $thispage_id, $session_length, $login, $autologin);
- if(!$result_id)
- {
- message_die(CRITICAL_ERROR, "Error creating user session : session_pagestart", __LINE__, __FILE__, $sql);
- }
- else
- {
$sql = "SELECT u.*, s.*
FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
--- 337,349 ----
//
! $user_id = ( isset($sessiondata['userid']) ) ? $sessiondata['userid'] : ANONYMOUS;
! $result_id = session_begin($user_id, $user_ip, $thispage_id, $board_config['session_length'], TRUE);
! if( !$result_id )
{
! message_die(CRITICAL_ERROR, "Error creating user session : session_pagestart", "", __LINE__, __FILE__, $sql);
}
else
{
$sql = "SELECT u.*, s.*
FROM " . SESSIONS_TABLE . " s, " . USERS_TABLE . " u
***************
*** 345,351 ****
AND u.user_id = s.session_user_id";
$result = $db->sql_query($sql);
! if (!$result)
{
! message_die(CRITICAL_ERROR, "Error doing DB query userdata row fetch : session_pagestart new user", __LINE__, __FILE__, $sql);
}
--- 352,358 ----
AND u.user_id = s.session_user_id";
$result = $db->sql_query($sql);
! if ( !$result )
{
! message_die(CRITICAL_ERROR, "Error doing DB query userdata row fetch : session_pagestart new user", "", __LINE__, __FILE__, $sql);
}
***************
*** 355,359 ****
return $userdata;
! } // session_check()
//
--- 362,366 ----
return $userdata;
! } // session_pagestart()
//
***************
*** 371,379 ****
$cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure'];
! if( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename]) )
{
! $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename])) : "";
! $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? stripslashes($HTTP_COOKIE_VARS[$cookiename . '_sid']) : "";
$sessionmethod = SESSION_METHOD_COOKIE;
--- 378,391 ----
$cookiedomain = $board_config['cookie_domain'];
$cookiesecure = $board_config['cookie_secure'];
+
+ $current_time = time();
! //
! // Pull cookiedata or grab the URI propagated sid
! //
! if( isset($HTTP_COOKIE_VARS[$cookiename . '_sid']) || isset($HTTP_COOKIE_VARS[$cookiename . '_data']) )
{
! $sessiondata = isset( $HTTP_COOKIE_VARS[$cookiename . '_data'] ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookiename . '_data'])) : "";
! $session_id = isset( $HTTP_COOKIE_VARS[$cookiename . '_sid'] ) ? $HTTP_COOKIE_VARS[$cookiename . '_sid'] : "";
$sessionmethod = SESSION_METHOD_COOKIE;
***************
*** 385,418 ****
$sessionmethod = SESSION_METHOD_GET;
}
- $current_time = time();
! $sql = "UPDATE " . SESSIONS_TABLE . "
! SET session_logged_in = 0, session_user_id = -1, session_time = $current_time
! WHERE (session_id = '" . $session_id . "')
! AND (session_user_id = $user_id)";
! $result = $db->sql_query($sql, BEGIN_TRANSACTION);
! if (!$result)
{
! message_die(CRITICAL_ERROR, "Couldn't delete user session : session_end", __LINE__, __FILE__, $sql);
}
! if( isset($sessiondata['autologinid']) )
{
$sql = "UPDATE " . USERS_TABLE . "
! SET user_autologin_key = ''
WHERE user_id = $user_id";
$result = $db->sql_query($sql, END_TRANSACTION);
if (!$result)
{
! message_die(CRITICAL_ERROR, "Couldn't reset user autologin key : session_end", __LINE__, __FILE__, $sql);
}
! $sessiondata['autologinid'] = "";
}
! $sessiondata['sessionend'] = $current_time;
$serialised_cookiedata = serialize($sessiondata);
! setcookie($cookiename, $serialised_cookiedata, ($current_time + 31536000), $cookiepath, $cookiedomain, $cookiesecure);
! setcookie($cookiename . '_sid', $session_id, 0, $cookiepath, $cookiedomain, $cookiesecure);
$SID = ($sessionmethod == SESSION_METHOD_GET) ? "sid=" . $session_id : "";
--- 397,443 ----
$sessionmethod = SESSION_METHOD_GET;
}
! //
! // Delete existing session
! //
! $sql = "DELETE FROM " . SESSIONS_TABLE . "
! WHERE session_id = '$session_id'
! AND session_user_id = $user_id";
! $result = $db->sql_query($sql);
! if(!$result)
{
! message_die(CRITICAL_ERROR, "Error removing user session : session_end", "", __LINE__, __FILE__, $sql);
}
! //
! // If a registered user then update their last visit
! // and autologin (if necessary) details
! //
! if( $user_id != ANONYMOUS )
{
+ $autologin_sql = "";
+ if( isset($sessiondata['autologinid']) && $sessionmethod = SESSION_METHOD_COOKIE )
+ {
+ unset($sessiondata['autologinid']);
+ $autologin_sql = ", user_autologin_key = ''";
+ }
+
$sql = "UPDATE " . USERS_TABLE . "
! SET user_lastvisit = " . time() . $autologin_sql . "
WHERE user_id = $user_id";
$result = $db->sql_query($sql, END_TRANSACTION);
if (!$result)
{
! message_die(CRITICAL_ERROR, "Couldn't reset user autologin key : session_end", "", __LINE__, __FILE__, $sql);
}
!
}
! $sessiondata['userid'] = ANONYMOUS;
! $sessiondata['lastvisit'] = $current_time;
$serialised_cookiedata = serialize($sessiondata);
! setcookie($cookiename . '_data', $serialised_cookiedata, ($current_time + 31536000), $cookiepath, $cookiedomain, $cookiesecure);
! setcookie($cookiename . '_sid', '', 0, $cookiepath, $cookiedomain, $cookiesecure);
$SID = ($sessionmethod == SESSION_METHOD_GET) ? "sid=" . $session_id : "";
***************
*** 423,426 ****
--- 448,480 ----
//
+ // This checks to see if we're @ the 20 cookie limit
+ // if we are it re-sends the session id. This isn't a great
+ // solution but it does work, although resulting in
+ // more cookies being sent than necessary. Will re-evaluate
+ // this in 2.2
+ //
+ function session_send_cookie($append_name, $set_value, $last_time)
+ {
+ global $board_config;
+ global $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $SID;
+
+ setcookie($board_config['cookie_name'] . $append_name, $set_value, $last_time, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
+
+ $cookie_count = 0;
+ while( list(, $value) = each($HTTP_COOKIE_VARS) )
+ {
+ $cookie_count += count($value);
+ }
+
+ if( $cookie_count == 20 )
+ {
+ setcookie($board_config['cookie_name'] . "_sid", stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_sid"]), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
+ }
+
+ return;
+ }
+
+ //
+ //
// Append $SID to a url. Borrowed from phplib and modified. This is an
// extra routine utilised by the session code above and acts as a wrapper
***************
*** 432,438 ****
global $SID;
! if(!empty($SID) && !eregi("sid=", $url))
{
! $url .= ( (strpos($url, "?") != false) ? ( ( $non_html_amp ) ? "&" : "&" ) : "?" ) . $SID;
}
--- 486,492 ----
global $SID;
! if( !empty($SID) && !eregi("sid=", $url) )
{
! $url .= ( ( strpos($url, "?") != false ) ? ( ( $non_html_amp ) ? "&" : "&" ) : "?" ) . $SID;
}
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 00:21:00
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv16782
Modified Files:
search.php login.php common.php viewtopic.php viewforum.php
index.php
Log Message:
New session code, probably still dodgy, fix for login failed message, search updates, highlighting URI messup fixes, max limit for ranks
Index: search.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/search.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -r1.40 -r1.41
*** search.php 2001/11/29 13:05:03 1.40
--- search.php 2001/12/05 00:20:51 1.41
***************
*** 257,290 ****
{
! if( $query_keywords != "" || $query_author != "" || $search_id == "newposts" || $search_id == "egosearch" || $search_id == "unanswered")
! {
! $synonym_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_synonyms.txt");
! $stopword_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_stopwords.txt");
if( $search_id == "newposts" )
{
! $show_results = "topics";
! $search_time = $userdata['session_last_visit'];
! $sortby = 0;
! $sortby_dir = "DESC";
}
!
! if( $search_id == "egosearch" )
{
! $query_author = $userdata['username'];
! $show_results = "topics";
! $search_time = 0;
! $sortby = 0;
! $sortby_dir = "DESC";
}
!
! if( $search_id == "unanswered" )
{
! $show_results = "topics";
! $search_time = 0;
! $sortby = 0;
! $sortby_dir = "DESC";
}
!
$cleaned_search = clean_words_search($query_keywords);
$cleaned_search = remove_stop_words($cleaned_search, $stopword_array);
--- 257,361 ----
{
! $search_sql = "";
+ //
+ // Cycle through options ...
+ //
+ if( $search_id == "newposts" || $search_id == "egosearch" || ( $query_author != "" && $query_keywords == "" ) )
+ {
if( $search_id == "newposts" )
{
! $sql = "SELECT post_id
! FROM " . POSTS_TABLE . "
! WHERE post_time >= " . $userdata['session_last_visit'] . "
! ORDER BY post_time DESC";
! }
! else if( $search_id == "egosearch" )
! {
! $sql = "SELECT post_id
! FROM " . POSTS_TABLE . "
! WHERE poster_id = " . $userdata['user_id'] . "
! ORDER BY post_time DESC";
}
! else
{
! $query_author = str_replace("*", "%", trim($query_author));
!
! $sql = "SELECT p.post_id
! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u
! WHERE u.username LIKE '$query_author'
! AND p.poster_id = u.user_id
! ORDER BY p.post_time DESC";
}
! $result = $db->sql_query($sql);
! if( !$result )
{
! message_die(GENERAL_ERROR, "Couldn't obtain matched posts list", "", __LINE__, __FILE__, $sql);
}
!
! $sql_post_id_in = "";
! while( $row = $db->sql_fetchrow($result) )
! {
! if( $sql_post_id_in != "" )
! {
! $sql_post_id_in .= ", ";
! }
! $sql_post_id_in .= $row['post_id'];
!
! $total_posts++;
! }
!
! if( $sql_post_id_in != "" )
! {
! $sql = "SELECT topic_id
! FROM " . POSTS_TABLE . "
! WHERE post_id IN ($sql_post_id_in)
! GROUP BY topic_id";
! $result = $db->sql_query($sql);
! if( !$result )
! {
! message_die(GENERAL_ERROR, "Couldn't matched posts", "", __LINE__, __FILE__, $sql);
! }
!
! $sql_post_id_in = "";
! while( $row = $db->sql_fetchrow($result) )
! {
! if( $sql_post_id_in != "" )
! {
! $sql_post_id_in .= ", ";
! }
! $sql_post_id_in .= $row['topic_id'];
! }
!
! $search_sql .= "t.topic_id IN ($sql_post_id_in) ";
! }
! else
! {
! message_die(GENERAL_MESSAGE, $lang['No_search_match']);
! }
!
! $show_results = "topics";
! $sortby = 0;
! $sortby_dir = "DESC";
!
! }
! else if( $search_id == "unanswered" )
! {
!
! $search_sql = "t.topic_replies = 0 ";
!
! //
! // Basic requirements
! //
! $show_results = "topics";
! $sortby = 0;
! $sortby_dir = "DESC";
! }
! else if( $query_keywords != "" || $query_author != "" )
! {
!
! $synonym_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_synonyms.txt");
! $stopword_array = @file($phpbb_root_path . "language/lang_" . $board_config['default_lang'] . "/search_stopwords.txt");
!
$cleaned_search = clean_words_search($query_keywords);
$cleaned_search = remove_stop_words($cleaned_search, $stopword_array);
***************
*** 384,396 ****
}
}
-
-
- $sql_fields = ( $show_results == "posts") ? "pt.post_text, pt.post_subject, p.post_id, p.post_time, p.post_username, f.forum_name, t.topic_id, t.topic_title, t.topic_poster, t.topic_time, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid" : "f.forum_id, f.forum_name, t.topic_id, t.topic_title, t.topic_poster, t.topic_time, t.topic_views, t.topic_replies, t.topic_last_post_id, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username" ;
-
- $sql_from = ( $show_results == "posts") ? FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt" : FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2";
-
- $sql_where = ( $show_results == "posts") ? "pt.post_id = p.post_id AND f.forum_id = p.forum_id AND p.topic_id = t.topic_id AND p.poster_id = u.user_id" : "f.forum_id = t.forum_id AND u.user_id = t.topic_poster AND p.post_id = t.topic_last_post_id AND u2.user_id = p.poster_id";
! $search_sql = "";
//
--- 455,466 ----
}
}
! //
! // Author name search
! //
! if( $query_author != "" )
! {
! $query_author = str_replace("*", "%", trim($query_author));
! }
//
***************
*** 401,627 ****
if( $show_results == "posts" )
{
! $search_sql .= "p.post_id IN ($sql_post_id_in) ";
}
else
{
! switch(SQL_LAYER)
{
! case 'mysql':
! case 'mysql4':
! $sql = "SELECT topic_id
! FROM " . POSTS_TABLE . "
! WHERE post_id IN ($sql_post_id_in)
! GROUP BY topic_id";
! $result = $db->sql_query($sql);
! if( !$result )
{
! message_die(GENERAL_ERROR, "Couldn't matched posts", "", __LINE__, __FILE__, $sql);
}
!
! $sql_post_id_in = "";
! while( $row = $db->sql_fetchrow($result) )
{
! if( $sql_post_id_in != "" )
! {
! $sql_post_id_in .= ", ";
! }
! $sql_post_id_in .= $row['topic_id'];
}
- $search_sql .= "t.topic_id IN ($sql_post_id_in) ";
-
- break;
-
- default:
- $search_sql .= "t.topic_id IN (
- SELECT topic_id
- FROM " . POSTS_TABLE . "
- WHERE post_id IN ($sql_post_id_in)
- GROUP BY topic_id )";
- break;
- }
}
}
! //
! // Author name search
! //
! if( $query_author != "" )
{
! $query_author = str_replace("*", "%", trim($query_author));
!
! if( $show_results == "posts" )
! {
! $search_sql .= ( $search_sql == "" ) ? "u.username LIKE '$query_author' " : " AND u.username LIKE '$query_author' ";
! }
! else
! {
! $search_sql .= ( $search_sql == "" ) ? "us.username LIKE '$query_author' AND us.user_id = p.poster_id " : " AND us.username LIKE '$query_author' AND us.user_id = p.poster_id ";
! $sql_from .= ", " . USERS_TABLE . " us ";
! }
}
! //
! // Unanswered Posts
! //
! if( $search_id == "unanswered" )
{
! $search_sql .= ( $search_sql == "" ) ? "t.topic_replies = 0 " : "AND t.topic_replies = 0 ";
}
!
! //
! // If user is logged in then we'll check to see which (if any) private
! // forums they are allowed to view and include them in the search.
! //
! // If not logged in we explicitly prevent searching of private forums
! //
! if( $search_sql != "" || $search_id == "newposts" || $search_id == "egosearch" || $search_id == "unanswered" )
{
! $sql = "SELECT $sql_fields
! FROM $sql_from ";
! $sql .= ( $search_id == "newposts" ) ? "WHERE $sql_where" : "WHERE $search_sql AND $sql_where";
! if( $search_forum != "all" )
{
! $is_auth = auth(AUTH_READ, $search_forum, $userdata);
!
! if( !$is_auth['auth_read'] )
! {
! message_die(GENERAL_MESSAGE, $lang['No_search_match']);
! }
! else
{
! $sql .= " AND f.forum_id = $search_forum";
}
}
! else
! {
! $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
!
! if( $search_cat != "all" )
! {
! $sql .= " AND f.cat_id = $search_cat";
! }
! $ignore_forum_sql = "";
! while( list($key, $value) = each($is_auth_ary) )
! {
! if( !$value['auth_read'] )
! {
! if( $ignore_forum_sql != "" )
! {
! $ignore_forum_sql .= ", ";
! }
! $ignore_forum_sql .= $key;
! }
! }
! if( $ignore_forum_sql != "" )
! {
! $sql .= " AND f.forum_id NOT IN ($ignore_forum_sql) ";
! }
! }
! if( $search_time )
! {
! $sql .= " AND p.post_time >= $search_time ";
! }
! $sql .= " ORDER BY " . $sortby_sql[$sortby] . " $sortby_dir";
!
! if( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, "Couldn't obtain search results", "", __LINE__, __FILE__, $sql);
! }
! $total_match_count = $db->sql_numrows($result);
! $searchset = $db->sql_fetchrowset($result);
! //
! // Clean up search results table
! //
! $sql = "SELECT session_id
! FROM " . SESSIONS_TABLE;
! if( $result = $db->sql_query($sql) )
{
! $delete_search_id_sql = "";
! while( $row = $db->sql_fetchrow($result) )
{
! if( $delete_search_id_sql != "" )
! {
! $delete_search_id_sql .= ", ";
! }
! $delete_search_id_sql .= "'" . $row['session_id'] . "'";
}
! if( $delete_search_id_sql != "" )
{
! $sql = "DELETE FROM " . SEARCH_TABLE . "
! WHERE session_id NOT IN ($delete_search_id_sql)";
! if( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, "Couldn't delete old search id sessions", "", __LINE__, __FILE__, $sql);
! }
}
}
! //
! // Store new result data
! //
! if( $total_match_count )
{
! $search_results = "";
! for($i = 0; $i < count($searchset); $i++)
{
! if( $show_results == "posts")
! {
! $search_results .= ($search_results != "") ? ", " . $searchset[$i]['post_id'] : $searchset[$i]['post_id'];
! }
! else
! {
! $search_results .= ($search_results != "") ? ", " . $searchset[$i]['topic_id'] : $searchset[$i]['topic_id'];
! }
}
!
! $per_page = ( $show_results == "posts" ) ? $board_config['posts_per_page'] : $board_config['topics_per_page'];
!
! //
! // Combine both results and search data (apart from original query)
! // so we can serialize it and place it in the DB
! //
! $store_search_data = array();
! $store_search_data['results'] = $search_results;
! $store_search_data['word_array'] = $split_search;
! $store_search_data['match_count'] = $total_match_count;
!
! $result_array = serialize($store_search_data);
! unset($store_search_data);
! unset($search_results);
! mt_srand ((double) microtime() * 1000000);
! $search_id = mt_rand();
! $sql = "UPDATE " . SEARCH_TABLE . "
! SET search_id = $search_id, search_array = '$result_array'
! WHERE session_id = '" . $userdata['session_id'] . "'";
! $result = $db->sql_query($sql);
! if( !$result || !$db->sql_affectedrows() )
{
! $sql = "INSERT INTO " . SEARCH_TABLE . " (search_id, session_id, search_array)
! VALUES($search_id, '" . $userdata['session_id'] . "', '$result_array')";
! if( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, "Couldn't insert search results", "", __LINE__, __FILE__, $sql);
! }
}
-
- $db->sql_freeresult($result);
-
- }
- else
- {
- message_die(GENERAL_MESSAGE, $lang['No_search_match']);
}
}
else
--- 471,723 ----
if( $show_results == "posts" )
{
! $search_sql .= ( $query_author == "" ) ? "p.post_id IN ($sql_post_id_in)" : "p.post_id IN ($sql_post_id_in) AND u.username LIKE '$query_author' ";
!
! if( $search_time )
! {
! $search_sql .= " AND p.post_time >= $search_time ";
! }
}
else
{
!
! $search_time_sql = "";
! if( $search_time )
! {
! $search_time_sql = ( $query_author == "" ) ? "AND post_time >= $search_time " : "AND p.post_time >= $search_time ";
! }
!
! if( $query_author == "" )
! {
! $sql = "SELECT topic_id
! FROM " . POSTS_TABLE . "
! WHERE post_id IN ($sql_post_id_in)
! $search_time_sql
! GROUP BY topic_id";
! }
! else
! {
! $sql = "SELECT p.topic_id
! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u
! WHERE p.post_id IN ($sql_post_id_in)
! AND u.username LIKE '$query_author'
! AND p.poster_id = u.user_id
! $search_time_sql
! GROUP BY p.topic_id";
! }
! $result = $db->sql_query($sql);
! if( !$result )
! {
! message_die(GENERAL_ERROR, "Couldn't matched posts", "", __LINE__, __FILE__, $sql);
! }
!
! $sql_post_id_in = "";
! while( $row = $db->sql_fetchrow($result) )
{
! if( $sql_post_id_in != "" )
! {
! $sql_post_id_in .= ", ";
! }
! $sql_post_id_in .= $row['topic_id'];
! }
!
! $search_sql .= "t.topic_id IN ($sql_post_id_in) ";
! /*
! if( $query_author == "" )
{
! $search_sql .= "t.topic_id IN (
! SELECT topic_id
! FROM " . POSTS_TABLE . "
! WHERE post_id IN ($sql_post_id_in)
! $search_time_sql
! GROUP BY topic_id )";
}
! else
{
! $search_sql .= "t.topic_id IN (
! SELECT p.topic_id
! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u
! WHERE p.post_id IN ($sql_post_id_in)
! AND u.username LIKE '$query_author'
! AND p.poster_id = u.user_id
! $search_time_sql
! GROUP BY p.topic_id )";
}
+ */
}
}
! else
{
! message_die(GENERAL_MESSAGE, $lang['No_search_match']);
}
+ }
! //
! // Define common SQL
! //
! $sql_fields = ( $show_results == "posts") ? "pt.post_text, pt.post_subject, p.post_id, p.post_time, p.post_username, f.forum_name, t.topic_id, t.topic_title, t.topic_poster, t.topic_time, t.topic_views, t.topic_replies, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid" : "f.forum_id, f.forum_name, t.topic_id, t.topic_title, t.topic_poster, t.topic_time, t.topic_views, t.topic_replies, t.topic_last_post_id, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username" ;
!
! $sql_from = ( $show_results == "posts") ? FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TEXT_TABLE . " pt" : FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2";
!
! $sql_where = ( $show_results == "posts") ? "pt.post_id = p.post_id AND f.forum_id = p.forum_id AND p.topic_id = t.topic_id AND p.poster_id = u.user_id" : "f.forum_id = t.forum_id AND u.user_id = t.topic_poster AND p.post_id = t.topic_last_post_id AND u2.user_id = p.poster_id";
!
! //
! // Build query ...
! //
! $sql = "SELECT $sql_fields
! FROM $sql_from ";
!
! $sql .= "WHERE $search_sql AND $sql_where ";
!
! //
! // If user is logged in then we'll check to see which (if any) private
! // forums they are allowed to view and include them in the search.
! //
! // If not logged in we explicitly prevent searching of private forums
! //
! $auth_sql = "";
! if( $search_forum != "all" )
! {
! $is_auth = auth(AUTH_READ, $search_forum, $userdata);
!
! if( !$is_auth['auth_read'] )
{
! message_die(GENERAL_MESSAGE, $lang['No_searchable_forums']);
}
! else
{
! $auth_sql = "f.forum_id = $search_forum";
! }
! }
! else
! {
! $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);
! if( $search_cat != "all" )
! {
! $auth_sql = "f.cat_id = $search_cat";
! }
! $ignore_forum_sql = "";
! while( list($key, $value) = each($is_auth_ary) )
! {
! if( !$value['auth_read'] )
{
! if( $ignore_forum_sql != "" )
{
! $ignore_forum_sql .= ", ";
}
+ $ignore_forum_sql .= $key;
}
! }
! if( $ignore_forum_sql != "" )
! {
! $auth_sql .= ( $auth_sql != "" ) ? " AND f.forum_id NOT IN ($ignore_forum_sql) " : "f.forum_id NOT IN ($ignore_forum_sql) ";
! }
! }
! //
! // Finish building query (for all combinations)
! // and run it ...
! //
! if( $search_sql != "" || $search_id == "newposts" || $search_id == "egosearch" || $search_id == "unanswered" )
! {
! if( $auth_sql != "" )
! {
! $sql .= " AND " . $auth_sql;
! }
! $sql .= " ORDER BY " . $sortby_sql[$sortby] . " $sortby_dir";
! if( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, "Couldn't obtain search results", "", __LINE__, __FILE__, $sql);
! }
! $total_match_count = $db->sql_numrows($result);
! $searchset = $db->sql_fetchrowset($result);
! //
! // Clean up search results table
! //
! $sql = "SELECT session_id
! FROM " . SESSIONS_TABLE;
! if( $result = $db->sql_query($sql) )
! {
! $delete_search_id_sql = "";
! while( $row = $db->sql_fetchrow($result) )
{
! if( $delete_search_id_sql != "" )
{
! $delete_search_id_sql .= ", ";
}
+ $delete_search_id_sql .= "'" . $row['session_id'] . "'";
+ }
! if( $delete_search_id_sql != "" )
! {
! $sql = "DELETE FROM " . SEARCH_TABLE . "
! WHERE session_id NOT IN ($delete_search_id_sql)";
! if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't delete old search id sessions", "", __LINE__, __FILE__, $sql);
}
}
+ }
! //
! // Store new result data
! //
! if( $total_match_count )
! {
! $search_results = "";
! for($i = 0; $i < count($searchset); $i++)
{
! if( $show_results == "posts")
{
! $search_results .= ($search_results != "") ? ", " . $searchset[$i]['post_id'] : $searchset[$i]['post_id'];
}
! else
! {
! $search_results .= ($search_results != "") ? ", " . $searchset[$i]['topic_id'] : $searchset[$i]['topic_id'];
! }
! }
! $per_page = ( $show_results == "posts" ) ? $board_config['posts_per_page'] : $board_config['topics_per_page'];
! //
! // Combine both results and search data (apart from original query)
! // so we can serialize it and place it in the DB
! //
! $store_search_data = array();
! $store_search_data['results'] = $search_results;
! $store_search_data['word_array'] = $split_search;
! $store_search_data['match_count'] = $total_match_count;
!
! $result_array = serialize($store_search_data);
! unset($store_search_data);
! unset($search_results);
!
! mt_srand ((double) microtime() * 1000000);
! $search_id = mt_rand();
!
! $sql = "UPDATE " . SEARCH_TABLE . "
! SET search_id = $search_id, search_array = '$result_array'
! WHERE session_id = '" . $userdata['session_id'] . "'";
! $result = $db->sql_query($sql);
! if( !$result || !$db->sql_affectedrows() )
! {
! $sql = "INSERT INTO " . SEARCH_TABLE . " (search_id, session_id, search_array)
! VALUES($search_id, '" . $userdata['session_id'] . "', '$result_array')";
! if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't insert search results", "", __LINE__, __FILE__, $sql);
}
}
+
+ $db->sql_freeresult($result);
+
}
else
***************
*** 743,746 ****
--- 839,844 ----
$highlight_active = "";
+ $search_string = array();
+ $replace_string = array();
for($j = 0; $j < count($split_search); $j++ )
{
***************
*** 751,755 ****
$highlight_active .= " " . $split_word;
! $search_string[] = "#\b(" . preg_quote(str_replace("*", ".*?", $split_word), "#") . ")\b#i";
$replace_string[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
--- 849,853 ----
$highlight_active .= " " . $split_word;
! $search_string[] = "#\b(" . str_replace("\*", ".*?", preg_quote($split_word, "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
$replace_string[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
***************
*** 760,764 ****
if( $replace_synonym == $split_word )
{
! $search_string[] = "#\b(" . preg_quote($match_synonym, "#") . ")\b#i";
$replace_string[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
--- 858,862 ----
if( $replace_synonym == $split_word )
{
! $search_string[] = "#\b(" . str_replace("\*", ".*?", preg_quote($replace_synonym, "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
$replace_string[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
***************
*** 798,802 ****
--- 896,907 ----
$message = strip_tags($message);
$message = preg_replace("/\[.*?:$bbcode_uid:?.*?\]/si", "", $message);
+
+ if( count($search_string) )
+ {
+ $message = preg_replace($search_string, $replace_string, $message);
+ }
+
$message = preg_replace("/\[url\]|\[\/url\]/si", "", $message);
+
}
else
***************
*** 805,808 ****
--- 910,920 ----
$user_sig_bbcode_uid = $searchset[$i]['user_sig_bbcode_uid'];
+ $message = make_clickable($message);
+
+ if( count($search_string) )
+ {
+ $message = preg_replace($search_string, $replace_string, $message);
+ }
+
if( !$board_config['allow_html'] )
{
***************
*** 828,833 ****
}
- $message = make_clickable($message);
-
if( $searchset[$i]['enable_sig'] )
{
--- 940,943 ----
***************
*** 855,863 ****
$message = str_replace("\n", "<br />", $message);
- if( count($search_string) )
- {
- $message = preg_replace($search_string, $replace_string, $message);
- }
}
$template->assign_block_vars("searchresults", array(
"TOPIC_TITLE" => $topic_title,
--- 965,970 ----
$message = str_replace("\n", "<br />", $message);
}
+
$template->assign_block_vars("searchresults", array(
"TOPIC_TITLE" => $topic_title,
***************
*** 984,1016 ****
}
! if( empty($HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $topic_id]) && $searchset[$i]['post_time'] > $userdata['session_last_visit'] )
{
- $folder_image = "<img src=\"$folder_new\" alt=\"" . $lang['New_posts'] . "\" />";
! $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_posts'] . "\" border=\"0\" /></a> ";
! }
! else
! {
! if( isset($HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $topic_id]) )
{
! if( $HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $topic_id] < $searchset[$i]['post_time'] && $searchset[$i]['post_time'] > $userdata['session_last_visit'] )
{
! $folder_image = "<img src=\"$folder_new\" alt=\"" . $lang['New_posts'] . "\" />";
! $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_posts'] . "\" border=\"0\" /></a> ";
}
! else
{
! $folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
! $folder_image = "<img src=\"$folder\" alt=\"$folder_alt\" />";
! $newest_post_img = "";
}
}
else
{
! $folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
! $folder_image = "<img src=\"$folder\" alt=\"$folder_alt\" />";
$newest_post_img = "";
}
}
}
--- 1091,1151 ----
}
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) ||
! isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"]) ||
! isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) )
{
! $unread_topics = true;
!
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) )
{
! if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"] > $topic_rowset[$i]['post_time'] )
{
! $unread_topics = false;
! }
! }
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"]) )
! {
! if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"] > $topic_rowset[$i]['post_time'] )
! {
! $unread_topics = false;
}
! }
!
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"]) )
! {
! if( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_all"] > $topic_rowset[$i]['post_time'] )
{
! $unread_topics = false;
}
}
+
+ if( $unread_topics )
+ {
+ $folder_image = "<img src=\"$folder_new\" alt=\"" . $lang['New_posts'] . "\" title=\"" . $lang['New_posts'] . "\" />";
+
+ $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_post'] . "\" title=\"" . $lang['View_newest_post'] . "\" border=\"0\" /></a> ";
+ }
else
{
! $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
!
! $folder_image = "<img src=\"$folder\" alt=\"$folder_alt\" title=\"$folder_alt\" border=\"0\" />";
$newest_post_img = "";
}
+
+ }
+ else if( $topic_rowset[$i]['post_time'] > $userdata['session_last_visit'] )
+ {
+ $folder_image = "<img src=\"$folder_new\" alt=\"" . $lang['New_posts'] . "\" title=\"" . $lang['New_posts'] . "\" />";
+
+ $newest_post_img = "<a href=\"viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=newest\"><img src=\"" . $images['icon_newest_reply'] . "\" alt=\"" . $lang['View_newest_post'] . "\" title=\"" . $lang['View_newest_post'] . "\" border=\"0\" /></a> ";
+ }
+ else
+ {
+ $folder_alt = ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
+ $folder_image = "<img src=\"$folder\" alt=\"$folder_alt\" title=\"$folder_alt\" border=\"0\" />";
+ $newest_post_img = "";
}
}
Index: login.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/login.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** login.php 2001/12/02 01:04:25 1.35
--- login.php 2001/12/05 00:20:52 1.36
***************
*** 25,29 ****
// board is shut down
//
! define("IN_ADMIN", true);
$phpbb_root_path = "./";
--- 25,29 ----
// board is shut down
//
! define("IN_LOGIN", true);
$phpbb_root_path = "./";
***************
*** 31,34 ****
--- 31,35 ----
include($phpbb_root_path . 'common.'.$phpEx);
+
//
// Set page ID for session management
***************
*** 70,74 ****
$autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;
! $session_id = session_begin($rowresult['user_id'], $user_ip, PAGE_INDEX, $session_length, TRUE, $autologin);
if( $session_id )
--- 71,75 ----
$autologin = ( isset($HTTP_POST_VARS['autologin']) ) ? TRUE : 0;
! $session_id = session_begin($rowresult['user_id'], $user_ip, PAGE_INDEX, $session_length, FALSE, $autologin);
if( $session_id )
***************
*** 97,101 ****
$message = $lang['Error_login'] . "<br /><br />" . sprintf($lang['Click_return_login'], "<a href=\"" . append_sid("login.$phpEx?$redirect") . "\">", "</a> ") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a> ");
!
message_die(GENERAL_MESSAGE, $message);
}
--- 98,102 ----
$message = $lang['Error_login'] . "<br /><br />" . sprintf($lang['Click_return_login'], "<a href=\"" . append_sid("login.$phpEx?$redirect") . "\">", "</a> ") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a> ");
!
message_die(GENERAL_MESSAGE, $message);
}
***************
*** 111,115 ****
$message = $lang['Error_login'] . "<br /><br />" . sprintf($lang['Click_return_login'], "<a href=\"" . append_sid("login.$phpEx?$redirect") . "\">", "</a> ") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a> ");
!
message_die(GENERAL_MESSAGE, $message);
}
--- 112,116 ----
$message = $lang['Error_login'] . "<br /><br />" . sprintf($lang['Click_return_login'], "<a href=\"" . append_sid("login.$phpEx?$redirect") . "\">", "</a> ") . "<br /><br />" . sprintf($lang['Click_return_index'], "<a href=\"" . append_sid("index.$phpEx") . "\">", "</a> ");
!
message_die(GENERAL_MESSAGE, $message);
}
Index: common.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/common.php,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -r1.65 -r1.66
*** common.php 2001/11/26 12:09:37 1.65
--- common.php 2001/12/05 00:20:52 1.66
***************
*** 180,184 ****
}
! if( $board_config['board_disable'] && !defined("IN_ADMIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
--- 180,184 ----
}
! if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
Index: viewtopic.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewtopic.php,v
retrieving revision 1.144
retrieving revision 1.145
diff -C2 -r1.144 -r1.145
*** viewtopic.php 2001/11/27 00:30:59 1.144
--- viewtopic.php 2001/12/05 00:20:52 1.145
***************
*** 57,85 ****
if( $HTTP_GET_VARS["view"] == "newest" )
{
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name']]) )
{
! $sessiondata = unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name']]));
! $newest_time = $sessiondata['lastvisit'];
!
! $sql = "SELECT post_id
! FROM " . POSTS_TABLE . "
! WHERE topic_id = $topic_id
! AND post_time >= $newest_time
! ORDER BY post_time ASC
! LIMIT 1";
! if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql);
! }
! if( !($row = $db->sql_fetchrow($result)) )
! {
! message_die(GENERAL_MESSAGE, $lang['No_new_posts_last_visit']);
}
else
{
! $post_id = $row['post_id'];
! header("Location: " . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id", true));
}
}
--- 57,91 ----
if( $HTTP_GET_VARS["view"] == "newest" )
{
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_sid"]) )
{
! $session_id = $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_sid"];
! if( $session_id )
{
! $sql = "SELECT p.post_id
! FROM " . POSTS_TABLE . " p, " . SESSIONS_TABLE . " s
! WHERE topic_id = $topic_id
! AND s.session_id = '$session_id'
! AND p.post_time >= s.session_last_visit
! ORDER BY p.post_time ASC
! LIMIT 1";
! if( !$result = $db->sql_query($sql) )
! {
! message_die(GENERAL_ERROR, "Couldn't obtain newer/older topic information", "", __LINE__, __FILE__, $sql);
! }
! if( !($row = $db->sql_fetchrow($result)) )
! {
! message_die(GENERAL_MESSAGE, $lang['No_new_posts_last_visit']);
! }
! else
! {
! $post_id = $row['post_id'];
! header("Location: " . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=$post_id#$post_id", true));
! }
}
else
{
! header("Location: " . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
}
}
***************
*** 138,159 ****
// page the post is on and the correct display of viewtopic)
//
! $join_sql_table = (!isset($post_id)) ? "" : "" . POSTS_TABLE . " p, " . POSTS_TABLE . " p2,";
! $join_sql = (!isset($post_id)) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
! $count_sql = (!isset($post_id)) ? "" : ", COUNT(p2.post_id) AS prev_posts";
! $order_sql = (!isset($post_id)) ? "" : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";
$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . "
! FROM $join_sql_table " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE $join_sql
AND f.forum_id = t.forum_id
$order_sql";
!
! if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
}
! if(!$total_rows = $db->sql_numrows($result))
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', "", __LINE__, __FILE__, $sql);
--- 144,164 ----
// page the post is on and the correct display of viewtopic)
//
! $join_sql_table = ( !isset($post_id) ) ? "" : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
! $join_sql = ( !isset($post_id) ) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
! $count_sql = ( !isset($post_id) ) ? "" : ", COUNT(p2.post_id) AS prev_posts";
! $order_sql = ( !isset($post_id) ) ? "" : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";
$sql = "SELECT t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments" . $count_sql . "
! FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $join_sql_table . "
WHERE $join_sql
AND f.forum_id = t.forum_id
$order_sql";
! if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain topic information", "", __LINE__, __FILE__, $sql);
}
! if( !$total_rows = $db->sql_numrows($result) )
{
message_die(GENERAL_MESSAGE, 'Topic_post_not_exist', "", __LINE__, __FILE__, $sql);
***************
*** 207,211 ****
// solution being practically as fast and certainly simpler!
//
! if($userdata['user_id'] != ANONYMOUS)
{
$can_watch_topic = TRUE;
--- 212,216 ----
// solution being practically as fast and certainly simpler!
//
! if( $userdata['user_id'] != ANONYMOUS )
{
$can_watch_topic = TRUE;
***************
*** 318,324 ****
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
! if(!empty($HTTP_POST_VARS['postdays']) || !empty($HTTP_GET_VARS['postdays']))
{
! $post_days = (!empty($HTTP_POST_VARS['postdays'])) ? $HTTP_POST_VARS['postdays'] : $HTTP_GET_VARS['postdays'];
$min_post_time = time() - ($post_days * 86400);
--- 323,329 ----
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
! if( !empty($HTTP_POST_VARS['postdays']) || !empty($HTTP_GET_VARS['postdays']) )
{
! $post_days = ( !empty($HTTP_POST_VARS['postdays']) ) ? $HTTP_POST_VARS['postdays'] : $HTTP_GET_VARS['postdays'];
$min_post_time = time() - ($post_days * 86400);
***************
*** 455,463 ****
// Dump out the page header and load viewtopic body template
//
! $topic_last_read = ( isset($HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $topic_id]) ) ? $HTTP_COOKIE_VARS['phpbb2_' . $forum_id . '_' . $topic_id] : 0;
!
! setcookie('phpbb2_' . $forum_id . '_' . $topic_id, time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
$template->set_filenames(array(
"body" => "viewtopic_body.tpl",
--- 460,485 ----
// Dump out the page header and load viewtopic body template
//
! if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) && isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"]) )
! {
! $topic_last_read = ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"] > $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"] ) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"] : $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"];
! }
! else if( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"]) )
! {
! $topic_last_read = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"]) ) ? $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t_$topic_id"] : $HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f_$forum_id"];
! }
! else
! {
! $topic_last_read = $userdata['session_last_visit'];
! }
+ //
+ // Set a cookie for this topic
+ //
+ setcookie($board_config['cookie_name'] . "_t_$topic_id", time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
+ //session_send_cookie("_t_$topic_id", time(), 0);
+ //
+ // Load templates
+ //
$template->set_filenames(array(
"body" => "viewtopic_body.tpl",
***************
*** 515,518 ****
--- 537,543 ----
if( isset($HTTP_GET_VARS['highlight']) )
{
+ $highlight_match = array();
+ $highlight_replace = array();
+
//
// Split words and phrases
***************
*** 524,529 ****
if( trim($words[$i]) != "" )
{
! $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")\b#i";
! $highlight_replace[] = "<font color=\"#FF0000\"><b>\\1</b></font>";
}
}
--- 549,554 ----
if( trim($words[$i]) != "" )
{
! $highlight_match[] = "#\b(" . str_replace("\*", ".*?", preg_quote($words[$i], "#")) . ")(?!.*?<\/a>)(?!.*?\[/url\])\b#i";
! $highlight_replace[] = "<font color=\"#" . $theme['fontcolor3'] . "\"><b>\\1</b></font>";
}
}
***************
*** 727,737 ****
{
case USER_AVATAR_UPLOAD:
! $poster_avatar = ( $board_config['avatar_upload_db'] ) ? "<img src=\"avatar.$phpEx?p=" . $postrow[$i]['post_id'] . "\" alt=\"\" />" : "<img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
break;
case USER_AVATAR_REMOTE:
! $poster_avatar = "<img src=\"" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
break;
case USER_AVATAR_GALLERY:
! $poster_avatar = "<img src=\"" . $board_config['avatar_gallery_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" />";
break;
}
--- 752,762 ----
{
case USER_AVATAR_UPLOAD:
! $poster_avatar = ( $board_config['avatar_upload_db'] ) ? "<img src=\"avatar.$phpEx?p=" . $postrow[$i]['post_id'] . "\" alt=\"\" />" : "<img src=\"" . $board_config['avatar_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" border=\"\" />";
break;
case USER_AVATAR_REMOTE:
! $poster_avatar = "<img src=\"" . $postrow[$i]['user_avatar'] . "\" alt=\"\" border=\"\" />";
break;
case USER_AVATAR_GALLERY:
! $poster_avatar = "<img src=\"" . $board_config['avatar_gallery_path'] . "/" . $postrow[$i]['user_avatar'] . "\" alt=\"\" border=\"\" />";
break;
}
***************
*** 747,755 ****
if( $postrow[$i]['post_time'] > $userdata['session_last_visit'] && $postrow[$i]['post_time'] > $topic_last_read )
{
! $mini_post_img = '<img src="' . $images['icon_minipost_new'] . '" alt="' . $lang['New_post'] . '" />';
}
else
{
! $mini_post_img = '<img src="' . $images['icon_minipost'] . '" alt="' . $lang['Post'] . '" />';
}
--- 772,780 ----
if( $postrow[$i]['post_time'] > $userdata['session_last_visit'] && $postrow[$i]['post_time'] > $topic_last_read )
{
! $mini_post_img = '<img src="' . $images['icon_minipost_new'] . '" alt="' . $lang['New_post'] . '" title="' . $lang['New_post'] . '" border="0" />';
}
else
{
! $mini_post_img = '<img src="' . $images['icon_minipost'] . '" alt="' . $lang['Post'] . '" title="' . $lang['Post'] . '" border="0" />';
}
***************
*** 776,783 ****
for($j = 0; $j < count($ranksrow); $j++)
{
! if($postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'])
{
$poster_rank = $ranksrow[$j]['rank_title'];
! $rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\"><br />" : "";
}
}
--- 801,808 ----
for($j = 0; $j < count($ranksrow); $j++)
{
! if( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
! $rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\" alt=\"\" border=\"0\" /><br />" : "";
}
}
***************
*** 787,794 ****
for($j = 0; $j < count($ranksrow); $j++)
{
! if($postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && $postrow[$i]['user_posts'] < $ranksrow[$j]['rank_max'] && !$ranksrow[$j]['rank_special'])
{
$poster_rank = $ranksrow[$j]['rank_title'];
! $rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\"><br />" : "";
}
}
--- 812,819 ----
for($j = 0; $j < count($ranksrow); $j++)
{
! if( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
! $rank_image = ($ranksrow[$j]['rank_image']) ? "<img src=\"" . $ranksrow[$j]['rank_image'] . "\" alt=\"\" border=\"0\" /><br />" : "";
}
}
***************
*** 806,812 ****
if($poster_id != ANONYMOUS)
{
! $profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"" . $images['icon_profile'] . "\" alt=\"" . $lang['Read_profile'] . "\" border=\"0\" /></a>";
! $pm_img = "<a href=\"" . append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"". $images['icon_pm'] . "\" alt=\"" . $lang['Send_private_message'] . "\" border=\"0\" /></a>";
if( !empty($postrow[$i]['user_viewemail']) )
--- 831,837 ----
if($poster_id != ANONYMOUS)
{
! $profile_img = "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"" . $images['icon_profile'] . "\" alt=\"" . $lang['Read_profile'] . "\" title=\"" . $lang['Read_profile'] . "\" border=\"0\" /></a>";
! $pm_img = "<a href=\"" . append_sid("privmsg.$phpEx?mode=post&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"". $images['icon_pm'] . "\" alt=\"" . $lang['Send_private_message'] . "\" title=\"" . $lang['Send_private_message'] . "\" border=\"0\" /></a>";
if( !empty($postrow[$i]['user_viewemail']) )
***************
*** 814,818 ****
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL ."=" . $poster_id) : "mailto:" . $postrow[$i]['user_email'];
! $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . "\" border=\"0\" /></a>";
}
else
--- 839,843 ----
$email_uri = ( $board_config['board_email_form'] ) ? append_sid("profile.$phpEx?mode=email&" . POST_USERS_URL ."=" . $poster_id) : "mailto:" . $postrow[$i]['user_email'];
! $email_img = "<a href=\"$email_uri\"><img src=\"" . $images['icon_email'] . "\" alt=\"" . $lang['Send_email'] . "\" title=\"" . $lang['Send_email'] . "\" border=\"0\" /></a>";
}
else
***************
*** 821,825 ****
}
! $www_img = ($postrow[$i]['user_website']) ? "<a href=\"" . $postrow[$i]['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" alt=\"" . $lang['Visit_website'] . "\" border=\"0\" /></a>" : "";
if( !empty($postrow[$i]['user_icq']) )
--- 846,850 ----
}
! $www_img = ($postrow[$i]['user_website']) ? "<a href=\"" . $postrow[$i]['user_website'] . "\" target=\"_userwww\"><img src=\"" . $images['icon_www'] . "\" alt=\"" . $lang['Visit_website'] . "\" title=\"" . $lang['Visit_website'] . "\" border=\"0\" /></a>" : "";
if( !empty($postrow[$i]['user_icq']) )
***************
*** 834,843 ****
if( $theme['template_name'] == "subSilver" )
{
! $icq_add_img = '<table width="59" border="0" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap" class="icqback"><img src="images/spacer.gif" width="3" height="18" alt = "">' . $icq_status_img . '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $postrow[$i]['user_icq'] . '"><img src="images/spacer.gif" width="35" height="18" border="0" alt="' . $lang['ICQ'] . '" /></a></td></tr></table>';
$icq_status_img = "";
}
else
{
! $icq_add_img = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=" . $postrow[$i]['user_icq'] . "\"><img src=\"" . $images['icon_icq'] . "\" alt=\"" . $lang['ICQ'] . "\" border=\"0\" /></a>";
}
}
--- 859,868 ----
if( $theme['template_name'] == "subSilver" )
{
! $icq_add_img = '<table width="59" border="0" cellspacing="0" cellpadding="0"><tr><td nowrap="nowrap" class="icqback"><img src="images/spacer.gif" width="3" height="18" alt = "" />' . $icq_status_img . '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $postrow[$i]['user_icq'] . '"><img src="images/spacer.gif" width="35" height="18" border="0" alt="' . $lang['ICQ'] . '" title="' . $lang['ICQ'] . '" /></a></td></tr></table>';
$icq_status_img = "";
}
else
{
! $icq_add_img = "<a href=\"http://wwp.icq.com/scripts/search.dll?to=" . $postrow[$i]['user_icq'] . "\"><img src=\"" . $images['icon_icq'] . "\" alt=\"" . $lang['ICQ'] . "\" title=\"" . $lang['ICQ'] . "\" border=\"0\" /></a>";
}
}
***************
*** 848,856 ****
}
! $aim_img = ($postrow[$i]['user_aim']) ? "<a href=\"aim:goim?screenname=" . $postrow[$i]['user_aim'] . "&message=Hello+Are+you+there?\"><img src=\"" . $images['icon_aim'] . "\" border=\"0\" alt=\"" . $lang['AIM'] . "\" /></a>" : "";
! $msn_img = ($postrow[$i]['user_msnm']) ? "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"" . $images['icon_msnm'] . "\" border=\"0\" alt=\"" . $lang['MSNM'] . "\" /></a>" : "";
! $yim_img = ($postrow[$i]['user_yim']) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" . $postrow[$i]['user_yim'] . "&.src=pg\"><img src=\"" . $images['icon_yim'] . "\" border=\"0\" alt=\"" . $lang['YIM'] . "\" /></a>" : "";
}
else
--- 873,881 ----
}
! $aim_img = ($postrow[$i]['user_aim']) ? "<a href=\"aim:goim?screenname=" . $postrow[$i]['user_aim'] . "&message=Hello+Are+you+there?\"><img src=\"" . $images['icon_aim'] . "\" alt=\"" . $lang['AIM'] . "\" title=\"" . $lang['AIM'] . "\" border=\"0\" /></a>" : "";
! $msn_img = ($postrow[$i]['user_msnm']) ? "<a href=\"" . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$poster_id") . "\"><img src=\"" . $images['icon_msnm'] . "\" alt=\"" . $lang['MSNM'] . "\" title=\"" . $lang['MSNM'] . "\" border=\"0\" /></a>" : "";
! $yim_img = ($postrow[$i]['user_yim']) ? "<a href=\"http://edit.yahoo.com/config/send_webmesg?.target=" . $postrow[$i]['user_yim'] . "&.src=pg\"><img src=\"" . $images['icon_yim'] . "\" alt=\"" . $lang['YIM'] . "\" title=\"" . $lang['YIM'] . "\" border=\"0\" /></a>" : "";
}
else
***************
*** 867,871 ****
}
! $quote_img = "<a href=\"" . append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_quote'] . "\" alt=\"" . $lang['Reply_with_quote'] ."\" border=\"0\" /></a>";
$search_img = "<a href=\"" . append_sid("search.$phpEx?search_author=" . urlencode($poster)) . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
--- 892,896 ----
}
! $quote_img = "<a href=\"" . append_sid("posting.$phpEx?mode=quote&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_quote'] . "\" alt=\"" . $lang['Reply_with_quote'] ."\" title=\"" . $lang['Reply_with_quote'] ."\" border=\"0\" /></a>";
$search_img = "<a href=\"" . append_sid("search.$phpEx?search_author=" . urlencode($poster)) . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" /></a>";
***************
*** 873,877 ****
if( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
{
! $edit_img = "<a href=\"" . append_sid("posting.$phpEx?mode=editpost&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_edit'] . "\" alt=\"" . $lang['Edit_delete_post'] . "\" border=\"0\" /></a>";
}
else
--- 898,902 ----
if( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] )
{
! $edit_img = "<a href=\"" . append_sid("posting.$phpEx?mode=editpost&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_edit'] . "\" alt=\"" . $lang['Edit_delete_post'] . "\" title=\"" . $lang['Edit_delete_post'] . "\" border=\"0\" /></a>";
}
else
***************
*** 882,888 ****
if( $is_auth['auth_mod'] )
{
! $ip_img = "<a href=\"" . append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id) . "\"><img src=\"" . $images['icon_ip'] . "\" alt=\"" . $lang['View_IP'] . "\" border=\"0\" /></a>";
! $delpost_img = "<a href=\"" . append_sid("posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_delpost'] . "\" alt=\"" . $lang['Delete_post'] . "\" border=\"0\" /></a>";
}
else
--- 907,913 ----
if( $is_auth['auth_mod'] )
{
! $ip_img = "<a href=\"" . append_sid("modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $postrow[$i]['post_id'] . "&" . POST_TOPIC_URL . "=" . $topic_id) . "\"><img src=\"" . $images['icon_ip'] . "\" alt=\"" . $lang['View_IP'] . "\" title=\"" . $lang['View_IP'] . "\" border=\"0\" /></a>";
! $delpost_img = "<a href=\"" . append_sid("posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_delpost'] . "\" alt=\"" . $lang['Delete_post'] . "\" title=\"" . $lang['Delete_post'] . "\" border=\"0\" /></a>";
}
else
***************
*** 892,896 ****
if( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $i == $total_replies - 1 )
{
! $delpost_img = "<a href=\"" . append_sid("posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_delpost'] . "\" alt=\"" . $lang['Delete_post'] . "\" border=\"0\" /></a>";
}
else
--- 917,921 ----
if( $userdata['user_id'] == $poster_id && $is_auth['auth_delete'] && $i == $total_replies - 1 )
{
! $delpost_img = "<a href=\"" . append_sid("posting.$phpEx?mode=delete&" . POST_POST_URL . "=" . $postrow[$i]['post_id']) . "\"><img src=\"" . $images['icon_delpost'] . "\" alt=\"" . $lang['Delete_post'] . "\" title=\"" . $lang['Delete_post'] . "\" border=\"0\" /></a>";
}
else
***************
*** 909,912 ****
--- 934,952 ----
//
+ // Note! The order used for parsing the message _is_
+ // important, moving things around could break any
+ // output
+ //
+ $message = make_clickable($message);
+
+ //
+ // Highlight active words (primarily for search)
+ //
+ if( $highlight_active )
+ {
+ $message = preg_replace($highlight_match, $highlight_replace, $message);
+ }
+
+ //
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
***************
*** 925,928 ****
--- 965,971 ----
}
+ //
+ // Parse signature for BBCode if reqd.
+ //
if( $user_sig != "" && $postrow[$i]['enable_sig'] && $user_sig_bbcode_uid != "" )
{
***************
*** 930,933 ****
--- 973,979 ----
}
+ //
+ // Parse message for BBCode if reqd
+ //
if( $bbcode_uid != "" )
{
***************
*** 935,945 ****
}
! if( $highlight_active )
! {
! $message = preg_replace($highlight_match, $highlight_replace, $message);
! }
!
! $message = make_clickable($message);
!
if( $postrow[$i]['enable_sig'] && $user_sig != "" )
{
--- 981,987 ----
}
! //
! // Append signature
! //
if( $postrow[$i]['enable_sig'] && $user_sig != "" )
{
***************
*** 947,950 ****
--- 989,995 ----
}
+ //
+ // Replace naughty words
+ //
if( count($orig_word) )
{
***************
*** 953,956 ****
--- 998,1004 ----
}
+ //
+ // Parse smilies
+ //
if( $board_config['allow_smilies'] && $postrow[$i]['enable_smilies'] )
{
***************
*** 958,961 ****
--- 1006,1013 ----
}
+ //
+ // Replace newlines (we use this rather than nl2br because
+ // till recently it wasn't XHTML compliant)
+ //
$message = str_replace("\n", "<br />", $message);
***************
*** 1033,1049 ****
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">", "</a>");
! $topic_mod = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete") . "\"><img src=\"" . $images['topic_mod_delete'] . "\" alt = \"" . $lang['Delete_topic'] . "\" border=\"0\" /></a> ";
! $topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=move"). "\"><img src=\"" . $images['topic_mod_move'] . "\" alt = \"" . $lang['Move_topic'] . "\" border=\"0\" /></a> ";
if($forum_row['topic_status'] == TOPIC_UNLOCKED)
{
! $topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock") . "\"><img src=\"" . $images['topic_mod_lock'] . "\" alt = \"" . $lang['Lock_topic'] . "\" border=\"0\" /></a> ";
}
else
{
! $topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unlock") . "\"><img src=\"" . $images['topic_mod_unlock'] . "\" alt = \"" . $lang['Unlock_topic'] . "\" border=\"0\" /></a> ";
}
! $topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=split") . "\"><img src=\"" . $images['topic_mod_split'] . "\" alt = \"" . $lang['Split_topic'] . "\" border=\"0\" /></a> ";
}
--- 1085,1101 ----
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"" . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . "\">", "</a>");
! $topic_mod = "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=delete") . "\"><img src=\"" . $images['topic_mod_delete'] . "\" alt=\"" . $lang['Delete_topic'] . "\" title=\"" . $lang['Delete_topic'] . "\" border=\"0\" /></a> ";
! $topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=move"). "\"><img src=\"" . $images['topic_mod_move'] . "\" alt=\"" . $lang['Move_topic'] . "\" title=\"" . $lang['Move_topic'] . "\" border=\"0\" /></a> ";
if($forum_row['topic_status'] == TOPIC_UNLOCKED)
{
! $topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=lock") . "\"><img src=\"" . $images['topic_mod_lock'] . "\" alt=\"" . $lang['Lock_topic'] . "\" title=\"" . $lang['Lock_topic'] . "\" border=\"0\" /></a> ";
}
else
{
! $topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=unlock") . "\"><img src=\"" . $images['topic_mod_unlock'] . "\" alt=\"" . $lang['Unlock_topic'] . "\" title=\"" . $lang['Unlock_topic'] . "\" border=\"0\" /></a> ";
}
! $topic_mod .= "<a href=\"" . append_sid("modcp.$phpEx?" . POST_TOPIC_URL . "=$topic_id&mode=split") . "\"><img src=\"" . $images['topic_mod_split'] . "\" alt=\"" . $lang['Split_topic'] . "\" title=\"" . $lang['Split_topic'] . "\" border=\"0\" /></a> ";
}
***************
*** 1056,1065 ****
{
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\">" . $lang['Stop_watching_topic'] . "</a>";
! $s_watching_topic_img = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\"><img src=\"" . $images['Topic_un_watch'] . "\" alt=\"" . $lang['Stop_watching_topic'] . "\" border=\"0\"></a>";
}
else
{
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start") . "\">" . $lang['Start_watching_topic'] . "</a>";
! $s_watching_topic_img = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start") . "\"><img src=\"" . $images['Topic_watch'] . "\" alt=\"" . $lang['Start_watching_topic'] . "\" border=\"0\"></a>";
}
}
--- 1108,1117 ----
{
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\">" . $lang['Stop_watching_topic'] . "</a>";
! $s_watching_topic_img = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&unwatch=topic&start=$start") . "\"><img src=\"" . $images['Topic_un_watch'] . "\" alt=\"" . $lang['Stop_watching_topic'] . "\" title=\"" . $lang['Stop_watching_topic'] . "\" border=\"0\"></a>";
}
else
{
$s_watching_topic = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start") . "\">" . $lang['Start_watching_topic'] . "</a>";
! $s_watching_topic_img = "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&watch=topic&start=$start") . "\"><img src=\"" . $images['Topic_watch'] . "\" alt=\"" . $lang['Start_watching_topic'] . "\" title=\"" . $lang['Start_watching_topic'] . "\" border=\"0\"></a>";
}
}
Index: viewforum.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/viewforum.php,v
retrieving revision 1.106
retrieving revision 1.107
diff -C2 -r1.106 -r1.107
*** viewforum.php 2001/11/26 12:09:37 1.106
--- viewforum.php 2001/12/05 00:20:52 1.107
***************
*** 113,159 ****
if( $mark_read == "topics" )
{
! if( $userdata['session_last_visit'] )
{
! $sql = "SELECT t.topic_id, p.post_time
! FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
! WHERE t.forum_id = $forum_id
! AND p.post_id = t.topic_last_post_id
! AND p.post_time > " . $userdata['sessi...
[truncated message content] |
|
From: Paul S. O. <ps...@us...> - 2001-12-05 00:21:00
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv16782/templates/subSilver
Modified Files:
index_body.tpl
Log Message:
New session code, probably still dodgy, fix for login failed message, search updates, highlighting URI messup fixes, max limit for ranks
Index: index_body.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/index_body.tpl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** index_body.tpl 2001/11/18 14:01:35 1.10
--- index_body.tpl 2001/12/05 00:20:56 1.11
***************
*** 1,12 ****
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
! <td align="left" valign="bottom"><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
! <td align="right" class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
! <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a><br />
! <a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a><br />{LAST_VISIT_DATE}</td>
</tr>
</table>
--- 1,13 ----
+ <br clear="all" />
+
<table width="100%" cellspacing="0" cellpadding="2" border="0" align="center">
<tr>
! <td align="left" valign="bottom"><span class="gensmall">{LAST_VISIT_DATE}<br />{CURRENT_TIME}<br /><br /></span><span class="nav"><a href="{U_INDEX}" class="nav">{L_INDEX}</a></span></td>
! <td align="right" valign="bottom" class="gensmall">
<!-- BEGIN switch_user_logged_in -->
<a href="{U_SEARCH_SELF}" class="gensmall">{L_SEARCH_SELF}</a><br />
<!-- END switch_user_logged_in -->
! <a href="{U_SEARCH_UNANSWERED}" class="gensmall">{L_SEARCH_UNANSWERED}</a><br /><a href="{U_SEARCH_NEW}" class="gensmall">{L_SEARCH_NEW}</a></td>
</tr>
</table>
|
|
From: Paul S. O. <ps...@us...> - 2001-12-05 00:21:00
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv16782/language/lang_english Modified Files: lang_main.php Log Message: New session code, probably still dodgy, fix for login failed message, search updates, highlighting URI messup fixes, max limit for ranks Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_main.php,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -r1.58 -r1.59 *** lang_main.php 2001/11/29 22:51:34 1.58 --- lang_main.php 2001/12/05 00:20:56 1.59 *************** *** 93,96 **** --- 93,97 ---- $lang['Select_forum'] = "Select a forum"; $lang['View_latest_post'] = "View latest post"; + $lang['View_newest_post'] = "View newest post"; $lang['Page_of'] = "Page <b>%d</b> of <b>%d</b>"; // Replaces with: Page 1 of 2 for example *************** *** 132,138 **** --- 133,142 ---- $lang['You_last_visit'] = "You last visited on %s"; // %s replaced by date/time + $lang['Current_time'] = "The time now is %s"; // %s replaced by time + $lang['Search_new'] = "View posts since last visit"; $lang['Search_your_posts'] = "View your posts"; $lang['Search_unanswered'] = "View unanswered posts"; + $lang['Register'] = "Register"; $lang['Profile'] = "Profile"; |
|
From: Paul S. O. <ps...@us...> - 2001-12-05 00:00:42
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv12705
Modified Files:
posting.php
Log Message:
Fix stripslashing on errors, preview, poll option addition ... okay I lied, but this one does work, honest guv ... wanna buy a bridge?
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.120
retrieving revision 1.121
diff -C2 -r1.120 -r1.121
*** posting.php 2001/12/04 22:02:30 1.120
--- posting.php 2001/12/05 00:00:39 1.121
***************
*** 2717,2721 ****
// then stripslashes
//
! if( !empty($post_message) && $mode != "editpost" && $mode != "reply" )
{
$post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
--- 2717,2721 ----
// then stripslashes
//
! if( !empty($post_message) && ( $preview || $error || $refresh ) )
{
$post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
|
|
From: Paul S. O. <ps...@us...> - 2001-12-04 22:03:13
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv15199
Modified Files:
posting.php
Log Message:
Fix stripslashing on errors, preview, poll option addition ... this one actually works properly ...
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -r1.119 -r1.120
*** posting.php 2001/12/04 18:08:43 1.119
--- posting.php 2001/12/04 22:02:30 1.120
***************
*** 2350,2354 ****
$post_user_id = $postrow['user_id'];
! $post_username = ( $post_user_id == ANONYMOUS && $postrow['post_username'] != "") ? $postrow['post_username'] : $postrow['username'];
$post_subject = $postrow['post_subject'];
$post_message = $postrow['post_text'];
--- 2350,2354 ----
$post_user_id = $postrow['user_id'];
! $post_username = ( $post_user_id == ANONYMOUS && $postrow['post_username'] != "" ) ? $postrow['post_username'] : $postrow['username'];
$post_subject = $postrow['post_subject'];
$post_message = $postrow['post_text'];
***************
*** 2717,2721 ****
// then stripslashes
//
! if( !empty($post_message) && $mode != "edit" && $mode != "reply" )
{
$post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
--- 2717,2721 ----
// then stripslashes
//
! if( !empty($post_message) && $mode != "editpost" && $mode != "reply" )
{
$post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
|
|
From: Paul S. O. <ps...@us...> - 2001-12-04 18:08:46
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv14613
Modified Files:
posting.php
Log Message:
Fix stripslashing on errors, preview, poll option addition
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.118
retrieving revision 1.119
diff -C2 -r1.118 -r1.119
*** posting.php 2001/12/03 12:21:53 1.118
--- posting.php 2001/12/04 18:08:43 1.119
***************
*** 2182,2190 ****
$poll_option_list = array();
- if( isset($HTTP_POST_VARS['del_poll_option']) || isset($HTTP_POST_VARS['poll_option_text']) || isset($HTTP_POST_VARS['add_poll_option']) )
- {
- $post_message = stripslashes($post_message);
- }
-
if( isset($HTTP_POST_VARS['del_poll_option']) )
{
--- 2182,2185 ----
***************
*** 2506,2510 ****
$preview_subject = $post_subject;
$preview_message = stripslashes(prepare_message($post_message, $html_on, $bbcode_on, $smilies_on, $bbcode_uid));
- $post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
//
--- 2501,2504 ----
***************
*** 2717,2720 ****
--- 2711,2723 ----
$hidden_form_fields .= '<input type="hidden" name="' . POST_POST_URL . '" value="' . $post_id . '" />';
break;
+ }
+
+ //
+ // If post_message is not empty (as per a preview or error )
+ // then stripslashes
+ //
+ if( !empty($post_message) && $mode != "edit" && $mode != "reply" )
+ {
+ $post_message = stripslashes(preg_replace($html_entities_match, $html_entities_replace, $post_message));
}
|
|
From: Paul S. O. <ps...@us...> - 2001-12-04 14:04:07
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv14308
Modified Files:
memberlist.php
Log Message:
Missed a ['From'] -> ['Location'] change
Index: memberlist.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/memberlist.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** memberlist.php 2001/11/27 00:30:59 1.26
--- memberlist.php 2001/12/04 14:04:03 1.27
***************
*** 150,154 ****
"L_EMAIL" => $lang['Email'],
"L_WEBSITE" => $lang['Website'],
! "L_FROM" => $lang['From'],
"L_ORDER" => $lang['Order'],
"L_SORT" => $lang['Sort'],
--- 150,154 ----
"L_EMAIL" => $lang['Email'],
"L_WEBSITE" => $lang['Website'],
! "L_FROM" => $lang['Location'],
"L_ORDER" => $lang['Order'],
"L_SORT" => $lang['Sort'],
***************
*** 228,232 ****
$search_img = "<a href=\"" . append_sid("search.$phpEx?a=" . urlencode($members[$i]['username']) . "&f=all&b=0&d=DESC&c=100&dosearch=1") . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" alt=\"" . $lang['Search'] . "\" /></a>";
! $row_color = "#" . ( (!($i % 2)) ? $theme['td_color1'] : $theme['td_color2']);
$row_class = (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2'];
--- 228,232 ----
$search_img = "<a href=\"" . append_sid("search.$phpEx?a=" . urlencode($members[$i]['username']) . "&f=all&b=0&d=DESC&c=100&dosearch=1") . "\"><img src=\"" . $images['icon_search'] . "\" border=\"0\" alt=\"" . $lang['Search'] . "\" /></a>";
! $row_color = (!($i % 2)) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = (!($i % 2)) ? $theme['td_class1'] : $theme['td_class2'];
***************
*** 234,238 ****
"U_VIEWPROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $user_id),
! "ROW_COLOR" => $row_color,
"ROW_CLASS" => $row_class,
"USERNAME" => $username,
--- 234,238 ----
"U_VIEWPROFILE" => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $user_id),
! "ROW_COLOR" => "#" . $row_color,
"ROW_CLASS" => $row_class,
"USERNAME" => $username,
|
|
From: Jonathan H. <the...@us...> - 2001-12-03 22:54:35
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv14608/admin
Modified Files:
admin_forum_prune.php
Log Message:
Keep it from complaining if it can't reset the array #@#ed arrays
Index: admin_forum_prune.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_forum_prune.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** admin_forum_prune.php 2001/10/14 22:13:57 1.10
--- admin_forum_prune.php 2001/12/03 22:54:32 1.11
***************
*** 98,102 ****
$i = 0;
! reset($forum_rows);
while(list(, $forum_data) = each ($forum_rows))
{
--- 98,102 ----
$i = 0;
! @reset($forum_rows);
while(list(, $forum_data) = each ($forum_rows))
{
***************
*** 202,204 ****
include('page_footer_admin.'.$phpEx);
! ?>
\ No newline at end of file
--- 202,204 ----
include('page_footer_admin.'.$phpEx);
! ?>
|
|
From: Paul S. O. <ps...@us...> - 2001-12-03 17:37:55
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv15633
Modified Files:
profile.php
Log Message:
Added extra term to allow multiple subdomain terms in uris, fixes bug #488030 hopefully
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.151
retrieving revision 1.152
diff -C2 -r1.151 -r1.152
*** profile.php 2001/11/29 21:48:08 1.151
--- profile.php 2001/12/03 17:37:52 1.152
***************
*** 127,136 ****
if($website != "")
{
! if( !ereg("^http\:\/\/", $website) )
{
$website = "http://" . $website;
}
! if (!preg_match("#^http\\:\\/\\/[a-z0-9\-]+\.[a-z0-9\-]+#i", $website))
{
$website = "";
--- 127,136 ----
if($website != "")
{
! if( !preg_match("#^http:\/\/#i", $website) )
{
$website = "http://" . $website;
}
! if ( !preg_match("#^http\\:\\/\\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+#i", $website) )
{
$website = "";
***************
*** 515,520 ****
$user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset($HTTP_POST_VARS['avatarlocal']) ) ? $HTTP_POST_VARS['avatarlocal'] : "" );
! $user_avatar_remoteurl = (!empty($HTTP_POST_VARS['avatarremoteurl'])) ? $HTTP_POST_VARS['avatarremoteurl'] : "";
! $user_avatar_url = (!empty($HTTP_POST_VARS['avatarurl'])) ? $HTTP_POST_VARS['avatarurl'] : "";
$user_avatar_loc = ($HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : "";
$user_avatar_name = (!empty($HTTP_POST_FILES['avatar']['name'])) ? $HTTP_POST_FILES['avatar']['name'] : "";
--- 515,520 ----
$user_avatar_local = ( isset($HTTP_POST_VARS['avatarselect']) && !empty($HTTP_POST_VARS['submitavatar']) && $board_config['allow_avatar_local'] ) ? $HTTP_POST_VARS['avatarselect'] : ( ( isset($HTTP_POST_VARS['avatarlocal']) ) ? $HTTP_POST_VARS['avatarlocal'] : "" );
! $user_avatar_remoteurl = (!empty($HTTP_POST_VARS['avatarremoteurl'])) ? trim($HTTP_POST_VARS['avatarremoteurl']) : "";
! $user_avatar_url = (!empty($HTTP_POST_VARS['avatarurl'])) ? trim($HTTP_POST_VARS['avatarurl']) : "";
$user_avatar_loc = ($HTTP_POST_FILES['avatar']['tmp_name'] != "none") ? $HTTP_POST_FILES['avatar']['tmp_name'] : "";
$user_avatar_name = (!empty($HTTP_POST_FILES['avatar']['name'])) ? $HTTP_POST_FILES['avatar']['name'] : "";
***************
*** 522,527 ****
$user_avatar_filetype = (!empty($HTTP_POST_FILES['avatar']['type'])) ? $HTTP_POST_FILES['avatar']['type'] : "";
! $user_avatar = (empty($user_avatar_loc) && $mode == "editprofile") ? $userdata['user_avatar'] : "";
! $user_avatar_type = (empty($user_avatar_loc) && $mode == "editprofile") ? $userdata['user_avatar_type'] : "";
}
--- 522,527 ----
$user_avatar_filetype = (!empty($HTTP_POST_FILES['avatar']['type'])) ? $HTTP_POST_FILES['avatar']['type'] : "";
! $user_avatar = ( empty($user_avatar_loc) && $mode == "editprofile" ) ? $userdata['user_avatar'] : "";
! $user_avatar_type = ( empty($user_avatar_loc) && $mode == "editprofile" ) ? $userdata['user_avatar_type'] : "";
}
***************
*** 938,947 ****
if($user_avatar_remoteurl != "" && $avatar_sql == "")
{
! if( !eregi("^http\:\/\/", $user_avatar_remoteurl) )
{
$user_avatar_remoteurl = "http://" . $user_avatar_remoteurl;
}
! if( preg_match("/^http\:\/\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+\/.*?\.(gif|jpg|png)$/is", $user_avatar_remoteurl) )
{
$avatar_sql = ", user_avatar = '$user_avatar_remoteurl', user_avatar_type = " . USER_AVATAR_REMOTE;
--- 938,947 ----
if($user_avatar_remoteurl != "" && $avatar_sql == "")
{
! if( !preg_match("#^http:\/\/#i", $user_avatar_remoteurl) )
{
$user_avatar_remoteurl = "http://" . $user_avatar_remoteurl;
}
! if( preg_match("#^http:\/\/[a-z0-9\-]+\.([a-z0-9\-]+\.)?[a-z]+\/.*?\.(gif|jpg|png)$#is", $user_avatar_remoteurl) )
{
$avatar_sql = ", user_avatar = '$user_avatar_remoteurl', user_avatar_type = " . USER_AVATAR_REMOTE;
|
|
From: Paul S. O. <ps...@us...> - 2001-12-03 12:46:35
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv30274/includes
Modified Files:
functions.php
Log Message:
Should fix bug #487886 bad word preg now uses # and quotes # too
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.87
retrieving revision 1.88
diff -C2 -r1.87 -r1.88
*** functions.php 2001/11/29 11:25:04 1.87
--- functions.php 2001/12/03 12:46:32 1.88
***************
*** 880,886 ****
for($i = 0; $i < count($word_list); $i++)
{
! $word = str_replace("\*", "\w*?", preg_quote($word_list[$i]['word']));
! $orig_word[] = "/\b(" . $word . ")\b/i";
$replacement_word[] = $word_list[$i]['replacement'];
}
--- 880,886 ----
for($i = 0; $i < count($word_list); $i++)
{
! $word = str_replace("\*", "\w*?", preg_quote($word_list[$i]['word'], "#"));
! $orig_word[] = "#\b(" . $word . ")\b#i";
$replacement_word[] = $word_list[$i]['replacement'];
}
|
|
From: Paul S. O. <ps...@us...> - 2001-12-03 12:21:57
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv23491
Modified Files:
posting.php
Log Message:
Fix backslashing when adding poll options
Index: posting.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/posting.php,v
retrieving revision 1.117
retrieving revision 1.118
diff -C2 -r1.117 -r1.118
*** posting.php 2001/12/02 23:54:25 1.117
--- posting.php 2001/12/03 12:21:53 1.118
***************
*** 2181,2184 ****
--- 2181,2190 ----
$poll_options = 0;
$poll_option_list = array();
+
+ if( isset($HTTP_POST_VARS['del_poll_option']) || isset($HTTP_POST_VARS['poll_option_text']) || isset($HTTP_POST_VARS['add_poll_option']) )
+ {
+ $post_message = stripslashes($post_message);
+ }
+
if( isset($HTTP_POST_VARS['del_poll_option']) )
{
|
|
From: Paul S. O. <ps...@us...> - 2001-12-03 01:02:41
|
Update of /cvsroot/phpbb/phpBB2/templates/subSilver
In directory usw-pr-cvs1:/tmp/cvs-serv23333/templates/subSilver
Modified Files:
overall_header.tpl
Log Message:
Re-entered content encoding variable
Index: overall_header.tpl
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/templates/subSilver/overall_header.tpl,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** overall_header.tpl 2001/11/28 18:48:53 1.12
--- overall_header.tpl 2001/12/03 01:02:37 1.13
***************
*** 5,9 ****
<html>
<head>
! <meta http-equiv="Content-Type" content="text/html" />
<meta http-equiv="Content-Style-Type" content="text/css" />
{META}
--- 5,9 ----
<html>
<head>
! <meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}" />
<meta http-equiv="Content-Style-Type" content="text/css" />
{META}
|
|
From: Paul S. O. <ps...@us...> - 2001-12-03 00:56:51
|
Update of /cvsroot/phpbb/phpBB2/language/lang_english In directory usw-pr-cvs1:/tmp/cvs-serv22391/language/lang_english Modified Files: lang_admin.php Log Message: Fix bug #487716 Index: lang_admin.php =================================================================== RCS file: /cvsroot/phpbb/phpBB2/language/lang_english/lang_admin.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** lang_admin.php 2001/12/01 01:25:06 1.16 --- lang_admin.php 2001/12/03 00:56:48 1.17 *************** *** 218,221 **** --- 218,222 ---- $lang['Ban_update_sucessful'] = "The banlist has been updated successfully"; + $lang['Click_return_banadmin'] = "Click %sHere%s to return to Ban Control"; |
|
From: Paul S. O. <ps...@us...> - 2001-12-03 00:56:51
|
Update of /cvsroot/phpbb/phpBB2/admin
In directory usw-pr-cvs1:/tmp/cvs-serv22391/admin
Modified Files:
admin_user_ban.php
Log Message:
Fix bug #487716
Index: admin_user_ban.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/admin/admin_user_ban.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** admin_user_ban.php 2001/11/19 19:06:35 1.12
--- admin_user_ban.php 2001/12/03 00:56:48 1.13
***************
*** 45,49 ****
$user_list = array();
! if(isset($HTTP_POST_VARS['ban_user']))
{
$user_list_temp = $HTTP_POST_VARS['ban_user'];
--- 45,49 ----
$user_list = array();
! if( isset($HTTP_POST_VARS['ban_user']) )
{
$user_list_temp = $HTTP_POST_VARS['ban_user'];
***************
*** 56,60 ****
$ip_list = array();
! if(isset($HTTP_POST_VARS['ban_ip']))
{
$ip_list_temp = explode(",", $HTTP_POST_VARS['ban_ip']);
--- 56,60 ----
$ip_list = array();
! if( isset($HTTP_POST_VARS['ban_ip']) )
{
$ip_list_temp = explode(",", $HTTP_POST_VARS['ban_ip']);
***************
*** 141,147 ****
$email_list = array();
! if(isset($HTTP_POST_VARS['ban_mail']))
{
! $email_list_temp = explode(",", $HTTP_POST_VARS['ban_mail']);
for($i = 0; $i < count($email_list_temp); $i++)
--- 141,147 ----
$email_list = array();
! if(isset($HTTP_POST_VARS['ban_email']))
{
! $email_list_temp = explode(",", $HTTP_POST_VARS['ban_email']);
for($i = 0; $i < count($email_list_temp); $i++)
***************
*** 329,334 ****
}
! message_die(GENERAL_MESSAGE, $lang['Ban_update_sucessful']);
}
else
--- 329,336 ----
}
! $message = $lang['Ban_update_sucessful'] . "<br /><br />" . sprintf($lang['Click_return_banadmin'], "<a href=\"" . append_sid("admin_user_ban.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");
+ message_die(GENERAL_MESSAGE, $message);
+
}
else
***************
*** 366,370 ****
$userban_count++;
}
! $select_userlist = "<select name=\"ban_user[]\" multiple=\"multiple\" size=\"" . min(5, $userban_count) . "\">" . $select_userlist . "</select>";
$template->assign_vars(array(
--- 368,373 ----
$userban_count++;
}
! $select_size = ( $userban_count < 5 || $userban_c) ? 5 :
! $select_userlist = "<select name=\"ban_user[]\" multiple=\"multiple\" size=\"5\">" . $select_userlist . "</select>";
$template->assign_vars(array(
***************
*** 399,412 ****
}
! if($select_userlist == "")
{
$select_userlist = "<option value=\"-1\">" . $lang['No_banned_users'] . "</option>";
}
- else if($userban_count == 1)
- {
- $select_userlist = "<option value=\"-1\">" . $lang['No_unban'] . "</option>" . $select_userlist;
- }
! $select_userlist = "<select name=\"unban_user[]\" multiple=\"multiple\" size=\"" . min(5, $userban_count) . "\">" . $select_userlist;
$select_userlist .= "</select>";
--- 402,411 ----
}
! if( $select_userlist == "" )
{
$select_userlist = "<option value=\"-1\">" . $lang['No_banned_users'] . "</option>";
}
! $select_userlist = "<select name=\"unban_user[]\" multiple=\"multiple\" size=\"5\">" . $select_userlist;
$select_userlist .= "</select>";
***************
*** 441,460 ****
$select_iplist = "<option value=\"-1\">" . $lang['No_banned_ip'] . "</option>";
}
- else if($ipban_count == 1)
- {
- $select_iplist = "<option value=\"-1\">" . $lang['No_unban'] . "</option>" . $select_iplist;
- }
! if($select_emaillist == "")
{
$select_emaillist = "<option value=\"-1\">" . $lang['No_banned_email'] . "</option>";
}
- else if($emailban_count == 1)
- {
- $select_emaillist = "<option value=\"-1\">" . $lang['No_unban'] . "</option>" . $select_emaillist;
- }
! $select_iplist = "<select name=\"unban_ip[]\" multiple=\"multiple\" size=\"" . min(5, $ipban_count) . "\">" . $select_iplist . "</select>";
! $select_emaillist = "<select name=\"unban_email[]\" multiple=\"multiple\" size=\"" . min(5, $emailban_count) . "\">" . $select_emaillist . "</select>";
$template->assign_vars(array(
--- 440,451 ----
$select_iplist = "<option value=\"-1\">" . $lang['No_banned_ip'] . "</option>";
}
! if( $select_emaillist == "")
{
$select_emaillist = "<option value=\"-1\">" . $lang['No_banned_email'] . "</option>";
}
! $select_iplist = "<select name=\"unban_ip[]\" multiple=\"multiple\" size=\"5\">" . $select_iplist . "</select>";
! $select_emaillist = "<select name=\"unban_email[]\" multiple=\"multiple\" size=\"5\">" . $select_emaillist . "</select>";
$template->assign_vars(array(
|
|
From: Paul S. O. <ps...@us...> - 2001-12-03 00:31:52
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv18472
Modified Files:
groupcp.php
Log Message:
Fixed bug #487544
Index: groupcp.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/groupcp.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** groupcp.php 2001/11/29 00:47:51 1.30
--- groupcp.php 2001/12/03 00:31:49 1.31
***************
*** 934,938 ****
}
! if( $members_count == 1 )
{
//
--- 934,938 ----
}
! if( !$members_count )
{
//
|