1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 07:08:09 +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
/***************************************************************************
* 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)
{

View File

@ -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;
}