aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acm/acm_memory.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2009-06-04 14:34:07 +0000
committerChris Smith <toonarmy@phpbb.com>2009-06-04 14:34:07 +0000
commitaec3a498de31b380d0eb48154de0b2bd56054dfa (patch)
tree5c1a11b465a1a018a038bd3914ded3371352646a /phpBB/includes/acm/acm_memory.php
parent43f19387ffc7c23f1e02bfde131cd804a0249922 (diff)
downloadforums-aec3a498de31b380d0eb48154de0b2bd56054dfa.tar
forums-aec3a498de31b380d0eb48154de0b2bd56054dfa.tar.gz
forums-aec3a498de31b380d0eb48154de0b2bd56054dfa.tar.bz2
forums-aec3a498de31b380d0eb48154de0b2bd56054dfa.tar.xz
forums-aec3a498de31b380d0eb48154de0b2bd56054dfa.zip
Lets follow some PHP4 conventions underscores for internal methods.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9536 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm/acm_memory.php')
-rw-r--r--phpBB/includes/acm/acm_memory.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/phpBB/includes/acm/acm_memory.php b/phpBB/includes/acm/acm_memory.php
index 964fdb2db4..7875c3441e 100644
--- a/phpBB/includes/acm/acm_memory.php
+++ b/phpBB/includes/acm/acm_memory.php
@@ -34,6 +34,8 @@ class acm_memory
*/
function acm_memory()
{
+ global $phpbb_root_path;
+
$this->cache_dir = $phpbb_root_path . 'cache/';
}
@@ -43,7 +45,7 @@ class acm_memory
function load()
{
// grab the global cache
- $this->vars = $this->read('global');
+ $this->vars = $this->_read('global');
if ($this->vars !== false)
{
@@ -78,7 +80,7 @@ class acm_memory
return;
}
- $this->write('global', $this->vars, 2592000);
+ $this->_write('global', $this->vars, 2592000);
$this->is_modified = false;
}
@@ -105,7 +107,7 @@ class acm_memory
return false;
}
- return $this->read($var_name);
+ return $this->_read($var_name);
}
else
{
@@ -120,7 +122,7 @@ class acm_memory
{
if ($var_name[0] == '_')
{
- $this->write($var_name, $var, $ttl);
+ $this->_write($var_name, $var, $ttl);
}
else
{
@@ -180,7 +182,7 @@ class acm_memory
foreach ($table as $table_name)
{
// gives us the md5s that we want
- $temp = $this->read('sql_' . $table_name);
+ $temp = $this->_read('sql_' . $table_name);
if ($temp === false)
{
@@ -190,11 +192,11 @@ class acm_memory
// delete each query ref
foreach ($temp as $md5_id => $void)
{
- $this->delete('sql_' . $md5_id);
+ $this->_delete('sql_' . $md5_id);
}
// delete the table ref
- $this->delete('sql_' . $table_name);
+ $this->_delete('sql_' . $table_name);
}
return;
@@ -207,7 +209,7 @@ class acm_memory
if ($var_name[0] == '_')
{
- $this->delete($var_name);
+ $this->_delete($var_name);
}
else if (isset($this->vars[$var_name]))
{
@@ -248,7 +250,7 @@ class acm_memory
$query = preg_replace('/[\n\r\s\t]+/', ' ', $query);
$query_id = sizeof($this->sql_rowset);
- if (($result = $this->read('sql_' . md5($query))) === false)
+ if (($result = $this->_read('sql_' . md5($query))) === false)
{
return false;
}
@@ -290,7 +292,7 @@ class acm_memory
$table_name = substr($table_name, 0, $pos);
}
- $temp = $this->read('sql_' . $table_name);
+ $temp = $this->_read('sql_' . $table_name);
if ($temp === false)
{
@@ -300,7 +302,7 @@ class acm_memory
$temp[$hash] = true;
// This must never expire
- $this->write('sql_' . $table_name, $temp, 0);
+ $this->_write('sql_' . $table_name, $temp, 0);
}
// store them in the right place
@@ -314,7 +316,7 @@ class acm_memory
}
$db->sql_freeresult($query_result);
- $this->write('sql_' . $hash, $this->sql_rowset[$query_id], $ttl);
+ $this->_write('sql_' . $hash, $this->sql_rowset[$query_id], $ttl);
$query_result = $query_id;
}