diff -crbBN phpbb203/admin/admin_board.php phpbb2011/admin/admin_board.php
*** phpbb203/admin/admin_board.php Sat Jul 10 20:16:18 2004
--- phpbb2011/admin/admin_board.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_board.php,v 1.51.2.1 2002/05/12 00:47:39 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_board.php,v 1.51.2.9 2004/11/18 17:49:33 acydburn Exp $
*
*
***************************************************************************/
***************
*** 16,22 ****
if( !empty($setmodules) )
{
$file = basename(__FILE__);
! $module['General']['Configuration'] = "$file?mode=config";
return;
}
--- 16,22 ----
if( !empty($setmodules) )
{
$file = basename(__FILE__);
! $module['General']['Configuration'] = "$file";
return;
}
***************
*** 43,52 ****
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
! $default_config[$config_name] = $config_value;
$new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];
if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "UPDATE " . CONFIG_TABLE . " SET
--- 43,57 ----
{
$config_name = $row['config_name'];
$config_value = $row['config_value'];
! $default_config[$config_name] = isset($HTTP_POST_VARS['submit']) ? str_replace("'", "\'", $config_value) : $config_value;
$new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name];
+ if ($config_name == 'cookie_name')
+ {
+ $cookie_name = str_replace('.', '_', $new['cookie_name']);
+ }
+
if( isset($HTTP_POST_VARS['submit']) )
{
$sql = "UPDATE " . CONFIG_TABLE . " SET
***************
*** 68,74 ****
}
$style_select = style_select($new['default_style'], 'default_style', "../templates");
! $lang_select = language_select($new['default_lang'], 'default_lang', "../language");
$timezone_select = tz_select($new['board_timezone'], 'board_timezone');
$disable_board_yes = ( $new['board_disable'] ) ? "checked=\"checked\"" : "";
--- 73,79 ----
}
$style_select = style_select($new['default_style'], 'default_style', "../templates");
! $lang_select = language_select($new['default_lang'], 'default_lang', "language");
$timezone_select = tz_select($new['board_timezone'], 'board_timezone');
$disable_board_yes = ( $new['board_disable'] ) ? "checked=\"checked\"" : "";
***************
*** 92,97 ****
--- 97,105 ----
$activation_user = ( $new['require_activation'] == USER_ACTIVATION_SELF ) ? "checked=\"checked\"" : "";
$activation_admin = ( $new['require_activation'] == USER_ACTIVATION_ADMIN ) ? "checked=\"checked\"" : "";
+ $confirm_yes = ($new['enable_confirm']) ? 'checked="checked"' : '';
+ $confirm_no = (!$new['enable_confirm']) ? 'checked="checked"' : '';
+
$board_email_form_yes = ( $new['board_email_form'] ) ? "checked=\"checked\"" : "";
$board_email_form_no = ( !$new['board_email_form'] ) ? "checked=\"checked\"" : "";
***************
*** 155,160 ****
--- 163,170 ----
"L_NONE" => $lang['Acc_None'],
"L_USER" => $lang['Acc_User'],
"L_ADMIN" => $lang['Acc_Admin'],
+ "L_VISUAL_CONFIRM" => $lang['Visual_confirm'],
+ "L_VISUAL_CONFIRM_EXPLAIN" => $lang['Visual_confirm_explain'],
"L_COOKIE_SETTINGS" => $lang['Cookie_settings'],
"L_COOKIE_SETTINGS_EXPLAIN" => $lang['Cookie_settings_explain'],
"L_COOKIE_DOMAIN" => $lang['Cookie_domain'],
***************
*** 242,247 ****
--- 252,260 ----
"ACTIVATION_USER_CHECKED" => $activation_user,
"ACTIVATION_ADMIN" => USER_ACTIVATION_ADMIN,
"ACTIVATION_ADMIN_CHECKED" => $activation_admin,
+ "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,
"MAX_POLL_OPTIONS" => $new['max_poll_options'],
diff -crbBN phpbb203/admin/admin_db_utilities.php phpbb2011/admin/admin_db_utilities.php
*** phpbb203/admin/admin_db_utilities.php Sat Jul 10 20:16:19 2004
--- phpbb2011/admin/admin_db_utilities.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_db_utilities.php,v 1.42.2.5 2002/06/27 21:26:46 dougk_ff7 Exp $
*
****************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_db_utilities.php,v 1.42.2.10 2003/03/04 21:02:19 acydburn Exp $
*
****************************************************************************/
***************
*** 34,49 ****
{
$filename = basename(__FILE__);
$module['General']['Backup_DB'] = $filename . "?perform=backup";
- if(@phpversion() >= '4.0.0')
- {
- $file_uploads = @ini_get('file_uploads');
- }
- else
- {
- $file_uploads = @get_cfg_var('file_uploads');
- }
! if( ($file_uploads != 0 || empty($file_uploads)) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') )
{
$module['General']['Restore_DB'] = $filename . "?perform=restore";
}
--- 34,43 ----
{
$filename = basename(__FILE__);
$module['General']['Backup_DB'] = $filename . "?perform=backup";
! $file_uploads = (@phpversion() >= '4.0.0') ? @ini_get('file_uploads') : @get_cfg_var('file_uploads');
!
! if( (empty($file_uploads) || $file_uploads != 0) && (strtolower($file_uploads) != 'off') && (@phpversion() != '4.0.4pl1') )
{
$module['General']['Restore_DB'] = $filename . "?perform=restore";
}
***************
*** 572,628 ****
function get_table_content_mysql($table, $handler)
{
global $db;
- //
- // Grab the data from the table.
- //
- $result = $db->sql_query("SELECT * FROM $table");
! if (!$result)
{
message_die(GENERAL_ERROR, "Failed in get_table_content (select *)", "", __LINE__, __FILE__, "SELECT * FROM $table");
}
- if($db->sql_numrows($result) > 0)
- {
- $schema_insert = "\n#\n# Table Data for $table\n#\n";
- }
- else
- {
- $schema_insert = "";
- }
-
- $handler($schema_insert);
-
- //
// Loop through the resulting rows and build the sql statement.
! //
!
! while ($row = $db->sql_fetchrow($result))
{
! $table_list = '(';
! $num_fields = $db->sql_numfields($result);
! //
// Grab the list of field names.
! //
for ($j = 0; $j < $num_fields; $j++)
{
! $table_list .= $db->sql_fieldname($j, $result) . ', ';
}
- //
- // Get rid of the last comma
- //
- $table_list = ereg_replace(', $', '', $table_list);
$table_list .= ')';
! //
// Start building the SQL statement.
- //
$schema_insert = "INSERT INTO $table $table_list VALUES(";
! //
// Loop through the rows and fill in data for each column
- //
for ($j = 0; $j < $num_fields; $j++)
{
! if(!isset($row[$j]))
{
//
// If there is no data for the column set it to null.
--- 566,606 ----
function get_table_content_mysql($table, $handler)
{
global $db;
! // Grab the data from the table.
! if (!($result = $db->sql_query("SELECT * FROM $table")))
{
message_die(GENERAL_ERROR, "Failed in get_table_content (select *)", "", __LINE__, __FILE__, "SELECT * FROM $table");
}
// Loop through the resulting rows and build the sql statement.
! if ($row = $db->sql_fetchrow($result))
{
! $handler("\n#\n# Table Data for $table\n#\n");
! $field_names = array();
!
// Grab the list of field names.
! $num_fields = $db->sql_numfields($result);
! $table_list = '(';
for ($j = 0; $j < $num_fields; $j++)
{
! $field_names[$j] = $db->sql_fieldname($j, $result);
! $table_list .= (($j > 0) ? ', ' : '') . $field_names[$j];
!
}
$table_list .= ')';
!
! do
! {
// Start building the SQL statement.
$schema_insert = "INSERT INTO $table $table_list VALUES(";
!
// Loop through the rows and fill in data for each column
for ($j = 0; $j < $num_fields; $j++)
{
! $schema_insert .= ($j > 0) ? ', ' : '';
!
! if(!isset($row[$field_names[$j]]))
{
//
// If there is no data for the column set it to null.
***************
*** 630,657 ****
// sql file not to reimport if the last column was null in
// any table. Should be fixed now :) JLH
//
! $schema_insert .= ' NULL,';
}
! elseif ($row[$j] != '')
{
! $schema_insert .= ' \'' . addslashes($row[$j]) . '\',';
}
else
{
! $schema_insert .= '\'\',';
}
}
! //
! // Get rid of the the last comma.
! //
! $schema_insert = ereg_replace(',$', '', $schema_insert);
$schema_insert .= ');';
! //
// Go ahead and send the insert statement to the handler function.
- //
$handler(trim($schema_insert));
}
return(true);
}
--- 608,634 ----
// sql file not to reimport if the last column was null in
// any table. Should be fixed now :) JLH
//
! $schema_insert .= 'NULL';
}
! elseif ($row[$field_names[$j]] != '')
{
! $schema_insert .= '\'' . addslashes($row[$field_names[$j]]) . '\'';
}
else
{
! $schema_insert .= '\'\'';
}
}
!
$schema_insert .= ');';
!
// Go ahead and send the insert statement to the handler function.
$handler(trim($schema_insert));
}
+ while ($row = $db->sql_fetchrow($result));
+ }
+
return(true);
}
***************
*** 681,701 ****
{
case 'backup':
! if( SQL_LAYER == 'oracle' || SQL_LAYER == 'odbc' || SQL_LAYER == 'mssql' )
! {
switch(SQL_LAYER)
{
case 'oracle':
! $db_type = "Oracle";
break;
! case 'odbc':
! $db_type = "ODBC";
break;
case 'mssql':
! $db_type = "MSSQL";
break;
}
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
--- 657,682 ----
{
case 'backup':
! $error = false;
switch(SQL_LAYER)
{
case 'oracle':
! $error = true;
! break;
! case 'db2':
! $error = true;
break;
! case 'msaccess':
! $error = true;
break;
case 'mssql':
! case 'mssql-odbc':
! $error = true;
break;
}
+ if ($error)
+ {
include('./page_header_admin.'.$phpEx);
$template->set_filenames(array(
***************
*** 709,715 ****
$template->pparse("body");
! break;
}
$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');
--- 690,696 ----
$template->pparse("body");
! include('./page_footer_admin.'.$phpEx);
}
$tables = array('auth_access', 'banlist', 'categories', 'config', 'disallow', 'forums', 'forum_prune', 'groups', 'posts', 'posts_text', 'privmsgs', 'privmsgs_text', 'ranks', 'search_results', 'search_wordlist', 'search_wordmatch', 'sessions', 'smilies', 'themes', 'themes_name', 'topics', 'topics_watch', 'user_group', 'users', 'vote_desc', 'vote_results', 'vote_voters', 'words');
***************
*** 721,726 ****
--- 701,708 ----
$gzipcompress = (!empty($HTTP_POST_VARS['gzipcompress'])) ? $HTTP_POST_VARS['gzipcompress'] : ( (!empty($HTTP_GET_VARS['gzipcompress'])) ? $HTTP_GET_VARS['gzipcompress'] : 0 );
+ $drop = (!empty($HTTP_POST_VARS['drop'])) ? intval($HTTP_POST_VARS['drop']) : ( (!empty($HTTP_GET_VARS['drop'])) ? intval($HTTP_GET_VARS['drop']) : 0 );
+
if(!empty($additional_tables))
{
if(ereg(",", $additional_tables))
***************
*** 780,786 ****
);
$template->assign_vars(array(
! "META" => "",
"MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Backup'],
"MESSAGE_TEXT" => $lang['Backup_download'])
--- 762,768 ----
);
$template->assign_vars(array(
! "META" => '',
"MESSAGE_TITLE" => $lang['Database_Utilities'] . " : " . $lang['Backup'],
"MESSAGE_TEXT" => $lang['Backup_download'])
***************
*** 836,850 ****
for($i = 0; $i < count($tables); $i++)
{
$table_name = $tables[$i];
! if(SQL_LAYER != 'mysql4')
! {
! $table_def_function = "get_table_def_" . SQL_LAYER;
! $table_content_function = "get_table_content_" . SQL_LAYER;
! }
! else
{
$table_def_function = "get_table_def_mysql";
$table_content_function = "get_table_content_mysql";
}
if($backup_type != 'data')
--- 818,836 ----
for($i = 0; $i < count($tables); $i++)
{
$table_name = $tables[$i];
!
! switch (SQL_LAYER)
{
+ case 'postgresql':
+ $table_def_function = "get_table_def_postgresql";
+ $table_content_function = "get_table_content_postgresql";
+ break;
+
+ case 'mysql':
+ case 'mysql4':
$table_def_function = "get_table_def_mysql";
$table_content_function = "get_table_content_mysql";
+ break;
}
if($backup_type != 'data')
***************
*** 872,878 ****
break;
case 'restore':
! if(!isset($restore_start))
{
//
// Define Template files...
--- 858,864 ----
break;
case 'restore':
! if(!isset($HTTP_POST_VARS['restore_start']))
{
//
// Define Template files...
***************
*** 919,925 ****
// a hackers attempt at getting us to process a local system
// file.
//
! if( file_exists($backup_file_tmpname) )
{
if( preg_match("/^(text\/[a-zA-Z]+)|(application\/(x\-)?gzip(\-compressed)?)|(application\/octet-stream)$/is", $backup_file_type) )
{
--- 905,911 ----
// a hackers attempt at getting us to process a local system
// file.
//
! if( file_exists(phpbb_realpath($backup_file_tmpname)) )
{
if( preg_match("/^(text\/[a-zA-Z]+)|(application\/(x\-)?gzip(\-compressed)?)|(application\/octet-stream)$/is", $backup_file_type) )
{
diff -crbBN phpbb203/admin/admin_disallow.php phpbb2011/admin/admin_disallow.php
*** phpbb203/admin/admin_disallow.php Sat Jul 10 20:16:19 2004
--- phpbb2011/admin/admin_disallow.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_disallow.php,v 1.9.2.1 2002/05/12 00:47:40 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_disallow.php,v 1.9.2.2 2002/11/26 11:42:11 psotfx Exp $
*
*
***************************************************************************/
***************
*** 41,48 ****
{
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
! $disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? $HTTP_POST_VARS['disallowed_user'] : $HTTP_GET_VARS['disallowed_user'];
if( !validate_username($disallowed_user) )
{
$message = $lang['Disallowed_already'];
--- 41,52 ----
{
include($phpbb_root_path . 'includes/functions_validate.'.$phpEx);
! $disallowed_user = ( isset($HTTP_POST_VARS['disallowed_user']) ) ? trim($HTTP_POST_VARS['disallowed_user']) : trim($HTTP_GET_VARS['disallowed_user']);
+ if ($disallowed_user == '')
+ {
+ message_die(MESSAGE, $lang['Fields_empty']);
+ }
if( !validate_username($disallowed_user) )
{
$message = $lang['Disallowed_already'];
diff -crbBN phpbb203/admin/admin_forum_prune.php phpbb2011/admin/admin_forum_prune.php
*** phpbb203/admin/admin_forum_prune.php Sat Jul 10 20:16:18 2004
--- phpbb2011/admin/admin_forum_prune.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_forum_prune.php,v 1.22.2.2 2002/05/12 15:57:44 psotfx Exp $
*
****************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_forum_prune.php,v 1.22.2.3 2002/12/18 14:14:07 psotfx Exp $
*
****************************************************************************/
***************
*** 168,176 ****
$forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name'];
$prune_data = $lang['Prune_topics_not_posted'] . " ";
! $prune_data .= ' ' . $lang['Days'];
! $hidden_input = '';
//
// Assign the template variables.
--- 168,176 ----
$forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name'];
$prune_data = $lang['Prune_topics_not_posted'] . " ";
! $prune_data .= ' ' . $lang['Days'];
! $hidden_input = '';
//
// Assign the template variables.
diff -crbBN phpbb203/admin/admin_forumauth.php phpbb2011/admin/admin_forumauth.php
*** phpbb203/admin/admin_forumauth.php Sat Jul 10 20:16:19 2004
--- phpbb2011/admin/admin_forumauth.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_forumauth.php,v 1.23.2.4 2002/05/21 16:52:08 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_forumauth.php,v 1.23.2.5 2004/03/25 15:57:19 acydburn Exp $
*
*
***************************************************************************/
***************
*** 102,121 ****
{
if(isset($HTTP_POST_VARS['simpleauth']))
{
! $simple_ary = $simple_auth_ary[$HTTP_POST_VARS['simpleauth']];
for($i = 0; $i < count($simple_ary); $i++)
{
$sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$i] . ' = ' . $simple_ary[$i];
}
$sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
}
else
{
for($i = 0; $i < count($forum_auth_fields); $i++)
{
! $value = $HTTP_POST_VARS[$forum_auth_fields[$i]];
if ( $forum_auth_fields[$i] == 'auth_vote' )
{
--- 102,124 ----
{
if(isset($HTTP_POST_VARS['simpleauth']))
{
! $simple_ary = $simple_auth_ary[intval($HTTP_POST_VARS['simpleauth'])];
for($i = 0; $i < count($simple_ary); $i++)
{
$sql .= ( ( $sql != '' ) ? ', ' : '' ) . $forum_auth_fields[$i] . ' = ' . $simple_ary[$i];
}
+ if (is_array($simple_ary))
+ {
$sql = "UPDATE " . FORUMS_TABLE . " SET $sql WHERE forum_id = $forum_id";
}
+ }
else
{
for($i = 0; $i < count($forum_auth_fields); $i++)
{
! $value = intval($HTTP_POST_VARS[$forum_auth_fields[$i]]);
if ( $forum_auth_fields[$i] == 'auth_vote' )
{
diff -crbBN phpbb203/admin/admin_forums.php phpbb2011/admin/admin_forums.php
*** phpbb203/admin/admin_forums.php Sat Jul 10 20:16:19 2004
--- phpbb2011/admin/admin_forums.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_forums.php,v 1.40.2.3 2002/07/19 14:10:06 psotfx Exp $
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_forums.php,v 1.40.2.11 2004/03/25 15:57:19 acydburn Exp $
*
***************************************************************************/
***************
*** 43,49 ****
"auth_reply" => AUTH_ALL,
"auth_edit" => AUTH_REG,
"auth_delete" => AUTH_REG,
! "auth_sticky" => AUTH_REG,
"auth_announce" => AUTH_MOD,
"auth_vote" => AUTH_REG,
"auth_pollcreate" => AUTH_REG
--- 43,49 ----
"auth_reply" => AUTH_ALL,
"auth_edit" => AUTH_REG,
"auth_delete" => AUTH_REG,
! "auth_sticky" => AUTH_MOD,
"auth_announce" => AUTH_MOD,
"auth_vote" => AUTH_REG,
"auth_pollcreate" => AUTH_REG
***************
*** 55,60 ****
--- 55,61 ----
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
+ $mode = htmlspecialchars($mode);
}
else
{
***************
*** 301,306 ****
--- 302,313 ----
$catlist = get_list('category', $cat_id, TRUE);
$forumstatus == ( FORUM_LOCKED ) ? $forumlocked = "selected=\"selected\"" : $forumunlocked = "selected=\"selected\"";
+
+ // These two options ($lang['Status_unlocked'] and $lang['Status_locked']) seem to be missing from
+ // the language files.
+ $lang['Status_unlocked'] = isset($lang['Status_unlocked']) ? $lang['Status_unlocked'] : 'Unlocked';
+ $lang['Status_locked'] = isset($lang['Status_locked']) ? $lang['Status_locked'] : 'Locked';
+
$statuslist = "\n";
$statuslist .= "\n";
***************
*** 604,611 ****
// Either delete or move all posts in a forum
if($to_id == -1)
{
include($phpbb_root_path . "includes/prune.$phpEx");
! prune($from_id, 0); // Delete everything from forum
}
else
{
--- 610,650 ----
// Either delete or move all posts in a forum
if($to_id == -1)
{
+ // Delete polls in this forum
+ $sql = "SELECT v.vote_id
+ FROM " . VOTE_DESC_TABLE . " v, " . TOPICS_TABLE . " t
+ WHERE t.forum_id = $from_id
+ AND v.topic_id = t.topic_id";
+ if (!($result = $db->sql_query($sql)))
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain list of vote ids", "", __LINE__, __FILE__, $sql);
+ }
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $vote_ids = '';
+ do
+ {
+ $vote_ids = (($vote_ids != '') ? ', ' : '') . $row['vote_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $sql = "DELETE FROM " . VOTE_DESC_TABLE . "
+ WHERE vote_id IN ($vote_ids)";
+ $db->sql_query($sql);
+
+ $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . "
+ WHERE vote_id IN ($vote_ids)";
+ $db->sql_query($sql);
+
+ $sql = "DELETE FROM " . VOTE_USERS_TABLE . "
+ WHERE vote_id IN ($vote_ids)";
+ $db->sql_query($sql);
+ }
+ $db->sql_freeresult($result);
+
include($phpbb_root_path . "includes/prune.$phpEx");
! prune($from_id, 0, true); // Delete everything from forum
}
else
{
***************
*** 636,641 ****
--- 676,732 ----
}
sync('forum', $to_id);
}
+
+ // Alter Mod level if appropriate - 2.0.4
+ $sql = "SELECT ug.user_id
+ FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
+ WHERE a.forum_id <> $from_id
+ AND a.auth_mod = 1
+ AND ug.group_id = a.group_id";
+ if( !$result = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain moderator list", "", __LINE__, __FILE__, $sql);
+ }
+
+ if ($row = $db->sql_fetchrow($result))
+ {
+ $user_ids = '';
+ do
+ {
+ $user_ids .= (($user_ids != '') ? ', ' : '' ) . $row['user_id'];
+ }
+ while ($row = $db->sql_fetchrow($result));
+
+ $sql = "SELECT ug.user_id
+ FROM " . AUTH_ACCESS_TABLE . " a, " . USER_GROUP_TABLE . " ug
+ WHERE a.forum_id = $from_id
+ AND a.auth_mod = 1
+ AND ug.group_id = a.group_id
+ AND ug.user_id NOT IN ($user_ids)";
+ if( !$result2 = $db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, "Couldn't obtain moderator list", "", __LINE__, __FILE__, $sql);
+ }
+
+ if ($row = $db->sql_fetchrow($result2))
+ {
+ $user_ids = '';
+ do
+ {
+ $user_ids .= (($user_ids != '') ? ', ' : '' ) . $row['user_id'];
+ }
+ while ($row = $db->sql_fetchrow($result2));
+
+ $sql = "UPDATE " . USERS_TABLE . "
+ SET user_level = " . USER . "
+ WHERE user_id IN ($user_ids)
+ AND user_level <> " . ADMIN;
+ $db->sql_query($sql);
+ }
+ $db->sql_freeresult($result);
+
+ }
+ $db->sql_freeresult($result2);
$sql = "DELETE FROM " . FORUMS_TABLE . "
WHERE forum_id = $from_id";
diff -crbBN phpbb203/admin/admin_groups.php phpbb2011/admin/admin_groups.php
*** phpbb203/admin/admin_groups.php Sat Jul 10 20:16:19 2004
--- phpbb2011/admin/admin_groups.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_groups.php,v 1.25.2.5 2002/07/31 19:14:46 dougk_ff7 Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_groups.php,v 1.25.2.9 2004/03/25 15:57:20 acydburn Exp $
*
*
***************************************************************************/
***************
*** 43,54 ****
}
else
{
! $group_id = '';
}
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
}
else
{
--- 43,55 ----
}
else
{
! $group_id = 0;
}
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
+ $mode = htmlspecialchars($mode);
}
else
{
***************
*** 171,176 ****
--- 172,227 ----
//
if ( isset($HTTP_POST_VARS['group_delete']) )
{
+ //
+ // Reset User Moderator Level
+ //
+
+ // Is Group moderating a forum ?
+ $sql = "SELECT auth_mod FROM " . AUTH_ACCESS_TABLE . "
+ WHERE group_id = " . $group_id;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not select auth_access', '', __LINE__, __FILE__, $sql);
+ }
+
+ $row = $db->sql_fetchrow($result);
+ if (intval($row['auth_mod']) == 1)
+ {
+ // Yes, get the assigned users and update their Permission if they are no longer moderator of one of the forums
+ $sql = "SELECT user_id FROM " . USER_GROUP_TABLE . "
+ WHERE group_id = " . $group_id;
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not select user_group', '', __LINE__, __FILE__, $sql);
+ }
+
+ $rows = $db->sql_fetchrowset($result);
+ for ($i = 0; $i < count($rows); $i++)
+ {
+ $sql = "SELECT g.group_id FROM " . AUTH_ACCESS_TABLE . " a, " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug
+ WHERE (a.auth_mod = 1) AND (g.group_id = a.group_id) AND (a.group_id = ug.group_id) AND (g.group_id = ug.group_id)
+ AND (ug.user_id = " . intval($rows[$i]['user_id']) . ") AND (ug.group_id <> " . $group_id . ")";
+ if ( !($result = $db->sql_query($sql)) )
+ {
+ message_die(GENERAL_ERROR, 'Could not obtain moderator permissions', '', __LINE__, __FILE__, $sql);
+ }
+
+ if ($db->sql_numrows($result) == 0)
+ {
+ $sql = "UPDATE " . USERS_TABLE . " SET user_level = " . USER . "
+ WHERE user_level = " . MOD . " AND user_id = " . intval($rows[$i]['user_id']);
+
+ if ( !$db->sql_query($sql) )
+ {
+ message_die(GENERAL_ERROR, 'Could not update moderator permissions', '', __LINE__, __FILE__, $sql);
+ }
+ }
+ }
+ }
+
+ //
+ // Delete Group
+ //
$sql = "DELETE FROM " . GROUPS_TABLE . "
WHERE group_id = " . $group_id;
if ( !$db->sql_query($sql) )
***************
*** 213,219 ****
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
}
! $this_userdata = get_userdata($group_moderator);
$group_moderator = $this_userdata['user_id'];
if ( !$group_moderator )
--- 264,270 ----
message_die(GENERAL_MESSAGE, $lang['No_group_moderator']);
}
! $this_userdata = get_userdata($group_moderator, true);
$group_moderator = $this_userdata['user_id'];
if ( !$group_moderator )
diff -crbBN phpbb203/admin/admin_mass_email.php phpbb2011/admin/admin_mass_email.php
*** phpbb203/admin/admin_mass_email.php Sat Jul 10 20:16:18 2004
--- phpbb2011/admin/admin_mass_email.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_mass_email.php,v 1.15.2.5 2002/05/20 00:52:18 psotfx Exp $
*
****************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_mass_email.php,v 1.15.2.7 2003/05/03 23:24:01 acydburn Exp $
*
****************************************************************************/
***************
*** 79,88 ****
if ( $row = $db->sql_fetchrow($result) )
{
! $bcc_list = '';
do
{
! $bcc_list .= ( ( $bcc_list != '' ) ? ', ' : '' ) . $row['user_email'];
}
while ( $row = $db->sql_fetchrow($result) );
--- 79,88 ----
if ( $row = $db->sql_fetchrow($result) )
{
! $bcc_list = array();
do
{
! $bcc_list[] = $row['user_email'];
}
while ( $row = $db->sql_fetchrow($result) );
***************
*** 116,127 ****
$emailer = new emailer($board_config['smtp_delivery']);
! $email_headers = 'Return-Path: ' . $userdata['board_email'] . "\nFrom: " . $board_config['board_email'] . "\n";
! $email_headers .= 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n";
$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
- $email_headers .= "Bcc: $bcc_list\n";
$emailer->use_template('admin_send_email');
$emailer->email_address($board_config['board_email']);
--- 116,133 ----
$emailer = new emailer($board_config['smtp_delivery']);
! $emailer->from($board_config['board_email']);
! $emailer->replyto($board_config['board_email']);
!
! for ($i = 0; $i < count($bcc_list); $i++)
! {
! $emailer->bcc($bcc_list[$i]);
! }
!
! $email_headers = 'X-AntiAbuse: Board servername - ' . $board_config['server_name'] . "\n";
$email_headers .= 'X-AntiAbuse: User_id - ' . $userdata['user_id'] . "\n";
$email_headers .= 'X-AntiAbuse: Username - ' . $userdata['username'] . "\n";
$email_headers .= 'X-AntiAbuse: User IP - ' . decode_ip($user_ip) . "\n";
$emailer->use_template('admin_send_email');
$emailer->email_address($board_config['board_email']);
diff -crbBN phpbb203/admin/admin_ranks.php phpbb2011/admin/admin_ranks.php
*** phpbb203/admin/admin_ranks.php Sat Jul 10 20:16:19 2004
--- phpbb2011/admin/admin_ranks.php Thu Nov 18 21:02:11 2004
***************
*** 6,13 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_ranks.php,v 1.13.2.2 2002/05/12 15:57:44 psotfx Exp $
! *
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_ranks.php,v 1.13.2.4 2004/03/25 15:57:20 acydburn Exp $
*
***************************************************************************/
***************
*** 39,44 ****
--- 38,44 ----
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
+ $mode = htmlspecialchars($mode);
}
else
{
***************
*** 162,169 ****
}
}
! if( $rank_id )
{
$sql = "UPDATE " . RANKS_TABLE . "
SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "'
WHERE rank_id = $rank_id";
--- 162,180 ----
}
}
! if ($rank_id)
! {
! if (!$special_rank)
! {
! $sql = "UPDATE " . USERS_TABLE . "
! SET user_rank = 0
! WHERE user_rank = $rank_id";
!
! if( !$result = $db->sql_query($sql) )
{
+ message_die(GENERAL_ERROR, $lang['No_update_ranks'], "", __LINE__, __FILE__, $sql);
+ }
+ }
$sql = "UPDATE " . RANKS_TABLE . "
SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "'
WHERE rank_id = $rank_id";
diff -crbBN phpbb203/admin/admin_smilies.php phpbb2011/admin/admin_smilies.php
*** phpbb203/admin/admin_smilies.php Sat Jul 10 20:16:19 2004
--- phpbb2011/admin/admin_smilies.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_smilies.php,v 1.22.2.5 2002/07/19 14:10:07 psotfx Exp $
*
****************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_smilies.php,v 1.22.2.13 2004/03/25 15:57:20 acydburn Exp $
*
****************************************************************************/
***************
*** 57,62 ****
--- 57,63 ----
if( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
+ $mode = htmlspecialchars($mode);
}
else
{
***************
*** 72,78 ****
while($file = @readdir($dir))
{
! if( !@is_dir($phpbb_root_path . $board_config['smilies_path'] . '/' . $file) )
{
$img_size = @getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file);
--- 73,79 ----
while($file = @readdir($dir))
{
! if( !@is_dir(phpbb_realpath($phpbb_root_path . $board_config['smilies_path'] . '/' . $file)) )
{
$img_size = @getimagesize($phpbb_root_path . $board_config['smilies_path'] . '/' . $file);
***************
*** 239,245 ****
FROM " . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Couldn't delete smiley", "", __LINE__, __FILE__, $sql);
}
$resultset = $db->sql_fetchrowset($result);
--- 240,246 ----
FROM " . SMILIES_TABLE;
if( !$result = $db->sql_query($sql) )
{
! message_die(GENERAL_ERROR, "Could not get smiley list", "", __LINE__, __FILE__, $sql);
}
$resultset = $db->sql_fetchrowset($result);
***************
*** 313,318 ****
--- 314,320 ----
//
$smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
+ $smiley_id = intval($smiley_id);
$sql = "DELETE FROM " . SMILIES_TABLE . "
WHERE smilies_id = " . $smiley_id;
***************
*** 333,338 ****
--- 335,341 ----
//
$smiley_id = ( !empty($HTTP_POST_VARS['id']) ) ? $HTTP_POST_VARS['id'] : $HTTP_GET_VARS['id'];
+ $smiley_id = intval($smiley_id);
$sql = "SELECT *
FROM " . SMILIES_TABLE . "
***************
*** 399,408 ****
// Get the submitted data, being careful to ensure that we only
// accept the data we are looking for.
//
! $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? $HTTP_POST_VARS['smile_code'] : $HTTP_GET_VARS['smile_code'];
! $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
! $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
$smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']);
//
// Convert < and > to proper htmlentities for parsing.
//
--- 402,418 ----
// Get the submitted data, being careful to ensure that we only
// accept the data we are looking for.
//
! $smile_code = ( isset($HTTP_POST_VARS['smile_code']) ) ? trim($HTTP_POST_VARS['smile_code']) : trim($HTTP_GET_VARS['smile_code']);
! $smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? trim($HTTP_POST_VARS['smile_url']) : trim($HTTP_GET_VARS['smile_url']);
! $smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? trim($HTTP_POST_VARS['smile_emotion']) : trim($HTTP_GET_VARS['smile_emotion']);
$smile_id = ( isset($HTTP_POST_VARS['smile_id']) ) ? intval($HTTP_POST_VARS['smile_id']) : intval($HTTP_GET_VARS['smile_id']);
+
+ // If no code was entered complain ...
+ if ($smile_code == '' || $smile_url == '')
+ {
+ message_die(MESSAGE, $lang['Fields_empty']);
+ }
+
//
// Convert < and > to proper htmlentities for parsing.
//
***************
*** 415,422 ****
$sql = "UPDATE " . SMILIES_TABLE . "
SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "'
WHERE smilies_id = $smile_id";
! $result = $db->sql_query($sql);
! if( !$result )
{
message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql);
}
--- 425,431 ----
$sql = "UPDATE " . SMILIES_TABLE . "
SET code = '" . str_replace("\'", "''", $smile_code) . "', smile_url = '" . str_replace("\'", "''", $smile_url) . "', emoticon = '" . str_replace("\'", "''", $smile_emotion) . "'
WHERE smilies_id = $smile_id";
! if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't update smilies info", "", __LINE__, __FILE__, $sql);
}
***************
*** 439,444 ****
--- 448,459 ----
$smile_url = ( isset($HTTP_POST_VARS['smile_url']) ) ? $HTTP_POST_VARS['smile_url'] : $HTTP_GET_VARS['smile_url'];
$smile_emotion = ( isset($HTTP_POST_VARS['smile_emotion']) ) ? $HTTP_POST_VARS['smile_emotion'] : $HTTP_GET_VARS['smile_emotion'];
+ // If no code was entered complain ...
+ if ($smile_code == '' || $smile_url == '')
+ {
+ message_die(MESSAGE, $lang['Fields_empty']);
+ }
+
//
// Convert < and > to proper htmlentities for parsing.
//
diff -crbBN phpbb203/admin/admin_styles.php phpbb2011/admin/admin_styles.php
*** phpbb203/admin/admin_styles.php Sat Jul 10 20:16:19 2004
--- phpbb2011/admin/admin_styles.php Thu Nov 18 21:02:11 2004
***************
*** 6,12 ****
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_styles.php,v 1.27.2.3 2002/05/13 13:18:17 psotfx Exp $
*
*
***************************************************************************/
--- 6,12 ----
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
! * $Id: admin_styles.php,v 1.27.2.13 2004/07/15 17:57:50 acydburn Exp $
*
*
***************************************************************************/
***************
*** 39,65 ****
// Check if the user has cancled a confirmation message.
//
$phpbb_root_path = "./../";
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
! if( empty($HTTP_POST_VARS['send_file']) )
! {
! $no_page_header = ( $cancel ) ? TRUE : FALSE;
! require($phpbb_root_path . 'extension.inc');
! require('./pagestart.' . $phpEx);
! }
! if( $cancel )
{
! $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
! header($header_location . append_sid("admin_styles.$phpEx"));
! exit;
}
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
}
else
{
--- 39,65 ----
// Check if the user has cancled a confirmation message.
//
$phpbb_root_path = "./../";
+ require($phpbb_root_path . 'extension.inc');
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
! $no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE;
!
! require('./pagestart.' . $phpEx);
!
! $confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
! $cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;
! if ($cancel)
{
! redirect('admin/' . append_sid("admin_styles.$phpEx", true));
}
if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_GET_VARS['mode']) ) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
+ $mode = htmlspecialchars($mode);
}
else
{
***************
*** 134,142 ****
{
while( $sub_dir = @readdir($dir) )
{
! if( !is_file($phpbb_root_path . 'templates/' .$sub_dir) && !is_link($phpbb_root_path . 'templates/' .$sub_dir) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" )
{
! if( @file_exists($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg") )
{
include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg");
--- 134,142 ----
{
while( $sub_dir = @readdir($dir) )
{
! if( !is_file(phpbb_realpath($phpbb_root_path . 'templates/' .$sub_dir)) && !is_link(phpbb_realpath($phpbb_root_path . 'templates/' .$sub_dir)) && $sub_dir != "." && $sub_dir != ".." && $sub_dir != "CVS" )
{
! if( @file_exists(@phpbb_realpath($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg")) )
{
include($phpbb_root_path. "templates/" . $sub_dir . "/theme_info.cfg");
***************
*** 492,498 ****
$themes_title = $lang['Edit_theme'];
$themes_explain = $lang['Edit_theme_explain'];
! $style_id = $HTTP_GET_VARS['style_id'];
$selected_names = array();
$selected_values = array();
--- 492,498 ----
$themes_title = $lang['Edit_theme'];
$themes_explain = $lang['Edit_theme_explain'];
! $style_id = intval($HTTP_GET_VARS['style_id']);
$selected_names = array();
$selected_values = array();
***************
*** 551,557 ****
$s_template_select = '