aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/acm/acm_db.php42
-rw-r--r--phpBB/includes/acm/acm_file.php33
2 files changed, 30 insertions, 45 deletions
diff --git a/phpBB/includes/acm/acm_db.php b/phpBB/includes/acm/acm_db.php
index 28df2e62be..6301307723 100644
--- a/phpBB/includes/acm/acm_db.php
+++ b/phpBB/includes/acm/acm_db.php
@@ -1,28 +1,20 @@
<?php
-/***************************************************************************
- * acm_db.php
- * -------------------
- * begin : Saturday, Feb 13, 2001
- * copyright : (C) 2001 The phpBB Group
- * email : support@phpbb.com
- *
- * $Id$
- *
- ***************************************************************************/
-
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
+// -------------------------------------------------------------
+//
+// $Id$
+//
+// FILENAME : acm_db.php
+// STARTED : Sat Feb 13, 2001
+// COPYRIGHT : © 2003 phpBB Group
+// WWW : http://www.phpbb.com/
+// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
+//
+// -------------------------------------------------------------
class acm
{
- var $is_modified = FALSE;
var $vars = '';
+ var $is_modified = FALSE;
function load($var_names = '')
{
@@ -31,10 +23,10 @@ class acm
$sql = 'SELECT var_name, var_ts, var_data
FROM ' . CACHE_TABLE;
-
+
if (!empty($var_names))
{
- $sql .= " WHERE var_name IN ('" . implode("', '", $var_names) . "')";
+ $sql .= "\nWHERE var_name IN ('" . implode("', '", $var_names) . "')";
}
$result = $db->sql_query($sql);
@@ -54,7 +46,7 @@ class acm
unset($this->vars);
}
- function save()
+ function save()
{
if (!$this->is_modified)
{
@@ -78,7 +70,7 @@ class acm
$insert[] = "'$var_name', " . time() . ", '" . $db->sql_escape(serialize($var_ary['data'])) . "'";
}
- $db->sql_query($sql);
+ $this->vars[$var_name]['is_modified'] = FALSE;
}
}
@@ -97,7 +89,7 @@ class acm
VALUES (' . implode('), (', $insert) . ')';
$db->sql_query($sql);
break;
-
+
default:
foreach ($insert as $values)
{
diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php
index e778000a37..3f209bdf40 100644
--- a/phpBB/includes/acm/acm_file.php
+++ b/phpBB/includes/acm/acm_file.php
@@ -1,23 +1,15 @@
<?php
-/***************************************************************************
- * acm_file.php
- * -------------------
- * begin : Saturday, Feb 13, 2001
- * copyright : (C) 2001 The phpBB Group
- * email : support@phpbb.com
- *
- * $Id$
- *
- ***************************************************************************/
-
-/***************************************************************************
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- ***************************************************************************/
+// -------------------------------------------------------------
+//
+// $Id$
+//
+// FILENAME : acm_file.php
+// STARTED : Sat Feb 13, 2001
+// COPYRIGHT : © 2003 phpBB Group
+// WWW : http://www.phpbb.com/
+// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
+//
+// -------------------------------------------------------------
class acm
{
@@ -209,7 +201,8 @@ class acm
include($this->cache_dir . 'sql_' . md5($query) . '.' . $phpEx);
$query_id = 'Cache id #' . count($this->sql_rowset);
- $this->sql_rowset[$query_id] = $rowset;
+
+ $this->sql_rowset[$query_id] =& $rowset;
return $query_id;
}