diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-09-03 21:53:41 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-09-03 21:53:41 +0000 |
commit | fef9d2d08a04b88a0989d12aaa14b86fef994d0c (patch) | |
tree | 966ef5d582e71bd72281c1343c45af50687dc609 /phpBB/includes/acm | |
parent | 7ea3d109da71699ac90b13ce41c99643359d801e (diff) | |
download | forums-fef9d2d08a04b88a0989d12aaa14b86fef994d0c.tar forums-fef9d2d08a04b88a0989d12aaa14b86fef994d0c.tar.gz forums-fef9d2d08a04b88a0989d12aaa14b86fef994d0c.tar.bz2 forums-fef9d2d08a04b88a0989d12aaa14b86fef994d0c.tar.xz forums-fef9d2d08a04b88a0989d12aaa14b86fef994d0c.zip |
Changed: headers, and a couple of clean-ups
git-svn-id: file:///svn/phpbb/trunk@4464 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/acm')
-rw-r--r-- | phpBB/includes/acm/acm_db.php | 42 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 33 |
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; } |