Browse Source

! More low-hanging fruit of things that needed cleaning up

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 years ago
parent
commit
030a360678
5 changed files with 7 additions and 10 deletions
  1. 2 2
      Sources/Errors.php
  2. 1 2
      Sources/Memberlist.php
  3. 2 4
      Sources/News.php
  4. 1 1
      Sources/Subs-List.php
  5. 1 1
      Sources/Subs-Menu.php

+ 2 - 2
Sources/Errors.php

@@ -122,7 +122,7 @@ function log_error($error_message, $error_type = 'general', $file = null, $line
  */
 function fatal_error($error, $log = 'general')
 {
-	global $txt, $modSettings;
+	global $txt;
 
 	// We don't have $txt yet, but that's okay...
 	if (empty($txt))
@@ -147,7 +147,7 @@ function fatal_error($error, $log = 'general')
  */
 function fatal_lang_error($error, $log = 'general', $sprintf = array())
 {
-	global $txt, $language, $modSettings, $user_info, $context;
+	global $txt, $language, $user_info, $context;
 	static $fatal_error_called = false;
 
 	// Try to load a theme if we don't have one.

+ 1 - 2
Sources/Memberlist.php

@@ -200,7 +200,7 @@ function Memberlist()
  */
 function MLAll()
 {
-	global $txt, $scripturl, $user_info;
+	global $txt, $scripturl;
 	global $modSettings, $context, $smcFunc;
 
 	// The chunk size for the cached index.
@@ -597,7 +597,6 @@ function MLSearch()
  */
 function printMemberListRows($request)
 {
-	global $scripturl, $txt, $user_info, $modSettings;
 	global $context, $memberContext, $smcFunc;
 
 	// Get the most posts.

+ 2 - 4
Sources/News.php

@@ -461,8 +461,6 @@ function cdata_parse($data, $ns = '')
  */
 function dumpTags($data, $i, $tag = null, $xml_format = '')
 {
-	global $modSettings, $context, $scripturl;
-
 	// For every array in the data...
 	foreach ($data as $key => $val)
 	{
@@ -593,7 +591,7 @@ function getXmlMembers($xml_format)
  */
 function getXmlNews($xml_format)
 {
-	global $user_info, $scripturl, $modSettings, $board;
+	global $scripturl, $modSettings, $board;
 	global $query_this_board, $smcFunc, $context;
 
 	/* Find the latest posts that:
@@ -727,7 +725,7 @@ function getXmlNews($xml_format)
  */
 function getXmlRecent($xml_format)
 {
-	global $user_info, $scripturl, $modSettings, $board;
+	global $scripturl, $modSettings, $board;
 	global $query_this_board, $smcFunc, $context;
 
 	$done = false;

+ 1 - 1
Sources/Subs-List.php

@@ -22,7 +22,7 @@ if (!defined('SMF'))
 
 function createList($listOptions)
 {
-	global $context, $options, $txt, $modSettings, $scripturl, $smcFunc;
+	global $context, $smcFunc;
 
 	assert(isset($listOptions['id']));
 	assert(isset($listOptions['columns']));

+ 1 - 1
Sources/Subs-Menu.php

@@ -24,7 +24,7 @@ if (!defined('SMF'))
  */
 function createMenu($menuData, $menuOptions = array())
 {
-	global $context, $settings, $options, $txt, $modSettings, $scripturl, $smcFunc, $user_info, $sourcedir;
+	global $context, $settings, $txt, $scripturl, $user_info;
 
 	/* Note menuData is array of form: