aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm/acm_apc.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-05-29 12:25:56 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-05-29 12:25:56 +0000
commit2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04 (patch)
tree3b7ea329bf35eab5ddab9b0b5eb790e45e283a5c /phpBB/includes/acm/acm_apc.php
parent91b4fe1868ca2c4d81111943f781e3cfd0262ef2 (diff)
downloadforums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.gz
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.bz2
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.tar.xz
forums-2f4a618900e2c3b6ea14c68cbeb5897cd2ac1a04.zip
ok... i hope i haven't messed too much with the code and everything is still working.
Changes: - Ascraeus now uses constants for the phpbb root path and the php extension. This ensures more security for external applications and modifications (no more overwriting of root path and extension possible through insecure mods and register globals enabled) as well as no more globalizing needed. - A second change implemented here is an additional short-hand-notation for append_sid(). It is allowed to omit the root path and extension now (for example calling append_sid('memberlist')) - in this case the root path and extension get added automatically. The hook is called after these are added. git-svn-id: file:///svn/phpbb/trunk@8572 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm/acm_apc.php')
-rw-r--r--phpBB/includes/acm/acm_apc.php15
1 files changed, 2 insertions, 13 deletions
diff --git a/phpBB/includes/acm/acm_apc.php b/phpBB/includes/acm/acm_apc.php
index 15f3705d9e..e4c4b79de3 100644
--- a/phpBB/includes/acm/acm_apc.php
+++ b/phpBB/includes/acm/acm_apc.php
@@ -33,8 +33,7 @@ class acm
*/
function __construct()
{
- global $phpbb_root_path;
- $this->cache_dir = $phpbb_root_path . 'cache/';
+ $this->cache_dir = PHPBB_ROOT_PATH . 'cache/';
}
/**
@@ -42,8 +41,6 @@ class acm
*/
private function load()
{
- global $phpEx;
-
// grab the global cache
if ($this->vars = apc_fetch('global'))
{
@@ -86,8 +83,6 @@ class acm
*/
public function tidy()
{
- global $phpEx;
-
// cache has auto GC, no need to have any code here :)
set_config('cache_last_gc', time(), true);
@@ -100,8 +95,6 @@ class acm
{
if ($var_name[0] === '_')
{
- global $phpEx;
-
return apc_fetch($var_name);
}
else
@@ -171,8 +164,6 @@ class acm
*/
public function destroy($var_name, $table = '')
{
- global $phpEx;
-
if ($var_name === 'sql' && !empty($table))
{
if (!is_array($table))
@@ -221,8 +212,6 @@ class acm
*/
public function sql_load($query)
{
- global $phpEx;
-
// Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
$query_id = sizeof($this->sql_rowset);
@@ -244,7 +233,7 @@ class acm
*/
public function sql_save($query, &$query_result, $ttl)
{
- global $db, $phpEx;
+ global $db;
// Remove extra spaces and tabs
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);