diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index fb62ee70a8..7acab748f0 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -20,11 +20,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - /* $type's accepted (pre-pend with AUTH_): VIEW, READ, POST, REPLY, EDIT, DELETE, STICKY, ANNOUNCE, VOTE, VOTECREATE, diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php index fb6bdb6e94..f54a9d4f3e 100755 --- a/phpBB/includes/emailer.php +++ b/phpBB/includes/emailer.php @@ -19,11 +19,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - // // The emailer class has support for attaching files, that isn't implemented // in the 2.0 release but we can probable find some way of using it in a future @@ -332,4 +327,4 @@ class emailer } // class emailer -?> +?> \ No newline at end of file diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 3bf9363e1b..11ca9fc642 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -21,11 +21,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - function get_db_stat($mode) { global $db; diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index db9a8ac80a..5d5df857fa 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -21,11 +21,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - // // Simple version of jumpbox, just lists authed forums // diff --git a/phpBB/includes/functions_search.php b/phpBB/includes/functions_search.php index 2a6b40c03f..325581101a 100644 --- a/phpBB/includes/functions_search.php +++ b/phpBB/includes/functions_search.php @@ -19,11 +19,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - function clean_words($mode, &$entry, &$stopword_list, &$synonym_list) { // Weird, $init_match doesn't work with static when double quotes (") are used... diff --git a/phpBB/includes/functions_selects.php b/phpBB/includes/functions_selects.php index f4f2f7918d..9207094348 100644 --- a/phpBB/includes/functions_selects.php +++ b/phpBB/includes/functions_selects.php @@ -21,11 +21,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - // // Pick a language, any language ... // diff --git a/phpBB/includes/functions_validate.php b/phpBB/includes/functions_validate.php index c6f11bf87a..1f70cf2e7e 100644 --- a/phpBB/includes/functions_validate.php +++ b/phpBB/includes/functions_validate.php @@ -21,11 +21,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - // // Check to see if the username has been taken, or if it is disallowed. // Also checks if it includes the " character, which we don't allow in usernames. diff --git a/phpBB/includes/prune.php b/phpBB/includes/prune.php index 2d398692ea..90b143fead 100644 --- a/phpBB/includes/prune.php +++ b/phpBB/includes/prune.php @@ -20,11 +20,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - require($phpbb_root_path . 'includes/functions_search.'.$phpEx); function prune($forum_id, $prune_date) diff --git a/phpBB/includes/sessions.php b/phpBB/includes/sessions.php index 27cc20f49b..0ae53d7d16 100644 --- a/phpBB/includes/sessions.php +++ b/phpBB/includes/sessions.php @@ -20,11 +20,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - // // session_begin() // diff --git a/phpBB/includes/smtp.php b/phpBB/includes/smtp.php index 07253af7e7..1539855c77 100644 --- a/phpBB/includes/smtp.php +++ b/phpBB/includes/smtp.php @@ -19,11 +19,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - define('SMTP_INCLUDED', 1); // // This function has been modified as provided @@ -233,4 +228,4 @@ function smtpmail($mail_to, $subject, $message, $headers = "") return TRUE; } -?> +?> \ No newline at end of file diff --git a/phpBB/includes/sql_parse.php b/phpBB/includes/sql_parse.php index d6c3660e1b..9761dd315c 100644 --- a/phpBB/includes/sql_parse.php +++ b/phpBB/includes/sql_parse.php @@ -28,11 +28,6 @@ * \***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - // // remove_comments will strip the sql comment lines out of an uploaded sql file // specifically for mssql and postgres type files in the install.... @@ -67,6 +62,7 @@ function remove_comments(&$output) unset($lines); return $output; } + // // remove_remarks will strip the sql comment lines out of an uploaded sql file // @@ -192,4 +188,5 @@ function split_sql_file($sql, $delimiter) return $output; } -?> + +?> \ No newline at end of file diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 16b59c01fd..3a15710a2c 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -20,11 +20,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - /** * Template class. By Nathan Codding of the phpBB group. * The interface was originally inspired by PHPLib templates, diff --git a/phpBB/includes/topic_review.php b/phpBB/includes/topic_review.php index e10a839afd..04667cef78 100644 --- a/phpBB/includes/topic_review.php +++ b/phpBB/includes/topic_review.php @@ -21,15 +21,6 @@ * ***************************************************************************/ -if ( !defined('IN_PHPBB') ) -{ - die("Hacking attempt"); -} - -// ----------------------- -// Page specific functions -// - function topic_review($topic_id, $is_inline_review) { global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; @@ -216,8 +207,5 @@ function topic_review($topic_id, $is_inline_review) include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } } -// -// End page specific functions -// --------------------------- ?> \ No newline at end of file diff --git a/phpBB/includes/usercp_activate.php b/phpBB/includes/usercp_activate.php index 358f62bf86..535c1f967f 100644 --- a/phpBB/includes/usercp_activate.php +++ b/phpBB/includes/usercp_activate.php @@ -21,7 +21,7 @@ * ***************************************************************************/ -if ( !defined('IN_PROFILE') ) +if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); exit; diff --git a/phpBB/includes/usercp_avatar.php b/phpBB/includes/usercp_avatar.php index 8e11e773bd..385316dbff 100644 --- a/phpBB/includes/usercp_avatar.php +++ b/phpBB/includes/usercp_avatar.php @@ -21,12 +21,6 @@ * ***************************************************************************/ -if ( !defined('IN_PROFILE') ) -{ - die("Hacking attempt"); - exit; -} - function check_image_type(&$type, &$error, &$error_msg) { global $lang; diff --git a/phpBB/includes/usercp_email.php b/phpBB/includes/usercp_email.php index 3a7bd36375..7379927b66 100644 --- a/phpBB/includes/usercp_email.php +++ b/phpBB/includes/usercp_email.php @@ -21,7 +21,7 @@ * ***************************************************************************/ -if ( !defined('IN_PROFILE') ) +if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); exit; diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php index 3cc356ea97..da28d485c9 100644 --- a/phpBB/includes/usercp_register.php +++ b/phpBB/includes/usercp_register.php @@ -21,7 +21,7 @@ * ***************************************************************************/ -if ( !defined('IN_PROFILE') ) +if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); exit; @@ -476,20 +476,26 @@ if ( isset($HTTP_POST_VARS['submit']) ) FROM " . USERS_TABLE; if ( !($result = $db->sql_query($sql)) ) { - message_die(GENERAL_ERROR, 'Could not obtained next user_id information', '', __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); } - $row = $db->sql_fetchrow($result); + if ( !($row = $db->sql_fetchrow($result) ) + { + message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); + } $user_id = $row['total'] + 1; $sql = "SELECT MAX(group_id) AS total FROM " . GROUPS_TABLE; - if (!( $result = $db->sql_query($sql)) ) + if ( !($result = $db->sql_query($sql) ) ) { - message_die(GENERAL_ERROR, 'Could not obtained next user_id information', '', __LINE__, __FILE__, $sql); + message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); } - $row = $db->sql_fetchrow($result); + if ( !($row = $db->sql_fetchrow($result) ) + { + message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); + } $group_id = $row['total'] + 1; // diff --git a/phpBB/includes/usercp_sendpasswd.php b/phpBB/includes/usercp_sendpasswd.php index 44f999b2fc..779b898f94 100644 --- a/phpBB/includes/usercp_sendpasswd.php +++ b/phpBB/includes/usercp_sendpasswd.php @@ -21,7 +21,7 @@ * ***************************************************************************/ -if ( !defined('IN_PROFILE') ) +if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); exit; diff --git a/phpBB/includes/usercp_viewprofile.php b/phpBB/includes/usercp_viewprofile.php index 43fb940482..c164cf1e13 100644 --- a/phpBB/includes/usercp_viewprofile.php +++ b/phpBB/includes/usercp_viewprofile.php @@ -21,7 +21,7 @@ * ***************************************************************************/ -if ( !defined('IN_PROFILE') ) +if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); exit;