phpbb-php5mod-cvs-checkins Mailing List for phpBB-php5 MOD (Page 2)
Brought to you by:
jelly_doughnut
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(15) |
Aug
|
Sep
(7) |
Oct
(2) |
Nov
(10) |
Dec
(3) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(15) |
Mar
|
Apr
(7) |
May
(11) |
Jun
(5) |
Jul
(6) |
Aug
|
Sep
|
Oct
(12) |
Nov
|
Dec
(7) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(10) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
2007 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Josh <jel...@us...> - 2005-10-31 21:35:23
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1999/install_ Added Files: update_to_20185.php Log Message: Schema updates --- NEW FILE: update_to_20185.php --- <?php /*************************************************************************** * update_to_20xy.php * ------------------- * begin : Friday, Nov. * copyright : (C) 2005 phpBB-php5 * email : n/a * * $Id: update_to_20185.php,v 1.1 2005/10/31 21:35:11 jelly_doughnut Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // This script is basically phpBB's update_to_20x.php // Except it doesn't have information to upgrade from ancient versions. function _sql($sql, &$errored, &$error_ary, $echo_dot = true) { global $db; if (!($result = $db->sql_query($sql))) { $errored = true; $error_ary['sql'][] = (is_array($sql)) ? $sql[$i] : $sql; $error_ary['error_code'][] = $db->sql_error(); } if ($echo_dot) { echo ". \n"; flush(); } return $result; } @set_time_limit(120); define('IN_PHPBB', 1); $phpbb_root_path = './../'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); if(!isset($dbms)) { die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update."); } include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/functions.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); include($phpbb_root_path . 'includes/functions_search.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); // // // $updates_to_version = ".0.18"; $update_php5mod_version = ".0.18.5"; // // // ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"> <!-- font,th,td,p,body { font-family: "Courier New", courier; font-size: 11pt } a:link,a:active,a:visited { color : #006699; } a:hover { text-decoration: underline; color : #DD6900;} hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;} .maintitle,h1,h2 {font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000;} .ok {color:green} /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ @import url("../templates/subSilver/formIE.css"); --> </style> </head> <body bgcolor="#FFFFFF" text="#000000" link="#006699" vlink="#5584AA"> <table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td> <td align="center" width="100%" valign="middle"><span class="maintitle">Updating to latest stable release</span></td> </tr> </table></td> </tr> </table> <br clear="all" /> <h2>Information</h2> <?php echo '<p>Database type :: <b>' . SQL_LAYER . '</b><br />'; $sql = "SELECT config_value FROM " . CONFIG_TABLE . " WHERE config_name = 'version'"; if (!($result = $db->sql_query($sql))) { die("Couldn't obtain version info"); } $row = $db->sql_fetchrow($result); $sql = array(); echo 'Previous version :: <b>2' . $row['config_value'] . '</b><br />'; echo 'Updated version :: <b>2' . $updates_to_version . '</b></p>' ."\n"; echo "<h2>Updating database schema</h2>\n"; echo "<p>Progress :: <b>"; flush(); // // Data updates // unset($sql); $error_ary = array(); $errored = false; echo "<h2>Updating data</h2>\n"; echo "<p>Progress :: <b>"; flush(); if ($row['config_value'] <= '.0.14'); { $sql[] = 'ALTER TABLE ' . SESSIONS_TABLE . ' ADD session_admin int(1)'; switch (SQL_LAYER) { case 'mysql': case 'mysql4': $sql[] = 'CREATE TABLE ' . $table_prefix . 'sessions_keys (key_id varchar(32) DEFAULT \'0\' NOT NULL, user_id mediumint(8) DEFAULT \'0\' NOT NULL, last_ip varchar(8) DEFAULT \'0\' NOT NULL, last_login int(11) DEFAULT \'0\' NOT NULL, PRIMARY KEY (key_id, user_id), KEY last_login (last_login))'; break; case 'mssql': case 'mssql-odbc': $sql[] = 'CREATE TABLE [' . $table_prefix . 'sessions_keys] ([key_id] [char] (32) NOT NULL , [user_id] [int] NOT NULL , [last_ip] [char] (8) NOT NULL , [last_login] [int] NOT NULL) ON [PRIMARY]'; $sql[] = 'CREATE INDEX [IX_' . $table_prefix . 'sessions_keys] ON [' . $table_prefix . 'sessions_keys]([key_id], [user_id]) ON [PRIMARY]'; $sql[] = 'CREATE INDEX [IX_' . $table_prefix . 'sessions_keys] ON [' . $table_prefix . 'sessions_keys]([last_login]) ON [PRIMARY]'; break; case 'msaccess': $sql[] = 'CREATE TABLE ' . $table_prefix . 'sessions_keys (key_id char(32) NOT NULL, user_id int NOT NULL, last_ip char(8) NOT NULL, last_login int NOT NULL)'; $sql[] = 'ALTER TABLE ' . $table_prefix . 'sessions_keys ADD PRIMARY KEY (key_id, user_id)'; break; case 'postgresql': $sql[] = 'CREATE TABLE ' . $table_prefix . 'sessions_keys (key_id char(32) DEFAULT \'0\' NOT NULL, user_id int4 DEFAULT \'0\' NOT NULL, last_ip char(8) DEFAULT \'0\' NOT NULL, last_login int4 DEFAULT \'0\' NOT NULL, CONSTRAINT ' . $table_prefix . 'sessions_keys_pkey PRIMARY KEY (key_id, user_id))'; $sql[] = 'CREATE INDEX last_login_' . $table_prefix . 'sessions_keys_index ON ' . $table_prefix . 'sessions_keys (last_login)'; break; } _sql($sql, $errored, $error_ary); $sql = 'UPDATE ' . USERS_TABLE . ' SET user_active = 0 WHERE user_id = ' . ANONYMOUS; _sql($sql, $errored, $error_ary); $sql = 'INSERT INTO ' . CONFIG_TABLE . " (config_name, config_value) VALUES ('allow_autologin', '1')"; _sql($sql, $errored, $error_ary); $sql = 'INSERT INTO ' . CONFIG_TABLE . " (config_name, config_value) VALUES ('max_autologin_time', '0')"; _sql($sql, $errored, $error_ary); } else if ($row['config_value'] <= '.0.17') { switch (SQL_LAYER) { case 'mysql': case 'mysql4': $sql[] = 'CREATE TABLE ' . $table_prefix . 'sessions_keys (key_id varchar(32) DEFAULT \'0\' NOT NULL, user_id mediumint(8) DEFAULT \'0\' NOT NULL, last_ip varchar(8) DEFAULT \'0\' NOT NULL, last_login int(11) DEFAULT \'0\' NOT NULL, PRIMARY KEY (key_id, user_id), KEY last_login (last_login))'; break; case 'mssql': case 'mssql-odbc': $sql[] = 'CREATE TABLE [' . $table_prefix . 'sessions_keys] ([key_id] [char] (32) NOT NULL , [user_id] [int] NOT NULL , [last_ip] [char] (8) NOT NULL , [last_login] [int] NOT NULL) ON [PRIMARY]'; $sql[] = 'CREATE INDEX [IX_' . $table_prefix . 'sessions_keys] ON [' . $table_prefix . 'sessions_keys]([key_id], [user_id]) ON [PRIMARY]'; $sql[] = 'CREATE INDEX [IX_' . $table_prefix . 'sessions_keys] ON [' . $table_prefix . 'sessions_keys]([last_login]) ON [PRIMARY]'; break; case 'msaccess': $sql[] = 'CREATE TABLE ' . $table_prefix . 'sessions_keys (key_id char(32) NOT NULL, user_id int NOT NULL, last_ip char(8) NOT NULL, last_login int NOT NULL)'; $sql[] = 'ALTER TABLE ' . $table_prefix . 'sessions_keys ADD PRIMARY KEY (key_id, user_id)'; break; case 'postgresql': $sql[] = 'CREATE TABLE ' . $table_prefix . 'sessions_keys (key_id char(32) DEFAULT \'0\' NOT NULL, user_id int4 DEFAULT \'0\' NOT NULL, last_ip char(8) DEFAULT \'0\' NOT NULL, last_login int4 DEFAULT \'0\' NOT NULL, CONSTRAINT ' . $table_prefix . 'sessions_keys_pkey PRIMARY KEY (key_id, user_id))'; $sql[] = 'CREATE INDEX last_login_' . $table_prefix . 'sessions_keys_index ON ' . $table_prefix . 'sessions_keys (last_login)'; break; } _sql($sql, $errored, $error_ary); $sql = 'UPDATE ' . USERS_TABLE . ' SET user_active = 0 WHERE user_id = ' . ANONYMOUS; _sql($sql, $errored, $error_ary); $sql = 'INSERT INTO ' . CONFIG_TABLE . " (config_name, config_value) VALUES ('allow_autologin', '1')"; _sql($sql, $errored, $error_ary); $sql = 'INSERT INTO ' . CONFIG_TABLE . " (config_name, config_value) VALUES ('max_autologin_time', '0')"; _sql($sql, $errored, $error_ary); } else { echo " No updates were required</b></p>\n"; } echo "<h2>Updating version and optimizing tables</h2>\n"; echo "<p>Progress :: <b>"; flush(); // update the version $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$updates_to_version' WHERE config_name = 'version'"; _sql($sql, $errored, $error_ary); $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$update_php5mod_version' WHERE config_name = 'version5'"; _sql($sql, $errored, $error_ary); // Optimize/vacuum analyze the tables where appropriate // this should be done for each version in future along with // the version number update switch (SQL_LAYER) { case 'mysql': case 'mysql4': case 'mysqli': $sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words'; _sql($sql, $errored, $error_ary); break; case 'postgresql': _sql("VACUUM ANALYZE", $errored, $error_ary); break; } echo "</b> <b class=\"ok\">Done</b><br />Result :: \n"; if ($errored) { echo " <b>Some queries failed, the statements and errors are listing below</b>\n<ul>"; for ($i = 0; $i < count($error_ary['sql']); $i++) { echo "<li>Error :: <b>" . $error_ary['error_code'][$i]['message'] . "</b><br />"; echo "SQL :: <b>" . $error_ary['sql'][$i] . "</b><br /><br /></li>"; } echo "</ul>\n<p>This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our development board. See <a href=\"docs\README.html\">README</a> for details on how to obtain advice.</p>\n"; } else { echo "<b>No errors</b>\n"; } echo "<h2>Update completed</h2>\n"; echo "\n<p>You should now visit the General Configuration settings page in the <a href=\"../admin/\">Administration Panel</a> and check the General Configuration of the board. If you updated from versions prior to RC-3 you <b>must</b> update some entries. If you do not do this emails sent from the board will contain incorrect information. Don't forget to delete this file!</p>\n"; ?> <br clear="all" /> </body> </html> |
Update of /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1999/install_/schemas Modified Files: mssql_basic.sql mssql_schema.sql mysql_basic.sql mysql_schema.sql postgres_basic.sql postgres_schema.sql Log Message: Schema updates Index: mysql_schema.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/mysql_schema.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mysql_schema.sql 9 May 2005 00:33:17 -0000 1.2 --- mysql_schema.sql 31 Oct 2005 21:35:11 -0000 1.3 *************** *** 312,315 **** --- 312,328 ---- ); + # -------------------------------------------------------- + # + # Table structure for table `phpbb_sessions_keys` + # + CREATE TABLE phpbb_sessions_keys ( + key_id varchar(32) DEFAULT '0' NOT NULL, + user_id mediumint(8) DEFAULT '0' NOT NULL, + last_ip varchar(8) DEFAULT '0' NOT NULL, + last_login int(11) DEFAULT '0' NOT NULL, + PRIMARY KEY (key_id, user_id), + KEY last_login (last_login) + ); + # -------------------------------------------------------- Index: postgres_schema.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/postgres_schema.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** postgres_schema.sql 9 May 2005 00:33:17 -0000 1.2 --- postgres_schema.sql 31 Oct 2005 21:35:11 -0000 1.3 *************** *** 296,299 **** --- 296,311 ---- CREATE INDEX session_id_ip_user_id_phpbb_sessions_index ON phpbb_sessions (session_id, session_ip, session_user_id); + /* -------------------------------------------------------- + Table structure for table phpbb_sessions_keys + -------------------------------------------------------- */ + CREATE TABLE phpbb_sessions_keys ( + key_id char(32) DEFAULT '0' NOT NULL, + user_id int4 DEFAULT '0' NOT NULL, + last_ip char(8) DEFAULT '0' NOT NULL, + last_login int4 DEFAULT '0' NOT NULL, + CONSTRAINT phpbb_sessions_keys_pkey PRIMARY KEY (key_id, user_id) + ); + CREATE INDEX last_login_phpbb_sessions_keys_index ON phpbb_sessions_keys (last_login); + /* -------------------------------------------------------- *************** *** 490,497 **** user_avatar varchar(100), user_avatar_type int2 DEFAULT '0' NOT NULL, ! user_level int4 DEFAULT '1', user_lang varchar(255), user_timezone decimal(5) DEFAULT '0' NOT NULL, ! user_dateformat varchar(14) DEFAULT 'd M Y H:m' NOT NULL, user_notify_pm int2 DEFAULT '0' NOT NULL, user_popup_pm int2 DEFAULT '0' NOT NULL, --- 502,509 ---- user_avatar varchar(100), user_avatar_type int2 DEFAULT '0' NOT NULL, ! user_level int4 DEFAULT '0', user_lang varchar(255), user_timezone decimal(5) DEFAULT '0' NOT NULL, ! user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL, user_notify_pm int2 DEFAULT '0' NOT NULL, user_popup_pm int2 DEFAULT '0' NOT NULL, Index: mssql_schema.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/mssql_schema.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mssql_schema.sql 9 May 2005 00:33:17 -0000 1.2 --- mssql_schema.sql 31 Oct 2005 21:35:11 -0000 1.3 *************** *** 196,199 **** --- 196,207 ---- GO + CREATE TABLE [phpbb_sessions_keys] ( + [key_id] [char] (32) NOT NULL , + [user_id] [int] NOT NULL , + [last_ip] [char] (8) NOT NULL , + [last_login] [int] NOT NULL + ) ON [PRIMARY] + GO + CREATE TABLE [phpbb_smilies] ( [smilies_id] [int] IDENTITY (1, 1) NOT NULL , *************** *** 617,620 **** --- 625,629 ---- CONSTRAINT [DF_phpbb_users_user_notify_pm] DEFAULT (0) FOR [user_notify_pm], CONSTRAINT [DF_phpbb_users_user_popup_pm] DEFAULT (1) FOR [user_popup_pm], + CONSTRAINT [DF_phpbb_users_user_dateformat] DEFAULT('d M Y H:i') FOR [user_dateformat], CONSTRAINT [DF_phpbb_users_user_avatar_type] DEFAULT (0) FOR [user_avatar_type] GO *************** *** 677,680 **** --- 686,696 ---- GO + CREATE INDEX [IX_phpbb_sessions_keys] ON [phpbb_sessions_keys]([key_id], [user_id]) ON [PRIMARY] + GO + + CREATE INDEX [IX_phpbb_sessions_keys] ON [phpbb_sessions_keys]([last_login]) ON [PRIMARY] + GO + + CREATE INDEX [IX_phpbb_user_group] ON [phpbb_user_group]([group_id], [user_id]) ON [PRIMARY] GO Index: postgres_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/postgres_basic.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** postgres_basic.sql 19 Jul 2005 23:14:52 -0000 1.8 --- postgres_basic.sql 31 Oct 2005 21:35:11 -0000 1.9 *************** *** 26,29 **** --- 26,31 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0'); + INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin','1'); + INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15'); *************** *** 64,69 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.17.5'); -- Categories --- 66,71 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.18'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.18.5'); -- Categories Index: mysql_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/mysql_basic.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mysql_basic.sql 19 Jul 2005 23:14:52 -0000 1.8 --- mysql_basic.sql 31 Oct 2005 21:35:11 -0000 1.9 *************** *** 25,28 **** --- 25,30 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_avatar_upload','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0'); + INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin','1'); + INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('override_user_style','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('posts_per_page','15'); *************** *** 63,68 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.17.5'); --- 65,70 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.18'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.18.5'); Index: mssql_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/mssql_basic.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mssql_basic.sql 19 Jul 2005 23:14:52 -0000 1.8 --- mssql_basic.sql 31 Oct 2005 21:35:11 -0000 1.9 *************** *** 43,46 **** --- 43,48 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('board_email','you...@yo...'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('enable_confirm', '0'); + INSERT INTO phpbb_config (config_name, config_value) VALUES ('allow_autologin','1'); + INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_autologin_time','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_delivery','0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('smtp_host',''); *************** *** 70,75 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.17.5'); /* --- 72,77 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.18'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.18.5'); /* |
From: Josh <jel...@us...> - 2005-10-31 21:03:35
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26724 Modified Files: common.php Log Message: Additions from phpBB Group Some fixes from me Index: common.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/common.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** common.php 31 Oct 2005 03:18:41 -0000 1.6 --- common.php 31 Oct 2005 21:03:26 -0000 1.7 *************** *** 37,41 **** //// for compatibility with MODifications written for php3 & 4 //// end phpBB-php5 developer note ! if (@phpversion() >= '5.0.0' && (!ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { $HTTP_POST_VARS = $_POST; --- 37,41 ---- //// for compatibility with MODifications written for php3 & 4 //// end phpBB-php5 developer note ! if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { $HTTP_POST_VARS = $_POST; |
From: Josh <jel...@us...> - 2005-10-31 21:03:35
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26724/includes Modified Files: functions_admin.php functions_search.php usercp_register.php Log Message: Additions from phpBB Group Some fixes from me Index: functions_search.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions_search.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions_search.php 31 Oct 2005 03:18:41 -0000 1.4 --- functions_search.php 31 Oct 2005 21:03:26 -0000 1.5 *************** *** 351,354 **** --- 351,355 ---- case 'mysql': case 'mysql4': + case 'mysqli': $sql = "SELECT word_id FROM " . SEARCH_MATCH_TABLE . " Index: usercp_register.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_register.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** usercp_register.php 31 Oct 2005 03:18:41 -0000 1.7 --- usercp_register.php 31 Oct 2005 21:03:26 -0000 1.8 *************** *** 72,75 **** --- 72,76 ---- $error = FALSE; + $error_msg = ''; $page_title = ( $mode == 'editprofile' ) ? $lang['Edit_profile'] : $lang['Register']; *************** *** 191,194 **** --- 192,196 ---- $user_avatar_local = ( isset($_POST['avatarselect']) && !empty($_POST['submitavatar']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($_POST['avatarselect']) : ( ( isset($_POST['avatarlocal']) ) ? htmlspecialchars($_POST['avatarlocal']) : '' ); + $user_avatar_category = ( isset($HTTP_POST_VARS['avatarcatname']) && $board_config['allow_avatar_local'] ) ? htmlspecialchars($HTTP_POST_VARS['avatarcatname']) : '' ; $user_avatar_remoteurl = ( !empty($_POST['avatarremoteurl']) ) ? trim(htmlspecialchars($_POST['avatarremoteurl'])) : ''; *************** *** 218,222 **** $occupation = stripslashes($occupation); $interests = stripslashes($interests); ! $signature = stripslashes($signature); $user_lang = stripslashes($user_lang); --- 220,224 ---- $occupation = stripslashes($occupation); $interests = stripslashes($interests); ! $signature = htmlspecialchars(stripslashes($signature)); $user_lang = stripslashes($user_lang); *************** *** 225,229 **** if ( !isset($_POST['cancelavatar'])) { ! $user_avatar = $user_avatar_local; $user_avatar_type = USER_AVATAR_GALLERY; } --- 227,231 ---- if ( !isset($_POST['cancelavatar'])) { ! $user_avatar = $user_avatar_category . '/' . $user_avatar_local; $user_avatar_type = USER_AVATAR_GALLERY; } *************** *** 434,438 **** } ! if ( $signature_bbcode_uid == '' ) { $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : ''; --- 436,440 ---- } ! if ( !isset($signature_bbcode_uid) || $signature_bbcode_uid == '' ) { $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : ''; *************** *** 471,487 **** else if ( $user_avatar_remoteurl != '' && $board_config['allow_avatar_remote'] ) { ! if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])) ) ! { ! @unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])); ! } $avatar_sql = user_avatar_url($mode, $error, $error_msg, $user_avatar_remoteurl); } else if ( $user_avatar_local != '' && $board_config['allow_avatar_local'] ) { ! if ( @file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])) ) ! { ! @unlink(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'])); ! } ! $avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local); } --- 473,483 ---- else if ( $user_avatar_remoteurl != '' && $board_config['allow_avatar_remote'] ) { ! user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']); $avatar_sql = user_avatar_url($mode, $error, $error_msg, $user_avatar_remoteurl); } else if ( $user_avatar_local != '' && $board_config['allow_avatar_local'] ) { ! user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']); ! $avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local, $user_avatar_category); } *************** *** 894,898 **** if ( !empty($user_avatar_local) ) { ! $s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $user_avatar_local . '" />'; } --- 890,894 ---- if ( !empty($user_avatar_local) ) { ! $s_hidden_fields .= '<input type="hidden" name="avatarlocal" value="' . $user_avatar_local . '" /><input type="hidden" name="avatarcatname" value="' . $user_avatar_category . '" />'; } Index: functions_admin.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions_admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_admin.php 31 Oct 2005 03:18:41 -0000 1.2 --- functions_admin.php 31 Oct 2005 21:03:26 -0000 1.3 *************** *** 180,183 **** --- 180,184 ---- $db->sql_freeresult($result); break; + } } |
Update of /cvsroot/phpbb-php5mod/phpbb-php5/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30886/includes Modified Files: bbcode.php constants.php db.php emailer.php functions.php functions_admin.php functions_post.php functions_search.php functions_validate.php page_header.php page_tail.php sessions.php smtp.php usercp_activate.php usercp_avatar.php usercp_register.php usercp_sendpasswd.php usercp_viewprofile.php Log Message: 2.0.18 Index: usercp_sendpasswd.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_sendpasswd.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** usercp_sendpasswd.php 8 May 2005 02:12:44 -0000 1.4 --- usercp_sendpasswd.php 31 Oct 2005 03:18:41 -0000 1.5 *************** *** 51,55 **** $user_actkey = gen_rand_string(true); $key_len = 54 - strlen($server_url); ! $key_len = ( $str_len > 6 ) ? $key_len : 6; $user_actkey = substr($user_actkey, 0, $key_len); $user_password = gen_rand_string(false); --- 51,55 ---- $user_actkey = gen_rand_string(true); $key_len = 54 - strlen($server_url); ! $key_len = ( $key_len > 6 ) ? $key_len : 6; $user_actkey = substr($user_actkey, 0, $key_len); $user_password = gen_rand_string(false); Index: functions.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions.php 19 Jul 2005 23:31:24 -0000 1.4 --- functions.php 31 Oct 2005 03:18:41 -0000 1.5 *************** *** 514,518 **** do { ! $orig_word[] = '#\b(' . str_replace('\*', '\w*?', phpbb_preg_quote($row['word'], '#')) . ')\b#i'; $replacement_word[] = $row['replacement']; } --- 514,518 ---- do { ! $orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i'; $replacement_word[] = $row['replacement']; } Index: smtp.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/smtp.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** smtp.php 8 May 2005 02:12:44 -0000 1.2 --- smtp.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 28,32 **** // function server_parse($socket, $response, $line = __LINE__) ! { while (substr($server_response, 3, 1) != ' ') { --- 28,33 ---- // function server_parse($socket, $response, $line = __LINE__) ! { ! $server_response = ''; while (substr($server_response, 3, 1) != ' ') { Index: page_tail.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/page_tail.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** page_tail.php 22 Feb 2005 01:21:02 -0000 1.3 --- page_tail.php 31 Oct 2005 03:18:41 -0000 1.4 *************** *** 26,29 **** --- 26,31 ---- } + global $gzip_compress; + // // Show the overall footer. *************** *** 38,42 **** //'PHPBB_VERSION' => '2' . $board_config['version'], //'PHPBB5_VERSION' => '2' . $board_config['version5'], ! 'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '', 'ADMIN_LINK' => $admin_link) ); --- 40,44 ---- //'PHPBB_VERSION' => '2' . $board_config['version'], //'PHPBB5_VERSION' => '2' . $board_config['version5'], ! 'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : ''), 'ADMIN_LINK' => $admin_link) ); Index: functions_admin.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions_admin.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_admin.php 29 Jul 2004 22:36:19 -0000 1.1 --- functions_admin.php 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 31,37 **** $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata); ! $sql = "SELECT forum_id, forum_name ! FROM " . FORUMS_TABLE . " ! ORDER BY cat_id, forum_order"; if ( !($result = $db->sql_query($sql)) ) { --- 31,38 ---- $is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata); ! $sql = 'SELECT f.forum_id, f.forum_name ! FROM ' . CATEGORIES_TABLE . ' c, ' . FORUMS_TABLE . ' f ! WHERE f.cat_id = c.cat_id ! ORDER BY c.cat_order, f.forum_order'; if ( !($result = $db->sql_query($sql)) ) { *************** *** 139,150 **** } ! if ( $row = $db->sql_fetchrow($result) ) { ! $sql = ( $row['total_posts'] ) ? "UPDATE " . TOPICS_TABLE . " SET topic_replies = " . ( $row['total_posts'] - 1 ) . ", topic_first_post_id = " . $row['first_post'] . ", topic_last_post_id = " . $row['last_post'] . " WHERE topic_id = $id" : "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = $id"; ! if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql); } } break; } --- 140,182 ---- } ! if ($row['total_posts']) { ! // Correct the details of this topic ! $sql = 'UPDATE ' . TOPICS_TABLE . ' ! SET topic_replies = ' . ($row['total_posts'] - 1) . ', topic_first_post_id = ' . $row['first_post'] . ', topic_last_post_id = ' . $row['last_post'] . " ! WHERE topic_id = $id"; ! ! if (!$db->sql_query($sql)) { message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql); } } + else + { + // There are no replies to this topic + // Check if it is a move stub + $sql = 'SELECT topic_moved_id + FROM ' . TOPICS_TABLE . " + WHERE topic_id = $id"; + + if (!($result = $db->sql_query($sql))) + { + message_die(GENERAL_ERROR, 'Could not get topic ID', '', __LINE__, __FILE__, $sql); + } + + if ($row = $db->sql_fetchrow($result)) + { + if (!$row['topic_moved_id']) + { + $sql = 'DELETE FROM ' . TOPICS_TABLE . " WHERE topic_id = $id"; + + if (!$db->sql_query($sql)) + { + message_die(GENERAL_ERROR, 'Could not remove topic', '', __LINE__, __FILE__, $sql); + } + } + } + + $db->sql_freeresult($result); break; } Index: usercp_viewprofile.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_viewprofile.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** usercp_viewprofile.php 19 Jul 2005 23:31:25 -0000 1.5 --- usercp_viewprofile.php 31 Oct 2005 03:18:41 -0000 1.6 *************** *** 166,170 **** $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>'; --- 166,170 ---- $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>'; Index: usercp_register.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_register.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** usercp_register.php 27 Jun 2005 20:16:40 -0000 1.6 --- usercp_register.php 31 Oct 2005 03:18:41 -0000 1.7 *************** *** 151,155 **** else { ! $attachsig = ( isset($_POST['attachsig']) ) ? ( ($_POST['attachsig']) ? TRUE : 0 ) : 0; $allowhtml = ( isset($_POST['allowhtml']) ) ? ( ($_POST['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml']; --- 151,155 ---- else { ! $attachsig = ( isset($_POST['attachsig']) ) ? ( ($_POST['attachsig']) ? TRUE : 0 ) : $userdata['user_attachsig']; $allowhtml = ( isset($_POST['allowhtml']) ) ? ( ($_POST['allowhtml']) ? TRUE : 0 ) : $userdata['user_allowhtml']; *************** *** 198,203 **** $user_avatar_filetype = ( !empty($_FILES['avatar']['type']) ) ? $_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'] : ''; if ( (isset($_POST['avatargallery']) || isset($_POST['submitavatar']) || isset($_POST['cancelavatar'])) && (!isset($_POST['submit'])) ) --- 198,203 ---- $user_avatar_filetype = ( !empty($_FILES['avatar']['type']) ) ? $_FILES['avatar']['type'] : ''; ! $user_avatar = ( empty($user_avatar_local) && $mode == 'editprofile' ) ? $userdata['user_avatar'] : ''; ! $user_avatar_type = ( empty($user_avatar_local) && $mode == 'editprofile' ) ? $userdata['user_avatar_type'] : ''; if ( (isset($_POST['avatargallery']) || isset($_POST['submitavatar']) || isset($_POST['cancelavatar'])) && (!isset($_POST['submit'])) ) *************** *** 528,550 **** // The users account has been deactivated, send them an email with a new activation key // ! include($phpbb_root_path . 'includes/emailer.'.$phpEx); ! $emailer = new emailer($board_config['smtp_delivery']); ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); ! $emailer->use_template('user_activate', stripslashes($user_lang)); ! $emailer->email_address($email); ! $emailer->set_subject($lang['Reactivate']); ! $emailer->assign_vars(array( ! 'SITENAME' => $board_config['sitename'], ! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', ! 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ! ); ! $emailer->send(); ! $emailer->reset(); $message = $lang['Profile_updated_inactive'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); --- 528,581 ---- // The users account has been deactivated, send them an email with a new activation key // ! if ( $board_config['require_activation'] != USER_ACTIVATION_ADMIN ) ! { ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); ! $emailer->use_template('user_activate', stripslashes($user_lang)); ! $emailer->email_address($email); ! $emailer->set_subject($lang['Reactivate']); ! $emailer->assign_vars(array( ! 'SITENAME' => $board_config['sitename'], ! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), ! 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', ! 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ! ); ! $emailer->send(); ! $emailer->reset(); ! } ! else if ( $board_config['require_activation'] == USER_ACTIVATION_ADMIN ) ! { ! $sql = 'SELECT user_email, user_lang ! FROM ' . USERS_TABLE . ' ! WHERE user_level = ' . ADMIN; ! ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not select Administrators', '', __LINE__, __FILE__, $sql); ! } ! ! while ($row = $db->sql_fetchrow($result)) ! { ! $emailer->from($board_config['board_email']); ! $emailer->replyto($board_config['board_email']); ! ! $emailer->email_address(trim($row['user_email'])); ! $emailer->use_template("admin_activate", $row['user_lang']); ! $emailer->set_subject($lang['Reactivate']); ! $emailer->assign_vars(array( ! 'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)), ! 'EMAIL_SIG' => str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']), ! ! 'U_ACTIVATE' => $server_url . '?mode=activate&' . POST_USERS_URL . '=' . $user_id . '&act_key=' . $user_actkey) ! ); ! $emailer->send(); ! $emailer->reset(); ! } ! $db->sql_freeresult($result); ! } $message = $lang['Profile_updated_inactive'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); *************** *** 817,821 **** $allowviewonline = !$allowviewonline; ! display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, &$new_password, &$cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']); } else --- 848,852 ---- $allowviewonline = !$allowviewonline; ! display_avatar_gallery($mode, $avatar_category, $user_id, $email, $current_email, $coppa, $username, $email, $new_password, $cur_password, $password_confirm, $icq, $aim, $msn, $yim, $website, $location, $occupation, $interests, $signature, $viewemail, $notifypm, $popup_pm, $notifyreply, $attachsig, $allowhtml, $allowbbcode, $allowsmilies, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']); } else *************** *** 828,834 **** } ! if ( !isset($user_template) ) { ! $selected_template = $board_config['system_template']; } --- 859,865 ---- } ! if ( !isset($user_style) ) { ! $user_style = $board_config['system_template']; } Index: functions_post.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions_post.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_post.php 20 Nov 2004 01:01:11 -0000 1.2 --- functions_post.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 122,126 **** // Prepare a message for posting // ! function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on, &$smilies_on, &$error_msg, &$username, &$bbcode_uid, &$subject, &$message, &$poll_title, &$poll_options, &$poll_length) { global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; --- 122,126 ---- // Prepare a message for posting // ! function prepare_post($mode, $post_data, &$bbcode_on, &$html_on, &$smilies_on, &$error_msg, &$username, &$bbcode_uid, &$subject, &$message, &$poll_title, $poll_options, &$poll_length) { global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; *************** *** 579,592 **** $current_time = time(); ! if ($mode == 'delete') ! { ! $delete_sql = (!$post_data['first_post'] && !$post_data['last_post']) ? " AND user_id = " . $userdata['user_id'] : ''; ! $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id" . $delete_sql; ! if (!$db->sql_query($sql)) ! { ! message_die(GENERAL_ERROR, 'Could not change topic notify data', '', __LINE__, __FILE__, $sql); ! } ! } ! else { if ($mode == 'reply') --- 579,583 ---- $current_time = time(); ! if ($mode != 'delete') { if ($mode == 'reply') *************** *** 770,774 **** $gen_simple_header = TRUE; ! $page_title = $lang['Emoticons'] . " - $topic_title"; include($phpbb_root_path . 'includes/page_header.'.$phpEx); --- 761,765 ---- $gen_simple_header = TRUE; ! $page_title = $lang['Emoticons']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); Index: db.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/db.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** db.php 24 Sep 2004 02:28:03 -0000 1.2 --- db.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 66,71 **** if(!$db->db_connect_id) { ! message_die(CRITICAL_ERROR, "Could not connect to the database"); } ! ?> --- 66,71 ---- if(!$db->db_connect_id) { ! message_die(CRITICAL_ERROR, "Could not connect to the database"); } ! ?> \ No newline at end of file Index: usercp_avatar.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_avatar.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** usercp_avatar.php 19 Jul 2005 23:31:25 -0000 1.5 --- usercp_avatar.php 31 Oct 2005 03:18:41 -0000 1.6 *************** *** 65,80 **** } ! function user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename) { global $board_config; ! $avatar_filename = str_replace(array('../', '..\\', './', '.\\'), '', $avatar_filename); ! if ($avatar_filename{0} == '/' || $avatar_filename{0} == "\\") { return ''; } ! if ( file_exists(@phpbb_realpath($board_config['avatar_gallery_path'] . '/' . $avatar_filename)) && ($mode == 'editprofile') ) { ! $return = ", user_avatar = '" . str_replace("\'", "''", $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY; } else --- 65,88 ---- } ! function user_avatar_galleryfunction user_avatar_gallery($mode, &$error, &$error_msg, $avatar_filename, $avatar_category) { global $board_config; ! $avatar_filename = phpbb_ltrim(basename($avatar_filename), "'"); ! $avatar_category = phpbb_ltrim(basename($avatar_category), "'"); ! ! if(!preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $avatar_filename)) { return ''; } ! ! if ($avatar_filename == "" || $avatar_category == "") { ! return ''; ! } ! ! if ( file_exists(@phpbb_realpath($board_config['avatar_gallery_path'] . '/' . $avatar_category . '/' . $avatar_filename)) && ($mode == 'editprofile') ) ! { ! $return = ", user_avatar = '" . str_replace("\'", "''", $avatar_category . '/' . $avatar_filename) . "', user_avatar_type = " . USER_AVATAR_GALLERY; } else *************** *** 111,114 **** --- 119,125 ---- $ini_val = ( @phpversion() >= '4.0.0' ) ? 'ini_get' : 'get_cfg_var'; + $width = $height = 0; + $type = ''; + if ( $avatar_mode == 'remote' && preg_match('/^(http:\/\/)?([\w\-\.]+)\:?([0-9]*)\/(.*)$/', $avatar_filename, $url_ary) ) { *************** *** 168,172 **** } ! list($width, $height) = @getimagesize($tmp_filename); } else --- 179,183 ---- } ! list($width, $height, $type) = @getimagesize($tmp_filename); } else *************** *** 194,198 **** } ! list($width, $height) = @getimagesize($avatar_filename); } --- 205,209 ---- } ! list($width, $height, $type) = @getimagesize($avatar_filename); } *************** *** 202,205 **** --- 213,254 ---- } + switch ($type) + { + // GIF + case 1: + if ($imgtype != '.gif') + { + @unlink($tmp_filename); + message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__); + } + break; + + // JPG, JPC, JP2, JPX, JB2 + case 2: + case 9: + case 10: + case 11: + case 12: + if ($imgtype != '.jpg' && $imgtype != '.jpeg') + { + @unlink($tmp_filename); + message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__); + } + break; + + // PNG + case 3: + if ($imgtype != '.png') + { + @unlink($tmp_filename); + message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__); + } + break; + + default: + @unlink($tmp_filename); + message_die(GENERAL_ERROR, 'Unable to upload file', '', __LINE__, __FILE__); + } + if ( $width > 0 && $height > 0 && $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] ) { *************** *** 208,215 **** if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' ) { ! if ( file_exists(@phpbb_realpath('./' . $board_config['avatar_path'] . '/' . $current_avatar)) ) ! { ! @unlink('./' . $board_config['avatar_path'] . '/' . $current_avatar); ! } } --- 257,261 ---- if ( $mode == 'editprofile' && $current_type == USER_AVATAR_UPLOAD && $current_avatar != '' ) { ! user_avatar_delete($current_type, $current_avatar); } *************** *** 279,283 **** if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) ) { ! $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file; $avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file))); --- 325,329 ---- if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) ) { ! $avatar_images[$file][$avatar_row_count][$avatar_col_count] = $sub_file; $avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file))); *************** *** 325,329 **** { $template->assign_block_vars('avatar_row.avatar_column', array( ! "AVATAR_IMAGE" => $board_config['avatar_gallery_path'] . '/' . $avatar_images[$category][$i][$j], "AVATAR_NAME" => $avatar_name[$category][$i][$j]) ); --- 371,375 ---- { $template->assign_block_vars('avatar_row.avatar_column', array( ! "AVATAR_IMAGE" => $board_config['avatar_gallery_path'] . '/' . $category . '/' . $avatar_images[$category][$i][$j], "AVATAR_NAME" => $avatar_name[$category][$i][$j]) ); *************** *** 337,341 **** $params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat'); ! $s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" />'; for($i = 0; $i < count($params); $i++) --- 383,387 ---- $params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat'); ! $s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="avatarcatname" value="' . $category . '" />'; for($i = 0; $i < count($params); $i++) Index: functions_validate.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions_validate.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** functions_validate.php 19 Jul 2005 23:31:24 -0000 1.2 --- functions_validate.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 35,43 **** $sql = "SELECT username ! FROM " . USERS_TABLE . " WHERE LOWER(username) = '" . strtolower($username) . "'"; if ($result = $db->sql_query($sql)) { ! if ($row = $db->sql_fetchrow($result)) { if (($userdata['session_logged_in'] && $row['username'] != $userdata['username']) || !$userdata['session_logged_in']) --- 35,43 ---- $sql = "SELECT username ! FROM " . USERS_TABLE . " WHERE LOWER(username) = '" . strtolower($username) . "'"; if ($result = $db->sql_query($sql)) { ! while ($row = $db->sql_fetchrow($result)) { if (($userdata['session_logged_in'] && $row['username'] != $userdata['username']) || !$userdata['session_logged_in']) *************** *** 71,75 **** do { ! if (preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['disallow_username'], '#')) . ")\b#i", $username)) { $db->sql_freeresult($result); --- 71,75 ---- do { ! if (preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['disallow_username'], '#')) . ")\b#i", $username)) { $db->sql_freeresult($result); *************** *** 90,94 **** do { ! if (preg_match("#\b(" . str_replace("\*", ".*?", phpbb_preg_quote($row['word'], '#')) . ")\b#i", $username)) { $db->sql_freeresult($result); --- 90,94 ---- do { ! if (preg_match("#\b(" . str_replace("\*", ".*?", preg_quote($row['word'], '#')) . ")\b#i", $username)) { $db->sql_freeresult($result); Index: emailer.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/emailer.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** emailer.php 29 Jul 2004 22:36:19 -0000 1.1 --- emailer.php 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 165,169 **** { $this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject'); ! $drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#'); } else --- 165,169 ---- { $this->subject = (trim($match[2]) != '') ? trim($match[2]) : (($this->subject != '') ? $this->subject : 'No Subject'); ! $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); } else *************** *** 175,179 **** { $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']); ! $drop_header .= '[\r\n]*?' . phpbb_preg_quote($match[1], '#'); } else --- 175,179 ---- { $this->encoding = (trim($match[2]) != '') ? trim($match[2]) : trim($lang['ENCODING']); ! $drop_header .= '[\r\n]*?' . preg_quote($match[1], '#'); } else *************** *** 262,266 **** // remove trailing spacer and add start and end delimiters ! $str = preg_replace('#' . phpbb_preg_quote($spacer, '#') . '$#', '', $str); return $start . $str . $end; --- 262,266 ---- // remove trailing spacer and add start and end delimiters ! $str = preg_replace('#' . preg_quote($spacer, '#') . '$#', '', $str); return $start . $str . $end; Index: sessions.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/sessions.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sessions.php 19 Jul 2005 23:31:24 -0000 1.8 --- sessions.php 31 Oct 2005 03:18:41 -0000 1.9 *************** *** 57,127 **** $last_visit = 0; $current_time = time(); ! $expiry_time = $current_time - $board_config['session_length']; // ! // Try and pull the last time stored in a cookie, if it exists // ! $sql = "SELECT * ! FROM " . USERS_TABLE . " ! WHERE user_id = $user_id"; ! if ( !($result = $db->sql_query($sql)) ) { ! message_die(CRITICAL_ERROR, 'Could not obtain lastvisit data from user table', '', __LINE__, __FILE__, $sql); } ! $userdata = $db->sql_fetchrow($result); ! if ( $user_id != ANONYMOUS ) { ! $auto_login_key = $userdata['user_password']; ! ! if ( $auto_create ) { ! if ( isset($sessiondata['autologinid']) && $userdata['user_active'] ) { ! // We have to login automagically ! if( $sessiondata['autologinid'] === $auto_login_key ) ! { ! // autologinid matches password ! $login = 1; ! $enable_autologin = 1; ! } ! else ! { ! // No match; don't login, set as anonymous user ! $login = 0; ! $enable_autologin = 0; ! $user_id = $userdata['user_id'] = ANONYMOUS; ! ! $sql = 'SELECT * FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS; ! $result = $db->sql_query($sql); ! $userdata = $db->sql_fetchrow($result); ! $db->sql_freeresult($result); ! } } - else - { - // Autologin is not set. Don't login, set as anonymous user - $login = 0; - $enable_autologin = 0; - $user_id = $userdata['user_id'] = ANONYMOUS; ! $sql = 'SELECT * FROM ' . USERS_TABLE . ' WHERE user_id = ' . ANONYMOUS; ! $result = $db->sql_query($sql); ! $userdata = $db->sql_fetchrow($result); ! $db->sql_freeresult($result); ! } } ! else { $login = 1; } } ! else { ! $login = 0; ! $enable_autologin = 0; } // // Initial ban check against user id, IP and email address --- 57,145 ---- $last_visit = 0; $current_time = time(); ! // ! // Are auto-logins allowed? ! // If allow_autologin is not set or is true then they are ! // (same behaviour as old 2.0.x session code) // ! if (isset($board_config['allow_autologin']) && !$board_config['allow_autologin']) { ! $enable_autologin = $sessiondata['autologinid'] = false; } ! // ! // First off attempt to join with the autologin value if we have one ! // If not, just use the user_id value ! // ! $userdata = array(); ! if ($user_id != ANONYMOUS) { ! if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '' && $user_id) { ! $sql = 'SELECT u.* ! FROM ' . USERS_TABLE . ' u, ' . SESSIONS_KEYS_TABLE . ' k ! WHERE u.user_id = ' . (int) $user_id . " ! AND u.user_active = 1 ! AND k.user_id = u.user_id ! AND k.key_id = '" . md5($sessiondata['autologinid']) . "'"; ! if (!($result = $db->sql_query($sql))) { ! message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql); } ! $userdata = $db->sql_fetchrow($result); ! $db->sql_freeresult($result); ! ! $enable_autologin = $login = 1; } ! else if (!$auto_create) { + $sessiondata['autologinid'] = ''; + $sessiondata['userid'] = $user_id; + + $sql = 'SELECT * + FROM ' . USERS_TABLE . ' + WHERE user_id = ' . (int) $user_id . ' + AND user_active = 1'; + if (!($result = $db->sql_query($sql))) + { + message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql); + } + + $userdata = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + $login = 1; } } ! ! // ! // At this point either $userdata should be populated or ! // one of the below is true ! // * Key didn't match one in the DB ! // * User does not exist ! // * User is inactive ! // ! if (!sizeof($userdata) || !is_array($userdata) || !$userdata) { ! $sessiondata['autologinid'] = ''; ! $sessiondata['userid'] = $user_id = ANONYMOUS; ! $enable_autologin = $login = 0; ! ! $sql = 'SELECT * ! FROM ' . USERS_TABLE . ' ! WHERE user_id = ' . (int) $user_id; ! if (!($result = $db->sql_query($sql))) ! { ! message_die(CRITICAL_ERROR, 'Error doing DB query userdata row fetch', '', __LINE__, __FILE__, $sql); ! } ! ! $userdata = $db->sql_fetchrow($result); ! $db->sql_freeresult($result); } + // // Initial ban check against user id, IP and email address *************** *** 174,178 **** if ( $user_id != ANONYMOUS ) ! {// ( $userdata['user_session_time'] > $expiry_time && $auto_create ) ? $userdata['user_lastvisit'] : ( $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; --- 192,196 ---- if ( $user_id != ANONYMOUS ) ! { $last_visit = ( $userdata['user_session_time'] > 0 ) ? $userdata['user_session_time'] : $current_time; *************** *** 189,193 **** $userdata['user_lastvisit'] = $last_visit; ! $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologinid']; $sessiondata['userid'] = $user_id; } --- 207,245 ---- $userdata['user_lastvisit'] = $last_visit; ! // ! // Regenerate the auto-login key ! // ! if ($enable_autologin) ! { ! list($sec, $usec) = explode(' ', microtime()); ! mt_srand(hexdec(substr($session_id, 0, 8)) + (float) $sec + ((float) $usec * 1000000)); ! $auto_login_key = uniqid(mt_rand(), true); ! ! if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '') ! { ! $sql = 'UPDATE ' . SESSIONS_KEYS_TABLE . " ! SET last_ip = '$user_ip', key_id = '" . md5($auto_login_key) . "', last_login = $current_time ! WHERE key_id = '" . md5($sessiondata['autologinid']) . "'"; ! } ! else ! { ! $sql = 'INSERT INTO ' . SESSIONS_KEYS_TABLE . "(key_id, user_id, last_ip, last_login) ! VALUES ('" . md5($auto_login_key) . "', $user_id, '$user_ip', $current_time)"; ! } ! ! if ( !$db->sql_query($sql) ) ! { ! message_die(CRITICAL_ERROR, 'Error updating session key', '', __LINE__, __FILE__, $sql); ! } ! ! $sessiondata['autologinid'] = $auto_login_key; ! unset($auto_login_key); ! } ! else ! { ! $sessiondata['autologinid'] = ''; ! } ! ! // $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologinid']; $sessiondata['userid'] = $user_id; } *************** *** 201,204 **** --- 253,257 ---- $userdata['session_time'] = $current_time; $userdata['session_admin'] = $admin; + $userdata['session_key'] = $sessiondata['autologinid']; setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); *************** *** 311,325 **** } ! // ! // Delete expired sessions ! // ! $expiry_time = $current_time - $board_config['session_length']; ! $sql = "DELETE FROM " . SESSIONS_TABLE . " ! WHERE session_time < $expiry_time ! AND session_id <> '$session_id'"; ! if ( !$db->sql_query($sql) ) ! { ! message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql); ! } setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); --- 364,368 ---- } ! session_clean($userdata['session_id']); setcookie($cookiename . '_data', serialize($sessiondata), $current_time + 31536000, $cookiepath, $cookiedomain, $cookiesecure); *************** *** 347,358 **** } ! // ! // session_end closes out a session ! // deleting the corresponding entry ! // in the sessions table ! // function session_end($session_id, $user_id) { ! global $db, $lang, $board_config; global $SID; --- 390,401 ---- } ! /** ! * Terminates the specified session ! * It will delete the entry in the sessions table for this session, ! * remove the corresponding auto-login key and reset the cookies ! */ function session_end($session_id, $user_id) { ! global $db, $lang, $board_config, $userdata; global $SID; *************** *** 364,381 **** $current_time = time(); - // - // Pull cookiedata or grab the URI propagated sid - // - if ( isset($_COOKIE[$cookiename . '_sid']) ) - { - $session_id = isset( $_COOKIE[$cookiename . '_sid'] ) ? $_COOKIE[$cookiename . '_sid'] : ''; - $sessionmethod = SESSION_METHOD_COOKIE; - } - else - { - $session_id = ( isset($_GET['sid']) ) ? $_GET['sid'] : ''; - $sessionmethod = SESSION_METHOD_GET; - } - if (!preg_match('/^[A-Za-z0-9]*$/', $session_id)) { --- 407,410 ---- *************** *** 386,390 **** // Delete existing session // ! $sql = "DELETE FROM " . SESSIONS_TABLE . " WHERE session_id = '$session_id' AND session_user_id = $user_id"; --- 415,419 ---- // Delete existing session // ! $sql = 'DELETE FROM ' . SESSIONS_TABLE . " WHERE session_id = '$session_id' AND session_user_id = $user_id"; *************** *** 394,397 **** --- 423,458 ---- } + // + // Remove this auto-login entry (if applicable) + // + if ( isset($userdata['session_key']) && $userdata['session_key'] != '' ) + { + $autologin_key = md5($userdata['session_key']); + $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' + WHERE user_id = ' . (int) $user_id . " + AND key_id = '$autologin_key'"; + if ( !$db->sql_query($sql) ) + { + message_die(CRITICAL_ERROR, 'Error removing auto-login key', '', __LINE__, __FILE__, $sql); + } + } + + // + // We expect that message_die will be called after this function, + // but just in case it isn't, reset $userdata to the details for a guest + // + $sql = 'SELECT * + FROM ' . USERS_TABLE . ' + WHERE user_id = ' . ANONYMOUS; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql); + } + if ( !($userdata = $db->sql_fetchrow($result)) ) + { + message_die(CRITICAL_ERROR, 'Error obtaining user details', '', __LINE__, __FILE__, $sql); + } + $db->sql_freeresult($result); + setcookie($cookiename . '_data', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure); setcookie($cookiename . '_sid', '', $current_time - 31536000, $cookiepath, $cookiedomain, $cookiesecure); *************** *** 400,403 **** --- 461,498 ---- } + /** + * Removes expired sessions and auto-login keys from the database + */ + function session_clean($session_id) + { + global $board_config, $db; + + // + // Delete expired sessions + // + $sql = 'DELETE FROM ' . SESSIONS_TABLE . ' + WHERE session_time < ' . (time() - (int) $board_config['session_length']) . " + AND session_id <> '$session_id'"; + if ( !$db->sql_query($sql) ) + { + message_die(CRITICAL_ERROR, 'Error clearing sessions table', '', __LINE__, __FILE__, $sql); + } + + // + // Delete expired auto-login keys + // If max_autologin_time is not set then keys will never be deleted + // (same behaviour as old 2.0.x session code) + // + if (!empty($board_config['max_autologin_time']) && $board_config['max_autologin_time'] > 0) + { + $sql = 'DELETE FROM ' . SESSIONS_KEYS_TABLE . ' + WHERE last_login < ' . (time() - (86400 * (int) $board_config['max_autologin_time'])); + $db->sql_query($sql); + } + + return true; + } + + // // Append $SID to a url. Borrowed from phplib and modified. This is an *************** *** 412,416 **** if ( !empty($SID) && !preg_match('#sid=#', $url) ) { ! $url .= ( ( strpos($url, '?') != false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID; } --- 507,511 ---- if ( !empty($SID) && !preg_match('#sid=#', $url) ) { ! $url .= ( ( strpos($url, '?') !== false ) ? ( ( $non_html_amp ) ? '&' : '&' ) : '?' ) . $SID; } Index: functions_search.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions_search.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_search.php 21 Feb 2005 16:09:12 -0000 1.3 --- functions_search.php 31 Oct 2005 03:18:41 -0000 1.4 *************** *** 90,94 **** } ! function split_words(&$entry, $mode = 'post') { // If you experience problems with the new method, uncomment this block. --- 90,94 ---- } ! function split_words($entry, $mode = 'post') { // If you experience problems with the new method, uncomment this block. Index: usercp_activate.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_activate.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** usercp_activate.php 19 Jul 2005 23:31:25 -0000 1.3 --- usercp_activate.php 31 Oct 2005 03:18:41 -0000 1.4 *************** *** 48,54 **** else if ((trim($row['user_actkey']) == trim($_GET['act_key'])) && (trim($row['user_actkey']) != '')) { ! if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $userdata['user_level'] != ADMIN) ! { ! message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); } --- 48,61 ---- else if ((trim($row['user_actkey']) == trim($_GET['act_key'])) && (trim($row['user_actkey']) != '')) { ! if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $row['user_newpasswd'] == '') ! { ! if (!$userdata['session_logged_in']) ! { ! redirect(append_sid('login.' . $phpEx . '?redirect=profile.' . $phpEx . '&mode=activate&' . POST_USERS_URL . '=' . $row['user_id'] . '&act_key=' . trim($_GET['act_key']))); ! } ! else if ($userdata['user_level'] != ADMIN) ! { ! message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); ! } } Index: page_header.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/page_header.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** page_header.php 8 May 2005 02:12:44 -0000 1.5 --- page_header.php 31 Oct 2005 03:18:41 -0000 1.6 *************** *** 451,454 **** --- 451,462 ---- { $template->assign_block_vars('switch_user_logged_out', array()); + // + // Allow autologin? + // + if (!isset($board_config['allow_autologin']) || $board_config['allow_autologin'] ) + { + $template->assign_block_vars('switch_allow_autologin', array()); + $template->assign_block_vars('switch_user_logged_out.switch_allow_autologin', array()); + } } else Index: bbcode.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/bbcode.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bbcode.php 19 Jul 2005 23:31:24 -0000 1.4 --- bbcode.php 31 Oct 2005 03:18:41 -0000 1.5 *************** *** 197,208 **** // [img]image_url_here[/img] code.. // This one gets first-passed.. ! $patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['img']; // matches a [url]xxxx://www.phpbb.com[/url] code.. ! $patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url1']; // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). $patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; --- 197,212 ---- // [img]image_url_here[/img] code.. // This one gets first-passed.. ! $patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i"; $replacements[] = $bbcode_tpl['img']; // matches a [url]xxxx://www.phpbb.com[/url] code.. ! $patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url1']; // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). + $patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is"; + $replacements[] = $bbcode_tpl['url2']; + + // [url=xxxx://www.phpbb.com]phpBB[/url] code.. $patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; *************** *** 210,217 **** // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). $patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url3']; ! ! // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i"; // [email]us...@do...d[/email] code.. --- 214,218 ---- // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). $patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url4']; // [email]us...@do...d[/email] code.. *************** *** 432,436 **** // Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right. $match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index); ! bbcode_array_push($stack, $match); // // Rather than just increment $curr_pos --- 433,437 ---- // Push its position, the text we matched, and its index in the open_tag array on to the stack, and then keep going to the right. $match = array("pos" => $curr_pos, "tag" => $which_start_tag, "index" => $start_tag_index); ! array_push($stack, $match); // // Rather than just increment $curr_pos *************** *** 454,458 **** $curr_nesting_depth = sizeof($stack); // We need to do 2 replacements now. ! $match = bbcode_array_pop($stack); $start_index = $match['pos']; $start_tag = $match['tag']; --- 455,459 ---- $curr_nesting_depth = sizeof($stack); // We need to do 2 replacements now. ! $match = array_pop($stack); $start_index = $match['pos']; $start_tag = $match['tag']; *************** *** 520,524 **** if (sizeof($stack) > 0) { ! $match = bbcode_array_pop($stack); $curr_pos = $match['pos']; // bbcode_array_push($stack, $match); --- 521,525 ---- if (sizeof($stack) > 0) { ! $match = array_pop($stack); $curr_pos = $match['pos']; // bbcode_array_push($stack, $match); *************** *** 624,628 **** // xxxx can only be alpha characters. // yyyy is anything up to the first space, newline, comma, double quote or < ! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing --- 625,629 ---- // xxxx can only be alpha characters. // yyyy is anything up to the first space, newline, comma, double quote or < ! $ret = preg_replace("#(^|[\n ])([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret); // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing *************** *** 630,638 **** // zzzz is optional.. will contain everything up to the first space, newline, // comma, double quote or <. ! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); // matches an email@domain type address at the start of a line, or after a space. // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". ! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); // Remove our padding.. --- 631,639 ---- // zzzz is optional.. will contain everything up to the first space, newline, // comma, double quote or <. ! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); // matches an email@domain type address at the start of a line, or after a space. // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". ! $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret); // Remove our padding.. *************** *** 700,703 **** --- 701,705 ---- * however, to keep phpBB compatable with PHP 3 we had to come up with our own * method of doing it. + * This function was deprecated in phpBB 2.0.18 */ function bbcode_array_push(&$stack, $value) *************** *** 711,714 **** --- 713,717 ---- * however, to keep phpBB compatable with PHP 3 we had to come up with our own * method of doing it. + * This function was deprecated in phpBB 2.0.18 */ function bbcode_array_pop(&$stack) *************** *** 761,765 **** for ($i = 0; $i < count($smilies); $i++) { ! $orig[] = "/(?<=.\W|\W.|^\W)" . phpbb_preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/"; $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />'; } --- 764,768 ---- for ($i = 0; $i < count($smilies); $i++) { ! $orig[] = "/(?<=.\W|\W.|^\W)" . preg_quote($smilies[$i]['code'], "/") . "(?=.\W|\W.|\W$)/"; $repl[] = '<img src="'. $board_config['smilies_path'] . '/' . $smilies[$i]['smile_url'] . '" alt="' . $smilies[$i]['emoticon'] . '" border="0" />'; } Index: constants.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/constants.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** constants.php 20 Nov 2004 01:01:10 -0000 1.2 --- constants.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 168,171 **** --- 168,172 ---- define('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch'); define('SESSIONS_TABLE', $table_prefix.'sessions'); + define('SESSIONS_KEYS_TABLE', $table_prefix.'sessions_keys'); define('SMILIES_TABLE', $table_prefix.'smilies'); define('THEMES_TABLE', $table_prefix.'themes'); |
From: Josh <jel...@us...> - 2005-10-31 03:18:50
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30886/templates/subSilver Modified Files: bbcode.tpl groupcp_info_body.tpl index_body.tpl login_body.tpl overall_header.tpl profile_add_body.tpl search_body.tpl search_results_posts.tpl subSilver.cfg Log Message: 2.0.18 Index: search_results_posts.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/search_results_posts.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** search_results_posts.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- search_results_posts.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 19,23 **** <!-- BEGIN searchresults --> <tr> ! <td class="catHead" colspan="2" height="28"><span class="topictitle"><img src="templates/subSilver/images/folder.gif" align="absmiddle"> {L_TOPIC}: <a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td> </tr> <tr> --- 19,23 ---- <!-- BEGIN searchresults --> <tr> ! <td class="catHead" colspan="2" height="28"><span class="topictitle"><img src="templates/subSilver/images/folder.gif" align="absmiddle" /> {L_TOPIC}: <a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td> </tr> <tr> Index: subSilver.cfg =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/subSilver.cfg,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** subSilver.cfg 29 Jul 2004 22:36:22 -0000 1.1 --- subSilver.cfg 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 78,82 **** $images['pm_no_new_msg'] = ""; ! $images['topic_watch'] = ""; $images['topic_un_watch'] = ""; $images['topic_mod_lock'] = "$current_template_images/topic_lock.gif"; --- 78,82 ---- $images['pm_no_new_msg'] = ""; ! $images['Topic_watch'] = ""; $images['topic_un_watch'] = ""; $images['topic_mod_lock'] = "$current_template_images/topic_lock.gif"; Index: groupcp_info_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/groupcp_info_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** groupcp_info_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- groupcp_info_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 34,38 **** <tr> <td class="row1" width="20%"><span class="gen">{L_GROUP_TYPE}:</span></td> ! <td class="row2"><span class="gen"><span class="gen"><input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} <input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} <input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} /> {L_GROUP_HIDDEN} <input class="mainoption" type="submit" name="groupstatus" value="{L_UPDATE}" /></span></td> </tr> <!-- END switch_mod_option --> --- 34,38 ---- <tr> <td class="row1" width="20%"><span class="gen">{L_GROUP_TYPE}:</span></td> ! <td class="row2"><span class="gen"><input type="radio" name="group_type" value="{S_GROUP_OPEN_TYPE}" {S_GROUP_OPEN_CHECKED} /> {L_GROUP_OPEN} <input type="radio" name="group_type" value="{S_GROUP_CLOSED_TYPE}" {S_GROUP_CLOSED_CHECKED} /> {L_GROUP_CLOSED} <input type="radio" name="group_type" value="{S_GROUP_HIDDEN_TYPE}" {S_GROUP_HIDDEN_CHECKED} /> {L_GROUP_HIDDEN} <input class="mainoption" type="submit" name="groupstatus" value="{L_UPDATE}" /></span></td> </tr> <!-- END switch_mod_option --> *************** *** 100,105 **** <!-- BEGIN switch_mod_option --> <tr> ! <td class="catBottom" colspan="8" align="right"><span class="cattitle"> ! <input type="submit" name="remove" value="{L_REMOVE_SELECTED}" class="mainoption" /> </td> </tr> --- 100,105 ---- <!-- BEGIN switch_mod_option --> <tr> ! <td class="catBottom" colspan="8" align="right"> ! <span class="cattitle"><input type="submit" name="remove" value="{L_REMOVE_SELECTED}" class="mainoption" /> </td> </tr> Index: overall_header.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/overall_header.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** overall_header.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- overall_header.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 233,241 **** <table cellspacing="0" cellpadding="2" border="0"> <tr> ! <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a> <!-- BEGIN switch_user_logged_out --> ! <a href="{U_REGISTER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a></span> <!-- END switch_user_logged_out --> ! </td> </tr> <tr> --- 233,241 ---- <table cellspacing="0" cellpadding="2" border="0"> <tr> ! <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a> <!-- BEGIN switch_user_logged_out --> ! <a href="{U_REGISTER}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_register.gif" width="12" height="13" border="0" alt="{L_REGISTER}" hspace="3" />{L_REGISTER}</a> <!-- END switch_user_logged_out --> ! </span></td> </tr> <tr> Index: search_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/search_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** search_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- search_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 32,36 **** </select></span></td> <td class="row1" align="right"><span class="gen">{L_SORT_BY}: </span></td> ! <td class="row2" valign="middle" nowrap="nowrap"><span class="genmed"><select class="post" name="sort_by">{S_SORT_OPTIONS}</select><br /><input type="radio" name="sort_dir" value="ASC" /> {L_SORT_ASCENDING}<br /><input type="radio" name="sort_dir" value="DESC" checked /> {L_SORT_DESCENDING}</span> </td> </tr> <tr> --- 32,36 ---- </select></span></td> <td class="row1" align="right"><span class="gen">{L_SORT_BY}: </span></td> ! <td class="row2" valign="middle" nowrap="nowrap"><span class="genmed"><select class="post" name="sort_by">{S_SORT_OPTIONS}</select><br /><input type="radio" name="sort_dir" value="ASC" /> {L_SORT_ASCENDING}<br /><input type="radio" name="sort_dir" value="DESC" checked="checked" /> {L_SORT_DESCENDING}</span> </td> </tr> <tr> Index: index_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/index_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- index_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 42,46 **** <table width="100%" cellspacing="0" border="0" align="center" cellpadding="2"> <tr> ! <td align="left"><span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span></td> <td align="right"><span class="gensmall">{S_TIMEZONE}</span></td> </tr> --- 42,50 ---- <table width="100%" cellspacing="0" border="0" align="center" cellpadding="2"> <tr> ! <td align="left"> ! <!-- BEGIN switch_user_logged_in --> ! <span class="gensmall"><a href="{U_MARK_READ}" class="gensmall">{L_MARK_FORUMS_READ}</a></span> ! <!-- END switch_user_logged_in --> ! </td> <td align="right"><span class="gensmall">{S_TIMEZONE}</span></td> </tr> *************** *** 78,83 **** --- 82,89 ---- {L_PASSWORD}: <input class="post" type="password" name="password" size="10" maxlength="32" /> + <!-- BEGIN switch_allow_autologin --> {L_AUTO_LOGIN} <input class="text" type="checkbox" name="autologin" /> + <!-- END switch_allow_autologin --> <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" /> Index: profile_add_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/profile_add_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** profile_add_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- profile_add_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 78,82 **** <td class="row1"><span class="gen">{L_ICQ_NUMBER}:</span></td> <td class="row2"> ! <input type="text" name="icq" class="post"style="width: 100px" size="10" maxlength="15" value="{ICQ}" /> </td> </tr> --- 78,82 ---- <td class="row1"><span class="gen">{L_ICQ_NUMBER}:</span></td> <td class="row2"> ! <input type="text" name="icq" class="post" style="width: 100px" size="10" maxlength="15" value="{ICQ}" /> </td> </tr> *************** *** 84,88 **** <td class="row1"><span class="gen">{L_AIM}:</span></td> <td class="row2"> ! <input type="text" class="post"style="width: 150px" name="aim" size="20" maxlength="255" value="{AIM}" /> </td> </tr> --- 84,88 ---- <td class="row1"><span class="gen">{L_AIM}:</span></td> <td class="row2"> ! <input type="text" class="post" style="width: 150px" name="aim" size="20" maxlength="255" value="{AIM}" /> </td> </tr> *************** *** 90,94 **** <td class="row1"><span class="gen">{L_MESSENGER}:</span></td> <td class="row2"> ! <input type="text" class="post"style="width: 150px" name="msn" size="20" maxlength="255" value="{MSN}" /> </td> </tr> --- 90,94 ---- <td class="row1"><span class="gen">{L_MESSENGER}:</span></td> <td class="row2"> ! <input type="text" class="post" style="width: 150px" name="msn" size="20" maxlength="255" value="{MSN}" /> </td> </tr> *************** *** 96,100 **** <td class="row1"><span class="gen">{L_YAHOO}:</span></td> <td class="row2"> ! <input type="text" class="post"style="width: 150px" name="yim" size="20" maxlength="255" value="{YIM}" /> </td> </tr> --- 96,100 ---- <td class="row1"><span class="gen">{L_YAHOO}:</span></td> <td class="row2"> ! <input type="text" class="post" style="width: 150px" name="yim" size="20" maxlength="255" value="{YIM}" /> </td> </tr> *************** *** 102,106 **** <td class="row1"><span class="gen">{L_WEBSITE}:</span></td> <td class="row2"> ! <input type="text" class="post"style="width: 200px" name="website" size="25" maxlength="255" value="{WEBSITE}" /> </td> </tr> --- 102,106 ---- <td class="row1"><span class="gen">{L_WEBSITE}:</span></td> <td class="row2"> ! <input type="text" class="post" style="width: 200px" name="website" size="25" maxlength="255" value="{WEBSITE}" /> </td> </tr> *************** *** 108,112 **** <td class="row1"><span class="gen">{L_LOCATION}:</span></td> <td class="row2"> ! <input type="text" class="post"style="width: 200px" name="location" size="25" maxlength="100" value="{LOCATION}" /> </td> </tr> --- 108,112 ---- <td class="row1"><span class="gen">{L_LOCATION}:</span></td> <td class="row2"> ! <input type="text" class="post" style="width: 200px" name="location" size="25" maxlength="100" value="{LOCATION}" /> </td> </tr> *************** *** 114,118 **** <td class="row1"><span class="gen">{L_OCCUPATION}:</span></td> <td class="row2"> ! <input type="text" class="post"style="width: 200px" name="occupation" size="25" maxlength="100" value="{OCCUPATION}" /> </td> </tr> --- 114,118 ---- <td class="row1"><span class="gen">{L_OCCUPATION}:</span></td> <td class="row2"> ! <input type="text" class="post" style="width: 200px" name="occupation" size="25" maxlength="100" value="{OCCUPATION}" /> </td> </tr> *************** *** 120,124 **** <td class="row1"><span class="gen">{L_INTERESTS}:</span></td> <td class="row2"> ! <input type="text" class="post"style="width: 200px" name="interests" size="35" maxlength="150" value="{INTERESTS}" /> </td> </tr> --- 120,124 ---- <td class="row1"><span class="gen">{L_INTERESTS}:</span></td> <td class="row2"> ! <input type="text" class="post" style="width: 200px" name="interests" size="35" maxlength="150" value="{INTERESTS}" /> </td> </tr> *************** *** 126,130 **** <td class="row1"><span class="gen">{L_SIGNATURE}:</span><br /><span class="gensmall">{L_SIGNATURE_EXPLAIN}<br /><br />{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td> <td class="row2"> ! <textarea name="signature"style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea> </td> </tr> --- 126,130 ---- <td class="row1"><span class="gen">{L_SIGNATURE}:</span><br /><span class="gensmall">{L_SIGNATURE_EXPLAIN}<br /><br />{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td> <td class="row2"> ! <textarea name="signature" style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea> </td> </tr> Index: login_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/login_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** login_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- login_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 29,35 **** --- 29,37 ---- </td> </tr> + <!-- BEGIN switch_allow_autologin --> <tr align="center"> <td colspan="2"><span class="gen">{L_AUTO_LOGIN}: <input type="checkbox" name="autologin" /></span></td> </tr> + <!-- END switch_allow_autologin --> <tr align="center"> <td colspan="2">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="mainoption" value="{L_LOGIN}" /></td> Index: bbcode.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/bbcode.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bbcode.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- bbcode.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 58,60 **** <!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url --> ! <!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email --> --- 58,60 ---- <!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url --> ! <!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</a><!-- END email --> |
Update of /cvsroot/phpbb-php5mod/phpbb-php5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30886 Modified Files: common.php groupcp.php index.php login.php memberlist.php modcp.php posting.php privmsg.php search.php viewtopic.php Log Message: 2.0.18 Index: login.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/login.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** login.php 8 May 2005 02:12:43 -0000 1.4 --- login.php 31 Oct 2005 03:18:41 -0000 1.5 *************** *** 132,135 **** --- 132,141 ---- else if( ( isset($_GET['logout']) || isset($_POST['logout']) ) && $userdata['session_logged_in'] ) { + // session id check + if ($sid == '' || $sid != $userdata['session_id']) + { + message_die(GENERAL_ERROR, 'Invalid_session'); + } + if( $userdata['session_logged_in'] ) { *************** *** 169,172 **** --- 175,180 ---- ); + $forward_page = ''; + if( isset($_POST['redirect']) || isset($_GET['redirect']) ) { *************** *** 180,184 **** if(count($forward_match) > 1) { - $forward_page = ''; for($i = 1; $i < count($forward_match); $i++) --- 188,191 ---- *************** *** 201,208 **** } } - else - { - $forward_page = ''; - } $username = ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : ''; --- 208,211 ---- *************** *** 211,215 **** $s_hidden_fields .= (isset($_GET['admin'])) ? '<input type="hidden" name="admin" value="1" />' : ''; ! make_jumpbox('viewforum.'.$phpEx, $forum_id); $template->assign_vars(array( 'USERNAME' => $username, --- 214,218 ---- $s_hidden_fields .= (isset($_GET['admin'])) ? '<input type="hidden" name="admin" value="1" />' : ''; ! make_jumpbox('viewforum.'.$phpEx); $template->assign_vars(array( 'USERNAME' => $username, *************** *** 218,221 **** --- 221,225 ---- 'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"), + 'L_SEND_PASSWORD' => $lang['Forgotten_password'], 'S_HIDDEN_FIELDS' => $s_hidden_fields) Index: search.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/search.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** search.php 16 Apr 2005 21:02:23 -0000 1.4 --- search.php 31 Oct 2005 03:18:41 -0000 1.5 *************** *** 258,263 **** $split_search = array(); ! $split_search = ( !strstr($multibyte_charset, $lang['ENCODING']) ) ? split_words(clean_words('search', stripslashes($search_keywords), $stopword_array, $synonym_array), 'search') : split(' ', $search_keywords); ! $search_msg_only = ( !$search_fields ) ? "AND m.title_match = 0" : ( ( strstr($multibyte_charset, $lang['ENCODING']) ) ? '' : '' ); --- 258,264 ---- $split_search = array(); ! $stripped_keywords = stripslashes($search_keywords); ! $split_search = ( !strstr($multibyte_charset, $lang['ENCODING']) ) ? split_words(clean_words('search', $stripped_keywords, $stopword_array, $synonym_array), 'search') : split(' ', $search_keywords); ! unset($stripped_keywords); $search_msg_only = ( !$search_fields ) ? "AND m.title_match = 0" : ( ( strstr($multibyte_charset, $lang['ENCODING']) ) ? '' : '' ); *************** *** 1302,1306 **** FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f WHERE f.cat_id = c.cat_id ! ORDER BY c.cat_id, f.forum_order"; $result = $db->sql_query($sql); if ( !$result ) --- 1303,1307 ---- FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f WHERE f.cat_id = c.cat_id ! ORDER BY c.cat_order, f.forum_order"; $result = $db->sql_query($sql); if ( !$result ) Index: index.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 30 Jul 2004 02:12:38 -0000 1.2 --- index.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 184,189 **** // posts made since user last visited // ! if ( $userdata['session_logged_in'] ) { $sql = "SELECT t.forum_id, t.topic_id, p.post_time FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p --- 184,194 ---- // posts made since user last visited // ! if( $userdata['session_logged_in'] ) { + if ($userdata['user_lastvisit'] < (time() - 5184000)) + { + $userdata['user_lastvisit'] = time() - 5184000; + } + $sql = "SELECT t.forum_id, t.topic_id, p.post_time FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p Index: viewtopic.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/viewtopic.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** viewtopic.php 19 Jul 2005 23:31:26 -0000 1.11 --- viewtopic.php 31 Oct 2005 03:18:41 -0000 1.12 *************** *** 48,52 **** $start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0; ! if ( !isset($topic_id) && !isset($post_id) ) { message_die(GENERAL_MESSAGE, 'Topic_post_not_exist'); --- 48,52 ---- $start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0; ! if (!$topic_id && !$post_id) { message_die(GENERAL_MESSAGE, 'Topic_post_not_exist'); *************** *** 115,118 **** --- 115,119 ---- t2.topic_id = $topic_id AND t.forum_id = t2.forum_id + AND t.topic_moved_id = 0 AND t.topic_last_post_id $sql_condition t2.topic_last_post_id ORDER BY t.topic_last_post_id $sql_ordering *************** *** 140,149 **** // page the post is on and the correct display of viewtopic) // ! $join_sql_table = ( empty($post_id) ) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 "; ! $join_sql = ( empty($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 = ( empty($post_id) ) ? '' : ", COUNT(p2.post_id) AS prev_posts"; ! ! $order_sql = ( empty($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, t.topic_last_post_id, 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, t.topic_last_post_id, 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 . " --- 141,150 ---- // page the post is on and the correct display of viewtopic) // ! $join_sql_table = (!$post_id) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 "; ! $join_sql = (!$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 = (!$post_id) ? '' : ", COUNT(p2.post_id) AS prev_posts"; + $order_sql = (!$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, t.topic_last_post_id, 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, t.topic_last_post_id, 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 . " *************** *** 182,187 **** if ( !$userdata['session_logged_in'] ) { ! $redirect = ( isset($post_id) ) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id"; ! $redirect .= ( isset($start) ) ? "&start=$start" : ''; redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true)); } --- 183,188 ---- if ( !$userdata['session_logged_in'] ) { ! $redirect = ($post_id) ? POST_POST_URL . "=$post_id" : POST_TOPIC_URL . "=$topic_id"; ! $redirect .= ($start) ? "&start=$start" : ''; redirect(append_sid("login.$phpEx?redirect=viewtopic.$phpEx&$redirect", true)); } *************** *** 200,204 **** $topic_time = $forum_topic_data['topic_time']; ! if ( !empty($post_id) ) { $start = floor(($forum_topic_data['prev_posts'] - 1) / intval($board_config['posts_per_page'])) * intval($board_config['posts_per_page']); --- 201,205 ---- $topic_time = $forum_topic_data['topic_time']; ! if ($post_id) { $start = floor(($forum_topic_data['prev_posts'] - 1) / intval($board_config['posts_per_page'])) * intval($board_config['posts_per_page']); *************** *** 490,494 **** if (trim($words[$i]) != '') { ! $highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('*', '\w*', phpbb_preg_quote($words[$i], '#')); } } --- 491,495 ---- if (trim($words[$i]) != '') { ! $highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('*', '\w*', preg_quote($words[$i], '#')); } } *************** *** 990,994 **** $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>'; --- 991,995 ---- $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>'; *************** *** 1066,1080 **** // Parse message and/or sig for BBCode if reqd // ! if ( $board_config['allow_bbcode'] ) { ! if ( $user_sig != '' && $user_sig_bbcode_uid != '' ) ! { ! $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $user_sig); ! } ! if ( $bbcode_uid != '' ) ! { ! $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message); ! } } --- 1067,1078 ---- // Parse message and/or sig for BBCode if reqd // ! if ($user_sig != '' && $user_sig_bbcode_uid != '') { ! $user_sig = ($board_config['allow_bbcode']) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:$user_sig_bbcode_uid/si", '', $user_sig); ! } ! if ($bbcode_uid != '') ! { ! $message = ($board_config['allow_bbcode']) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace("/\:$bbcode_uid/si", '', $message); } Index: posting.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/posting.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** posting.php 30 Jul 2004 02:12:38 -0000 1.2 --- posting.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 60,63 **** --- 60,64 ---- $refresh = $preview || $poll_add || $poll_edit || $poll_delete; + $orig_word = $replacement_word = array(); // *************** *** 65,68 **** --- 66,70 ---- // $topic_type = ( !empty($_POST['topictype']) ) ? intval($_POST['topictype']) : POST_NORMAL; + $topic_type = ( in_array($topic_type, array(POST_NORMAL, POST_STICKY, POST_ANNOUNCE)) ) ? $topic_type : POST_NORMAL; // *************** *** 190,194 **** } ! $sql = "SELECT f.*, t.topic_status, t.topic_title FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t WHERE t.topic_id = $topic_id --- 192,196 ---- } ! $sql = "SELECT f.*, t.topic_status, t.topic_title, t.topic_type FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t WHERE t.topic_id = $topic_id *************** *** 205,209 **** } ! $select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : ''; $from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : ''; $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : ''; --- 207,211 ---- } ! $select_sql = ( !$submit ) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : ''; $from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : ''; $where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : ''; *************** *** 314,317 **** --- 316,324 ---- } + if ( $mode == 'newtopic' ) + { + $post_data['topic_type'] = POST_NORMAL; + } + $post_data['first_post'] = ( $mode == 'newtopic' ) ? true : 0; $post_data['last_post'] = false; *************** *** 319,322 **** --- 326,334 ---- $post_data['edit_poll'] = false; } + + if ( $mode == 'poll_delete' && !isset($poll_id) ) + { + message_die(GENERAL_MESSAGE, $lang['No_such_post']); + } } else *************** *** 631,634 **** --- 643,647 ---- { $user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : ''; + $userdata['user_sig_bbcode_uid'] = $post_info['user_sig_bbcode_uid']; } else if ( $mode == 'editpost' ) Index: memberlist.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/memberlist.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** memberlist.php 30 Jul 2004 02:12:38 -0000 1.2 --- memberlist.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 62,66 **** // $mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']); ! $mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten'); $select_sort_mode = '<select name="mode">'; --- 62,66 ---- // $mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']); ! $mode_types = array('joined', 'username', 'location', 'posts', 'email', 'website', 'topten'); $select_sort_mode = '<select name="mode">'; Index: groupcp.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/groupcp.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** groupcp.php 8 May 2005 02:12:43 -0000 1.4 --- groupcp.php 31 Oct 2005 03:18:41 -0000 1.5 *************** *** 100,106 **** $yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : ''; ! $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>'; ! $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>'; return; --- 100,106 ---- $yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : ''; ! $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($row['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $row['username']) . '" title="' . sprintf($lang['Search_user_posts'], $row['username']) . '" border="0" /></a>'; ! $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $row['username']) . '</a>'; return; *************** *** 1219,1222 **** --- 1219,1223 ---- // Load and process templates // + $page_title = $lang['Group_Control_Panel']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); Index: modcp.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/modcp.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** modcp.php 27 Jun 2005 20:16:43 -0000 1.4 --- modcp.php 31 Oct 2005 03:18:41 -0000 1.5 *************** *** 224,228 **** if (!$is_auth['auth_delete']) { ! message_die(MESSAGE, sprintf($lang['Sorry_auth_delete'], $is_auth['auth_delete_type'])); } --- 224,228 ---- if (!$is_auth['auth_delete']) { ! message_die(GENERAL_MESSAGE, sprintf($lang['Sorry_auth_delete'], $is_auth['auth_delete_type'])); } *************** *** 1085,1089 **** 'U_PROFILE' => ($id == ANONYMOUS) ? "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $post_id . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'] : append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$id"), ! 'U_SEARCHPOSTS' => append_sid("search.$phpEx?search_author=" . urlencode($username) . "&showresults=topics")) ); --- 1085,1089 ---- 'U_PROFILE' => ($id == ANONYMOUS) ? "modcp.$phpEx?mode=ip&" . POST_POST_URL . "=" . $post_id . "&" . POST_TOPIC_URL . "=" . $topic_id . "&sid=" . $userdata['session_id'] : append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$id"), ! append_sid("search.$phpEx?search_author=" . (($id == ANONYMOUS) ? 'Anonymous' : urlencode($username)) . "&showresults=topics")) ); Index: privmsg.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/privmsg.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** privmsg.php 19 Jul 2005 23:31:26 -0000 1.6 --- privmsg.php 31 Oct 2005 03:18:41 -0000 1.7 *************** *** 296,300 **** if ( $sent_info = $db->sql_fetchrow($result) ) { ! if ( $sent_info['sent_items'] >= $board_config['max_sentbox_privmsgs'] ) { $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " --- 296,300 ---- if ( $sent_info = $db->sql_fetchrow($result) ) { ! if ($board_config['max_sentbox_privmsgs'] && $sent_info['sent_items'] >= $board_config['max_sentbox_privmsgs']) { $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " *************** *** 538,544 **** $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username_from) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>'; ! $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>'; ! // // Processing of post --- 538,543 ---- $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($username_from) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . sprintf($lang['Search_user_posts'], $username_from) . '" title="' . sprintf($lang['Search_user_posts'], $username_from) . '" border="0" /></a>'; ! $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $username_from) . '</a>'; // // Processing of post *************** *** 912,916 **** if ( $saved_info = $db->sql_fetchrow($result) ) { ! if ( $saved_info['savebox_items'] >= $board_config['max_savebox_privmsgs'] ) { $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " --- 911,915 ---- if ( $saved_info = $db->sql_fetchrow($result) ) { ! if ($board_config['max_savebox_privmsgs'] && $saved_info['savebox_items'] >= $board_config['max_savebox_privmsgs'] ) { $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " *************** *** 1139,1142 **** --- 1138,1163 ---- } + if ($submit && $mode == 'edit') + { + $sql = 'SELECT privmsgs_from_userid + FROM ' . PRIVMSGS_TABLE . ' + WHERE privmsgs_id = ' . (int) $privmsg_id . ' + AND privmsgs_from_userid = ' . $userdata['user_id']; + + if (!($result = $db->sql_query($sql))) + { + message_die(GENERAL_ERROR, "Could not obtain message details", "", __LINE__, __FILE__, $sql); + } + + if (!($row = $db->sql_fetchrow($result))) + { + message_die(GENERAL_MESSAGE, $lang['No_such_post']); + } + $db->sql_freeresult($result); + + unset($row); + } + + if ( $submit ) { *************** *** 1155,1159 **** } ! $to_userdata = $db->sql_fetchrow($result); } else --- 1176,1184 ---- } ! if (!($to_userdata = $db->sql_fetchrow($result))) ! { ! $error = TRUE; ! $error_msg = $lang['No_such_user']; ! } } else *************** *** 1223,1227 **** if ( $inbox_info = $db->sql_fetchrow($result) ) { ! if ( $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs'] ) { $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " --- 1248,1252 ---- if ( $inbox_info = $db->sql_fetchrow($result) ) { ! if ($board_config['max_inbox_privmsgs'] && $inbox_info['inbox_items'] >= $board_config['max_inbox_privmsgs']) { $sql = "SELECT privmsgs_id FROM " . PRIVMSGS_TABLE . " *************** *** 1320,1324 **** $emailer->assign_vars(array( ! 'USERNAME' => $to_username, 'SITENAME' => $board_config['sitename'], 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', --- 1345,1349 ---- $emailer->assign_vars(array( ! 'USERNAME' => stripslashes($to_username), 'SITENAME' => $board_config['sitename'], 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', *************** *** 1424,1429 **** } } ! ! if ( $mode == 'edit' ) { $sql = "SELECT pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id, u.user_sig --- 1449,1453 ---- } } ! else if ( $mode == 'edit' ) { $sql = "SELECT pm.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text, u.username, u.user_id, u.user_sig *************** *** 1506,1510 **** else { ! $privmsg_message = $privmsg_subject = ''; } } --- 1530,1534 ---- else { ! $privmsg_subject = $privmsg_message = $to_username = ''; } } *************** *** 1799,1803 **** 'S_SMILIES_CHECKED' => ( !$smilies_on ) ? ' checked="checked"' : '', 'S_SIGNATURE_CHECKED' => ( $attach_sig ) ? ' checked="checked"' : '', - 'S_NAMES_SELECT' => $user_names_select, 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields, 'S_POST_ACTION' => append_sid("privmsg.$phpEx"), --- 1823,1826 ---- Index: common.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/common.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** common.php 22 Feb 2005 01:18:39 -0000 1.5 --- common.php 31 Oct 2005 03:18:41 -0000 1.6 *************** *** 29,33 **** set_magic_quotes_runtime(0); // Disable magic_quotes_runtime ! // The following code (unsetting globals) was contributed to phpBB by Matt Kavanagh // PHP5 with register_long_arrays off? --- 29,34 ---- set_magic_quotes_runtime(0); // Disable magic_quotes_runtime ! // The following code (unsetting globals) ! // Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files // PHP5 with register_long_arrays off? *************** *** 36,40 **** //// for compatibility with MODifications written for php3 & 4 //// end phpBB-php5 developer note ! if (!isset($HTTP_POST_VARS) && isset($_POST)) { $HTTP_POST_VARS = $_POST; --- 37,41 ---- //// for compatibility with MODifications written for php3 & 4 //// end phpBB-php5 developer note ! if (@phpversion() >= '5.0.0' && (!ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { $HTTP_POST_VARS = $_POST; *************** *** 52,58 **** } ! //// phpBB-php5 Developer Note: ! //// This was modified from phpBB's version primarily to remove legacy code. ! //// END phpBB-php5 note if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') { --- 53,68 ---- } ! // Protect against GLOBALS tricks ! if (isset($_REQUEST['GLOBALS'])) ! { ! die("Hacking attempt"); ! } ! ! // Protect against HTTP_SESSION_VARS tricks ! if (isset($_SESSION) && !is_array($_SESSION)) ! { ! die("Hacking attempt"); ! } ! if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on') { *************** *** 62,66 **** // is not an array, it will actually fail. So we check if // HTTP_SESSION_VARS has been initialised. ! if (!isset($_SESSION)) { $_SESSION = array(); --- 72,76 ---- // is not an array, it will actually fail. So we check if // HTTP_SESSION_VARS has been initialised. ! if (!isset($_SESSION) || !is_array($_SESSION)) { $_SESSION = array(); *************** *** 170,174 **** if( !defined("PHPBB_INSTALLED") ) { ! header("Location: install/install.$phpEx"); exit; } --- 180,184 ---- if( !defined("PHPBB_INSTALLED") ) { ! header('Location: ' . $phpbb_root_path . 'install/install.' . $phpEx); exit; } *************** *** 181,184 **** --- 191,198 ---- include($phpbb_root_path . 'includes/db.'.$phpEx); + + // We do not need this any longer, unset for safety purposes + unset($dbpasswd); + // // Obtain and encode users IP |
From: Josh <jel...@us...> - 2005-10-31 03:18:49
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30886/templates/subSilver/admin Modified Files: board_config_body.tpl forum_admin_body.tpl index_frameset.tpl page_header.tpl styles_addnew_body.tpl styles_edit_body.tpl styles_list_body.tpl user_edit_body.tpl Log Message: 2.0.18 Index: styles_addnew_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin/styles_addnew_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** styles_addnew_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- styles_addnew_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 2,6 **** <h1>{L_STYLES_TITLE}</h1> ! <P>{L_STYLES_ADD_TEXT}</p> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> --- 2,6 ---- <h1>{L_STYLES_TITLE}</h1> ! <p>{L_STYLES_ADD_TEXT}</p> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> *************** *** 17,19 **** </tr> <!-- END styles --> ! </table></form> --- 17,19 ---- </tr> <!-- END styles --> ! </table> Index: styles_list_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin/styles_list_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** styles_list_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- styles_list_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 2,6 **** <h1>{L_STYLES_TITLE}</h1> ! <P>{L_STYLES_TEXT}</p> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> --- 2,6 ---- <h1>{L_STYLES_TITLE}</h1> ! <p>{L_STYLES_TEXT}</p> <table cellspacing="1" cellpadding="4" border="0" align="center" class="forumline"> *************** *** 19,21 **** </tr> <!-- END styles --> ! </table></form> --- 19,21 ---- </tr> <!-- END styles --> ! </table> Index: user_edit_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin/user_edit_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** user_edit_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- user_edit_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 237,241 **** <td class="row1"><span class="gen">{L_UPLOAD_AVATAR_URL}</span></td> <td class="row2"> ! <input class="post" type="text" name="avatarurl" size="40" class="post" style="width: 200px" /> </td> </tr> --- 237,241 ---- <td class="row1"><span class="gen">{L_UPLOAD_AVATAR_URL}</span></td> <td class="row2"> ! <input class="post" type="text" name="avatarurl" size="40" style="width: 200px" /> </td> </tr> *************** *** 245,249 **** <td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}</span></td> <td class="row2"> ! <input class="post" type="text" name="avatarremoteurl" size="40" class="post" style="width: 200px" /> </td> </tr> --- 245,249 ---- <td class="row1"><span class="gen">{L_LINK_REMOTE_AVATAR}</span></td> <td class="row2"> ! <input class="post" type="text" name="avatarremoteurl" size="40" style="width: 200px" /> </td> </tr> Index: forum_admin_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin/forum_admin_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** forum_admin_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- forum_admin_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 14,18 **** <td class="cat" align="center" valign="middle"><span class="gen"><a href="{catrow.U_CAT_DELETE}">{L_DELETE}</a></span></td> <td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="gen"><a href="{catrow.U_CAT_MOVE_UP}">{L_MOVE_UP}</a> <a href="{catrow.U_CAT_MOVE_DOWN}">{L_MOVE_DOWN}</a></span></td> ! <td class="catRight" align="center" valign="middle"><span class="gen"> </span></td> </tr> <!-- BEGIN forumrow --> --- 14,18 ---- <td class="cat" align="center" valign="middle"><span class="gen"><a href="{catrow.U_CAT_DELETE}">{L_DELETE}</a></span></td> <td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="gen"><a href="{catrow.U_CAT_MOVE_UP}">{L_MOVE_UP}</a> <a href="{catrow.U_CAT_MOVE_DOWN}">{L_MOVE_DOWN}</a></span></td> ! <td class="catRight" align="center" valign="middle"><span class="gen"> </span></td> </tr> <!-- BEGIN forumrow --> Index: styles_edit_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin/styles_edit_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** styles_edit_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- styles_edit_body.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 22,26 **** </tr> <tr> ! <td class="row1">{L_STYLESHEET}:<br /><span class="gensmall">Filename for CSS stylesheet to use for this theme.</span></td> <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="head_stylesheet" value="{HEAD_STYLESHEET}"></td> <td class="row2"> </td> --- 22,26 ---- </tr> <tr> ! <td class="row1">{L_STYLESHEET}:<br /><span class="gensmall">{L_STYLESHEET_EXPLAIN}</span></td> <td class="row2"><input class="post" type="text" size="25" maxlength="100" name="head_stylesheet" value="{HEAD_STYLESHEET}"></td> <td class="row2"> </td> Index: index_frameset.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin/index_frameset.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index_frameset.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- index_frameset.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 1,3 **** ! <html> <head> <title>phpBB Administration</title> --- 1,3 ---- ! <html dir="{S_CONTENT_DIRECTION}"> <head> <title>phpBB Administration</title> Index: page_header.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin/page_header.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** page_header.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- page_header.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 1,4 **** <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html> <head> {META} --- 1,4 ---- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> ! <html dir="{S_CONTENT_DIRECTION}"> <head> {META} Index: board_config_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/admin/board_config_body.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** board_config_body.tpl 20 Nov 2004 01:01:12 -0000 1.2 --- board_config_body.tpl 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 41,44 **** --- 41,52 ---- </tr> <tr> + <td class="row1">{L_ALLOW_AUTOLOGIN}<br /><span class="gensmall">{L_ALLOW_AUTOLOGIN_EXPLAIN}</span></td> + <td class="row2"><input type="radio" name="allow_autologin" value="1" {ALLOW_AUTOLOGIN_YES} />{L_YES} <input type="radio" name="allow_autologin" value="0" {ALLOW_AUTOLOGIN_NO} />{L_NO}</td> + </tr> + <tr> + <td class="row1">{L_AUTOLOGIN_TIME} <br /><span class="gensmall">{L_AUTOLOGIN_TIME_EXPLAIN}</span></td> + <td class="row2"><input class="post" type="text" size="3" maxlength="4" name="max_autologin_time" value="{AUTOLOGIN_TIME}" /></td> + </tr> + <tr> <td class="row1">{L_BOARD_EMAIL_FORM}<br /><span class="gensmall">{L_BOARD_EMAIL_FORM_EXPLAIN}</span></td> <td class="row2"><input type="radio" name="board_email_form" value="1" {BOARD_EMAIL_FORM_ENABLE} /> {L_ENABLED} <input type="radio" name="board_email_form" value="0" {BOARD_EMAIL_FORM_DISABLE} /> {L_DISABLED}</td> |
From: Josh <jel...@us...> - 2005-10-31 03:18:49
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30886/db Modified Files: mysql.php mysql4.php mysqli.php Log Message: 2.0.18 Index: mysql.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/db/mysql.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql.php 29 Jul 2004 22:36:00 -0000 1.1 --- mysql.php 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 264,268 **** else if($this->row[$query_id]) { ! $result = $this->row[$query_id][$field]; } } --- 264,268 ---- else if($this->row[$query_id]) { ! $result = $this->rowset[$query_id][0][$field]; } } Index: mysql4.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/db/mysql4.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mysql4.php 29 Jul 2004 22:36:00 -0000 1.1 --- mysql4.php 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 272,276 **** if( $this->rowset[$query_id] ) { ! $result = $this->rowset[$query_id][$field]; } else if( $this->row[$query_id] ) --- 272,276 ---- if( $this->rowset[$query_id] ) { ! $result = $this->rowset[$query_id][0][$field]; } else if( $this->row[$query_id] ) Index: mysqli.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/db/mysqli.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mysqli.php 12 May 2005 02:56:08 -0000 1.7 --- mysqli.php 31 Oct 2005 03:18:41 -0000 1.8 *************** *** 281,285 **** if( $this->rowset[$query_id] ) { ! $result = $this->rowset[$query_id][$field]; } else if( $this->row[$query_id] ) --- 281,285 ---- if( $this->rowset[$query_id] ) { ! $result = $this->rowset[$query_id][0][$field]; } else if( $this->row[$query_id] ) |
From: Josh <jel...@us...> - 2005-10-31 03:18:49
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30886/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: 2.0.18 Index: lang_main.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/language/lang_english/lang_main.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_main.php 8 May 2005 02:12:44 -0000 1.2 --- lang_main.php 31 Oct 2005 03:18:41 -0000 1.3 *************** *** 275,279 **** $lang['Read_profile'] = 'View user\'s profile'; - $lang['Send_email'] = 'Send e-mail to user'; $lang['Visit_website'] = 'Visit poster\'s website'; $lang['ICQ_status'] = 'ICQ Status'; --- 275,278 ---- *************** *** 368,372 **** $lang['Attach_signature'] = 'Attach signature (signatures can be changed in profile)'; $lang['Notify'] = 'Notify me when a reply is posted'; - $lang['Delete_post'] = 'Delete this post'; $lang['Stored'] = 'Your message has been entered successfully.'; --- 367,370 ---- *************** *** 528,535 **** $lang['Contact'] = 'Contact'; $lang['Email_address'] = 'E-mail address'; - $lang['Email'] = 'E-mail'; $lang['Send_private_message'] = 'Send private message'; $lang['Hidden_email'] = '[ Hidden ]'; - $lang['Search_user_posts'] = 'Search for posts by this user'; $lang['Interests'] = 'Interests'; $lang['Occupation'] = 'Occupation'; --- 526,531 ---- *************** *** 605,609 **** $lang['Current_password_mismatch'] = 'The current password you supplied does not match that stored in the database.'; $lang['Password_long'] = 'Your password must be no more than 32 characters.'; - $lang['Too_many_registers'] = 'You have made too many registration attempts. Please try again later.'; $lang['Username_taken'] = 'Sorry, but this username has already been taken.'; $lang['Username_invalid'] = 'Sorry, but this username contains an invalid character such as \'.'; --- 601,604 ---- Index: lang_admin.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/language/lang_english/lang_admin.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** lang_admin.php 22 Feb 2005 01:21:02 -0000 1.3 --- lang_admin.php 31 Oct 2005 03:18:41 -0000 1.4 *************** *** 336,339 **** --- 336,346 ---- $lang['Visual_confirm_explain'] = 'Requires users enter a code defined by an image when registering.'; + // Autologin Keys - added 2.0.18 + $lang['Allow_autologin'] = 'Allow automatic logins'; + $lang['Allow_autologin_explain'] = 'Determines whether users are allowed to select to be automatically logged in when visiting the forum'; + $lang['Autologin_time'] = 'Automatic login key expiry'; + $lang['Autologin_time_explain'] = 'How long a autologin key is valid for in days if the user does not visit the board. Set to zero to disable expiry.'; + + // // Forum Management *************** *** 622,625 **** --- 629,633 ---- $lang['Stylesheet'] = 'CSS Stylesheet'; + $lang['Stylesheet_explain'] = 'Filename for CSS stylesheet to use for this theme.'; $lang['Background_image'] = 'Background Image'; $lang['Background_color'] = 'Background Colour'; |
From: Josh <jel...@us...> - 2005-10-31 03:18:49
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30886/admin Modified Files: admin_board.php admin_disallow.php admin_smilies.php admin_styles.php admin_ug_auth.php admin_user_ban.php admin_users.php index.php page_footer_admin.php Log Message: 2.0.18 Index: admin_styles.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_styles.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_styles.php 16 Apr 2005 21:02:22 -0000 1.3 --- admin_styles.php 31 Oct 2005 03:18:40 -0000 1.4 *************** *** 583,586 **** --- 583,587 ---- "L_VALUE" => $lang['Value'], "L_STYLESHEET" => $lang['Stylesheet'], + "L_STYLESHEET_EXPLAIN" => $lang['Stylesheet_explain'], "L_BACKGROUND_IMAGE" => $lang['Background_image'], "L_BACKGROUND_COLOR" => $lang['Background_color'], Index: admin_users.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_users.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_users.php 19 Jul 2005 23:31:24 -0000 1.3 --- admin_users.php 31 Oct 2005 03:18:40 -0000 1.4 *************** *** 1,1153 **** ! <?php ! /*************************************************************************** ! * admin_users.php ! * ------------------- ! * begin : Saturday, Feb 13, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... ! * ! * $Id$ ! * [...2279 lines suppressed...] ! ! $template->assign_vars(array( ! 'L_USER_TITLE' => $lang['User_admin'], ! 'L_USER_EXPLAIN' => $lang['User_admin_explain'], ! 'L_USER_SELECT' => $lang['Select_a_User'], ! 'L_LOOK_UP' => $lang['Look_up_user'], ! 'L_FIND_USERNAME' => $lang['Find_username'], ! ! 'U_SEARCH_USER' => append_sid("./../search.$phpEx?mode=searchuser"), ! ! 'S_USER_ACTION' => append_sid("admin_users.$phpEx"), ! 'S_USER_SELECT' => $select_list) ! ); ! $template->pparse('body'); ! ! } ! ! include('./page_footer_admin.'.$phpEx); ! ! ?> Index: index.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 22 Feb 2005 01:21:01 -0000 1.3 --- index.php 31 Oct 2005 03:18:40 -0000 1.4 *************** *** 569,573 **** $errstr = $version_info = ''; ! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr)) { @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); --- 569,573 ---- $errstr = $version_info = ''; ! if ($fsock = @fsockopen('www.phpbb.com', 80, $errno, $errstr, 10)) { @fputs($fsock, "GET /updatecheck/20x.txt HTTP/1.1\r\n"); *************** *** 604,608 **** { $version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; ! $version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_version) . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>'; } } --- 604,608 ---- { $version_info = '<p style="color:red">' . $lang['Version_not_up_to_date']; ! $version_info .= '<br />' . sprintf($lang['Latest_version_info'], $latest_version) . ' ' . sprintf($lang['Current_version_info'], '2' . $board_config['version']) . '</p>'; } } Index: admin_ug_auth.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_ug_auth.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_ug_auth.php 19 Jul 2005 23:31:24 -0000 1.9 --- admin_ug_auth.php 31 Oct 2005 03:18:40 -0000 1.10 *************** *** 255,261 **** } ! $sql = "SELECT * ! FROM " . FORUMS_TABLE . " f ! ORDER BY forum_order"; if ( !($result = $db->sql_query($sql)) ) { --- 255,262 ---- } ! $sql = 'SELECT f.* ! FROM ' . FORUMS_TABLE . ' f, ' . CATEGORIES_TABLE . ' c ! WHERE f.cat_id = c.cat_id ! ORDER BY c.cat_order, f.forum_order'; if ( !($result = $db->sql_query($sql)) ) { *************** *** 601,615 **** $db->sql_freeresult($result); ! for($j = 0; $j < count($forum_auth_fields); $j++) { ! $forum_access[$i][$forum_auth_fields[$j]] . ' :: '; ! if ( $forum_access[$i][$forum_auth_fields[$j]] == AUTH_ACL ) { ! $forum_auth_level[$forum_id] = AUTH_ACL; ! $forum_auth_level_fields[$forum_id][] = $forum_auth_fields[$j]; } } - $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE "; $sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id"; --- 602,620 ---- $db->sql_freeresult($result); ! foreach ($forum_access as $i => $forum_data) { ! for($j = 0; $j < count($forum_auth_fields); $j++) { ! $forum_access[$i][$forum_auth_fields[$j]] . ' :: '; ! ! if ( $forum_data[$forum_auth_fields[$j]] == AUTH_ACL ) ! { ! $forum_id = $forum_data['forum_id']; ! $forum_auth_level[$forum_id] = AUTH_ACL; ! $forum_auth_level_fields[$forum_id][] = $forum_auth_fields[$j]; ! } } } $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE "; $sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id"; *************** *** 838,844 **** } if( count($name) ) { - $t_usergroup_list = $t_pending_list = ''; for($i = 0; $i < count($ug_info); $i++) { --- 843,849 ---- } + $t_usergroup_list = $t_pending_list = ''; if( count($name) ) { for($i = 0; $i < count($ug_info); $i++) { *************** *** 855,862 **** } } ! else ! { ! $t_usergroup_list = $lang['None']; ! } $s_column_span = 2; // Two columns always present --- 860,866 ---- } } ! ! $t_usergroup_list = ($t_usergroup_list == '') ? $lang['None'] : $t_usergroup_list; ! $t_pending_list = ($t_pending_list == '') ? $lang['None'] : $t_pending_list; $s_column_span = 2; // Two columns always present Index: admin_user_ban.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_user_ban.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_user_ban.php 20 Nov 2004 01:55:26 -0000 1.4 --- admin_user_ban.php 31 Oct 2005 03:18:40 -0000 1.5 *************** *** 156,160 **** // section) // ! if (preg_match('#^(([a-z0-9&.-_+])|(\*))+@[a-z0-9\-]+\.([a-z0-9\-]+\.)*?[a-z]+$#is', trim($email_list_temp[$i]))) { $email_list[] = trim($email_list_temp[$i]); --- 156,160 ---- // section) // ! if (preg_match('/^(([a-z0-9&\'\.\-_\+])|(\*))+@(([a-z0-9\-])|(\*))+\.([a-z0-9\-]+\.)*?[a-z]+$/is', trim($email_list_temp[$i]))) { $email_list[] = trim($email_list_temp[$i]); Index: admin_smilies.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_smilies.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_smilies.php 8 May 2005 02:12:43 -0000 1.3 --- admin_smilies.php 31 Oct 2005 03:18:40 -0000 1.4 *************** *** 1,559 **** ! <?php ! /*************************************************************************** ! * admin_smilies.php ! * ------------------- ! * begin : Thu May 31, 2001 ! * copyright : (C) 2001 The phpBB Group ! * email : su...@ph... ! * ! * $Id$ ! * [...1091 lines suppressed...] ! "CODE" => $smilies[$i]['code'], ! "EMOT" => $smilies[$i]['emoticon'], ! ! "U_SMILEY_EDIT" => append_sid("admin_smilies.$phpEx?mode=edit&id=" . $smilies[$i]['smilies_id']), ! "U_SMILEY_DELETE" => append_sid("admin_smilies.$phpEx?mode=delete&id=" . $smilies[$i]['smilies_id'])) ! ); ! } ! ! // ! // Spit out the page. ! // ! $template->pparse("body"); ! } ! ! // ! // Page Footer ! // ! include('./page_footer_admin.'.$phpEx); ! ! ?> Index: page_footer_admin.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/page_footer_admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** page_footer_admin.php 16 Apr 2005 21:02:22 -0000 1.2 --- page_footer_admin.php 31 Oct 2005 03:18:40 -0000 1.3 *************** *** 26,29 **** --- 26,31 ---- } + global $do_gzip_compress; + // // Show the overall footer. *************** *** 35,39 **** $template->assign_vars(array( 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '', ! 'TRANSLATION_INFO' => $lang['TRANSLATION_INFO']) ); --- 37,41 ---- $template->assign_vars(array( 'PHPBB_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? '2' . $board_config['version'] : '', ! 'TRANSLATION_INFO' => (isset($lang['TRANSLATION_INFO'])) ? $lang['TRANSLATION_INFO'] : ((isset($lang['TRANSLATION'])) ? $lang['TRANSLATION'] : '')) ); Index: admin_disallow.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_disallow.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_disallow.php 30 Jul 2004 02:12:37 -0000 1.2 --- admin_disallow.php 31 Oct 2005 03:18:40 -0000 1.3 *************** *** 46,50 **** if ($disallowed_user == '') { ! message_die(MESSAGE, $lang['Fields_empty']); } if( !validate_username($disallowed_user) ) --- 46,50 ---- if ($disallowed_user == '') { ! message_die(GENERAL_MESSAGE, $lang['Fields_empty']); } if( !validate_username($disallowed_user) ) Index: admin_board.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_board.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_board.php 20 Nov 2004 01:01:05 -0000 1.3 --- admin_board.php 31 Oct 2005 03:18:40 -0000 1.4 *************** *** 101,104 **** --- 101,108 ---- $confirm_no = (!$new['enable_confirm']) ? 'checked="checked"' : ''; + $allow_autologin_yes = ($new['allow_autologin']) ? 'checked="checked"' : ''; + $allow_autologin_no = (!$new['allow_autologin']) ? 'checked="checked"' : ''; + + $board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : ""; $board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : ""; *************** *** 166,169 **** --- 170,177 ---- "L_VISUAL_CONFIRM" => $lang['Visual_confirm'], "L_VISUAL_CONFIRM_EXPLAIN" => $lang['Visual_confirm_explain'], + "L_ALLOW_AUTOLOGIN" => $lang['Allow_autologin'], + "L_ALLOW_AUTOLOGIN_EXPLAIN" => $lang['Allow_autologin_explain'], + "L_AUTOLOGIN_TIME" => $lang['Autologin_time'], + "L_AUTOLOGIN_TIME_EXPLAIN" => $lang['Autologin_time_explain'], "L_COOKIE_SETTINGS" => $lang['Cookie_settings'], "L_COOKIE_SETTINGS_EXPLAIN" => $lang['Cookie_settings_explain'], *************** *** 255,259 **** "CONFIRM_ENABLE" => $confirm_yes, "CONFIRM_DISABLE" => $confirm_no, ! "ACTIVATION_NONE_CHECKED" => $activation_none, "BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes, "BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no, --- 263,269 ---- "CONFIRM_ENABLE" => $confirm_yes, "CONFIRM_DISABLE" => $confirm_no, ! 'ALLOW_AUTOLOGIN_YES' => $allow_autologin_yes, ! 'ALLOW_AUTOLOGIN_NO' => $allow_autologin_no, ! 'AUTOLOGIN_TIME' => (int) $new['max_autologin_time'], "BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes, "BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no, |
From: Josh <jel...@us...> - 2005-10-31 03:18:49
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/language/lang_english/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30886/language/lang_english/email Modified Files: topic_notify.tpl Log Message: 2.0.18 Index: topic_notify.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/language/lang_english/email/topic_notify.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** topic_notify.tpl 29 Jul 2004 22:36:21 -0000 1.1 --- topic_notify.tpl 31 Oct 2005 03:18:41 -0000 1.2 *************** *** 2,6 **** Charset: iso-8859-1 ! Hello {USERNAME}, You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. --- 2,6 ---- Charset: iso-8859-1 ! Hello, You are receiving this email because you are watching the topic, "{TOPIC_TITLE}" at {SITENAME}. This topic has received a reply since your last visit. You can use the following link to view the replies made, no more notifications will be sent until you visit the topic. |
From: Josh <jel...@us...> - 2005-07-19 23:32:05
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21914/admin Modified Files: admin_ug_auth.php admin_users.php Log Message: 2.0.17.5 Index: admin_ug_auth.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_ug_auth.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_ug_auth.php 14 May 2005 17:48:38 -0000 1.8 --- admin_ug_auth.php 19 Jul 2005 23:31:24 -0000 1.9 *************** *** 419,422 **** --- 419,423 ---- WHERE ug.group_id = aa.group_id AND u.user_id = ug.user_id + AND ug.user_pending = 0 AND u.user_level NOT IN (" . MOD . ", " . ADMIN . ") GROUP BY u.user_id *************** *** 584,590 **** // Front end // ! $sql = "SELECT * ! FROM " . FORUMS_TABLE . " f ! ORDER BY forum_order"; if ( !($result = $db->sql_query($sql)) ) { --- 585,592 ---- // Front end // ! $sql = "SELECT f.* ! FROM " . FORUMS_TABLE . " f, " . CATEGORIES_TABLE . " c ! WHERE c.cat_id = f.cat_id ! ORDER BY c.cat_order, f.forum_order"; if ( !($result = $db->sql_query($sql)) ) { *************** *** 610,614 **** ! $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE "; $sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id"; if ( !($result = $db->sql_query($sql)) ) --- 612,616 ---- ! $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE "; $sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id"; if ( !($result = $db->sql_query($sql)) ) *************** *** 838,847 **** if( count($name) ) { ! $t_usergroup_list = ''; for($i = 0; $i < count($ug_info); $i++) { $ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL; ! $t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>'; } } --- 840,856 ---- if( count($name) ) { ! $t_usergroup_list = $t_pending_list = ''; for($i = 0; $i < count($ug_info); $i++) { $ug = ( $mode == 'user' ) ? 'group&' . POST_GROUPS_URL : 'user&' . POST_USERS_URL; ! if (!$ug_info[$i]['user_pending']) ! { ! $t_usergroup_list .= ( ( $t_usergroup_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>'; ! } ! else ! { ! $t_pending_list .= ( ( $t_pending_list != '' ) ? ', ' : '' ) . '<a href="' . append_sid("admin_ug_auth.$phpEx?mode=$ug=" . $id[$i]) . '">' . $name[$i] . '</a>'; ! } } } *************** *** 906,910 **** $template->assign_vars(array( 'USERNAME' => $t_groupname, ! 'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list) ); } --- 915,919 ---- $template->assign_vars(array( 'USERNAME' => $t_groupname, ! 'GROUP_MEMBERSHIP' => $lang['Usergroup_members'] . ' : ' . $t_usergroup_list . '<br />' . $lang['Pending_members'] . ' : ' . $t_pending_list) ); } Index: admin_users.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_users.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_users.php 30 Jul 2004 02:12:37 -0000 1.2 --- admin_users.php 19 Jul 2005 23:31:24 -0000 1.3 *************** *** 87,91 **** $sql = "UPDATE " . POSTS_TABLE . " ! SET poster_id = " . DELETED . ", post_username = '$username' WHERE poster_id = $user_id"; if( !$db->sql_query($sql) ) --- 87,91 ---- $sql = "UPDATE " . POSTS_TABLE . " ! SET poster_id = " . DELETED . ", post_username = '" . str_replace("\\'", "''", addslashes($this_userdata['username'])) . "' WHERE poster_id = $user_id"; if( !$db->sql_query($sql) ) |
From: Josh <jel...@us...> - 2005-07-19 23:31:36
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21914/includes Modified Files: bbcode.php functions.php functions_validate.php sessions.php usercp_activate.php usercp_avatar.php usercp_confirm.php usercp_viewprofile.php Log Message: 2.0.17.5 Index: functions_validate.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions_validate.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_validate.php 29 Jul 2004 22:36:19 -0000 1.1 --- functions_validate.php 19 Jul 2005 23:31:24 -0000 1.2 *************** *** 31,38 **** // Remove doubled up spaces ! $username = preg_replace('#\s+#', ' ', $username); ! // Limit username length ! $username = substr(str_replace("\'", "'", $username), 0, 25); ! $username = str_replace("'", "''", $username); $sql = "SELECT username --- 31,36 ---- // Remove doubled up spaces ! $username = preg_replace('#\s+#', ' ', trim($username)); ! $username = phpbb_clean_username($username); $sql = "SELECT username Index: functions.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions.php 22 Feb 2005 01:21:02 -0000 1.3 --- functions.php 19 Jul 2005 23:31:24 -0000 1.4 *************** *** 92,96 **** global $db; ! if (intval($user) == 0 || $force_str) { $user = phpbb_clean_username($user); --- 92,96 ---- global $db; ! if (!is_numeric($user) || $force_str) { $user = phpbb_clean_username($user); *************** *** 553,557 **** } ! define(HAS_DIED, 1); --- 553,557 ---- } ! define('HAS_DIED', 1); Index: sessions.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/sessions.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** sessions.php 8 May 2005 02:12:44 -0000 1.7 --- sessions.php 19 Jul 2005 23:31:24 -0000 1.8 *************** *** 190,194 **** $userdata['user_lastvisit'] = $last_visit; $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologinid']; ! } --- 190,194 ---- $userdata['user_lastvisit'] = $last_visit; $sessiondata['autologinid'] = (!$admin) ? (( $enable_autologin && $sessionmethod == SESSION_METHOD_COOKIE ) ? $auto_login_key : '') : $sessiondata['autologinid']; ! $sessiondata['userid'] = $user_id; } Index: usercp_activate.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_activate.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** usercp_activate.php 30 Jul 2004 02:12:38 -0000 1.2 --- usercp_activate.php 19 Jul 2005 23:31:25 -0000 1.3 *************** *** 48,51 **** --- 48,56 ---- else if ((trim($row['user_actkey']) == trim($_GET['act_key'])) && (trim($row['user_actkey']) != '')) { + if (intval($board_config['require_activation']) == USER_ACTIVATION_ADMIN && $userdata['user_level'] != ADMIN) + { + message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); + } + $sql_update_pass = ( $row['user_newpasswd'] != '' ) ? ", user_password = '" . str_replace("\'", "''", $row['user_newpasswd']) . "', user_newpasswd = ''" : ''; Index: usercp_confirm.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_confirm.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** usercp_confirm.php 8 May 2005 02:12:44 -0000 1.2 --- usercp_confirm.php 19 Jul 2005 23:31:25 -0000 1.3 *************** *** 34,38 **** // Do we have an id? No, then just exit ! if (empty($_GET_['id'])) { exit; --- 34,38 ---- // Do we have an id? No, then just exit ! if (empty($_GET['id'])) { exit; Index: usercp_viewprofile.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_viewprofile.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** usercp_viewprofile.php 8 May 2005 02:12:44 -0000 1.4 --- usercp_viewprofile.php 19 Jul 2005 23:31:25 -0000 1.5 *************** *** 166,171 **** $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>'; ! $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>'; // --- 166,171 ---- $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '" border="0" /></a>'; ! $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>'; // Index: bbcode.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/bbcode.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bbcode.php 27 Jun 2005 20:16:37 -0000 1.3 --- bbcode.php 19 Jul 2005 23:31:24 -0000 1.4 *************** *** 197,213 **** // [img]image_url_here[/img] code.. // This one gets first-passed.. ! $patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#si"; $replacements[] = $bbcode_tpl['img']; // matches a [url]xxxx://www.phpbb.com[/url] code.. ! $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url1']; // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; --- 197,213 ---- // [img]image_url_here[/img] code.. // This one gets first-passed.. ! $patterns[] = "#\[url\]([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['img']; // matches a [url]xxxx://www.phpbb.com[/url] code.. ! $patterns[] = "#\[url\]((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url1']; // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=([\w]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; *************** *** 624,628 **** // xxxx can only be alpha characters. // yyyy is anything up to the first space, newline, comma, double quote or < ! $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret); // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing --- 624,628 ---- // xxxx can only be alpha characters. // yyyy is anything up to the first space, newline, comma, double quote or < ! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing *************** *** 634,638 **** // matches an email@domain type address at the start of a line, or after a space. // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". ! $ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret); // Remove our padding.. --- 634,638 ---- // matches an email@domain type address at the start of a line, or after a space. // Note: Only the followed chars are valid; alphanums, "-", "_" and or ".". ! $ret = preg_replace("#(^|[\n ])((www|ftp)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret); // Remove our padding.. Index: usercp_avatar.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_avatar.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** usercp_avatar.php 27 Jun 2005 20:16:39 -0000 1.4 --- usercp_avatar.php 19 Jul 2005 23:31:25 -0000 1.5 *************** *** 87,90 **** --- 87,92 ---- function user_avatar_url($mode, &$error, &$error_msg, $avatar_filename) { + global $lang; + if ( !preg_match('#^(http)|(ftp):\/\/#i', $avatar_filename) ) { |
From: Josh <jel...@us...> - 2005-07-19 23:31:36
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21914 Modified Files: privmsg.php viewtopic.php Log Message: 2.0.17.5 Index: privmsg.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/privmsg.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** privmsg.php 8 May 2005 02:12:43 -0000 1.5 --- privmsg.php 19 Jul 2005 23:31:26 -0000 1.6 *************** *** 699,743 **** else if ( $confirm ) { ! if ( $delete_all ) { ! switch($folder) { ! case 'inbox': ! $delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )"; ! break; ! case 'outbox': ! $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )"; ! break; ! case 'sentbox': ! $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL; ! break; ! case 'savebox': ! $delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " ! AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) ! OR ( privmsgs_to_userid = " . $userdata['user_id'] . " ! AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )"; ! break; ! } ! $sql = "SELECT privmsgs_id ! FROM " . PRIVMSGS_TABLE . " ! WHERE $delete_type"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not obtain id list to delete all messages', '', __LINE__, __FILE__, $sql); ! } ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $mark_list[] = $row['privmsgs_id']; ! } ! unset($delete_type); } if ( count($mark_list) ) { --- 699,753 ---- else if ( $confirm ) { ! $delete_sql_id = ''; ! ! if (!$delete_all) { ! for ($i = 0; $i < count($mark_list); $i++) { ! $delete_sql_id .= (($delete_sql_id != '') ? ', ' : '') . intval($mark_list[$i]); ! } ! $delete_sql_id = "AND privmsgs_id IN ($delete_sql_id)"; ! } ! ! switch($folder) ! { ! case 'inbox': ! $delete_type = "privmsgs_to_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_READ_MAIL . " OR privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )"; ! break; ! case 'outbox': ! $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND ( privmsgs_type = " . PRIVMSGS_NEW_MAIL . " OR privmsgs_type = " . PRIVMSGS_UNREAD_MAIL . " )"; ! break; ! case 'sentbox': ! $delete_type = "privmsgs_from_userid = " . $userdata['user_id'] . " AND privmsgs_type = " . PRIVMSGS_SENT_MAIL; ! break; ! case 'savebox': ! $delete_type = "( ( privmsgs_from_userid = " . $userdata['user_id'] . " ! AND privmsgs_type = " . PRIVMSGS_SAVED_OUT_MAIL . " ) ! OR ( privmsgs_to_userid = " . $userdata['user_id'] . " ! AND privmsgs_type = " . PRIVMSGS_SAVED_IN_MAIL . " ) )"; ! break; ! } ! $sql = "SELECT privmsgs_id ! FROM " . PRIVMSGS_TABLE . " ! WHERE $delete_type $delete_sql_id"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not obtain id list to delete messages', '', __LINE__, __FILE__, $sql); ! } ! $mark_list = array(); ! while ( $row = $db->sql_fetchrow($result) ) ! { ! $mark_list[] = $row['privmsgs_id']; } + unset($delete_type); + if ( count($mark_list) ) { *************** *** 1494,1497 **** --- 1504,1511 ---- } } + else + { + $privmsg_message = $privmsg_subject = ''; + } } *************** *** 2020,2023 **** --- 2034,2041 ---- } } + else + { + $inbox_limit_img_length = $inbox_limit_pct = $l_box_size_status = ''; + } // Index: viewtopic.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/viewtopic.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** viewtopic.php 27 Jun 2005 20:16:44 -0000 1.10 --- viewtopic.php 19 Jul 2005 23:31:26 -0000 1.11 *************** *** 990,995 **** $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>'; ! $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>'; if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] ) --- 990,995 ---- $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($postrow[$i]['username']) . "&showresults=posts"); ! $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '" border="0" /></a>'; ! $search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $postrow[$i]['username']) . '</a>'; if ( ( $userdata['user_id'] == $poster_id && $is_auth['auth_edit'] ) || $is_auth['auth_mod'] ) |
From: Josh <jel...@us...> - 2005-07-19 23:31:36
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21914/templates/subSilver Modified Files: faq_body.tpl Log Message: 2.0.17.5 Index: faq_body.tpl =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/templates/subSilver/faq_body.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** faq_body.tpl 29 Jul 2004 22:36:22 -0000 1.1 --- faq_body.tpl 19 Jul 2005 23:31:26 -0000 1.2 *************** *** 35,39 **** <!-- BEGIN faq_row --> <tr> ! <td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#Top">{L_BACK_TO_TOP}</a></span></td> </tr> <tr> --- 35,39 ---- <!-- BEGIN faq_row --> <tr> ! <td class="{faq_block.faq_row.ROW_CLASS}" align="left" valign="top"><span class="postbody"><a name="{faq_block.faq_row.U_FAQ_ID}"></a><b>{faq_block.faq_row.FAQ_QUESTION}</b></span><br /><span class="postbody">{faq_block.faq_row.FAQ_ANSWER}<br /><a class="postlink" href="#top">{L_BACK_TO_TOP}</a></span></td> </tr> <tr> |
From: Josh <jel...@us...> - 2005-07-19 23:15:05
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18191/install/schemas Modified Files: mssql_basic.sql mysql_basic.sql postgres_basic.sql Log Message: 2.0.17.5 Index: mysql_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/mysql_basic.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mysql_basic.sql 27 Jun 2005 20:34:45 -0000 1.7 --- mysql_basic.sql 19 Jul 2005 23:14:52 -0000 1.8 *************** *** 63,68 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.16.4'); --- 63,68 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.17.5'); Index: mssql_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/mssql_basic.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** mssql_basic.sql 27 Jun 2005 20:34:39 -0000 1.7 --- mssql_basic.sql 19 Jul 2005 23:14:52 -0000 1.8 *************** *** 70,75 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.16.4'); /* --- 70,75 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.17.5'); /* Index: postgres_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/postgres_basic.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** postgres_basic.sql 27 Jun 2005 20:34:47 -0000 1.7 --- postgres_basic.sql 19 Jul 2005 23:14:52 -0000 1.8 *************** *** 64,69 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.16.4'); -- Categories --- 64,69 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.17'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.17.5'); -- Categories |
From: Josh <jel...@us...> - 2005-07-19 23:15:05
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18191/install Added Files: update_to_20175.php Log Message: 2.0.17.5 --- NEW FILE: update_to_20175.php --- <?php /*************************************************************************** * update_to_20xy.php * ------------------- * begin : Friday, Nov. * copyright : (C) 2005 phpBB-php5 * email : n/a * * $Id: update_to_20175.php,v 1.1 2005/07/19 23:14:52 jelly_doughnut Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // This script is basically phpBB's update_to_20x.php // Except it doesn't have information to upgrade from ancient versions. function _sql($sql, &$errored, &$error_ary, $echo_dot = true) { global $db; if (!($result = $db->sql_query($sql))) { $errored = true; $error_ary['sql'][] = (is_array($sql)) ? $sql[$i] : $sql; $error_ary['error_code'][] = $db->sql_error(); } if ($echo_dot) { echo ". \n"; flush(); } return $result; } @set_time_limit(120); define('IN_PHPBB', 1); $phpbb_root_path = './../'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); if(!isset($dbms)) { die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update."); } include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/functions.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); include($phpbb_root_path . 'includes/functions_search.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); // // // $updates_to_version = ".0.17"; $update_php5mod_version = ".0.17.5"; // // // ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"> <!-- font,th,td,p,body { font-family: "Courier New", courier; font-size: 11pt } a:link,a:active,a:visited { color : #006699; } a:hover { text-decoration: underline; color : #DD6900;} hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;} .maintitle,h1,h2 {font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000;} .ok {color:green} /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ @import url("../templates/subSilver/formIE.css"); --> </style> </head> <body bgcolor="#FFFFFF" text="#000000" link="#006699" vlink="#5584AA"> <table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td> <td align="center" width="100%" valign="middle"><span class="maintitle">Updating to latest stable release</span></td> </tr> </table></td> </tr> </table> <br clear="all" /> <h2>Information</h2> <?php echo '<p>Database type :: <b>' . SQL_LAYER . '</b><br />'; $sql = "SELECT config_value FROM " . CONFIG_TABLE . " WHERE config_name = 'version'"; if (!($result = $db->sql_query($sql))) { die("Couldn't obtain version info"); } $row = $db->sql_fetchrow($result); $sql = array(); echo 'Previous version :: <b>2' . $row['config_value'] . '</b><br />'; echo 'Updated version :: <b>2' . $updates_to_version . '</b></p>' ."\n"; echo "<h2>Updating database schema</h2>\n"; echo "<p>Progress :: <b>"; flush(); // // Data updates // unset($sql); $error_ary = array(); $errored = false; echo "<h2>Updating data</h2>\n"; echo "<p>Progress :: <b>"; flush(); if ($row['config_value'] == '.0.14'); { $sql = 'ALTER TABLE ' . SESSIONS_TABLE . ' ADD session_admin int(1)'; _sql($sql, $errored, $error_ary); } else { echo " No updates were required</b></p>\n"; } echo "<h2>Updating version and optimizing tables</h2>\n"; echo "<p>Progress :: <b>"; flush(); // update the version $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$updates_to_version' WHERE config_name = 'version'"; _sql($sql, $errored, $error_ary); $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$update_php5mod_version' WHERE config_name = 'version5'"; _sql($sql, $errored, $error_ary); // Optimize/vacuum analyze the tables where appropriate // this should be done for each version in future along with // the version number update switch (SQL_LAYER) { case 'mysql': case 'mysql4': case 'mysqli': $sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words'; _sql($sql, $errored, $error_ary); break; case 'postgresql': _sql("VACUUM ANALYZE", $errored, $error_ary); break; } echo "</b> <b class=\"ok\">Done</b><br />Result :: \n"; if ($errored) { echo " <b>Some queries failed, the statements and errors are listing below</b>\n<ul>"; for ($i = 0; $i < count($error_ary['sql']); $i++) { echo "<li>Error :: <b>" . $error_ary['error_code'][$i]['message'] . "</b><br />"; echo "SQL :: <b>" . $error_ary['sql'][$i] . "</b><br /><br /></li>"; } echo "</ul>\n<p>This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our development board. See <a href=\"docs\README.html\">README</a> for details on how to obtain advice.</p>\n"; } else { echo "<b>No errors</b>\n"; } echo "<h2>Update completed</h2>\n"; echo "\n<p>You should now visit the General Configuration settings page in the <a href=\"../admin/\">Administration Panel</a> and check the General Configuration of the board. If you updated from versions prior to RC-3 you <b>must</b> update some entries. If you do not do this emails sent from the board will contain incorrect information. Don't forget to delete this file!</p>\n"; ?> <br clear="all" /> </body> </html> |
From: Josh <jel...@us...> - 2005-06-27 20:44:32
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/install In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23161/install Added Files: update_to_20164.php Log Message: Update script --- NEW FILE: update_to_20164.php --- <?php /*************************************************************************** * update_to_20xy.php * ------------------- * begin : Friday, Nov. * copyright : (C) 2005 phpBB-php5 * email : n/a * * $Id: update_to_20164.php,v 1.1 2005/06/27 20:44:16 jelly_doughnut Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // This script is basically phpBB's update_to_20x.php // Except it doesn't have information to upgrade from ancient versions. function _sql($sql, &$errored, &$error_ary, $echo_dot = true) { global $db; if (!($result = $db->sql_query($sql))) { $errored = true; $error_ary['sql'][] = (is_array($sql)) ? $sql[$i] : $sql; $error_ary['error_code'][] = $db->sql_error(); } if ($echo_dot) { echo ". \n"; flush(); } return $result; } @set_time_limit(120); define('IN_PHPBB', 1); $phpbb_root_path = './../'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'config.'.$phpEx); if(!isset($dbms)) { die("Please read: <a href='../docs/INSTALL.html'>INSTALL.html</a> before attempting to update."); } include($phpbb_root_path . 'includes/constants.'.$phpEx); include($phpbb_root_path . 'includes/functions.'.$phpEx); include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); include($phpbb_root_path . 'includes/functions_search.'.$phpEx); include($phpbb_root_path . 'includes/db.'.$phpEx); // // // $updates_to_version = ".0.16"; $update_php5mod_version = ".0.16.4"; // // // ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"> <!-- font,th,td,p,body { font-family: "Courier New", courier; font-size: 11pt } a:link,a:active,a:visited { color : #006699; } a:hover { text-decoration: underline; color : #DD6900;} hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;} .maintitle,h1,h2 {font-weight: bold; font-size: 22px; font-family: "Trebuchet MS",Verdana, Arial, Helvetica, sans-serif; text-decoration: none; line-height : 120%; color : #000000;} .ok {color:green} /* Import the fancy styles for IE only (NS4.x doesn't use the @import function) */ @import url("../templates/subSilver/formIE.css"); --> </style> </head> <body bgcolor="#FFFFFF" text="#000000" link="#006699" vlink="#5584AA"> <table width="100%" border="0" cellspacing="0" cellpadding="10" align="center"> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="../templates/subSilver/images/logo_phpBB.gif" border="0" alt="Forum Home" vspace="1" /></td> <td align="center" width="100%" valign="middle"><span class="maintitle">Updating to latest stable release</span></td> </tr> </table></td> </tr> </table> <br clear="all" /> <h2>Information</h2> <?php echo '<p>Database type :: <b>' . SQL_LAYER . '</b><br />'; $sql = "SELECT config_value FROM " . CONFIG_TABLE . " WHERE config_name = 'version'"; if (!($result = $db->sql_query($sql))) { die("Couldn't obtain version info"); } $row = $db->sql_fetchrow($result); $sql = array(); echo 'Previous version :: <b>2' . $row['config_value'] . '</b><br />'; echo 'Updated version :: <b>2' . $updates_to_version . '</b></p>' ."\n"; echo "<h2>Updating database schema</h2>\n"; echo "<p>Progress :: <b>"; flush(); // // Data updates // unset($sql); $error_ary = array(); $errored = false; echo "<h2>Updating data</h2>\n"; echo "<p>Progress :: <b>"; flush(); $sql = 'ALTER TABLE ' . SESSIONS_TABLE . ' ADD session_admin int(1)'; _sql($sql, $errored, $error_ary); echo " No updates where required</b></p>\n"; echo "<h2>Updating version and optimizing tables</h2>\n"; echo "<p>Progress :: <b>"; flush(); // update the version $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$updates_to_version' WHERE config_name = 'version'"; _sql($sql, $errored, $error_ary); $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '$update_php5mod_version' WHERE config_name = 'version5'"; _sql($sql, $errored, $error_ary); // Optimize/vacuum analyze the tables where appropriate // this should be done for each version in future along with // the version number update switch (SQL_LAYER) { case 'mysql': case 'mysql4': case 'mysqli': $sql = 'OPTIMIZE TABLE ' . $table_prefix . 'auth_access, ' . $table_prefix . 'banlist, ' . $table_prefix . 'categories, ' . $table_prefix . 'config, ' . $table_prefix . 'disallow, ' . $table_prefix . 'forum_prune, ' . $table_prefix . 'forums, ' . $table_prefix . 'groups, ' . $table_prefix . 'posts, ' . $table_prefix . 'posts_text, ' . $table_prefix . 'privmsgs, ' . $table_prefix . 'privmsgs_text, ' . $table_prefix . 'ranks, ' . $table_prefix . 'search_results, ' . $table_prefix . 'search_wordlist, ' . $table_prefix . 'search_wordmatch, ' . $table_prefix . 'smilies, ' . $table_prefix . 'themes, ' . $table_prefix . 'themes_name, ' . $table_prefix . 'topics, ' . $table_prefix . 'topics_watch, ' . $table_prefix . 'user_group, ' . $table_prefix . 'users, ' . $table_prefix . 'vote_desc, ' . $table_prefix . 'vote_results, ' . $table_prefix . 'vote_voters, ' . $table_prefix . 'words'; _sql($sql, $errored, $error_ary); break; case 'postgresql': _sql("VACUUM ANALYZE", $errored, $error_ary); break; } echo "</b> <b class=\"ok\">Done</b><br />Result :: \n"; if ($errored) { echo " <b>Some queries failed, the statements and errors are listing below</b>\n<ul>"; for ($i = 0; $i < count($error_ary['sql']); $i++) { echo "<li>Error :: <b>" . $error_ary['error_code'][$i]['message'] . "</b><br />"; echo "SQL :: <b>" . $error_ary['sql'][$i] . "</b><br /><br /></li>"; } echo "</ul>\n<p>This is probably nothing to worry about, update will continue. Should this fail to complete you may need to seek help at our development board. See <a href=\"docs\README.html\">README</a> for details on how to obtain advice.</p>\n"; } else { echo "<b>No errors</b>\n"; } echo "<h2>Update completed</h2>\n"; echo "\n<p>You should now visit the General Configuration settings page in the <a href=\"../admin/\">Administration Panel</a> and check the General Configuration of the board. If you updated from versions prior to RC-3 you <b>must</b> update some entries. If you do not do this emails sent from the board will contain incorrect information. Don't forget to delete this file!</p>\n"; ?> <br clear="all" /> </body> </html> |
From: Josh <jel...@us...> - 2005-06-27 20:35:43
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18842/install/schemas Modified Files: mssql_basic.sql mysql_basic.sql postgres_basic.sql Log Message: Schemas Index: mysql_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/mysql_basic.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mysql_basic.sql 9 May 2005 00:33:17 -0000 1.6 --- mysql_basic.sql 27 Jun 2005 20:34:45 -0000 1.7 *************** *** 63,68 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.15'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.15.4'); --- 63,68 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.16.4'); Index: mssql_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/mssql_basic.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mssql_basic.sql 9 May 2005 00:33:17 -0000 1.6 --- mssql_basic.sql 27 Jun 2005 20:34:39 -0000 1.7 *************** *** 70,75 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.15'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.15.4'); /* --- 70,75 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.16.4'); /* Index: postgres_basic.sql =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/install/schemas/postgres_basic.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** postgres_basic.sql 9 May 2005 00:33:17 -0000 1.6 --- postgres_basic.sql 27 Jun 2005 20:34:47 -0000 1.7 *************** *** 64,69 **** INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.15'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.15.3'); -- Categories --- 64,69 ---- INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '80'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '/phpBB2/'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '.0.16'); ! INSERT INTO phpbb_config (config_name, config_value) VALUES ('version5', '.0.16.4'); -- Categories |
From: Josh <jel...@us...> - 2005-06-27 20:18:00
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10348/includes Modified Files: bbcode.php usercp_avatar.php usercp_register.php Log Message: 2.0.16.4 Index: usercp_register.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_register.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** usercp_register.php 8 May 2005 02:12:44 -0000 1.5 --- usercp_register.php 27 Jun 2005 20:16:40 -0000 1.6 *************** *** 452,455 **** --- 452,456 ---- $avatar_sql = user_avatar_delete($userdata['user_avatar_type'], $userdata['user_avatar']); } + else if ( ( !empty($user_avatar_upload) || !empty($user_avatar_name) ) && $board_config['allow_avatar_upload'] ) Index: bbcode.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/bbcode.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bbcode.php 8 May 2005 02:12:44 -0000 1.2 --- bbcode.php 27 Jun 2005 20:16:37 -0000 1.3 *************** *** 205,213 **** // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url2']; ! // [url=xxxx://www.phpbb.com]phpBB[/url] code.. ! $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?].*?)\[/url\]#i"; $replacements[] = $bbcode_tpl['url3']; --- 205,213 ---- // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is"; ! $replacements[] = $bbcode_tpl['url3']; ! // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix). ! $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; Index: usercp_avatar.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/includes/usercp_avatar.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** usercp_avatar.php 16 Apr 2005 21:02:23 -0000 1.3 --- usercp_avatar.php 27 Jun 2005 20:16:39 -0000 1.4 *************** *** 200,204 **** } ! if ( $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] ) { $new_filename = uniqid(rand()) . $imgtype; --- 200,204 ---- } ! if ( $width > 0 && $height > 0 && $width <= $board_config['avatar_max_width'] && $height <= $board_config['avatar_max_height'] ) { $new_filename = uniqid(rand()) . $imgtype; |
From: Josh <jel...@us...> - 2005-06-27 20:17:39
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10348 Modified Files: modcp.php viewtopic.php Log Message: 2.0.16.4 Index: modcp.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/modcp.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** modcp.php 16 Apr 2005 21:02:23 -0000 1.3 --- modcp.php 27 Jun 2005 20:16:43 -0000 1.4 *************** *** 465,468 **** --- 465,481 ---- $old_forum_id = $forum_id; + $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . ' + WHERE forum_id = ' . $new_forum_id; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql); + } + + if (!$db->sql_fetchrow($result)) + { + message_die(GENERAL_MESSAGE, 'New forum does not exist'); + } + $db->sql_freeresult($result); + if ( $new_forum_id != $old_forum_id ) { *************** *** 757,760 **** --- 770,786 ---- $new_forum_id = intval($_POST['new_forum_id']); $topic_time = time(); + + $sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . ' + WHERE forum_id = ' . $new_forum_id; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql); + } + + if (!$db->sql_fetchrow($result)) + { + message_die(GENERAL_MESSAGE, 'New forum does not exist'); + } + $db->sql_freeresult($result); $sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type) Index: viewtopic.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/viewtopic.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** viewtopic.php 12 May 2005 02:56:08 -0000 1.9 --- viewtopic.php 27 Jun 2005 20:16:44 -0000 1.10 *************** *** 1108,1112 **** // This was shamelessly 'borrowed' from volker at multiartstudio dot de // via php.net's annotated manual ! $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', $highlight_match) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1)); } --- 1108,1112 ---- // This was shamelessly 'borrowed' from volker at multiartstudio dot de // via php.net's annotated manual ! $message = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace('#\b(" . str_replace('\\', '\\\\', addslashes($highlight_match)) . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $message . '<'), 1, -1)); } |
From: Josh <jel...@us...> - 2005-06-27 20:17:27
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10348/admin Modified Files: pagestart.php Log Message: 2.0.16.4 Index: pagestart.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/pagestart.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pagestart.php 8 May 2005 02:12:43 -0000 1.3 --- pagestart.php 27 Jun 2005 20:16:37 -0000 1.4 *************** *** 41,45 **** if (!$userdata['session_logged_in']) { ! redirect(append_sid("login.$phpEx?redirect=admin/", true)); } else if ($userdata['user_level'] != ADMIN) --- 41,45 ---- if (!$userdata['session_logged_in']) { ! redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx", true)); } else if ($userdata['user_level'] != ADMIN) *************** *** 62,66 **** if (!$userdata['session_admin']) { ! redirect(append_sid("login.$phpEx?redirect=admin/&admin=1", true)); } --- 62,66 ---- if (!$userdata['session_admin']) { ! redirect(append_sid("login.$phpEx?redirect=admin/index.$phpEx&admin=1", true)); } |
From: Josh <jel...@us...> - 2005-05-14 17:48:48
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9531/admin Modified Files: admin_ug_auth.php Log Message: phpBB 2.0.15a Index: admin_ug_auth.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_ug_auth.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_ug_auth.php 12 May 2005 02:56:07 -0000 1.7 --- admin_ug_auth.php 14 May 2005 17:48:38 -0000 1.8 *************** *** 557,561 **** $sql = "UPDATE " . USERS_TABLE . " SET user_level = " . USER . " ! WHERE user_id IN (" . implode(', ', $group_user) . ")"; if ( !($result = $db->sql_query($sql)) ) { --- 557,561 ---- $sql = "UPDATE " . USERS_TABLE . " SET user_level = " . USER . " ! WHERE user_id IN (" . implode(', ', $group_user) . ") AND user_level = " . MOD; if ( !($result = $db->sql_query($sql)) ) { |
From: Josh <jel...@us...> - 2005-05-12 02:56:17
|
Update of /cvsroot/phpbb-php5mod/phpbb-php5/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16387/admin Modified Files: admin_ug_auth.php Log Message: stupid, stupid, stupid donut. Tip: don't code while watching the Numa Numa dance Index: admin_ug_auth.php =================================================================== RCS file: /cvsroot/phpbb-php5mod/phpbb-php5/admin/admin_ug_auth.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** admin_ug_auth.php 8 May 2005 02:12:43 -0000 1.6 --- admin_ug_auth.php 12 May 2005 02:56:07 -0000 1.7 *************** *** 513,516 **** --- 513,569 ---- } + if( empty($adv) ) + { + for($i = 0; $i < count($forum_access); $i++) + { + $forum_id = $forum_access[$i]['forum_id']; + + $forum_auth_level[$forum_id] = AUTH_ALL; + + $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . " + WHERE group_id = $group_id"; + $result = $db->sql_query($sql); + + $group_user = array(); + + while ($row = $db->sql_fetchrow($result)) + { + $group_user[$row['user_id']] = $row['user_id']; + } + $db->sql_freeresult($result); + + $sql = "SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod + FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug + WHERE ug.user_id IN (" . implode(', ', $group_user) . ") + AND aa.group_id = ug.group_id + AND aa.auth_mod = 1 + GROUP BY ug.user_id"; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql); + } + + while ($row = $db->sql_fetchrow($result)) + { + if ($row['is_auth_mod']) + { + unset($group_user[$row['user_id']]); + } + } + $db->sql_freeresult($result); + + if (sizeof($group_user)) + { + $sql = "UPDATE " . USERS_TABLE . " + SET user_level = " . USER . " + WHERE user_id IN (" . implode(', ', $group_user) . ")"; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql); + } + } + } + } + message_die(GENERAL_MESSAGE, $message); } *************** *** 546,611 **** $db->sql_freeresult($result); ! if( empty($adv) ) { ! for($i = 0; $i < count($forum_access); $i++) { ! $forum_id = $forum_access[$i]['forum_id']; ! ! $forum_auth_level[$forum_id] = AUTH_ALL; ! ! $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . " ! WHERE group_id = $group_id"; ! $result = $db->sql_query($sql); ! ! $group_user = array(); ! ! while ($row = $db->sql_fetchrow($result)) ! { ! $group_user[$row['user_id']] = $row['user_id']; ! } ! $db->sql_freeresult($result); ! ! $sql = "SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod ! FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug ! WHERE ug.user_id IN (" . implode(', ', $group_user) . ") ! AND aa.group_id = ug.group_id ! AND aa.auth_mod = 1 ! GROUP BY ug.user_id"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not obtain moderator status', '', __LINE__, __FILE__, $sql); ! } ! ! while ($row = $db->sql_fetchrow($result)) ! { ! if ($row['is_auth_mod']) ! { ! unset($group_user[$row['user_id']]); ! } ! } ! $db->sql_freeresult($result); ! ! if (sizeof($group_user)) ! { ! $sql = "UPDATE " . USERS_TABLE . " ! SET user_level = " . USER . " ! WHERE user_id IN (" . implode(', ', $group_user) . ")"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql); ! } ! } ! for($j = 0; $j < count($forum_auth_fields); $j++) ! { ! $forum_access[$i][$forum_auth_fields[$j]] . ' :: '; ! if ( $forum_access[$i][$forum_auth_fields[$j]] == AUTH_ACL ) ! { ! $forum_auth_level[$forum_id] = AUTH_ACL; ! $forum_auth_level_fields[$forum_id][] = $forum_auth_fields[$j]; ! } ! } } } $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE "; $sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id"; --- 599,613 ---- $db->sql_freeresult($result); ! for($j = 0; $j < count($forum_auth_fields); $j++) { ! $forum_access[$i][$forum_auth_fields[$j]] . ' :: '; ! if ( $forum_access[$i][$forum_auth_fields[$j]] == AUTH_ACL ) { ! $forum_auth_level[$forum_id] = AUTH_ACL; ! $forum_auth_level_fields[$forum_id][] = $forum_auth_fields[$j]; } } + $sql = "SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user FROM " . USERS_TABLE . " u, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug WHERE "; $sql .= ( $mode == 'user' ) ? "u.user_id = $user_id AND ug.user_id = u.user_id AND g.group_id = ug.group_id" : "g.group_id = $group_id AND ug.group_id = g.group_id AND u.user_id = ug.user_id"; |