Skip to content

Commit

Permalink
* Moved $action_no_log to loadSettings, and removed extra_actions and…
Browse files Browse the repository at this point in the history
… nolog_actions variables. There are a couple of hooks where you can modify $action_list and $action_no_log, so I see no reason to have these features, apart from a very relative performance advantage. (index.php, Load.php)

* Capitalization. (Install.english.php)
  • Loading branch information
Nao committed Mar 19, 2014
1 parent b19e3d9 commit 98cd9cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
11 changes: 6 additions & 5 deletions core/app/Load.php
Expand Up @@ -25,7 +25,7 @@
*/
function loadSettings()
{
global $settings, $context, $pluginsdir, $pluginsurl, $action_list;
global $settings, $context, $pluginsdir, $pluginsurl, $action_list, $action_no_log;

// This is where it all began.
$context = array(
Expand Down Expand Up @@ -154,13 +154,14 @@ function loadSettings()
if (empty($settings['pm_enabled']))
unset($action_list['pm']);

// If an action should not influence the who's online list, please add it to the $action_no_log global from your own action.
$action_no_log = array('ajax', 'dlattach', 'feed', 'like', 'notification', 'verification', 'viewquery', 'viewremote');

// Set up path constants.
loadPaths();

// Deal with loading plugins.
$context['enabled_plugins'] = array();
$context['extra_actions'] = array();
$context['nolog_actions'] = array();
if (!empty($settings['enabled_plugins']))
{
// Step through the list we think we have enabled.
Expand All @@ -181,9 +182,9 @@ function loadSettings()
if (strpos($action['function'], '::') !== false)
$action['function'] = explode('::', $action['function']);

$context['extra_actions'][$action['action']] = array($action['filename'], $action['function'], $plugin_details['id']);
$action_list[$action['action']] = array($action['filename'], $action['function'], $plugin_details['id']);
if (!empty($action['nolog']))
$context['nolog_actions'][] = $action['action'];
$action_no_log[] = $action['action'];
}

unset($plugin_details['id'], $plugin_details['provides'], $plugin_details['actions']);
Expand Down
2 changes: 1 addition & 1 deletion core/languages/Install.english.php
Expand Up @@ -19,7 +19,7 @@
$txt['congratulations_help'] = 'If at any time you need support, or Wedge fails to work properly, please remember that <a href="http://wedge.org/" target="_blank">help is available</a> if you need it.';
$txt['still_writable'] = 'Your installation directory is still writable. It\'s a good idea to chmod it so that it is not writable for security reasons.';
$txt['delete_installer'] = 'Click here to delete this install.php file now.';
$txt['delete_installer_maybe'] = '<em>(doesn\'t work on all servers.)</em>';
$txt['delete_installer_maybe'] = '<em>(Doesn\'t work on all servers!)</em>';
$txt['go_to_your_forum'] = 'Now you can see <a href="%1$s">your newly installed forum</a> and begin to use it. You should first make sure you are logged in, after which you will be able to access the administration center.';
$txt['good_luck'] = 'Good luck!<br>The Wedge Team.';

Expand Down
10 changes: 0 additions & 10 deletions index.php
Expand Up @@ -84,16 +84,6 @@
// Load the actions and database settings, and perform operations like optimizing.
loadSettings();

// If an action should not influence the who's online list, please add it here. (Hookable as global.)
$action_no_log = array(
'ajax', 'dlattach', 'feed', 'like', 'notification', 'verification', 'viewquery', 'viewremote',
);

if (!empty($context['extra_actions']))
$action_list = array_merge($action_list, $context['extra_actions']);
if (!empty($context['nolog_actions']))
$action_no_log = array_merge($action_no_log, $context['nolog_actions']);

// Seed the random generator.
if (empty($settings['rand_seed']) || mt_rand(1, 250) == 42)
we_seed_generator();
Expand Down

0 comments on commit 98cd9cf

Please sign in to comment.