Skip to content

Commit

Permalink
! In the wake of removing a bunch of icon images and using CSS, it se…
Browse files Browse the repository at this point in the history
…emed appropriate to have a quick breeze through looking for rogue $settings entries. There's still more but this is the first wave that can be done easily.

Signed-off-by: Peter Spicer <[email protected]>
Arantor committed Dec 19, 2013
1 parent adec6c5 commit 16f9ef6
Showing 22 changed files with 38 additions and 38 deletions.
8 changes: 4 additions & 4 deletions SSI.php
Original file line number Diff line number Diff line change
@@ -260,7 +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, $settings, $scripturl, $txt, $db_prefix, $user_info;
global $context, $scripturl, $txt, $db_prefix, $user_info;
global $modSettings, $smcFunc;

// Excluding certain boards...
@@ -328,7 +328,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, $settings, $scripturl, $txt, $db_prefix, $user_info;
global $context, $scripturl, $txt, $db_prefix, $user_info;
global $modSettings, $smcFunc;

// Find all the posts. Newer ones will have higher IDs.
@@ -611,7 +611,7 @@ function ssi_topPoster($topNumber = 1, $output_method = 'echo')
// Show boards by activity.
function ssi_topBoards($num_top = 10, $output_method = 'echo')
{
global $context, $settings, $db_prefix, $txt, $scripturl, $user_info, $modSettings, $smcFunc;
global $context, $db_prefix, $txt, $scripturl, $user_info, $modSettings, $smcFunc;

// Find boards with lots of posts.
$request = $smcFunc['db_query']('', '
@@ -863,7 +863,7 @@ function ssi_fetchGroupMembers($group_id = null, $output_method = 'echo')
// Fetch some member data!
function ssi_queryMembers($query_where = null, $query_where_params = array(), $query_limit = '', $query_order = 'id_member DESC', $output_method = 'echo')
{
global $context, $settings, $scripturl, $txt, $db_prefix, $user_info;
global $context, $scripturl, $txt, $db_prefix, $user_info;
global $modSettings, $smcFunc, $memberContext;

if ($query_where === null)
2 changes: 1 addition & 1 deletion Sources/ManageMail.php
Original file line number Diff line number Diff line change
@@ -278,7 +278,7 @@ function list_getMailQueueSize()
*/
function ModifyMailSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $modSettings, $txtBirthdayEmails;
global $txt, $scripturl, $context, $modSettings, $txtBirthdayEmails;

loadLanguage('EmailTemplates');

2 changes: 1 addition & 1 deletion Sources/ManageRegistration.php
Original file line number Diff line number Diff line change
@@ -174,7 +174,7 @@ function AdminRegister()
function EditAgreement()
{
// I hereby agree not to be a lazy bum.
global $txt, $boarddir, $context, $modSettings, $smcFunc, $settings;
global $txt, $boarddir, $context, $modSettings, $smcFunc;

// By default we look at agreement.txt.
$context['current_agreement'] = '';
6 changes: 3 additions & 3 deletions Sources/ManageServer.php
Original file line number Diff line number Diff line change
@@ -200,7 +200,7 @@ function ModifyGeneralSettings($return_config = false)
*/
function ModifyDatabaseSettings($return_config = false)
{
global $scripturl, $context, $settings, $txt, $boarddir;
global $scripturl, $context, $txt, $boarddir;

/* If you're writing a mod, it's a bad idea to add things here....
For each option:
@@ -339,7 +339,7 @@ function hideGlobalCookies()
*/
function ModifyGeneralSecuritySettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc, $modSettings;
global $txt, $scripturl, $context, $sc, $modSettings;

$config_vars = array(
array('int', 'failed_login_threshold'),
@@ -477,7 +477,7 @@ function ModifyCacheSettings($return_config = false)
*/
function ModifyLoadBalancingSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $modSettings;
global $txt, $scripturl, $context, $modSettings;

// Setup a warning message, but disabled by default.
$disabled = true;
4 changes: 2 additions & 2 deletions Sources/Memberlist.php
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
*/
function Memberlist()
{
global $scripturl, $txt, $modSettings, $context, $settings, $modSettings;
global $scripturl, $txt, $modSettings, $context, $modSettings;

// Make sure they can view the memberlist.
isAllowedTo('view_mlist');
@@ -598,7 +598,7 @@ function MLSearch()
function printMemberListRows($request)
{
global $scripturl, $txt, $user_info, $modSettings;
global $context, $settings, $memberContext, $smcFunc;
global $context, $memberContext, $smcFunc;

// Get the most posts.
$result = $smcFunc['db_query']('', '
2 changes: 1 addition & 1 deletion Sources/ModerationCenter.php
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@
*/
function ModerationMain($dont_call = false)
{
global $txt, $context, $scripturl, $sc, $modSettings, $user_info, $settings, $sourcedir, $options, $smcFunc;
global $txt, $context, $scripturl, $sc, $modSettings, $user_info, $sourcedir, $options, $smcFunc;

// Don't run this twice... and don't conflict with the admin bar.
if (isset($context['admin_area']))
2 changes: 1 addition & 1 deletion Sources/Modlog.php
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
*/
function ViewModlog()
{
global $txt, $modSettings, $context, $scripturl, $sourcedir, $user_info, $smcFunc, $settings;
global $txt, $modSettings, $context, $scripturl, $sourcedir, $user_info, $smcFunc;

// Are we looking at the moderation log or the administration log.
$context['log_type'] = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'adminlog' ? 3 : 1;
2 changes: 1 addition & 1 deletion Sources/MoveTopic.php
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
*/
function MoveTopic()
{
global $txt, $board, $topic, $user_info, $context, $language, $scripturl, $settings, $smcFunc, $modSettings, $sourcedir;
global $txt, $board, $topic, $user_info, $context, $language, $scripturl, $smcFunc, $modSettings, $sourcedir;

if (empty($topic))
fatal_lang_error('no_access', false);
4 changes: 2 additions & 2 deletions Sources/News.php
Original file line number Diff line number Diff line change
@@ -594,7 +594,7 @@ function getXmlMembers($xml_format)
function getXmlNews($xml_format)
{
global $user_info, $scripturl, $modSettings, $board;
global $query_this_board, $smcFunc, $settings, $context;
global $query_this_board, $smcFunc, $context;

/* Find the latest posts that:
- are the first post in their topic.
@@ -728,7 +728,7 @@ function getXmlNews($xml_format)
function getXmlRecent($xml_format)
{
global $user_info, $scripturl, $modSettings, $board;
global $query_this_board, $smcFunc, $settings, $context;
global $query_this_board, $smcFunc, $context;

$done = false;
$loops = 0;
2 changes: 1 addition & 1 deletion Sources/Packages.php
Original file line number Diff line number Diff line change
@@ -1364,7 +1364,7 @@ function PackageRemove()
*/
function PackageBrowse()
{
global $txt, $boarddir, $scripturl, $context, $forum_version, $sourcedir, $settings;
global $txt, $boarddir, $scripturl, $context, $forum_version, $sourcedir;

$context['page_title'] .= ' - ' . $txt['browse_packages'];

2 changes: 1 addition & 1 deletion Sources/PersonalMessage.php
Original file line number Diff line number Diff line change
@@ -230,7 +230,7 @@ function MessageMain()
*/
function messageIndexBar($area)
{
global $txt, $context, $scripturl, $sourcedir, $sc, $modSettings, $settings, $user_info, $options;
global $txt, $context, $scripturl, $sourcedir, $sc, $modSettings, $user_info, $options;

$pm_areas = array(
'folders' => array(
18 changes: 9 additions & 9 deletions Sources/Profile-Modify.php
Original file line number Diff line number Diff line change
@@ -932,7 +932,7 @@ function saveProfileFields()
function saveProfileChanges(&$profile_vars, &$post_errors, $memID)
{
global $user_info, $txt, $modSettings, $user_profile;
global $context, $settings, $sourcedir;
global $context, $sourcedir;
global $smcFunc;

// These make life easier....
@@ -1709,7 +1709,7 @@ function getAvatars($directory, $level)
*/
function theme($memID)
{
global $txt, $context, $user_profile, $modSettings, $settings, $user_info, $smcFunc;
global $txt, $context, $user_profile, $modSettings, $user_info, $smcFunc;

loadThemeOptions($memID);
if (allowedTo(array('profile_extra_own', 'profile_extra_any')))
@@ -1819,7 +1819,7 @@ function authentication($memID, $saving = false)
*/
function notification($memID)
{
global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir, $settings;
global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir;

// Going to want this for consistency.
loadCSSFile('admin.css', array(), 'admin');
@@ -1844,7 +1844,7 @@ function notification($memID)

function alert_configuration($memID)
{
global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir, $settings;
global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir;

$context['token_check'] = 'profile-nt' . $memID;
is_not_guest();
@@ -2044,7 +2044,7 @@ function alert_configuration($memID)

function alert_notifications_topics($memID)
{
global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir, $settings;
global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir;

// Because of the way this stuff works, we want to do this ourselves.
if (isset($_POST['edit_notify_topics']))
@@ -2092,7 +2092,7 @@ function alert_notifications_topics($memID)
),
'data' => array(
'function' => create_function('$topic', '
global $settings, $txt;
global $txt;
$link = $topic[\'link\'];
@@ -2184,7 +2184,7 @@ function alert_notifications_topics($memID)

function alert_notifications_boards($memID)
{
global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir, $settings;
global $txt, $scripturl, $user_profile, $user_info, $context, $modSettings, $smcFunc, $sourcedir;

// Because of the way this stuff works, we want to do this ourselves.
if (isset($_POST['edit_notify_boards']))
@@ -2225,7 +2225,7 @@ function alert_notifications_boards($memID)
),
'data' => array(
'function' => create_function('$board', '
global $settings, $txt;
global $txt;
$link = $board[\'link\'];
@@ -2558,7 +2558,7 @@ function ignoreboards($memID)
*/
function profileLoadLanguages()
{
global $context, $modSettings, $settings, $cur_profile, $language, $smcFunc;
global $context, $modSettings, $cur_profile, $language, $smcFunc;

$context['profile_languages'] = array();

4 changes: 2 additions & 2 deletions Sources/Register.php
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
*/
function Register($reg_errors = array())
{
global $txt, $boarddir, $context, $settings, $modSettings, $user_info;
global $txt, $boarddir, $context, $modSettings, $user_info;
global $language, $scripturl, $smcFunc, $sourcedir, $smcFunc, $cur_profile;

// Is this an incoming AJAX check?
@@ -220,7 +220,7 @@ function Register($reg_errors = array())
function Register2($verifiedOpenID = false)
{
global $scripturl, $txt, $modSettings, $context, $sourcedir;
global $user_info, $options, $settings, $smcFunc;
global $user_info, $options, $smcFunc;

checkSession();
validateToken('register');
2 changes: 1 addition & 1 deletion Sources/ScheduledTasks.php
Original file line number Diff line number Diff line change
@@ -1249,7 +1249,7 @@ function loadEssentialThemeData()
*/
function scheduled_fetchSMfiles()
{
global $sourcedir, $txt, $language, $settings, $forum_version, $modSettings, $smcFunc, $context;
global $sourcedir, $txt, $language, $forum_version, $modSettings, $smcFunc, $context;

// What files do we want to get
$request = $smcFunc['db_query']('', '
2 changes: 1 addition & 1 deletion Sources/Subs-Editor.php
Original file line number Diff line number Diff line change
@@ -1937,7 +1937,7 @@ function () {
function create_control_verification(&$verificationOptions, $do_test = false)
{
global $txt, $modSettings, $options, $smcFunc;
global $context, $settings, $user_info, $sourcedir, $scripturl, $language;
global $context, $user_info, $sourcedir, $scripturl, $language;

// First verification means we need to set up some bits...
if (empty($context['controls']['verification']))
2 changes: 1 addition & 1 deletion Sources/Subs-List.php
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@

function createList($listOptions)
{
global $context, $settings, $options, $txt, $modSettings, $scripturl, $smcFunc;
global $context, $options, $txt, $modSettings, $scripturl, $smcFunc;

assert(isset($listOptions['id']));
assert(isset($listOptions['columns']));
2 changes: 1 addition & 1 deletion Sources/Subs-Members.php
Original file line number Diff line number Diff line change
@@ -440,7 +440,7 @@ function deleteMembers($users, $check_not_admin = false)
function registerMember(&$regOptions, $return_errors = false)
{
global $scripturl, $txt, $modSettings, $context, $sourcedir;
global $user_info, $options, $settings, $smcFunc;
global $user_info, $options, $smcFunc;

loadLanguage('Login');

2 changes: 1 addition & 1 deletion Sources/Subs-Package.php
Original file line number Diff line number Diff line change
@@ -1868,7 +1868,7 @@ function listtree($path, $sub_path = '')
*/
function parseModification($file, $testing = true, $undo = false, $theme_paths = array())
{
global $boarddir, $sourcedir, $settings, $txt, $modSettings, $package_ftp;
global $boarddir, $sourcedir, $txt, $modSettings, $package_ftp;

@set_time_limit(600);
require_once($sourcedir . '/Class-Package.php');
2 changes: 1 addition & 1 deletion Themes/default/Compat.template.php
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $strip_options = array())
{
global $settings, $context, $txt, $scripturl;
global $context, $txt, $scripturl;

// Compatibility.
if (!is_array($strip_options))
2 changes: 1 addition & 1 deletion Themes/default/Errors.template.php
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
// Show an error message.....
function template_fatal_error()
{
global $context, $settings, $options, $txt;
global $context, $options, $txt;

echo '
<div id="fatal_error">
2 changes: 1 addition & 1 deletion Themes/default/GenericControls.template.php
Original file line number Diff line number Diff line change
@@ -216,7 +216,7 @@ function template_control_richedit_buttons($editor_id)
// What's this, verification?!
function template_control_verification($verify_id, $display_type = 'all', $reset = false)
{
global $context, $settings, $options, $txt, $modSettings;
global $context, $options, $txt, $modSettings;

$verify_context = &$context['controls']['verification'][$verify_id];

2 changes: 1 addition & 1 deletion cron.php
Original file line number Diff line number Diff line change
@@ -220,7 +220,7 @@ function cleanRequest_cron()

function error_handler_cron($error_level, $error_string, $file, $line)
{
global $settings, $modSettings, $db_show_debug;
global $modSettings, $db_show_debug;

// Ignore errors if we're ignoring them or they are strict notices from PHP 5 (which cannot be solved without breaking PHP 4.)
if (error_reporting() == 0 || (defined('E_STRICT') && $error_level == E_STRICT && (empty($modSettings['enableErrorLogging']) || $modSettings['enableErrorLogging'] != 2)))

0 comments on commit 16f9ef6

Please sign in to comment.