Browse Source

! More things we don't really want hanging about.

Signed-off-by: Peter Spicer <[email protected]>
Peter Spicer 10 years ago
parent
commit
ab926e51cf

+ 4 - 5
SSI.php

@@ -260,8 +260,7 @@ function ssi_logout($redirect_to = '', $output_method = 'echo')
 // Recent post list:   [board] Subject by Poster	Date
 function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo', $limit_body = true)
 {
-	global $context, $scripturl, $txt, $user_info;
-	global $modSettings, $smcFunc;
+	global $modSettings;
 
 	// Excluding certain boards...
 	if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
@@ -303,7 +302,7 @@ function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $include_board
 // Fetch a post with a particular ID. By default will only show if you have permission to the see the board in question - this can be overriden.
 function ssi_fetchPosts($post_ids = array(), $override_permissions = false, $output_method = 'echo')
 {
-	global $user_info, $modSettings;
+	global $modSettings;
 
 	if (empty($post_ids))
 		return;
@@ -328,7 +327,7 @@ function ssi_fetchPosts($post_ids = array(), $override_permissions = false, $out
 // This removes code duplication in other queries - don't call it direct unless you really know what you're up to.
 function ssi_queryPosts($query_where = '', $query_where_params = array(), $query_limit = 10, $query_order = 'm.id_msg DESC', $output_method = 'echo', $limit_body = false, $override_permissions = false)
 {
-	global $context, $scripturl, $txt, $user_info;
+	global $scripturl, $txt, $user_info;
 	global $modSettings, $smcFunc;
 
 	// Find all the posts. Newer ones will have higher IDs.
@@ -424,7 +423,7 @@ function ssi_queryPosts($query_where = '', $query_where_params = array(), $query
 // Recent topic list:   [board] Subject by Poster	Date
 function ssi_recentTopics($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo')
 {
-	global $context, $settings, $scripturl, $txt, $user_info;
+	global $settings, $scripturl, $txt, $user_info;
 	global $modSettings, $smcFunc;
 
 	if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)

+ 1 - 1
Sources/ManageLanguages.php

@@ -65,7 +65,7 @@ function ManageLanguages()
  */
 function AddLanguage()
 {
-	global $context, $sourcedir, $forum_version, $boarddir, $txt, $smcFunc, $scripturl;
+	global $context, $sourcedir, $boarddir, $txt, $smcFunc, $scripturl;
 
 	// Are we searching for new languages courtesy of Simple Machines?
 	if (!empty($_POST['smf_add_sub']))

+ 1 - 1
Sources/Search.php

@@ -247,7 +247,7 @@ function PlushSearch1()
  */
 function PlushSearch2()
 {
-	global $scripturl, $modSettings, $sourcedir, $txt, $db_connection;
+	global $scripturl, $modSettings, $sourcedir, $txt;
 	global $user_info, $context, $options, $messages_request, $boards_can;
 	global $excludedWords, $participants, $smcFunc;
 

+ 1 - 1
Sources/SearchAPI-Fulltext.php

@@ -62,7 +62,7 @@ class fulltext_search
 	 */
 	public function __construct()
 	{
-		global $smcFunc, $db_connection, $modSettings, $db_type;
+		global $smcFunc, $modSettings, $db_type;
 
 		// Is this database supported?
 		if (!in_array($db_type, $this->supported_databases))

+ 1 - 1
Sources/Subs-Db-mysql.php

@@ -464,7 +464,7 @@ function smf_db_transaction($type = 'commit', $connection = null)
 function smf_db_error($db_string, $connection = null)
 {
 	global $txt, $context, $sourcedir, $webmaster_email, $modSettings;
-	global $forum_version, $db_connection, $db_last_error, $db_persist;
+	global $db_connection, $db_last_error, $db_persist;
 	global $db_server, $db_user, $db_passwd, $db_name, $db_show_debug, $ssi_db_user, $ssi_db_passwd;
 	global $smcFunc;
 

+ 1 - 1
Sources/Subs-Db-mysqli.php

@@ -514,7 +514,7 @@ function smf_db_transaction($type = 'commit', $connection = null)
 function smf_db_error($db_string, $connection = null)
 {
 	global $txt, $context, $sourcedir, $webmaster_email, $modSettings;
-	global $forum_version, $db_connection, $db_last_error, $db_persist;
+	global $db_connection, $db_last_error, $db_persist;
 	global $db_server, $db_user, $db_passwd, $db_name, $db_show_debug, $ssi_db_user, $ssi_db_passwd;
 	global $smcFunc;
 

+ 1 - 1
Sources/Subs-Db-postgresql.php

@@ -539,7 +539,7 @@ function smf_db_transaction($type = 'commit', $connection = null)
 function smf_db_error($db_string, $connection = null)
 {
 	global $txt, $context, $sourcedir, $webmaster_email, $modSettings;
-	global $forum_version, $db_connection, $db_last_error, $db_persist;
+	global $db_connection, $db_last_error, $db_persist;
 	global $db_server, $db_user, $db_passwd, $db_name, $db_show_debug, $ssi_db_user, $ssi_db_passwd;
 	global $smcFunc;
 

+ 1 - 1
Sources/Subs-Db-sqlite.php

@@ -490,7 +490,7 @@ function smf_db_transaction($type = 'commit', $connection = null)
 function smf_db_error($db_string, $connection = null)
 {
 	global $txt, $context, $sourcedir, $webmaster_email, $modSettings;
-	global $forum_version, $db_connection, $db_last_error, $db_persist;
+	global $db_connection, $db_last_error, $db_persist;
 	global $db_server, $db_user, $db_passwd, $db_name, $db_show_debug, $ssi_db_user, $ssi_db_passwd;
 	global $smcFunc;
 

+ 1 - 1
Sources/Subs-Db-sqlite3.php

@@ -595,7 +595,7 @@ function smf_db_transaction($type = 'commit', $connection = null)
 function smf_db_error($db_string, $connection = null)
 {
 	global $txt, $context, $sourcedir, $webmaster_email, $modSettings;
-	global $forum_version, $db_connection, $db_last_error, $db_persist;
+	global $db_connection, $db_last_error, $db_persist;
 	global $db_server, $db_user, $db_passwd, $db_name, $db_show_debug, $ssi_db_user, $ssi_db_passwd;
 	global $smcFunc;
 

+ 1 - 1
Sources/Subs-MembersOnline.php

@@ -26,7 +26,7 @@ if (!defined('SMF'))
  */
 function getMembersOnlineStats($membersOnlineOptions)
 {
-	global $smcFunc, $context, $scripturl, $user_info, $modSettings, $txt;
+	global $smcFunc, $scripturl, $user_info, $modSettings, $txt;
 
 	// The list can be sorted in several ways.
 	$allowed_sort_options = array(

+ 1 - 1
Sources/Subs-MessageIndex.php

@@ -23,7 +23,7 @@ if (!defined('SMF'))
  */
 function getBoardList($boardListOptions = array())
 {
-	global $smcFunc, $user_info;
+	global $smcFunc;
 
 	if (isset($boardListOptions['excluded_boards']) && isset($boardListOptions['included_boards']))
 		trigger_error('getBoardList(): Setting both excluded_boards and included_boards is not allowed.', E_USER_ERROR);

+ 1 - 1
Sources/Topic.php

@@ -106,7 +106,7 @@ function LockTopic()
  */
 function Sticky()
 {
-	global $modSettings, $topic, $board, $sourcedir, $smcFunc;
+	global $topic, $board, $sourcedir, $smcFunc;
 
 	// Make sure the user can sticky it, and they are stickying *something*.
 	isAllowedTo('make_sticky');

+ 1 - 1
Sources/ViewQuery.php

@@ -27,7 +27,7 @@ if (!defined('SMF'))
  */
 function ViewQuery()
 {
-	global $scripturl, $user_info, $settings, $context, $db_connection, $modSettings, $boarddir, $smcFunc, $txt, $db_show_debug;
+	global $scripturl, $settings, $context, $db_connection, $boarddir, $smcFunc, $txt, $db_show_debug;
 
 	// We should have debug mode enabled, as well as something to display!
 	if (!isset($db_show_debug) || $db_show_debug !== true || !isset($_SESSION['debug']))

+ 1 - 1
Themes/default/languages/index.english.php

@@ -1,7 +1,7 @@
 <?php
 // Version: 2.1 Alpha 1; index
 
-global $forum_copyright, $forum_version, $webmaster_email, $scripturl, $context, $boardurl;
+global $forum_copyright, $webmaster_email, $scripturl, $context, $boardurl;
 
 // Locale (strftime, pspell_new) and spelling. (pspell_new, can be left as '' normally.)
 // For more information see: