############################################################## ## MOD Title: phpBB 3.0.1 to phpBB 3.0.2 Code Changes ## MOD Author: Acyd Burn < N/A > (Meik Sievertsen) N/A ## MOD Description: ## ## ## These are the Changes from phpBB 3.0.1 to phpBB 3.0.2 summed up into a little ## Mod. This might be very helpful if you want to update your Board and have ## installed a bunch of Mods. Then it's normally easier to apply the Code Changes ## than to install all Mods again. ## ## When you find a 'AFTER, ADD'-Statement, the Code have to be added after the last ## line quoted in the 'FIND'-Statement. ## When you find a 'BEFORE, ADD'-Statement, the Code have to be added before the ## first line quoted in the 'FIND'-Statement. ## When you find a 'REPLACE WITH'-Statement, the Code quoted in the ## 'FIND'-Statement have to be replaced completely with the quoted Code in the ## 'REPLACE WITH'-Statement. ## ## When you find more than one 'FIND'-Statement it just means that you go down the ## code within the order of the 'FIND'-Statements, if you found the lines for the ## first 'FIND'-Statement, you continue to search the lines for the second ## 'FIND'-Statement. The last 'FIND'-Statement includes the codeblock to work ## with. ## ## For a comprehensive explanation about installing MODs, please visit this url: ## http://www.phpbb.com/kb/article/how-to-install-mods/ ## ## After you have finished this tutorial, you have to upload the ## install/database_update.php file, execute it and then delete it from your ## webspace. ## ## ## ## MOD Version: 1.0.0 ## ## Installation Level: Easy ## Installation Time: 20 Minutes ## Files To Edit: ## adm/index.php ## adm/style/acp_forums.html ## adm/style/overall_header.html ## download/file.php ## includes/acp/acp_attachments.php ## includes/acp/acp_board.php ## includes/acp/acp_captcha.php ## includes/acp/acp_database.php ## includes/acp/acp_forums.php ## includes/acp/acp_groups.php ## includes/acp/acp_icons.php ## includes/acp/acp_main.php ## includes/acp/acp_permissions.php ## includes/acp/acp_styles.php ## includes/auth/auth_apache.php ## includes/auth.php ## includes/constants.php ## includes/functions.php ## includes/functions_admin.php ## includes/functions_compress.php ## includes/functions_content.php ## includes/functions_convert.php ## includes/functions_install.php ## includes/functions_jabber.php ## includes/functions_posting.php ## includes/functions_privmsgs.php ## includes/functions_upload.php ## includes/functions_user.php ## includes/mcp/mcp_ban.php ## includes/mcp/mcp_main.php ## includes/mcp/mcp_queue.php ## includes/mcp/mcp_reports.php ## includes/mcp/mcp_topic.php ## includes/mcp/mcp_warn.php ## includes/message_parser.php ## includes/search/fulltext_mysql.php ## includes/search/fulltext_native.php ## includes/session.php ## includes/ucp/ucp_confirm.php ## includes/ucp/ucp_pm.php ## includes/ucp/ucp_pm_compose.php ## includes/ucp/ucp_pm_viewfolder.php ## includes/utf/utf_tools.php ## language/en/acp/attachments.php ## language/en/acp/board.php ## language/en/acp/common.php ## language/en/acp/groups.php ## language/en/common.php ## language/en/memberlist.php ## language/en/posting.php ## mcp.php ## memberlist.php ## posting.php ## search.php ## style.php ## styles/prosilver/imageset/imageset.cfg ## styles/prosilver/style.cfg ## styles/prosilver/template/mcp_ban.html ## styles/prosilver/template/mcp_queue.html ## styles/prosilver/template/memberlist_view.html ## styles/prosilver/template/message_body.html ## styles/prosilver/template/template.cfg ## styles/prosilver/template/ucp_main_subscribed.html ## styles/prosilver/template/ucp_pm_history.html ## styles/prosilver/template/viewforum_body.html ## styles/prosilver/theme/bidi.css ## styles/prosilver/theme/theme.cfg ## styles/subsilver2/imageset/imageset.cfg ## styles/subsilver2/style.cfg ## styles/subsilver2/template/search_results.html ## styles/subsilver2/template/template.cfg ## styles/subsilver2/theme/theme.cfg ## ucp.php ## viewforum.php ## viewonline.php ## viewtopic.php ## ## Included Files: install/database_update.php ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## Author Notes: ## ## ############################################################## ## MOD History: ## ## 2008-07-06 - Version 1.0.0 ## - first release ## ############################################################## ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ############################################################## # #-----[ OPEN ]--------------------------------------------- # adm/index.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: index.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: index.php 8591 2008-06-04 11:40:53Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 43 $safe_mode = (@ini_get('safe_mode') == '1' || @strtolower(ini_get('safe_mode')) === 'on') ? true : false; # #-----[ REPLACE WITH ]--------------------------------------------- # $safe_mode = (@ini_get('safe_mode') == '1' || strtolower(@ini_get('safe_mode')) === 'on') ? true : false; # #-----[ FIND ]--------------------------------------------- # Around Line 114 '_SID' => $_SID, 'SESSION_ID' => $user->session_id, 'ROOT_PATH' => $phpbb_admin_path, 'U_LOGOUT' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout'), # #-----[ AFTER, ADD ]--------------------------------------------- # 'U_ADM_LOGOUT' => append_sid("{$phpbb_admin_path}index.$phpEx", 'action=admlogout'), # #-----[ OPEN ]--------------------------------------------- # adm/style/acp_forums.html # #-----[ FIND ]--------------------------------------------- # Around Line 94 // ]]> « {L_BACK} # #-----[ FIND ]--------------------------------------------- # Around Line 99

{L_TITLE} :: {FORUM_NAME}

# #-----[ REPLACE WITH ]--------------------------------------------- #

{L_TITLE} :: {FORUM_NAME}

# #-----[ OPEN ]--------------------------------------------- # adm/style/overall_header.html # #-----[ FIND ]--------------------------------------------- # Around Line 179

{L_LOGGED_IN_AS}
{USERNAME}{L_LOGOUT} ]

# #-----[ REPLACE WITH ]--------------------------------------------- #

{L_LOGGED_IN_AS}
{USERNAME}{L_LOGOUT} ][ {L_ADM_LOGOUT} ]

# #-----[ OPEN ]--------------------------------------------- # download/file.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: file.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: file.php 8514 2008-04-21 10:54:41Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 16 $phpEx = substr(strrchr(__FILE__, '.'), 1); if (isset($_GET['avatar'])) { require($phpbb_root_path . 'config.' . $phpEx); # #-----[ AFTER, ADD ]--------------------------------------------- # if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type)) { exit; } # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_attachments.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_attachments.php 8495 2008-04-07 17:39:23Z acydburn $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_attachments.php 8555 2008-05-15 14:10:11Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 115 'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), # #-----[ REPLACE WITH ]--------------------------------------------- # 'secure_allow_empty_referer' => array('lang' => 'SECURE_EMPTY_REFERRER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'check_attachment_content' => array('lang' => 'CHECK_CONTENT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), # #-----[ FIND ]--------------------------------------------- # Around Line 156 $this->new_config[$config_name] = $config_value = ($size_var == 'kb') ? ($config_value << 10) : (($size_var == 'mb') ? ($config_value << 20) : $config_value); # #-----[ REPLACE WITH ]--------------------------------------------- # $this->new_config[$config_name] = $config_value = ($size_var == 'kb') ? round($config_value * 1024) : (($size_var == 'mb') ? round($config_value * 1048576) : $config_value); # #-----[ FIND ]--------------------------------------------- # Around Line 276 $l_explain = (isset($user->lang[$vars['lang_explain']])) ? $user->lang[$vars['lang_explain']] : $vars['lang_explain']; } else if ($vars['explain']) { $l_explain = (isset($user->lang[$vars['lang'] . '_EXPLAIN'])) ? $user->lang[$vars['lang'] . '_EXPLAIN'] : ''; # #-----[ AFTER, ADD ]--------------------------------------------- # } $content = build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars); if (empty($content)) { continue; # #-----[ FIND ]--------------------------------------------- # Around Line 289 'CONTENT' => build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars), # #-----[ REPLACE WITH ]--------------------------------------------- # 'CONTENT' => $content, # #-----[ FIND ]--------------------------------------------- # Around Line 510 $max_filesize = ($size_select == 'kb') ? ($max_filesize << 10) : (($size_select == 'mb') ? ($max_filesize << 20) : $max_filesize); # #-----[ REPLACE WITH ]--------------------------------------------- # $max_filesize = ($size_select == 'kb') ? round($max_filesize * 1024) : (($size_select == 'mb') ? round($max_filesize * 1048576) : $max_filesize); # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_board.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_board.php 8493 2008-04-07 16:04:43Z Kellanved $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_board.php 8593 2008-06-04 13:23:30Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 162 'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']), 'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']), 'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true), 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false), 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false), 'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true), 'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => false), 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true), 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true), 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true), 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'), 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true), 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), # #-----[ REPLACE WITH ]--------------------------------------------- # 'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']), 'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']), 'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true), 'topics_per_page' => array('lang' => 'TOPICS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false), 'posts_per_page' => array('lang' => 'POSTS_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:4', 'explain' => false), 'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true), 'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false), 'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true), 'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true), 'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true), 'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'), 'max_quote_depth' => array('lang' => 'QUOTE_DEPTH_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true), 'max_post_img_width' => array('lang' => 'MAX_POST_IMG_WIDTH', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), 'max_post_img_height' => array('lang' => 'MAX_POST_IMG_HEIGHT', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']), # #-----[ FIND ]--------------------------------------------- # Around Line 321 'allow_autologin' => array('lang' => 'ALLOW_AUTOLOGIN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'max_autologin_time' => array('lang' => 'AUTOLOGIN_LENGTH', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']), 'ip_check' => array('lang' => 'IP_VALID', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_ip_check', 'explain' => true), 'browser_check' => array('lang' => 'BROWSER_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'forwarded_for_check' => array('lang' => 'FORWARDED_FOR_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), # #-----[ AFTER, ADD ]--------------------------------------------- # 'referer_validation' => array('lang' => 'REFERER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true), # #-----[ FIND ]--------------------------------------------- # Around Line 568 'CONTENT' => build_cfg_template($type, $config_key, $this->new_config, $config_key, $vars), # #-----[ REPLACE WITH ]--------------------------------------------- # 'CONTENT' => $content, # #-----[ FIND ]--------------------------------------------- # Around Line 675 { $radio_ary = array(4 => 'ALL', 3 => 'CLASS_C', 2 => 'CLASS_B', 0 => 'NO_IP_VALIDATION'); return h_radio('config[ip_check]', $radio_ary, $value, $key); } # #-----[ AFTER, ADD ]--------------------------------------------- # /** * Select referer validation */ function select_ref_check($value, $key = '') { $radio_ary = array(REFERER_VALIDATE_PATH => 'REF_PATH', REFERER_VALIDATE_HOST => 'REF_HOST', REFERER_VALIDATE_NONE => 'NO_REF_VALIDATION'); return h_radio('config[referer_validation]', $radio_ary, $value, $key); } # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_captcha.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_captcha.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_captcha.php 8655 2008-06-13 19:39:01Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 52 { include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx); } $captcha = new captcha(); $captcha->execute(gen_rand_string(mt_rand(5, 8)), time()); # #-----[ FIND ]--------------------------------------------- # Around Line 57 exit_handler(); # #-----[ REPLACE WITH ]--------------------------------------------- # exit; # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_database.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_database.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_database.php 8647 2008-06-11 15:29:19Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 23 global $db, $user, $auth, $template, $table_prefix; # #-----[ REPLACE WITH ]--------------------------------------------- # global $cache, $db, $user, $auth, $template, $table_prefix; # #-----[ FIND ]--------------------------------------------- # Around Line 157 } } $extractor->write_end(); # #-----[ AFTER, ADD ]--------------------------------------------- # add_log('admin', 'LOG_DB_BACKUP'); # #-----[ FIND ]--------------------------------------------- # Around Line 157 if ($download == true) { exit; } # #-----[ FIND ]--------------------------------------------- # Around Line 162 add_log('admin', 'LOG_DB_BACKUP'); # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 170 break; default: include($phpbb_root_path . 'includes/functions_install.' . $phpEx); $tables = get_tables($db); # #-----[ AFTER, ADD ]--------------------------------------------- # asort($tables); # #-----[ FIND ]--------------------------------------------- # Around Line 345 case 'postgres': $delim = ";\n"; while (($sql = $fgetd($fp, $delim, $read, $seek, $eof)) !== false) { $query = trim($sql); # #-----[ FIND ]--------------------------------------------- # Around Line 350 $db->sql_query($query); # #-----[ REPLACE WITH ]--------------------------------------------- # if (substr($query, 0, 13) == 'CREATE DOMAIN') { list(, , $domain) = explode(' ', $query); $sql = "SELECT domain_name FROM information_schema.domains WHERE domain_name = '$domain';"; $result = $db->sql_query($sql); if (!$db->sql_fetchrow($result)) { $db->sql_query($query); } $db->sql_freeresult($result); } else { $db->sql_query($query); } # #-----[ FIND ]--------------------------------------------- # Around Line 397 } break; } $close($fp); # #-----[ AFTER, ADD ]--------------------------------------------- # // Purge the cache due to updated data $cache->purge(); # #-----[ FIND ]--------------------------------------------- # Around Line 1108 $this->flush($sql_data . ";\n"); } } $sql_data = '-- Table: ' . $table_name . "\n"; # #-----[ FIND ]--------------------------------------------- # Around Line 1113 //$sql_data .= "DROP TABLE $table_name;\n"; # #-----[ REPLACE WITH ]--------------------------------------------- # $sql_data .= "DROP TABLE $table_name;\n"; # #-----[ FIND ]--------------------------------------------- # Around Line 1177 $line .= '('; $line .= sprintf("%s,%s", (($row['lengthvar'] >> 16) & 0xffff), (($row['lengthvar'] - 4) & 0xffff)); $line .= ')'; } # #-----[ FIND ]--------------------------------------------- # Around Line 1182 if (!empty($row['rowdefault'])) # #-----[ REPLACE WITH ]--------------------------------------------- # if (isset($row['rowdefault'])) # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_forums.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_forums.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_forums.php 8655 2008-06-13 19:39:01Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 54 case 'progress_bar': $start = request_var('start', 0); $total = request_var('total', 0); $this->display_progress_bar($start, $total); # #-----[ FIND ]--------------------------------------------- # Around Line 59 exit_handler(); # #-----[ REPLACE WITH ]--------------------------------------------- # exit; # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_groups.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_groups.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_groups.php 8634 2008-06-09 13:05:34Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 85 group_user_attributes($action, $group_id, $mark_ary, false, $group_name); switch ($action) { case 'demote': $message = 'GROUP_MODS_DEMOTED'; break; case 'promote': $message = 'GROUP_MODS_PROMOTED'; break; case 'approve': $message = 'USERS_APPROVED'; break; } trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id)); # #-----[ REPLACE WITH ]--------------------------------------------- # $error = group_user_attributes($action, $group_id, $mark_ary, false, $group_name); if (!$error) { switch ($action) { case 'demote': $message = 'GROUP_MODS_DEMOTED'; break; case 'promote': $message = 'GROUP_MODS_PROMOTED'; break; case 'approve': $message = 'USERS_APPROVED'; break; } trigger_error($user->lang[$message] . adm_back_link($this->u_action . '&action=list&g=' . $group_id)); } else { trigger_error($user->lang[$error] . adm_back_link($this->u_action . '&action=list&g=' . $group_id), E_USER_WARNING); } # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_icons.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_icons.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_icons.php 8628 2008-06-09 11:58:57Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 434 break; default: $suc_lang = $lang; } # #-----[ FIND ]--------------------------------------------- # Around Line 439 $errormsgs = '
'; # #-----[ REPLACE WITH ]--------------------------------------------- # $errormsgs = ''; # #-----[ FIND ]--------------------------------------------- # Around Line 445 trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs .adm_back_link($this->u_action), $level); # #-----[ REPLACE WITH ]--------------------------------------------- # trigger_error($user->lang[$suc_lang . '_ADDED'] . $errormsgs . adm_back_link($this->u_action), $level); # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_main.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_main.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_main.php 8580 2008-06-02 17:10:21Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 59 $action = request_var('action', ''); if ($action) { # #-----[ AFTER, ADD ]--------------------------------------------- # if ($action === 'admlogout') { $user->unset_admin(); $redirect_url = append_sid("{$phpbb_root_path}index.$phpEx"); meta_refresh(3, $redirect_url); trigger_error($user->lang['ADM_LOGGED_OUT'] . '

' . sprintf($user->lang['RETURN_INDEX'], '', '')); } # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_permissions.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_permissions.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_permissions.php 8496 2008-04-08 10:07:05Z davidmj $ # #-----[ FIND ]--------------------------------------------- # Around Line 1154 { $sql_where = 'AND ' . $db->sql_in_set('a.auth_option_id', $option_ids); } // Not ideal, due to the filesort, non-use of indexes, etc. # #-----[ FIND ]--------------------------------------------- # Around Line 1159 $sql = 'SELECT DISTINCT u.user_id, u.username # #-----[ REPLACE WITH ]--------------------------------------------- # $sql = 'SELECT DISTINCT u.user_id, u.username, u.username_clean, u.user_regdate # #-----[ OPEN ]--------------------------------------------- # includes/acp/acp_styles.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: acp_styles.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: acp_styles.php 8530 2008-04-28 17:13:50Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 692 $db->sql_freeresult($result); if (!$template_info) { trigger_error($user->lang['NO_TEMPLATE'] . adm_back_link($this->u_action), E_USER_WARNING); # #-----[ AFTER, ADD ]--------------------------------------------- # } if ($save_changes && !check_form_key('acp_styles')) { trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING); } else if (!$save_changes) { add_form_key('acp_styles'); # #-----[ OPEN ]--------------------------------------------- # includes/auth/auth_apache.php # #-----[ FIND ]--------------------------------------------- # Around Line 3 * @version $Id: auth_apache.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: auth_apache.php 8602 2008-06-04 16:05:27Z naderman $ # #-----[ FIND ]--------------------------------------------- # Around Line 146 set_var($php_auth_user, $php_auth_user, 'string'); set_var($php_auth_pw, $php_auth_pw, 'string'); # #-----[ REPLACE WITH ]--------------------------------------------- # set_var($php_auth_user, $php_auth_user, 'string', true); set_var($php_auth_pw, $php_auth_pw, 'string', true); # #-----[ FIND ]--------------------------------------------- # Around Line 231 set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string'); # #-----[ REPLACE WITH ]--------------------------------------------- # set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true); # #-----[ OPEN ]--------------------------------------------- # includes/auth.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: auth.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: auth.php 8502 2008-04-11 14:14:23Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 798 { if (!$row['auth_role_id']) { $this->_set_group_hold_ary($hold_ary[$row['forum_id']], $row['auth_option_id'], $row['auth_setting']); } # #-----[ FIND ]--------------------------------------------- # Around Line 803 else # #-----[ REPLACE WITH ]--------------------------------------------- # else if (!empty($this->role_cache[$row['auth_role_id']])) # #-----[ OPEN ]--------------------------------------------- # includes/constants.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: constants.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: constants.php 8554 2008-05-15 13:29:14Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 168 define('FIELD_STRING', 2); define('FIELD_TEXT', 3); define('FIELD_BOOL', 4); define('FIELD_DROPDOWN', 5); define('FIELD_DATE', 6); # #-----[ AFTER, ADD ]--------------------------------------------- # // referer validation define('REFERER_VALIDATE_NONE', 0); define('REFERER_VALIDATE_HOST', 1); define('REFERER_VALIDATE_PATH', 2); # #-----[ OPEN ]--------------------------------------------- # includes/functions.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions.php 8491 2008-04-04 11:41:58Z acydburn $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions.php 8675 2008-06-28 17:07:50Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 253 * @version Version 0.1 / $Id: functions.php 8491 2008-04-04 11:41:58Z acydburn $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version Version 0.1 / slightly modified for phpBB 3.0.x (using $H$ as hash type identifier) # #-----[ FIND ]--------------------------------------------- # Around Line 820 $zone_trunc = truncate_string($zone, 50, false, '...'); # #-----[ REPLACE WITH ]--------------------------------------------- # $zone_trunc = truncate_string($zone, 50, 255, false, '...'); # #-----[ FIND ]--------------------------------------------- # Around Line 1776 $script_path = $user->page['root_script_path']; } if ($server_port && (($config['cookie_secure'] && $server_port <> 443) || (!$config['cookie_secure'] && $server_port <> 80))) { # #-----[ FIND ]--------------------------------------------- # Around Line 1781 // HTTP HOST can carry a port number... # #-----[ REPLACE WITH ]--------------------------------------------- # // HTTP HOST can carry a port number (we fetch $user->host, but for old versions this may be true) # #-----[ FIND ]--------------------------------------------- # Around Line 1799 return $url; } /** * Redirects the user to another page then exits the script nicely # #-----[ FIND ]--------------------------------------------- # Around Line 1804 */ function redirect($url, $return = false) # #-----[ REPLACE WITH ]--------------------------------------------- # * This function is intended for urls within the board. It's not meant to redirect to cross-domains. * * @param string $url The url to redirect to * @param bool $return If true, do not redirect but return the sanitized URL. Default is no return. * @param bool $disable_cd_check If true, redirect() will redirect to an external domain. If false, the redirect point to the boards url if it does not match the current domain. Default is false. */ function redirect($url, $return = false, $disable_cd_check = false) # #-----[ FIND ]--------------------------------------------- # Around Line 1832 // Malformed url, redirect to current page... $url = generate_board_url() . '/' . $user->page['page']; } else if (!empty($url_parts['scheme']) && !empty($url_parts['host'])) { # #-----[ FIND ]--------------------------------------------- # Around Line 1837 // Full URL # #-----[ REPLACE WITH ]--------------------------------------------- # // Attention: only able to redirect within the same domain if $disable_cd_check is false (yourdomain.com -> www.yourdomain.com will not work) if (!$disable_cd_check && $url_parts['host'] !== $user->host) { $url = generate_board_url(); } # #-----[ FIND ]--------------------------------------------- # Around Line 2052 // For XHTML compatibility we change back & to & $template->assign_vars(array( 'META' => '') ); # #-----[ REPLACE WITH ]--------------------------------------------- # $url = str_replace('&', '&', $url); // For XHTML compatibility we change back & to & $template->assign_vars(array( 'META' => '') ); return $url; # #-----[ FIND ]--------------------------------------------- # Around Line 2341 if (defined('IN_CHECK_BAN') && $result['user_row']['user_type'] != USER_FOUNDER) { return; } # #-----[ FIND ]--------------------------------------------- # Around Line 2346 meta_refresh(3, $redirect); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = meta_refresh(3, $redirect); # #-----[ FIND ]--------------------------------------------- # Around Line 2781 return '(?:[a-z0-9\'\.\-_\+\|]|&)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+'; # #-----[ REPLACE WITH ]--------------------------------------------- # return '(?:[a-z0-9\'\.\-_\+\|]++|&)+@[a-z0-9\-]+\.(?:[a-z0-9\-]+\.)*[a-z]+'; # #-----[ FIND ]--------------------------------------------- # Around Line 2882 @exec('nslookup -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host), $output); # #-----[ REPLACE WITH ]--------------------------------------------- # @exec('nslookup -type=' . escapeshellarg($type) . ' ' . escapeshellarg($host) . '.', $output); # #-----[ FIND ]--------------------------------------------- # Around Line 2908 return (checkdnsrr($host, $type)) ? true : false; # #-----[ REPLACE WITH ]--------------------------------------------- # // The dot indicates to search the DNS root (helps those having DNS prefixes on the same domain) return (checkdnsrr($host . '.', $type)) ? true : false; # #-----[ FIND ]--------------------------------------------- # Around Line 2952 if ($config['gzip_compress']) { if (@extension_loaded('zlib') && !headers_sent()) # #-----[ REPLACE WITH ]--------------------------------------------- # if ((int) @ini_get('output_buffering') === 1 || strtolower(@ini_get('output_buffering')) === 'on') { @ob_flush(); } // Another quick fix for those having gzip compression enabled, but do not flush if the coder wants to catch "something". ;) if ($config['gzip_compress']) { if (@extension_loaded('zlib') && !headers_sent() && !ob_get_level()) # #-----[ FIND ]--------------------------------------------- # Around Line 3199 $sql = 'SELECT s.session_user_id, s.session_ip, s.session_viewonline FROM ' . SESSIONS_TABLE . ' s WHERE s.session_time >= ' . ($time - ((int) ($time % 30))) . $reading_sql . ' AND s.session_user_id <> ' . ANONYMOUS; # #-----[ FIND ]--------------------------------------------- # Around Line 3204 $result = $db->sql_query($sql, 30); # #-----[ REPLACE WITH ]--------------------------------------------- # $result = $db->sql_query($sql); # #-----[ FIND ]--------------------------------------------- # Around Line 3669 * * Note: This function is called after the template has been outputted. */ function exit_handler() { # #-----[ FIND ]--------------------------------------------- # Around Line 3674 global $phpbb_hook; # #-----[ REPLACE WITH ]--------------------------------------------- # global $phpbb_hook, $config; # #-----[ FIND ]--------------------------------------------- # Around Line 3680 return $phpbb_hook->hook_return_result(__FUNCTION__); } } // As a pre-caution... some setups display a blank page if the flush() is not there. # #-----[ FIND ]--------------------------------------------- # Around Line 3685 @flush(); # #-----[ REPLACE WITH ]--------------------------------------------- # (!$config['gzip_compress']) ? @flush() : @ob_flush(); # #-----[ OPEN ]--------------------------------------------- # includes/functions_admin.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_admin.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_admin.php 8508 2008-04-20 04:58:29Z davidmj $ # #-----[ FIND ]--------------------------------------------- # Around Line 1543 if (sizeof($forum_ids) == 1) { $sql = 'SELECT SUM(t.topic_replies + 1) AS forum_posts FROM ' . TOPICS_TABLE . ' t WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . ' # #-----[ FIND ]--------------------------------------------- # Around Line 1548 AND t.topic_approved = 1'; # #-----[ REPLACE WITH ]--------------------------------------------- # AND t.topic_approved = 1 AND t.topic_status <> ' . ITEM_MOVED; # #-----[ FIND ]--------------------------------------------- # Around Line 1552 { $sql = 'SELECT t.forum_id, SUM(t.topic_replies + 1) AS forum_posts FROM ' . TOPICS_TABLE . ' t WHERE ' . $db->sql_in_set('t.forum_id', $forum_ids) . ' AND t.topic_approved = 1 # #-----[ AFTER, ADD ]--------------------------------------------- # AND t.topic_status <> ' . ITEM_MOVED . ' # #-----[ OPEN ]--------------------------------------------- # includes/functions_compress.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_compress.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_compress.php 8639 2008-06-09 17:44:32Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 213 $folders = explode('/', $target_filename); // Create and folders and subfolders if they do not exist foreach ($folders as $folder) { # #-----[ AFTER, ADD ]--------------------------------------------- # $folder = trim($folder); if (!$folder) { continue; } # #-----[ FIND ]--------------------------------------------- # Around Line 235 // Some archivers are punks, they don't don't include folders in their archives! # #-----[ REPLACE WITH ]--------------------------------------------- # // Some archivers are punks, they don't include folders in their archives! # #-----[ FIND ]--------------------------------------------- # Around Line 242 $folders = explode('/', pathinfo($target_filename, PATHINFO_DIRNAME)); // Create and folders and subfolders if they do not exist foreach ($folders as $folder) { # #-----[ AFTER, ADD ]--------------------------------------------- # $folder = trim($folder); if (!$folder) { continue; } # #-----[ FIND ]--------------------------------------------- # Around Line 517 if ($filetype == 5) { if (!is_dir("$dst$filename")) { $str = ''; $folders = explode('/', "$dst$filename"); // Create and folders and subfolders if they do not exist foreach ($folders as $folder) { # #-----[ REPLACE WITH ]--------------------------------------------- # $target_filename = "$dst$filename"; if ($filetype == 5) { if (!is_dir($target_filename)) { $str = ''; $folders = explode('/', $target_filename); // Create and folders and subfolders if they do not exist foreach ($folders as $folder) { $folder = trim($folder); if (!$folder) { continue; } # #-----[ FIND ]--------------------------------------------- # Around Line 547 else if ($filesize != 0 && ($filetype == 0 || $filetype == "\0")) { // Write out the files if (!($fp = fopen("$dst$filename", 'wb'))) { trigger_error("Couldn't create file $filename"); } @chmod("$dst$filename", 0777); // Grab the file contents fwrite($fp, $fzread($this->fp, ($filesize + 511) &~ 511), $filesize); # #-----[ REPLACE WITH ]--------------------------------------------- # else if ($filesize >= 0 && ($filetype == 0 || $filetype == "\0")) { // Some archivers are punks, they don't properly order the folders in their archives! $str = ''; $folders = explode('/', pathinfo($target_filename, PATHINFO_DIRNAME)); // Create and folders and subfolders if they do not exist foreach ($folders as $folder) { $folder = trim($folder); if (!$folder) { continue; } $str = (!empty($str)) ? $str . '/' . $folder : $folder; if (!is_dir($str)) { if (!@mkdir($str, 0777)) { trigger_error("Could not create directory $folder"); } @chmod($str, 0777); } } // Write out the files if (!($fp = fopen($target_filename, 'wb'))) { trigger_error("Couldn't create file $filename"); } @chmod($target_filename, 0777); // Grab the file contents fwrite($fp, ($filesize) ? $fzread($this->fp, ($filesize + 511) &~ 511) : '', $filesize); # #-----[ OPEN ]--------------------------------------------- # includes/functions_content.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_content.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_content.php 8667 2008-06-21 16:05:02Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 436 function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false) { global $phpbb_root_path, $phpEx; $uid = $bitfield = ''; # #-----[ AFTER, ADD ]--------------------------------------------- # $flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0); # #-----[ FIND ]--------------------------------------------- # Around Line 460 if (!$message_parser->bbcode_bitfield) { $uid = ''; } # #-----[ FIND ]--------------------------------------------- # Around Line 465 $flags = (($allow_bbcode) ? OPTION_FLAG_BBCODE : 0) + (($allow_smilies) ? OPTION_FLAG_SMILIES : 0) + (($allow_urls) ? OPTION_FLAG_LINKS : 0); # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 566 return $orig_url . '/'; // slash is taken away by relative url pattern # #-----[ REPLACE WITH ]--------------------------------------------- # return $whitespace . $orig_url . '/'; // slash is taken away by relative url pattern # #-----[ FIND ]--------------------------------------------- # Around Line 1064 */ function truncate_string($string, $max_length = 60, $allow_reply = true, $append = '') # #-----[ REPLACE WITH ]--------------------------------------------- # * The maximum storage length is there to fit the string within the given length. The string may be further truncated due to html entities. * For example: string given is 'a "quote"' (length: 9), would be a stored as 'a "quote"' (length: 19) * * @param string $string The text to truncate to the given length. String is specialchared. * @param int $max_length Maximum length of string (multibyte character count as 1 char / Html entity count as 1 char) * @param int $max_store_length Maximum character length of string (multibyte character count as 1 char / Html entity count as entity chars). * @param bool $allow_reply Allow Re: in front of string * @param string $append String to be appended */ function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = true, $append = '') # #-----[ FIND ]--------------------------------------------- # Around Line 1094 if (sizeof($chars) > $max_length) { // Cut off the last elements from the array $string = implode('', array_slice($chars, 0, $max_length - utf8_strlen($append))); $stripped = true; # #-----[ AFTER, ADD ]--------------------------------------------- # } // Due to specialchars, we may not be able to store the string... if (utf8_strlen($string) > $max_store_length) { // let's split again, we do not want half-baked strings where entities are split $_chars = utf8_str_split(htmlspecialchars_decode($string)); $chars = array_map('utf8_htmlspecialchars', $_chars); do { array_pop($chars); $string = implode('', $chars); } while (utf8_strlen($string) > $max_store_length || !sizeof($chars)); # #-----[ OPEN ]--------------------------------------------- # includes/functions_convert.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_convert.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_convert.php 8667 2008-06-21 16:05:02Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 1280 $config_value = truncate_string(utf8_htmlspecialchars($config_value), 255, false); # #-----[ REPLACE WITH ]--------------------------------------------- # $config_value = truncate_string(utf8_htmlspecialchars($config_value), 255, 255, false); # #-----[ OPEN ]--------------------------------------------- # includes/functions_install.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_install.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_install.php 8507 2008-04-20 04:57:29Z davidmj $ # #-----[ FIND ]--------------------------------------------- # Around Line 284 if (strpos($table_prefix, '-') !== false || strpos($table_prefix, '.') !== false) # #-----[ REPLACE WITH ]--------------------------------------------- # if (strspn($table_prefix, '-./\\') !== 0) # #-----[ OPEN ]--------------------------------------------- # includes/functions_jabber.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_jabber.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_jabber.php 8516 2008-04-21 11:11:08Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 397 if ($second_time) { // If we are here for the second time after TLS, we need to continue logging in $this->login(); return; } # #-----[ REPLACE WITH ]--------------------------------------------- # /** Currently commented out due to problems with some jabber server - reason unknown if ($second_time) { // If we are here for the second time after TLS, we need to continue logging in $this->login(); return; }*/ # #-----[ OPEN ]--------------------------------------------- # includes/functions_posting.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_posting.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_posting.php 8667 2008-06-21 16:05:02Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 356 ); include_once($phpbb_root_path . 'includes/functions_upload.' . $phpEx); $upload = new fileupload(); # #-----[ AFTER, ADD ]--------------------------------------------- # if ($config['check_attachment_content']) { $upload->set_disallowed_content(explode('|', $config['mime_triggers'])); } # #-----[ FIND ]--------------------------------------------- # Around Line 527 $format = imagetypes(); $new_type = 0; if ($type !== false) { # #-----[ AFTER, ADD ]--------------------------------------------- # // Type is one of the IMAGETYPE constants - it is fetched from getimagesize() // We do not use the constants here, because some were not available in PHP 4.3.x # #-----[ FIND ]--------------------------------------------- # Around Line 550 // PNG case 3: $new_type = ($format & IMG_PNG) ? IMG_PNG : false; break; # #-----[ FIND ]--------------------------------------------- # Around Line 555 // BMP, WBMP case 6: # #-----[ REPLACE WITH ]--------------------------------------------- # // WBMP # #-----[ FIND ]--------------------------------------------- # Around Line 1649 $data['post_edit_reason'] = truncate_string($data['post_edit_reason'], 255, false); # #-----[ REPLACE WITH ]--------------------------------------------- # $data['post_edit_reason'] = truncate_string($data['post_edit_reason'], 255, 255, false); # #-----[ FIND ]--------------------------------------------- # Around Line 1860 'topic_last_post_id' => $data['post_id'], 'topic_last_post_time' => $current_time, 'topic_last_poster_id' => (int) $user->data['user_id'], 'topic_last_poster_name' => (!$user->data['is_registered'] && $username) ? $username : (($user->data['user_id'] != ANONYMOUS) ? $user->data['username'] : ''), 'topic_last_poster_colour' => $user->data['user_colour'], # #-----[ AFTER, ADD ]--------------------------------------------- # 'topic_last_post_subject' => (string) $subject, # #-----[ OPEN ]--------------------------------------------- # includes/functions_privmsgs.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_privmsgs.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_privmsgs.php 8567 2008-05-26 12:00:17Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 206 'S_UNREAD_MESSAGES' => ($folder_ary['unread_messages']) ? true : false, 'S_CUSTOM_FOLDER' => ($f_id > 0) ? true : false) ); } # #-----[ AFTER, ADD ]--------------------------------------------- # if ($folder_id !== false && !isset($folder[$folder_id])) { trigger_error('UNKNOWN_FOLDER'); } # #-----[ FIND ]--------------------------------------------- # Around Line 1804 'U_VIEW_NEXT_HISTORY' => ($next_history_pm) ? "$url&p=" . $next_history_pm : '', 'U_VIEW_PREVIOUS_HISTORY' => ($previous_history_pm) ? "$url&p=" . $previous_history_pm : '', )); return true; # #-----[ AFTER, ADD ]--------------------------------------------- # } /** * Set correct users max messages in PM folder. * If several group memberships define different amount of messages, the highest will be chosen. */ function set_user_message_limit() { global $user, $db, $config; // Get maximum about from user memberships - if it is 0, there is no limit set and we use the maximum value within the config. $sql = 'SELECT MAX(g.group_message_limit) as max_message_limit FROM ' . GROUPS_TABLE . ' g, ' . USER_GROUP_TABLE . ' ug WHERE ug.user_id = ' . $user->data['user_id'] . ' AND ug.user_pending = 0 AND ug.group_id = g.group_id'; $result = $db->sql_query($sql); $message_limit = (int) $db->sql_fetchfield('max_message_limit'); $db->sql_freeresult($result); $user->data['message_limit'] = (!$message_limit) ? $config['pm_max_msgs'] : $message_limit; # #-----[ OPEN ]--------------------------------------------- # includes/functions_upload.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_upload.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_upload.php 8555 2008-05-15 14:10:11Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 226 */ function get_filesize($filename) { return @filesize($filename); } # #-----[ AFTER, ADD ]--------------------------------------------- # /** * Check the first 256 bytes for forbidden content */ function check_content($disallowed_content) { if (empty($disallowed_content)) { return true; } $fp = @fopen($this->filename, 'rb'); if ($fp !== false) { $ie_mime_relevant = fread($fp, 256); fclose($fp); foreach ($disallowed_content as $forbidden) { if (stripos($ie_mime_relevant, '<' . $forbidden) !== false) { return false; } } } return true; } # #-----[ FIND ]--------------------------------------------- # Around Line 283 $upload_mode = (@ini_get('open_basedir') || @ini_get('safe_mode')) ? 'move' : 'copy'; # #-----[ REPLACE WITH ]--------------------------------------------- # $upload_mode = (@ini_get('open_basedir') || @ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'on') ? 'move' : 'copy'; # #-----[ FIND ]--------------------------------------------- # Around Line 453 * @package phpBB3 */ class fileupload { var $allowed_extensions = array(); # #-----[ AFTER, ADD ]--------------------------------------------- # var $disallowed_content = array(); # #-----[ FIND ]--------------------------------------------- # Around Line 473 function fileupload($error_prefix = '', $allowed_extensions = false, $max_filesize = false, $min_width = false, $min_height = false, $max_width = false, $max_height = false) { $this->set_allowed_extensions($allowed_extensions); $this->set_max_filesize($max_filesize); $this->set_allowed_dimensions($min_width, $min_height, $max_width, $max_height); $this->set_error_prefix($error_prefix); # #-----[ REPLACE WITH ]--------------------------------------------- # function fileupload($error_prefix = '', $allowed_extensions = false, $max_filesize = false, $min_width = false, $min_height = false, $max_width = false, $max_height = false, $disallowed_content = false) { $this->set_allowed_extensions($allowed_extensions); $this->set_max_filesize($max_filesize); $this->set_allowed_dimensions($min_width, $min_height, $max_width, $max_height); $this->set_error_prefix($error_prefix); $this->set_disallowed_content($disallowed_content); # #-----[ FIND ]--------------------------------------------- # Around Line 491 { $this->max_filesize = 0; $this->min_width = $this->min_height = $this->max_width = $this->max_height = 0; $this->error_prefix = ''; $this->allowed_extensions = array(); # #-----[ AFTER, ADD ]--------------------------------------------- # $this->disallowed_content = array(); # #-----[ FIND ]--------------------------------------------- # Around Line 526 if ($max_filesize !== false && (int) $max_filesize) { $this->max_filesize = (int) $max_filesize; } } # #-----[ AFTER, ADD ]--------------------------------------------- # /** * Set disallowed strings */ function set_disallowed_content($disallowed_content) { if ($disallowed_content !== false && is_array($disallowed_content)) { $this->disallowed_content = $disallowed_content; } } # #-----[ FIND ]--------------------------------------------- # Around Line 781 $tmp_path = (!@ini_get('safe_mode')) ? false : $phpbb_root_path . 'cache'; # #-----[ REPLACE WITH ]--------------------------------------------- # $tmp_path = (!@ini_get('safe_mode') || strtolower(@ini_get('safe_mode')) == 'off') ? false : $phpbb_root_path . 'cache'; # #-----[ FIND ]--------------------------------------------- # Around Line 870 // Invalid Extension if (!$this->valid_extension($file)) { $file->error[] = sprintf($user->lang[$this->error_prefix . 'DISALLOWED_EXTENSION'], $file->get('extension')); } # #-----[ AFTER, ADD ]--------------------------------------------- # // MIME Sniffing if (!$this->valid_content($file)) { $file->error[] = sprintf($user->lang[$this->error_prefix . 'DISALLOWED_CONTENT']); } # #-----[ FIND ]--------------------------------------------- # Around Line 913 * Check if form upload is valid */ function is_valid($form_name) { return (isset($_FILES[$form_name]) && $_FILES[$form_name]['name'] != 'none') ? true : false; # #-----[ AFTER, ADD ]--------------------------------------------- # } /** * Check for allowed extension */ function valid_content(&$file) { return ($file->check_content($this->disallowed_content)); # #-----[ OPEN ]--------------------------------------------- # includes/functions_user.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: functions_user.php 8494 2008-04-07 17:07:54Z acydburn $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: functions_user.php 8668 2008-06-21 17:08:41Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 181 'user_permissions' => '', 'user_timezone' => $config['board_timezone'], 'user_dateformat' => $config['default_dateformat'], 'user_lang' => $config['default_lang'], 'user_style' => (int) $config['default_style'], # #-----[ FIND ]--------------------------------------------- # Around Line 186 'user_allow_pm' => 1, # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 483 $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE); # #-----[ REPLACE WITH ]--------------------------------------------- # $table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE); # #-----[ FIND ]--------------------------------------------- # Around Line 732 if (in_array('*', $ban_list)) { // Ban all users (it's a good thing that you can exclude people) $banlist_ary[] = '*'; } else { // Select the relevant user_ids. $sql_usernames = array(); foreach ($ban_list as $username) { $username = trim($username); if ($username != '') { $clean_name = utf8_clean_string($username); if ($clean_name == $user->data['username_clean']) { trigger_error('CANNOT_BAN_YOURSELF', E_USER_WARNING); } if (in_array($clean_name, $founder_names)) { trigger_error('CANNOT_BAN_FOUNDER', E_USER_WARNING); } $sql_usernames[] = $clean_name; } } // Make sure we have been given someone to ban if (!sizeof($sql_usernames)) { trigger_error('NO_USER_SPECIFIED'); } $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('username_clean', $sql_usernames); // Do not allow banning yourself if (sizeof($founder)) { $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), array($user->data['user_id'])), true); } else { $sql .= ' AND user_id <> ' . $user->data['user_id']; } if ($row = $db->sql_fetchrow($result)) { do { $banlist_ary[] = (int) $row['user_id']; } while ($row = $db->sql_fetchrow($result)); } else { trigger_error('NO_USERS'); } $db->sql_freeresult($result); } # #-----[ REPLACE WITH ]--------------------------------------------- # // At the moment we do not support wildcard username banning // Select the relevant user_ids. $sql_usernames = array(); foreach ($ban_list as $username) { $username = trim($username); if ($username != '') { $clean_name = utf8_clean_string($username); if ($clean_name == $user->data['username_clean']) { trigger_error('CANNOT_BAN_YOURSELF', E_USER_WARNING); } if (in_array($clean_name, $founder_names)) { trigger_error('CANNOT_BAN_FOUNDER', E_USER_WARNING); } $sql_usernames[] = $clean_name; } } // Make sure we have been given someone to ban if (!sizeof($sql_usernames)) { trigger_error('NO_USER_SPECIFIED'); } $sql = 'SELECT user_id FROM ' . USERS_TABLE . ' WHERE ' . $db->sql_in_set('username_clean', $sql_usernames); // Do not allow banning yourself if (sizeof($founder)) { $sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), array($user->data['user_id'])), true); } else { $sql .= ' AND user_id <> ' . $user->data['user_id']; } if ($row = $db->sql_fetchrow($result)) { do { $banlist_ary[] = (int) $row['user_id']; } while ($row = $db->sql_fetchrow($result)); } else { $db->sql_freeresult($result); trigger_error('NO_USERS'); } $db->sql_freeresult($result); # #-----[ FIND ]--------------------------------------------- # Around Line 990 $sql_where = (in_array('*', $banlist_ary)) ? '' : 'WHERE ' . $db->sql_in_set('session_user_id', $banlist_ary); # #-----[ REPLACE WITH ]--------------------------------------------- # $sql_where = 'WHERE ' . $db->sql_in_set('session_user_id', $banlist_ary); # #-----[ FIND ]--------------------------------------------- # Around Line 1187 * * "Master" function for validating a range of data types */ function validate_data($data, $val_ary) { # #-----[ AFTER, ADD ]--------------------------------------------- # global $user; # #-----[ FIND ]--------------------------------------------- # Around Line 1205 $function = array_shift($validate); array_unshift($validate, $data[$var]); if ($result = call_user_func_array('validate_' . $function, $validate)) { # #-----[ FIND ]--------------------------------------------- # Around Line 1210 $error[] = $result . '_' . strtoupper($var); # #-----[ REPLACE WITH ]--------------------------------------------- # // Since errors are checked later for their language file existence, we need to make sure custom errors are not adjusted. $error[] = (empty($user->lang[$result . '_' . strtoupper($var)])) ? $result : $result . '_' . strtoupper($var); # #-----[ FIND ]--------------------------------------------- # Around Line 1606 if ($user->check_ban(false, false, $email, true) == true) { return 'EMAIL_BANNED'; # #-----[ REPLACE WITH ]--------------------------------------------- # if (($ban_reason = $user->check_ban(false, false, $email, true)) !== false) { return ($ban_reason === true) ? 'EMAIL_BANNED' : $ban_reason; # #-----[ FIND ]--------------------------------------------- # Around Line 1948 $upload = new fileupload('AVATAR_', array('jpg', 'jpeg', 'gif', 'png'), $config['avatar_filesize'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height']); # #-----[ REPLACE WITH ]--------------------------------------------- # $upload = new fileupload('AVATAR_', array('jpg', 'jpeg', 'gif', 'png'), $config['avatar_filesize'], $config['avatar_min_width'], $config['avatar_min_height'], $config['avatar_max_width'], $config['avatar_max_height'], explode('|', $config['mime_triggers'])); # #-----[ FIND ]--------------------------------------------- # Around Line 2904 // We need both username and user_id info $result = user_get_id_name($user_id_ary, $username_ary); if (!sizeof($user_id_ary) || $result !== false) { # #-----[ FIND ]--------------------------------------------- # Around Line 2909 return false; # #-----[ REPLACE WITH ]--------------------------------------------- # return 'NO_USERS'; # #-----[ FIND ]--------------------------------------------- # Around Line 2916 switch ($action) { case 'demote': case 'promote': # #-----[ AFTER, ADD ]--------------------------------------------- # $sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . " WHERE group_id = $group_id AND user_pending = 1 AND " . $db->sql_in_set('user_id', $user_id_ary); $result = $db->sql_query_limit($sql, 1); $not_empty = ($db->sql_fetchrow($result)); $db->sql_freeresult($result); if ($not_empty) { return 'NO_VALID_USERS'; } # #-----[ FIND ]--------------------------------------------- # Around Line 2916 $sql = 'UPDATE ' . USER_GROUP_TABLE . ' SET group_leader = ' . (($action == 'promote') ? 1 : 0) . " WHERE group_id = $group_id # #-----[ AFTER, ADD ]--------------------------------------------- # AND user_pending = 0 # #-----[ FIND ]--------------------------------------------- # Around Line 3026 add_log('admin', $log, $group_name, implode(', ', $username_ary)); group_update_listings($group_id); # #-----[ FIND ]--------------------------------------------- # Around Line 3031 return true; # #-----[ REPLACE WITH ]--------------------------------------------- # return false; # #-----[ OPEN ]--------------------------------------------- # includes/mcp/mcp_ban.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: mcp_ban.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: mcp_ban.php 8589 2008-06-04 11:11:48Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 149 'U_ACTION' => $this->u_action, 'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=mcp_ban&field=ban'), )); # #-----[ FIND ]--------------------------------------------- # Around Line 154 if ($mode != 'user') # #-----[ REPLACE WITH ]--------------------------------------------- # if ($mode === 'email' && !$auth->acl_get('a_user')) # #-----[ FIND ]--------------------------------------------- # Around Line 157 $username = false; if ($user_id && $user_id <> ANONYMOUS) { $sql = 'SELECT username FROM ' . USERS_TABLE . ' WHERE user_id = ' . $user_id; $result = $db->sql_query($sql); $username = (string) $db->sql_fetchfield('username'); # #-----[ REPLACE WITH ]--------------------------------------------- # $username = $pre_fill = false; if ($user_id && $user_id <> ANONYMOUS) { $sql = 'SELECT username, user_email, user_ip FROM ' . USERS_TABLE . ' WHERE user_id = ' . $user_id; $result = $db->sql_query($sql); switch ($mode) { case 'user': $pre_fill = (string) $db->sql_fetchfield('username'); break; case 'ip': $pre_fill = (string) $db->sql_fetchfield('user_ip'); break; case 'email': $pre_fill = (string) $db->sql_fetchfield('user_email'); break; } # #-----[ FIND ]--------------------------------------------- # Around Line 187 $username = $post_info[$post_id]['username']; } } if ($username) { $template->assign_var('USERNAMES', $username); # #-----[ REPLACE WITH ]--------------------------------------------- # switch ($mode) { case 'user': $pre_fill = $post_info[$post_id]['username']; break; case 'ip': $pre_fill = $post_info[$post_id]['poster_ip']; break; case 'email': $pre_fill = $post_info[$post_id]['user_email']; break; } } } if ($pre_fill) { // left for legacy template compatibility $template->assign_var('USERNAMES', $pre_fill); $template->assign_var('BAN_QUANTIFIER', $pre_fill); # #-----[ OPEN ]--------------------------------------------- # includes/mcp/mcp_main.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: mcp_main.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: mcp_main.php 8631 2008-06-09 12:36:06Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 233 $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('action', 'quickmod'))); # #-----[ FIND ]--------------------------------------------- # Around Line 319 $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('action', 'quickmod'))); # #-----[ FIND ]--------------------------------------------- # Around Line 540 $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('action', 'quickmod'))); # #-----[ FIND ]--------------------------------------------- # Around Line 552 'redirect' => $redirect) ); if ($to_forum_id) { # #-----[ FIND ]--------------------------------------------- # Around Line 557 $forum_data = get_forum_data($to_forum_id); # #-----[ REPLACE WITH ]--------------------------------------------- # $forum_data = get_forum_data($to_forum_id, 'f_post'); # #-----[ FIND ]--------------------------------------------- # Around Line 760 $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('action', 'quickmod'))); # #-----[ FIND ]--------------------------------------------- # Around Line 816 $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('action', 'quickmod'))); # #-----[ FIND ]--------------------------------------------- # Around Line 939 $redirect = request_var('redirect', build_url(array('_f_', 'action', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('action', 'quickmod'))); # #-----[ FIND ]--------------------------------------------- # Around Line 951 'redirect' => $redirect) ); if ($to_forum_id) { # #-----[ FIND ]--------------------------------------------- # Around Line 956 $forum_data = get_forum_data($to_forum_id); # #-----[ REPLACE WITH ]--------------------------------------------- # $forum_data = get_forum_data($to_forum_id, 'f_post'); # #-----[ FIND ]--------------------------------------------- # Around Line 988 unset($_REQUEST['confirm_key']); } if (confirm_box(true)) { # #-----[ FIND ]--------------------------------------------- # Around Line 993 $topic_data = get_topic_data($topic_ids); # #-----[ REPLACE WITH ]--------------------------------------------- # $topic_data = get_topic_data($topic_ids, 'f_post'); # #-----[ OPEN ]--------------------------------------------- # includes/mcp/mcp_queue.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: mcp_queue.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: mcp_queue.php 8609 2008-06-05 14:08:12Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 72 { case 'approve_details': $this->tpl_name = 'mcp_post'; # #-----[ FIND ]--------------------------------------------- # Around Line 77 $user->add_lang('posting'); # #-----[ REPLACE WITH ]--------------------------------------------- # $user->add_lang(array('posting', 'viewtopic')); # #-----[ FIND ]--------------------------------------------- # Around Line 457 $redirect = request_var('redirect', build_url(array('_f_', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('quickmod'))); # #-----[ FIND ]--------------------------------------------- # Around Line 756 $redirect = request_var('redirect', build_url(array('t', 'mode', '_f_', 'quickmod')) . "&mode=$mode"); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('t', 'mode', 'quickmod')) . "&mode=$mode"); # #-----[ OPEN ]--------------------------------------------- # includes/mcp/mcp_reports.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: mcp_reports.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: mcp_reports.php 8598 2008-06-04 15:37:06Z naderman $ # #-----[ FIND ]--------------------------------------------- # Around Line 448 $redirect = request_var('redirect', build_url(array('mode', '_f_', 'r', 'quickmod')) . '&mode=reports'); } else if ($action == 'close' && !request_var('r', 0)) { $redirect = request_var('redirect', build_url(array('mode', '_f_', 'p', 'quickmod')) . '&mode=reports'); } else { $redirect = request_var('redirect', build_url(array('_f_', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('mode', 'r', 'quickmod')) . '&mode=reports'); } else if ($action == 'close' && !request_var('r', 0)) { $redirect = request_var('redirect', build_url(array('mode', 'p', 'quickmod')) . '&mode=reports'); } else { $redirect = request_var('redirect', build_url(array('quickmod'))); # #-----[ OPEN ]--------------------------------------------- # includes/mcp/mcp_topic.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: mcp_topic.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: mcp_topic.php 8520 2008-04-21 13:17:30Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 384 $redirect = request_var('redirect', build_url(array('_f_', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('quickmod'))); # #-----[ FIND ]--------------------------------------------- # Around Line 548 $redirect = request_var('redirect', build_url(array('_f_', 'quickmod'))); # #-----[ REPLACE WITH ]--------------------------------------------- # $redirect = request_var('redirect', build_url(array('quickmod'))); # #-----[ OPEN ]--------------------------------------------- # includes/mcp/mcp_warn.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: mcp_warn.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: mcp_warn.php 8621 2008-06-08 10:43:32Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 260 trigger_error($user->lang['USER_WARNING_ADDED'] . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); # #-----[ REPLACE WITH ]--------------------------------------------- # trigger_error($msg . '

' . sprintf($user->lang['RETURN_PAGE'], '', '')); # #-----[ OPEN ]--------------------------------------------- # includes/message_parser.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: message_parser.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: message_parser.php 8665 2008-06-21 15:09:44Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 344 } $in = trim($in); $error = false; # #-----[ AFTER, ADD ]--------------------------------------------- # // Do not allow 0-sizes generally being entered if ($width <= 0 || $height <= 0) { return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]'; } # #-----[ FIND ]--------------------------------------------- # Around Line 398 $code = str_replace(array('<', '>'), array('<', '>'), $code); # #-----[ REPLACE WITH ]--------------------------------------------- # $str_from = array('<', '>', '[', ']', '.', ':', ':'); $str_to = array('<', '>', '[', ']', '.', ':', ':'); $code = str_replace($str_from, $str_to, $code); # #-----[ OPEN ]--------------------------------------------- # includes/search/fulltext_mysql.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: fulltext_mysql.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: fulltext_mysql.php 8604 2008-06-04 17:25:50Z naderman $ # #-----[ FIND ]--------------------------------------------- # Around Line 544 $sql_sort_table = ($type == 'posts') ? TOPICS_TABLE . ' t, ' : ''; $sql_sort_join = ($type == 'posts') ? ' AND t.topic_id = p.topic_id ' : ''; # #-----[ REPLACE WITH ]--------------------------------------------- # $sql_sort_table = ($type == 'posts' && !$firstpost_only) ? TOPICS_TABLE . ' t, ' : ''; $sql_sort_join = ($type == 'posts' && !$firstpost_only) ? ' AND t.topic_id = p.topic_id ' : ''; # #-----[ OPEN ]--------------------------------------------- # includes/search/fulltext_native.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: fulltext_native.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: fulltext_native.php 8604 2008-06-04 17:25:50Z naderman $ # #-----[ FIND ]--------------------------------------------- # Around Line 811 $sql_sort_table = ($type == 'posts') ? TOPICS_TABLE . ' t, ' : ''; $sql_sort_join = ($type == 'posts') ? ' AND t.topic_id = p.topic_id ' : ''; # #-----[ REPLACE WITH ]--------------------------------------------- # $sql_sort_table = ($type == 'posts' && !$firstpost_only) ? TOPICS_TABLE . ' t, ' : ''; $sql_sort_join = ($type == 'posts' && !$firstpost_only) ? ' AND t.topic_id = p.topic_id ' : ''; # #-----[ FIND ]--------------------------------------------- # Around Line 898 FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($topic_id || $firstpost_only) ? ', ' . TOPICS_TABLE . ' t' : '') . " # #-----[ REPLACE WITH ]--------------------------------------------- # FROM " . $sql_sort_table . POSTS_TABLE . ' p' . (($firstpost_only) ? ', ' . TOPICS_TABLE . ' t' : '') . " # #-----[ OPEN ]--------------------------------------------- # includes/session.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: session.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: session.php 8670 2008-06-23 14:07:24Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 66 if (strpos($argument, 'sid=') === 0 || strpos($argument, '_f_=') === 0) # #-----[ REPLACE WITH ]--------------------------------------------- # if (strpos($argument, 'sid=') === 0) # #-----[ FIND ]--------------------------------------------- # Around Line 156 // Give us some basic information $this->time_now = time(); $this->cookie_data = array('u' => 0, 'k' => ''); $this->update_session_page = $update_session_page; $this->browser = (!empty($_SERVER['HTTP_USER_AGENT'])) ? htmlspecialchars((string) $_SERVER['HTTP_USER_AGENT']) : ''; # #-----[ AFTER, ADD ]--------------------------------------------- # $this->referer = (!empty($_SERVER['HTTP_REFERER'])) ? htmlspecialchars((string) $_SERVER['HTTP_REFERER']) : ''; # #-----[ FIND ]--------------------------------------------- # Around Line 156 $this->forwarded_for = (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? (string) $_SERVER['HTTP_X_FORWARDED_FOR'] : ''; $this->host = (!empty($_SERVER['HTTP_HOST'])) ? (string) strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME')); # #-----[ AFTER, ADD ]--------------------------------------------- # // Since HTTP_HOST may carry a port definition, we need to remove it here... if (strpos($this->host, ':') !== false) { $this->host = substr($this->host, 0, strpos($this->host, ':')); } # #-----[ FIND ]--------------------------------------------- # Around Line 223 if ($load = @file_get_contents('/proc/loadavg')) { $this->load = array_slice(explode(' ', $load), 0, 1); # #-----[ REPLACE WITH ]--------------------------------------------- # if ((function_exists('sys_getloadavg') && $load = sys_getloadavg()) || ($load = explode(' ', @file_get_contents('/proc/loadavg')))) { $this->load = array_slice($load, 0, 1); # #-----[ FIND ]--------------------------------------------- # Around Line 269 if ($u_ip === $s_ip && $s_browser === $u_browser && $s_forwarded_for === $u_forwarded_for) # #-----[ REPLACE WITH ]--------------------------------------------- # // referer checks // The @ before $config['referer_validation'] suppresses notices present while running the updater $check_referer_path = (@$config['referer_validation'] == REFERER_VALIDATE_PATH); $referer_valid = true; // we assume HEAD and TRACE to be foul play and thus only whitelist GET if (@$config['referer_validation'] && isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) !== 'get') { $referer_valid = $this->validate_referer($check_referer_path); } if ($u_ip === $s_ip && $s_browser === $u_browser && $s_forwarded_for === $u_forwarded_for && $referer_valid) # #-----[ FIND ]--------------------------------------------- # Around Line 360 add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, htmlspecialchars($u_forwarded_for), htmlspecialchars($s_forwarded_for)); # #-----[ REPLACE WITH ]--------------------------------------------- # if ($referer_valid) { add_log('critical', 'LOG_IP_BROWSER_FORWARDED_CHECK', $u_ip, $s_ip, $u_browser, $s_browser, htmlspecialchars($u_forwarded_for), htmlspecialchars($s_forwarded_for)); } else { add_log('critical', 'LOG_REFERER_INVALID', $this->referer); } # #-----[ FIND ]--------------------------------------------- # Around Line 1122 trigger_error($message); } return ($banned) ? true : false; # #-----[ REPLACE WITH ]--------------------------------------------- # // A very special case... we are within the cron script which is not supposed to print out the ban message... show blank page if (defined('IN_CRON')) { garbage_collection(); exit_handler(); exit; } trigger_error($message); } return ($banned && $ban_row['ban_give_reason']) ? $ban_row['ban_give_reason'] : $banned; # #-----[ FIND ]--------------------------------------------- # Around Line 1310 // Lets regenerate it to be safe if ($user_id === $this->data['user_id'] && $this->cookie_data['k']) { $this->set_login_key($user_id); } # #-----[ AFTER, ADD ]--------------------------------------------- # } /** * Check if the request originated from the same page. * @param bool $check_script_path If true, the path will be checked as well */ function validate_referer($check_script_path = false) { // no referer - nothing to validate, user's fault for turning it off (we only check on POST; so meta can't be the reason) if (empty($this->referer) || empty($this->host) ) { return true; } $host = htmlspecialchars($this->host); $ref = substr($this->referer, strpos($this->referer, '://') + 3); if (!(stripos($ref , $host) === 0)) { return false; } else if ($check_script_path && rtrim($this->page['root_script_path'], '/') !== '') { $ref = substr($ref, strlen($host)); $server_port = (!empty($_SERVER['SERVER_PORT'])) ? (int) $_SERVER['SERVER_PORT'] : (int) getenv('SERVER_PORT'); if ($server_port !== 80 && $server_port !== 443 && stripos($ref, ":$server_port") === 0) { $ref = substr($ref, strlen(":$server_port")); } if (!(stripos(rtrim($ref, '/'), rtrim($this->page['root_script_path'], '/')) === 0)) { return false; } } return true; } function unset_admin() { global $db; $sql = 'UPDATE ' . SESSIONS_TABLE . ' SET session_admin = 0 WHERE session_id = \'' . $db->sql_escape($this->session_id) . '\''; $db->sql_query($sql); # #-----[ FIND ]--------------------------------------------- # Around Line 1601 if ($row['image_lang']) { $localised_images = true; } # #-----[ AFTER, ADD ]--------------------------------------------- # $row['image_filename'] = rawurlencode($row['image_filename']); # #-----[ OPEN ]--------------------------------------------- # includes/ucp/ucp_confirm.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: ucp_confirm.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: ucp_confirm.php 8655 2008-06-13 19:39:01Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 71 include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx); } $captcha = new captcha(); $captcha->execute($row['code'], $row['seed']); # #-----[ FIND ]--------------------------------------------- # Around Line 76 exit; # #-----[ REPLACE WITH ]--------------------------------------------- # garbage_collection(); exit_handler(); # #-----[ OPEN ]--------------------------------------------- # includes/ucp/ucp_pm.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: ucp_pm.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: ucp_pm.php 8521 2008-04-21 13:20:13Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 127 $sql = 'SELECT group_message_limit FROM ' . GROUPS_TABLE . ' WHERE group_id = ' . $user->data['group_id']; $result = $db->sql_query($sql, 3600); $message_limit = (int) $db->sql_fetchfield('group_message_limit'); $db->sql_freeresult($result); $user->data['message_limit'] = (!$message_limit) ? $config['pm_max_msgs'] : $message_limit; # #-----[ REPLACE WITH ]--------------------------------------------- # set_user_message_limit(); # #-----[ FIND ]--------------------------------------------- # Around Line 157 $sql = 'SELECT group_message_limit FROM ' . GROUPS_TABLE . ' WHERE group_id = ' . $user->data['group_id']; $result = $db->sql_query($sql, 3600); $message_limit = (int) $db->sql_fetchfield('group_message_limit'); $db->sql_freeresult($result); $user->data['message_limit'] = (!$message_limit) ? $config['pm_max_msgs'] : $message_limit; # #-----[ REPLACE WITH ]--------------------------------------------- # set_user_message_limit(); # #-----[ OPEN ]--------------------------------------------- # includes/ucp/ucp_pm_compose.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: ucp_pm_compose.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: ucp_pm_compose.php 8620 2008-06-08 10:39:44Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 634 'message' => $message_parser->message, 'attachment_data' => $message_parser->attachment_data, 'filename_data' => $message_parser->filename_data, 'address_list' => $address_list ); # #-----[ FIND ]--------------------------------------------- # Around Line 639 unset($message_parser); # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 767 } $attachment_data = $message_parser->attachment_data; $filename_data = $message_parser->filename_data; $message_text = $message_parser->message; # #-----[ FIND ]--------------------------------------------- # Around Line 772 unset($message_parser); # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ OPEN ]--------------------------------------------- # includes/ucp/ucp_pm_viewfolder.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: ucp_pm_viewfolder.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: ucp_pm_viewfolder.php 8567 2008-05-26 12:00:17Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 491 $pm_count = $folder[$folder_id]['num_messages']; # #-----[ REPLACE WITH ]--------------------------------------------- # $pm_count = (!empty($folder[$folder_id]['num_messages'])) ? $folder[$folder_id]['num_messages'] : 0; # #-----[ OPEN ]--------------------------------------------- # includes/utf/utf_tools.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: utf_tools.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: utf_tools.php 8510 2008-04-20 05:16:42Z davidmj $ # #-----[ FIND ]--------------------------------------------- # Around Line 1838 } /** * A wrapper for htmlspecialchars($value, ENT_COMPAT, 'UTF-8') */ # #-----[ FIND ]--------------------------------------------- # Around Line 1843 function utf8_htmlspecialchars(&$value) # #-----[ REPLACE WITH ]--------------------------------------------- # function utf8_htmlspecialchars($value) # #-----[ OPEN ]--------------------------------------------- # language/en/acp/attachments.php # #-----[ FIND ]--------------------------------------------- # Around Line 2 * @version $Id: attachments.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: attachments.php 8555 2008-05-15 14:10:11Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 69 'CAT_FLASH_FILES' => 'Flash files', 'CAT_IMAGES' => 'Images', 'CAT_QUICKTIME_FILES' => 'Quicktime media files', 'CAT_RM_FILES' => 'RealMedia media files', 'CAT_WM_FILES' => 'Windows Media media files', # #-----[ AFTER, ADD ]--------------------------------------------- # 'CHECK_CONTENT' => 'Check attachment files', 'CHECK_CONTENT_EXPLAIN' => 'Some browsers can be tricked to assume an incorrect mimetype for uploaded files. This option ensures that such files likely to cause this are rejected.', # #-----[ OPEN ]--------------------------------------------- # language/en/acp/board.php # #-----[ FIND ]--------------------------------------------- # Around Line 2 * @version $Id: board.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: board.php 8554 2008-05-15 13:29:14Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 204 'COPPA_MAIL_EXPLAIN' => 'This is the mailing address where parents will send COPPA registration forms.', 'ENABLE_COPPA' => 'Enable COPPA', 'ENABLE_COPPA_EXPLAIN' => 'This requires users to declare whether they are 13 or over for compliance with the U.S. COPPA. If this is disabled the COPPA specific groups will no longer be displayed.', 'MAX_CHARS' => 'Max', 'MIN_CHARS' => 'Min', # #-----[ FIND ]--------------------------------------------- # Around Line 209 'MIN_TIME_REG' => 'Minimum time for registration', 'MIN_TIME_REG_EXPLAIN' => 'The registration form cannot be submitted before this time has passed.', 'MIN_TIME_TERMS' => 'Minimum time for accepting terms', 'MIN_TIME_TERMS_EXPLAIN' => 'The terms page cannot be skipped before this time has passed.', # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 369 'EMAIL_CHECK_MX_EXPLAIN' => 'If enabled, the e-mail domain provided on registration and profile changes is checked for a valid MX record.', 'FORCE_PASS_CHANGE' => 'Force password change', 'FORCE_PASS_CHANGE_EXPLAIN' => 'Require user to change their password after a set number of days. Setting this value to 0 disables this behaviour.', 'FORM_TIME_MAX' => 'Maximum time to submit forms', 'FORM_TIME_MAX_EXPLAIN' => 'The time a user has to submit a form. Use -1 to disable. Note that a form might become invalid if the session expires, regardless of this setting.', # #-----[ FIND ]--------------------------------------------- # Around Line 374 'FORM_TIME_MIN' => 'Minimum time to submit forms', 'FORM_TIME_MIN_EXPLAIN' => 'Submissions faster than this time are ignored by the board. Use 0 to disable.', # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 378 'IP_VALID' => 'Session IP validation', 'IP_VALID_EXPLAIN' => 'Determines how much of the users IP is used to validate a session; All compares the complete address, A.B.C the first x.x.x, A.B the first x.x, None disables checking. On IPv6 addresses A.B.C compares the first 4 blocks and A.B the first 3 blocks.', 'MAX_LOGIN_ATTEMPTS' => 'Maximum number of login attempts', 'MAX_LOGIN_ATTEMPTS_EXPLAIN' => 'After this number of failed logins the user needs to additionally confirm his login visually (visual confirmation).', 'NO_IP_VALIDATION' => 'None', # #-----[ AFTER, ADD ]--------------------------------------------- # 'NO_REF_VALIDATION' => 'None', # #-----[ FIND ]--------------------------------------------- # Around Line 385 'PASSWORD_TYPE_EXPLAIN' => 'Determines how complex a password needs to be when set or altered, subsequent options include the previous ones.', 'PASS_TYPE_ALPHA' => 'Must contain letters and numbers', 'PASS_TYPE_ANY' => 'No requirements', 'PASS_TYPE_CASE' => 'Must be mixed case', 'PASS_TYPE_SYMBOL' => 'Must contain symbols', # #-----[ AFTER, ADD ]--------------------------------------------- # 'REF_HOST' => 'Only validate host', 'REF_PATH' => 'Also validate path', 'REFERER_VALID' => 'Validate Referer', 'REFERER_VALID_EXPLAIN' => 'If enabled, the referer of POST requests will be checked against the host/script path settings. This may cause issues with boards using several domains and or external logins.', # #-----[ OPEN ]--------------------------------------------- # language/en/acp/common.php # #-----[ FIND ]--------------------------------------------- # Around Line 2 * @version $Id: common.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: common.php 8591 2008-06-04 11:40:53Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 199 'ADD' => 'Add', 'ADMIN' => 'Administration', 'ADMIN_INDEX' => 'Admin index', 'ADMIN_PANEL' => 'Administration Control Panel', # #-----[ AFTER, ADD ]--------------------------------------------- # 'ADM_LOGOUT' => 'ACP Logout', 'ADM_LOGGED_OUT' => 'Successfully logged out from Administration Control Panel', # #-----[ FIND ]--------------------------------------------- # Around Line 609 'LOG_REASON_ADDED' => 'Added report/denial reason
» %s', 'LOG_REASON_REMOVED' => 'Removed report/denial reason
» %s', 'LOG_REASON_UPDATED' => 'Updated report/denial reason
» %s', # #-----[ AFTER, ADD ]--------------------------------------------- # 'LOG_REFERER_INVALID' => 'Referer validation failed
»Referer was “%1$s”. The request was rejected and the session killed.', # #-----[ OPEN ]--------------------------------------------- # language/en/acp/groups.php # #-----[ FIND ]--------------------------------------------- # Around Line 2 * @version $Id: groups.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: groups.php 8634 2008-06-09 13:05:34Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 106 'NO_GROUP' => 'No group specified.', 'NO_GROUPS_CREATED' => 'No groups created yet.', 'NO_PERMISSIONS' => 'Do not copy permissions', 'NO_USERS' => 'You haven’t entered any users.', 'NO_USERS_ADDED' => 'No users were added to the group.', # #-----[ AFTER, ADD ]--------------------------------------------- # 'NO_VALID_USERS' => 'You haven’t entered any users eligible for that action.', # #-----[ OPEN ]--------------------------------------------- # language/en/common.php # #-----[ FIND ]--------------------------------------------- # Around Line 2 * @version $Id: common.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: common.php 8555 2008-05-15 14:10:11Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 76 'ASCENDING' => 'Ascending', 'ATTACHMENTS' => 'Attachments', 'ATTACHED_IMAGE_NOT_IMAGE' => 'The image file you tried to attach is invalid.', 'AUTHOR' => 'Author', 'AUTH_NO_PROFILE_CREATED' => 'The creation of a user profile was unsuccessful.', # #-----[ AFTER, ADD ]--------------------------------------------- # 'AVATAR_DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.', # #-----[ OPEN ]--------------------------------------------- # language/en/memberlist.php # #-----[ FIND ]--------------------------------------------- # Around Line 2 * @version $Id: memberlist.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: memberlist.php 8574 2008-05-29 13:59:47Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 130 'SORT_LAST_ACTIVE' => 'Last active', 'SORT_POST_COUNT' => 'Post count', 'USERNAME_BEGINS_WITH' => 'Username begins with', 'USER_ADMIN' => 'Administrate user', # #-----[ AFTER, ADD ]--------------------------------------------- # 'USER_BAN' => 'Banning', # #-----[ OPEN ]--------------------------------------------- # language/en/posting.php # #-----[ FIND ]--------------------------------------------- # Around Line 2 * @version $Id: posting.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: posting.php 8555 2008-05-15 14:10:11Z Kellanved $ # #-----[ FIND ]--------------------------------------------- # Around Line 80 'DELETE_POST_CONFIRM' => 'Are you sure you want to delete this post?', 'DELETE_POST_WARN' => 'Once deleted the post cannot be recovered', 'DISABLE_BBCODE' => 'Disable BBCode', 'DISABLE_MAGIC_URL' => 'Do not automatically parse URLs', 'DISABLE_SMILIES' => 'Disable smilies', # #-----[ AFTER, ADD ]--------------------------------------------- # 'DISALLOWED_CONTENT' => 'The upload was rejected because the uploaded file was identified as a possible attack vector.', # #-----[ OPEN ]--------------------------------------------- # mcp.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: mcp.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: mcp.php 8655 2008-06-13 19:39:01Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 164 case 'fork': case 'move': case 'delete_post': case 'delete_topic': $module->load('mcp', 'main', 'quickmod'); # #-----[ FIND ]--------------------------------------------- # Around Line 169 exit_handler(); # #-----[ REPLACE WITH ]--------------------------------------------- # exit; # #-----[ OPEN ]--------------------------------------------- # memberlist.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: memberlist.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: memberlist.php 8645 2008-06-10 14:37:38Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 549 'S_PROFILE_ACTION' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group'), 'S_GROUP_OPTIONS' => $group_options, 'S_CUSTOM_FIELDS' => (isset($profile_fields['row']) && sizeof($profile_fields['row'])) ? true : false, 'U_USER_ADMIN' => ($auth->acl_get('a_user')) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", 'i=users&mode=overview&u=' . $user_id, true, $user->session_id) : '', # #-----[ AFTER, ADD ]--------------------------------------------- # 'U_USER_BAN' => ($auth->acl_get('m_ban')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=ban&mode=user&u=' . $user_id, true, $user->session_id) : '', # #-----[ FIND ]--------------------------------------------- # Around Line 896 $sort_key_sql['m'] = 'u.user_rank DESC, u.user_posts'; # #-----[ REPLACE WITH ]--------------------------------------------- # $sort_key_sql['m'] = 'u.user_rank'; # #-----[ FIND ]--------------------------------------------- # Around Line 1155 { $sort_key = $default_key; } $order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC'); # #-----[ AFTER, ADD ]--------------------------------------------- # // Unfortunately we must do this here for sorting by rank, else the sort order is applied wrongly if ($sort_key == 'm') { $order_by .= ', u.user_posts DESC'; } # #-----[ FIND ]--------------------------------------------- # Around Line 1562 'USER_COLOR' => get_username_string('colour', $user_id, $username, $data['user_colour']), 'U_VIEW_PROFILE' => get_username_string('profile', $user_id, $username, $data['user_colour']), 'A_USERNAME' => addslashes(get_username_string('username', $user_id, $username, $data['user_colour'])), # #-----[ AFTER, ADD ]--------------------------------------------- # 'AVATAR_IMG' => get_user_avatar($data['user_avatar'], $data['user_avatar_type'], $data['user_avatar_width'], $data['user_avatar_height']), # #-----[ OPEN ]--------------------------------------------- # posting.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: posting.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: posting.php 8655 2008-06-13 19:39:01Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 112 WHERE forum_id = ' . $forum_id; } else { upload_popup(); # #-----[ FIND ]--------------------------------------------- # Around Line 117 garbage_collection(); exit_handler(); # #-----[ REPLACE WITH ]--------------------------------------------- # exit; # #-----[ FIND ]--------------------------------------------- # Around Line 143 } if ($mode == 'popup') { upload_popup($post_data['forum_style']); # #-----[ FIND ]--------------------------------------------- # Around Line 148 exit_handler(); # #-----[ REPLACE WITH ]--------------------------------------------- # exit; # #-----[ FIND ]--------------------------------------------- # Around Line 274 // Handle delete mode... if ($mode == 'delete') { handle_post_delete($forum_id, $topic_id, $post_id, $post_data); # #-----[ FIND ]--------------------------------------------- # Around Line 279 exit_handler(); # #-----[ REPLACE WITH ]--------------------------------------------- # exit; # #-----[ FIND ]--------------------------------------------- # Around Line 995 { $data['topic_replies_real'] = $post_data['topic_replies_real']; $data['topic_replies'] = $post_data['topic_replies']; } # #-----[ FIND ]--------------------------------------------- # Around Line 1000 unset($message_parser); # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 1150 $message_parser->message = implode("\n", $post_data['poll_options']); $message_parser->decode_message(); $post_data['poll_options'] = explode("\n", $message_parser->message); } # #-----[ FIND ]--------------------------------------------- # Around Line 1155 unset($message_parser); # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 1399 $template->assign_vars(array( 'PROGRESS_BAR' => $user->img('upload_bar', $user->lang['UPLOAD_IN_PROGRESS'])) ); $template->display('popup'); # #-----[ AFTER, ADD ]--------------------------------------------- # garbage_collection(); exit_handler(); # #-----[ OPEN ]--------------------------------------------- # search.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: search.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: search.php 8669 2008-06-22 11:02:04Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 464 $l_search_matches = ($total_match_count == 1) ? sprintf($user->lang['FOUND_SEARCH_MATCH'], $total_match_count) : sprintf($user->lang['FOUND_SEARCH_MATCHES'], $total_match_count); } // define some vars for urls $hilit = implode('|', explode(' ', preg_replace('#\s+#u', ' ', str_replace(array('+', '-', '|', '(', ')', '"'), ' ', $keywords)))); # #-----[ AFTER, ADD ]--------------------------------------------- # // Do not allow *only* wildcard being used for hilight $hilit = (strspn($hilit, '*') === strlen($hilit)) ? '' : $hilit; # #-----[ OPEN ]--------------------------------------------- # style.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: style.php 8486 2008-04-02 08:51:21Z acydburn $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: style.php 8513 2008-04-21 10:54:12Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 18 if (!defined('PHPBB_INSTALLED') || empty($dbms) || !isset($dbhost) || !isset($dbpasswd) || empty($dbuser)) # #-----[ REPLACE WITH ]--------------------------------------------- # if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type)) # #-----[ FIND ]--------------------------------------------- # Around Line 55 // happen to have a current session it will output nothing. We will also cache the // resulting CSS data for five minutes ... anything to reduce the load on the SQL // server a little if ($id) { # #-----[ FIND ]--------------------------------------------- # Around Line 60 if (empty($acm_type) || empty($dbms)) { die('Hacking attempt'); } # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 93 $sql = 'SELECT s.style_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path # #-----[ REPLACE WITH ]--------------------------------------------- # $sql = 'SELECT s.style_id, c.theme_id, c.theme_data, c.theme_path, c.theme_name, c.theme_mtime, i.*, t.template_path # #-----[ FIND ]--------------------------------------------- # Around Line 191 'theme_mtime' => $theme['theme_mtime'], 'theme_data' => $theme['theme_data'] ); $sql = 'UPDATE ' . STYLES_THEME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " # #-----[ FIND ]--------------------------------------------- # Around Line 196 WHERE theme_id = $id"; # #-----[ REPLACE WITH ]--------------------------------------------- # WHERE theme_id = {$theme['theme_id']}"; # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/imageset/imageset.cfg # #-----[ FIND ]--------------------------------------------- # Around Line 17 # # General Information about this style name = prosilver copyright = © phpBB Group, 2007 # #-----[ FIND ]--------------------------------------------- # Around Line 22 version = 3.0.0 # #-----[ REPLACE WITH ]--------------------------------------------- # version = 3.0.2 # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/style.cfg # #-----[ FIND ]--------------------------------------------- # Around Line 17 # # General Information about this style name = prosilver copyright = © phpBB Group, 2007 # #-----[ FIND ]--------------------------------------------- # Around Line 22 version = 3.0.0 # #-----[ REPLACE WITH ]--------------------------------------------- # version = 3.0.2 # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/template/mcp_ban.html # #-----[ FIND ]--------------------------------------------- # Around Line 42
# #-----[ REPLACE WITH ]--------------------------------------------- #
# #-----[ OPEN ]--------------------------------------------- # styles/prosilver/template/mcp_queue.html # #-----[ FIND ]--------------------------------------------- # Around Line 34
  • {L_DELETED_TOPIC}

  • # #-----[ REPLACE WITH ]--------------------------------------------- #
  • {L_DELETED_TOPIC}

  • # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/template/memberlist_view.html # #-----[ FIND ]--------------------------------------------- # Around Line 17
    {L_USERNAME}:
    {USERNAME} [ {L_USER_ADMIN} ] # #-----[ AFTER, ADD ]--------------------------------------------- # [ {L_USER_BAN} ] # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/template/message_body.html # #-----[ FIND ]--------------------------------------------- # Around Line 2

    {L_RETURN_TO_SEARCH_ADV}

    # #-----[ REPLACE WITH ]--------------------------------------------- #

    {L_RETURN_TO_SEARCH_ADV}

    # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/template/template.cfg # #-----[ FIND ]--------------------------------------------- # Around Line 17 # # General Information about this template name = prosilver copyright = © phpBB Group, 2007 # #-----[ FIND ]--------------------------------------------- # Around Line 22 version = 3.0.0 # #-----[ REPLACE WITH ]--------------------------------------------- # version = 3.0.2 # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/template/ucp_main_subscribed.html # #-----[ FIND ]--------------------------------------------- # Around Line 79
    {L_MARK_ALL}{L_UNMARK_ALL}
    # #-----[ REPLACE WITH ]--------------------------------------------- #
    {L_MARK_ALL}{L_UNMARK_ALL}
    # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/template/ucp_pm_history.html # #-----[ FIND ]--------------------------------------------- # Around Line 7
    # #-----[ REPLACE WITH ]--------------------------------------------- #
    # #-----[ FIND ]--------------------------------------------- # Around Line 17
    # #-----[ REPLACE WITH ]--------------------------------------------- #
    # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/template/viewforum_body.html # #-----[ FIND ]--------------------------------------------- # Around Line 104
    # #-----[ AFTER, ADD ]--------------------------------------------- # # #-----[ FIND ]--------------------------------------------- # Around Line 171 # #-----[ REPLACE WITH ]--------------------------------------------- # # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/theme/bidi.css # #-----[ FIND ]--------------------------------------------- # Around Line 251 padding: 0 0 0 12px; background-position: 100% 100%; # #-----[ REPLACE WITH ]--------------------------------------------- # padding-right: 12px; background-position: right; # #-----[ OPEN ]--------------------------------------------- # styles/prosilver/theme/theme.cfg # #-----[ FIND ]--------------------------------------------- # Around Line 19 # # General Information about this theme name = prosilver copyright = © phpBB Group, 2007 # #-----[ FIND ]--------------------------------------------- # Around Line 24 version = 3.0.0 # #-----[ REPLACE WITH ]--------------------------------------------- # version = 3.0.2 # #-----[ OPEN ]--------------------------------------------- # styles/subsilver2/imageset/imageset.cfg # #-----[ FIND ]--------------------------------------------- # Around Line 17 # # General Information about this style name = subsilver2 copyright = © phpBB Group, 2003 # #-----[ FIND ]--------------------------------------------- # Around Line 22 version = 3.0.0 # #-----[ REPLACE WITH ]--------------------------------------------- # version = 3.0.2 # #-----[ OPEN ]--------------------------------------------- # styles/subsilver2/style.cfg # #-----[ FIND ]--------------------------------------------- # Around Line 17 # # General Information about this style name = subsilver2 copyright = © 2005 phpBB Group # #-----[ FIND ]--------------------------------------------- # Around Line 22 version = 3.0.0 # #-----[ REPLACE WITH ]--------------------------------------------- # version = 3.0.2 # #-----[ OPEN ]--------------------------------------------- # styles/subsilver2/template/search_results.html # #-----[ FIND ]--------------------------------------------- # Around Line 33 {topicrow.ATTACH_ICON_IMG} {searchresults.TOPIC_TITLE} # #-----[ REPLACE WITH ]--------------------------------------------- # {searchresults.ATTACH_ICON_IMG} {searchresults.TOPIC_TITLE} # #-----[ OPEN ]--------------------------------------------- # styles/subsilver2/template/template.cfg # #-----[ FIND ]--------------------------------------------- # Around Line 17 # # General Information about this template name = subsilver2 copyright = © phpBB Group, 2003 # #-----[ FIND ]--------------------------------------------- # Around Line 22 version = 3.0.0 # #-----[ REPLACE WITH ]--------------------------------------------- # version = 3.0.2 # #-----[ OPEN ]--------------------------------------------- # styles/subsilver2/theme/theme.cfg # #-----[ FIND ]--------------------------------------------- # Around Line 19 # # General Information about this theme name = subsilver2 copyright = © phpBB Group, 2003 # #-----[ FIND ]--------------------------------------------- # Around Line 24 version = 3.0.0 # #-----[ REPLACE WITH ]--------------------------------------------- # version = 3.0.2 # #-----[ OPEN ]--------------------------------------------- # ucp.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: ucp.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: ucp.php 8655 2008-06-13 19:39:01Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 67 $module->display($user->lang['REGISTER']); break; case 'confirm': $module->load('ucp', 'confirm'); # #-----[ FIND ]--------------------------------------------- # Around Line 72 exit_handler(); # #-----[ REPLACE WITH ]--------------------------------------------- # exit; # #-----[ OPEN ]--------------------------------------------- # viewforum.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: viewforum.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: viewforum.php 8674 2008-06-28 15:07:37Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 105 SET forum_posts = forum_posts + 1 WHERE forum_id = ' . $forum_id; $db->sql_query($sql); } # #-----[ FIND ]--------------------------------------------- # Around Line 110 redirect($forum_data['forum_link']); # #-----[ REPLACE WITH ]--------------------------------------------- # // We redirect to the url. The third parameter indicates that external redirects are allowed. redirect($forum_data['forum_link'], false, true); exit; # #-----[ OPEN ]--------------------------------------------- # viewonline.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: viewonline.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: viewonline.php 8677 2008-07-03 12:43:49Z acydburn $ # #-----[ FIND ]--------------------------------------------- # Around Line 223 switch ($on_page[1]) { case 'posting': preg_match('#mode=([a-z]+)#', $row['session_page'], $on_page); # #-----[ FIND ]--------------------------------------------- # Around Line 228 switch ($on_page[1]) # #-----[ REPLACE WITH ]--------------------------------------------- # $posting_mode = (!empty($on_page[1])) ? $on_page[1] : ''; switch ($posting_mode) # #-----[ OPEN ]--------------------------------------------- # viewtopic.php # #-----[ FIND ]--------------------------------------------- # Around Line 1 * @version $Id: viewtopic.php 8479 2008-03-29 00:22:48Z naderman $ # #-----[ REPLACE WITH ]--------------------------------------------- # * @version $Id: viewtopic.php 8601 2008-06-04 15:48:19Z naderman $ # #-----[ FIND ]--------------------------------------------- # Around Line 449 if ($config['email_enable'] && $config['allow_topic_notify'] && $user->data['is_registered']) { watch_topic_forum('topic', $s_watching_topic, $user->data['user_id'], $forum_id, $topic_id, $topic_data['notify_status'], $start); # #-----[ REPLACE WITH ]--------------------------------------------- # if (($config['email_enable'] || $config['jab_enable']) && $config['allow_topic_notify'] && $user->data['is_registered']) { watch_topic_forum('topic', $s_watching_topic, $user->data['user_id'], $forum_id, $topic_id, $topic_data['notify_status'], $start); // Reset forum notification if forum notify is set if ($config['allow_forum_notify'] && $auth->acl_get('f_subscribe', $forum_id)) { $s_watching_forum = $s_watching_topic; watch_topic_forum('forum', $s_watching_forum, $user->data['user_id'], $forum_id, 0); } # #-----[ FIND ]--------------------------------------------- # Around Line 1008 'avatar' => '', 'rank_title' => '', 'rank_image' => '', 'rank_image_src' => '', 'sig' => '', # #-----[ FIND ]--------------------------------------------- # Around Line 1013 'posts' => '', # #-----[ REPLACE WITH ]--------------------------------------------- # Just remove/delete the lines (replacing with an empty line) # #-----[ FIND ]--------------------------------------------- # Around Line 1070 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '', # #-----[ REPLACE WITH ]--------------------------------------------- # 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&sr=posts') : '', # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM