1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 15:17:16 +01:00

Changed: headers, and a couple of clean-ups

git-svn-id: file:///svn/phpbb/trunk@4464 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Ludovic Arnaud 2003-09-03 21:53:41 +00:00
parent 7ea3d109da
commit fef9d2d08a
2 changed files with 30 additions and 45 deletions

View File

@ -1,28 +1,20 @@
<?php <?php
/*************************************************************************** // -------------------------------------------------------------
* acm_db.php //
* ------------------- // $Id$
* begin : Saturday, Feb 13, 2001 //
* copyright : (C) 2001 The phpBB Group // FILENAME : acm_db.php
* email : support@phpbb.com // STARTED : Sat Feb 13, 2001
* // COPYRIGHT : © 2003 phpBB Group
* $Id$ // WWW : http://www.phpbb.com/
* // LICENCE : GPL vs2.0 [ see /docs/COPYING ]
***************************************************************************/ //
// -------------------------------------------------------------
/***************************************************************************
*
* 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.
*
***************************************************************************/
class acm class acm
{ {
var $is_modified = FALSE;
var $vars = ''; var $vars = '';
var $is_modified = FALSE;
function load($var_names = '') function load($var_names = '')
{ {
@ -31,10 +23,10 @@ class acm
$sql = 'SELECT var_name, var_ts, var_data $sql = 'SELECT var_name, var_ts, var_data
FROM ' . CACHE_TABLE; FROM ' . CACHE_TABLE;
if (!empty($var_names)) 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); $result = $db->sql_query($sql);
@ -54,7 +46,7 @@ class acm
unset($this->vars); unset($this->vars);
} }
function save() function save()
{ {
if (!$this->is_modified) if (!$this->is_modified)
{ {
@ -78,7 +70,7 @@ class acm
$insert[] = "'$var_name', " . time() . ", '" . $db->sql_escape(serialize($var_ary['data'])) . "'"; $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) . ')'; VALUES (' . implode('), (', $insert) . ')';
$db->sql_query($sql); $db->sql_query($sql);
break; break;
default: default:
foreach ($insert as $values) foreach ($insert as $values)
{ {

View File

@ -1,23 +1,15 @@
<?php <?php
/*************************************************************************** // -------------------------------------------------------------
* acm_file.php //
* ------------------- // $Id$
* begin : Saturday, Feb 13, 2001 //
* copyright : (C) 2001 The phpBB Group // FILENAME : acm_file.php
* email : support@phpbb.com // STARTED : Sat Feb 13, 2001
* // COPYRIGHT : © 2003 phpBB Group
* $Id$ // WWW : http://www.phpbb.com/
* // LICENCE : GPL vs2.0 [ see /docs/COPYING ]
***************************************************************************/ //
// -------------------------------------------------------------
/***************************************************************************
*
* 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.
*
***************************************************************************/
class acm class acm
{ {
@ -209,7 +201,8 @@ class acm
include($this->cache_dir . 'sql_' . md5($query) . '.' . $phpEx); include($this->cache_dir . 'sql_' . md5($query) . '.' . $phpEx);
$query_id = 'Cache id #' . count($this->sql_rowset); $query_id = 'Cache id #' . count($this->sql_rowset);
$this->sql_rowset[$query_id] = $rowset;
$this->sql_rowset[$query_id] =& $rowset;
return $query_id; return $query_id;
} }