2003-11-22 04:05:00 +01:00
|
|
|
<?php
|
2005-10-14 12:41:15 +02:00
|
|
|
/**************************************************************************\
|
|
|
|
* eGroupWare - Filemanager *
|
|
|
|
* http://www.egroupware.org *
|
|
|
|
* ------------------------------------------------------------------------ *
|
|
|
|
* 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$ */
|
2003-11-22 04:05:00 +01:00
|
|
|
|
|
|
|
class sofilemanager
|
|
|
|
{
|
|
|
|
var $db;
|
|
|
|
|
|
|
|
function sofilemanager()
|
|
|
|
{
|
2005-09-14 03:58:20 +02:00
|
|
|
$this->db = clone($GLOBALS['egw']->db);
|
2003-11-22 04:05:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Any initializations that need to be done */
|
2005-09-14 03:58:20 +02:00
|
|
|
function db_init()
|
2003-11-22 04:05:00 +01:00
|
|
|
{
|
|
|
|
$this->db->Auto_Free = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* General SQL query */
|
2005-09-14 03:58:20 +02:00
|
|
|
function db_query($query)
|
2003-11-22 04:05:00 +01:00
|
|
|
{
|
|
|
|
|
2005-09-14 03:58:20 +02:00
|
|
|
return $this->db->query($query);
|
2003-11-22 04:05:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Fetch next array for $query_id */
|
2005-09-14 03:58:20 +02:00
|
|
|
function db_fetch_array($query_id)
|
2003-11-22 04:05:00 +01:00
|
|
|
{
|
2005-09-14 03:58:20 +02:00
|
|
|
// $egw->db->Query_ID = $query_id;
|
|
|
|
$this->db->next_record();
|
2003-11-22 04:05:00 +01:00
|
|
|
return $this->db->Record;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
General wrapper for all other db calls
|
|
|
|
Calls in here are simply returned, so not all will work
|
|
|
|
*/
|
2005-09-14 03:58:20 +02:00
|
|
|
function db_call($function, $query_id)
|
2003-11-22 04:05:00 +01:00
|
|
|
{
|
2005-09-14 03:58:20 +02:00
|
|
|
// $egw->db->Query_ID = $query_id;
|
|
|
|
return $this->db->$function();
|
2003-11-22 04:05:00 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|