aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-02-22 15:29:18 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-02-22 15:29:18 +0000
commit794c5749696c9fa2595ed3a1d7c836a0d984e11c (patch)
tree37aab2f0f965ddcaeb1d26af753095f59a6e025c /phpBB/cron.php
parentFix guest/bot session problems with apache authentication plugin (Bug #41085) (diff)
downloadphpbb-794c5749696c9fa2595ed3a1d7c836a0d984e11c.tar.gz
phpbb-794c5749696c9fa2595ed3a1d7c836a0d984e11c.tar.bz2
phpbb-794c5749696c9fa2595ed3a1d7c836a0d984e11c.zip
remove global and change $user-> to phpbb::$user->
git-svn-id: file:///svn/phpbb/trunk@9334 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/cron.php')
-rw-r--r--phpBB/cron.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/phpBB/cron.php b/phpBB/cron.php
index b892084a55..9d4b1aa99f 100644
--- a/phpBB/cron.php
+++ b/phpBB/cron.php
@@ -17,8 +17,8 @@ if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(PHPBB_ROOT_PATH . 'common.' . PHP_EXT);
// Do not update users last page entry
-$user->session_begin(false);
-$auth->acl($user->data);
+phpbb::$user->session_begin(false);
+$auth->acl(phpbb::$user->data);
$cron_type = request_var('cron_type', '');
$use_shutdown_function = (@function_exists('register_shutdown_function')) ? true : false;
@@ -58,7 +58,7 @@ define('CRON_ID', time() . ' ' . unique_id());
$sql = 'UPDATE ' . CONFIG_TABLE . "
SET config_value = '" . $db->sql_escape(CRON_ID) . "'
WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape(phpbb::$config['cron_lock']) . "'";
-$db->sql_query($sql);
+phpbb::$db->sql_query($sql);
// another cron process altered the table between script start and UPDATE query so exit
if ($db->sql_affectedrows() != 1)
@@ -202,7 +202,7 @@ switch ($cron_type)
}
else
{
- $user->session_gc();
+ phpbb::$user->session_gc();
}
break;
@@ -276,8 +276,6 @@ exit;
*/
function unlock_cron()
{
- global $db;
-
$sql = 'UPDATE ' . CONFIG_TABLE . "
SET config_value = '0'
WHERE config_name = 'cron_lock' AND config_value = '" . $db->sql_escape(CRON_ID) . "'";