Browse Source

Merge pull request #329 from Antes/unused

Unused
Matthew K. 12 years ago
parent
commit
92119d0988
7 changed files with 22 additions and 22 deletions
  1. 2 2
      Sources/Display.php
  2. 2 2
      Sources/Drafts.php
  3. 1 1
      Sources/DumpDatabase.php
  4. 2 2
      Sources/Errors.php
  5. 1 1
      Sources/Groups.php
  6. 9 9
      Sources/Load.php
  7. 5 5
      Sources/LogInOut.php

+ 2 - 2
Sources/Display.php

@@ -1181,7 +1181,7 @@ function Display()
 function prepareDisplayContext($reset = false)
 {
 	global $settings, $txt, $modSettings, $scripturl, $options, $user_info, $smcFunc;
-	global $memberContext, $context, $messages_request, $topic, $attachments, $topicinfo;
+	global $memberContext, $context, $messages_request, $topic;
 
 	static $counter = null;
 
@@ -1315,7 +1315,7 @@ function prepareDisplayContext($reset = false)
  */
 function Download()
 {
-	global $txt, $modSettings, $user_info, $scripturl, $context, $sourcedir, $topic, $smcFunc;
+	global $txt, $modSettings, $user_info, $context, $topic, $smcFunc;
 
 	// Some defaults that we need.
 	$context['character_set'] = empty($modSettings['global_character_set']) ? (empty($txt['lang_character_set']) ? 'ISO-8859-1' : $txt['lang_character_set']) : $modSettings['global_character_set'];

+ 2 - 2
Sources/Drafts.php

@@ -30,7 +30,7 @@ loadLanguage('Drafts');
  */
 function SaveDraft(&$post_errors)
 {
-	global $txt, $context, $user_info, $smcFunc, $modSettings, $board;
+	global $context, $user_info, $smcFunc, $modSettings, $board;
 
 	// can you be, should you be ... here?
 	if (empty($modSettings['drafts_enabled']) || empty($modSettings['drafts_post_enabled']) || !allowedTo('post_draft') || !isset($_POST['save_draft']) || !isset($_POST['id_draft']))
@@ -519,7 +519,7 @@ function XmlDraft($id_draft)
  */
 function showProfileDrafts($memID, $draft_type = 0)
 {
-	global $txt, $user_info, $scripturl, $modSettings, $context, $smcFunc;
+	global $txt, $scripturl, $modSettings, $context, $smcFunc;
 
 	// Some initial context.
 	$context['start'] = isset($_REQUEST['start']) ? (int) $_REQUEST['start'] : 0;

+ 1 - 1
Sources/DumpDatabase.php

@@ -27,7 +27,7 @@ if (!defined('SMF'))
  */
 function DumpDatabase2()
 {
-	global $db_name, $scripturl, $context, $modSettings, $crlf, $smcFunc, $db_prefix, $db_show_debug;
+	global $db_name, $scripturl, $modSettings, $crlf, $smcFunc, $db_prefix, $db_show_debug;
 
 	// Administrators only!
 	if (!allowedTo('admin_forum'))

+ 2 - 2
Sources/Errors.php

@@ -32,7 +32,7 @@ if (!defined('SMF'))
  */
 function log_error($error_message, $error_type = 'general', $file = null, $line = null)
 {
-	global $txt, $modSettings, $sc, $user_info, $smcFunc, $scripturl, $last_error;
+	global $modSettings, $sc, $user_info, $smcFunc, $scripturl, $last_error;
 	static $tried_hook = false;
 
 	// Check if error logging is actually on.
@@ -120,7 +120,7 @@ function log_error($error_message, $error_type = 'general', $file = null, $line
  */
 function fatal_error($error, $log = 'general')
 {
-	global $txt, $context, $modSettings;
+	global $txt, $modSettings;
 
 	// We don't have $txt yet, but that's okay...
 	if (empty($txt))

+ 1 - 1
Sources/Groups.php

@@ -781,7 +781,7 @@ function list_getGroupRequestCount($where, $where_parameters)
  */
 function list_getGroupRequests($start, $items_per_page, $sort, $where, $where_parameters)
 {
-	global $smcFunc, $txt, $scripturl;
+	global $smcFunc, $scripturl;
 
 	$request = $smcFunc['db_query']('', '
 		SELECT lgr.id_request, lgr.id_member, lgr.id_group, lgr.time_applied, lgr.reason,

+ 9 - 9
Sources/Load.php

@@ -25,7 +25,7 @@ if (!defined('SMF'))
  */
 function reloadSettings()
 {
-	global $modSettings, $boarddir, $smcFunc, $txt, $db_character_set, $context, $sourcedir;
+	global $modSettings, $boarddir, $smcFunc, $txt, $db_character_set, $sourcedir;
 
 	// Most database systems have not set UTF-8 as their default input charset.
 	if (!empty($db_character_set))
@@ -1037,7 +1037,7 @@ function loadMemberData($users, $is_name = false, $set = 'normal')
 function loadMemberContext($user, $display_custom_fields = false)
 {
 	global $memberContext, $user_profile, $txt, $scripturl, $user_info;
-	global $context, $modSettings, $board_info, $settings;
+	global $context, $modSettings, $settings;
 	global $smcFunc;
 	static $dataLoaded = array();
 
@@ -1368,8 +1368,8 @@ function isBrowser($browser)
  */
 function loadTheme($id_theme = 0, $initialize = true)
 {
-	global $user_info, $user_settings, $board_info, $sc, $boarddir;
-	global $txt, $boardurl, $scripturl, $mbname, $modSettings, $language;
+	global $user_info, $user_settings, $board_info, $boarddir;
+	global $txt, $boardurl, $scripturl, $mbname, $modSettings;
 	global $context, $settings, $options, $sourcedir, $ssi_theme, $smcFunc;
 
 	// The theme was specified by parameter.
@@ -1938,7 +1938,7 @@ function loadTemplate($template_name, $style_sheets = array(), $fatal = true)
  */
 function loadSubTemplate($sub_template_name, $fatal = false)
 {
-	global $context, $settings, $options, $txt, $db_show_debug;
+	global $context, $txt, $db_show_debug;
 
 	if ($db_show_debug === true)
 		$context['debug']['sub_templates'][] = $sub_template_name;
@@ -2100,7 +2100,7 @@ function addInlineJavascript($javascript, $defer = false)
 function loadLanguage($template_name, $lang = '', $fatal = true, $force_reload = false)
 {
 	global $user_info, $language, $settings, $context, $modSettings;
-	global $cachedir, $db_show_debug, $sourcedir, $txt;
+	global $db_show_debug, $sourcedir, $txt;
 	static $already_loaded = array();
 
 	// Default to the user's language.
@@ -2412,8 +2412,8 @@ function censorText(&$text, $force = false)
  */
 function template_include($filename, $once = false)
 {
-	global $context, $settings, $options, $txt, $scripturl, $modSettings;
-	global $user_info, $boardurl, $boarddir, $sourcedir;
+	global $context, $settings, $txt, $scripturl, $modSettings;
+	global $boardurl, $boarddir, $sourcedir;
 	global $maintenance, $mtitle, $mmessage;
 	static $templates = array();
 
@@ -2915,7 +2915,7 @@ function cache_get_data($key, $ttl = 120)
  */
 function get_memcached_server($level = 3)
 {
-	global $modSettings, $memcached, $db_persist, $cache_memcached;
+	global $memcached, $db_persist, $cache_memcached;
 
 	$servers = explode(',', $cache_memcached);
 	$server = explode(':', trim($servers[array_rand($servers)]));

+ 5 - 5
Sources/LogInOut.php

@@ -81,7 +81,7 @@ function Login()
 function Login2()
 {
 	global $txt, $scripturl, $user_info, $user_settings, $smcFunc;
-	global $cookiename, $maintenance, $modSettings, $context, $sc, $sourcedir;
+	global $cookiename, $modSettings, $context, $sc, $sourcedir;
 
 	// Load cookie authentication stuff.
 	require_once($sourcedir . '/Subs-Auth.php');
@@ -477,8 +477,8 @@ function checkActivation()
  */
 function DoLogin()
 {
-	global $txt, $scripturl, $user_info, $user_settings, $smcFunc;
-	global $cookiename, $maintenance, $modSettings, $context, $sourcedir;
+	global $user_info, $user_settings, $smcFunc;
+	global $maintenance, $modSettings, $context, $sourcedir;
 
 	// Load cookie authentication stuff.
 	require_once($sourcedir . '/Subs-Auth.php');
@@ -576,7 +576,7 @@ function DoLogin()
  */
 function Logout($internal = false, $redirect = true)
 {
-	global $sourcedir, $user_info, $user_settings, $context, $modSettings, $smcFunc;
+	global $sourcedir, $user_info, $user_settings, $context, $smcFunc;
 
 	// Make sure they aren't being auto-logged out.
 	if (!$internal)
@@ -714,7 +714,7 @@ function phpBB3_password_check($passwd, $passwd_hash)
  */
 function validatePasswordFlood($id_member, $password_flood_value = false, $was_correct = false)
 {
-	global $smcFunc, $cookiename, $sourcedir;
+	global $cookiename, $sourcedir;
 
 	// As this is only brute protection, we allow 5 attempts every 10 seconds.