fix diverse occurences of egw_db

This commit is contained in:
Ralf Becker 2016-05-06 11:13:19 +00:00
parent cb6be27b12
commit 153c068271
12 changed files with 19 additions and 19 deletions

View File

@ -14,7 +14,7 @@
use EGroupware\Api;
/**
* Exception thrown by the egw_db class for everything not covered by extended classed below
* Exception thrown by the Api\Db class for everything not covered by extended classed below
*
* New Db\Exception has to extend deprecated egw_exception_db to allow legacy code
* to catch exceptions thrown by Api\Db class!

View File

@ -332,8 +332,8 @@ class Config
*/
public static function init_static()
{
// we use a reference here (no clone), as we no longer use egw_db::row() or egw_db::next_record()!
if (isset($GLOBALS['egw_setup']) && is_a($GLOBALS['egw_setup']->db, 'egw_db'))
// we use a reference here (no clone), as we no longer use Db::row() or Db::next_record()!
if (isset($GLOBALS['egw_setup']) && $GLOBALS['egw_setup']->db instanceof Db)
{
self::$db = $GLOBALS['egw_setup']->db;
}

View File

@ -163,9 +163,9 @@ class Contacts extends Contacts\Storage
* Constructor
*
* @param string $contact_app ='addressbook' used for acl->get_grants()
* @param egw_db $db =null
* @param Db $db =null
*/
function __construct($contact_app='addressbook',egw_db $db=null)
function __construct($contact_app='addressbook',Db $db=null)
{
parent::__construct($contact_app,$db);
if ($this->log)
@ -1549,7 +1549,7 @@ class Contacts extends Contacts\Storage
$options['filter'] = (array)$options['filter'];
}
// return only contacts with email set
$options['filter'][] = "contact_email ".$this->db->capabilities[egw_db::CAPABILITY_CASE_INSENSITIV_LIKE]." '%@%'";
$options['filter'][] = "contact_email ".$this->db->capabilities[Db::CAPABILITY_CASE_INSENSITIV_LIKE]." '%@%'";
// let link query know, to append email to list
$options['type'] = 'email';

View File

@ -87,7 +87,7 @@ class Backup
*/
var $backup_files = false ;
/**
* Reference to schema_proc's egw_db object
* Reference to schema_proc's Api\Db object
*
* @var Api\Db
*/

View File

@ -14,7 +14,7 @@
namespace EGroupware\Api\Db;
/**
* Exception thrown by the egw_db class for everything not covered by extended classed below
* Exception thrown by the Api\Db class for everything not covered by extended classed below
*
* New Db\Exception has to extend deprecated egw_exception_db to allow legacy code
* to catch exceptions thrown by Api\Db class!

View File

@ -916,7 +916,7 @@ class Schema
*/
function ExecuteSqlArray($aSql,$debug_level)
{
if ($this->m_odb->query_log) // we use egw_db::query to log the queries
if ($this->m_odb->query_log) // we use Db::query to log the queries
{
$retval = 2;
foreach($aSql as $sql)

View File

@ -23,7 +23,7 @@ class Applications
/**
* Reference to the global db class
*
* @var egw_db
* @var EGroupware\Api\Db
*/
var $db;
var $table_name = 'egw_applications';

View File

@ -39,7 +39,7 @@ class Storage
/**
* Reference to the global db-class
*
* @var egw_db
* @var Api\Db
*/
private static $db;
/**

View File

@ -86,7 +86,7 @@ class Preferences
*/
var $session = array();
/**
* @var egw_db
* @var Db
*/
var $db;
/**

View File

@ -54,7 +54,7 @@ class Session
/**
* key of eGW's required files in $_SESSION
*
* These files get set by egw_db and egw class, for classes which get not autoloaded (eg. ADOdb, idots_framework)
* These files get set by Db and Egw class, for classes which get not autoloaded (eg. ADOdb, idots_framework)
*/
const EGW_REQUIRED_FILES = 'egw_required_files';

View File

@ -59,10 +59,10 @@ class Customfields implements \IteratorAggregate
* @param string $only_type2 =null if given only return fields of type2 == $only_type2
* @param int $start =0
* @param int $num_rows =null
* @param egw_db $db =null reference to database instance to use
* @param Api\Db $db =null reference to database instance to use
* @return array with customfields
*/
function __construct($app, $all_private_too=false, $only_type2=null, $start=0, $num_rows=null, egw_db $db=null)
function __construct($app, $all_private_too=false, $only_type2=null, $start=0, $num_rows=null, Api\Db $db=null)
{
$this->app = $app;
$this->all_private_too = $all_private_too;
@ -88,7 +88,7 @@ class Customfields implements \IteratorAggregate
/**
* Return iterator required for IteratorAggregate
*
* @return egw_db_callback_iterator
* @return Api\Db\CallbackIterator
*/
function getIterator()
{
@ -129,10 +129,10 @@ class Customfields implements \IteratorAggregate
* @param string $app
* @param boolean $all_private_too =false should all the private fields be returned too, default no
* @param string $only_type2 =null if given only return fields of type2 == $only_type2
* @param egw_db $db =null reference to database to use
* @param Api\Db $db =null reference to database to use
* @return array with customfields
*/
public static function get($app, $all_private_too=false, $only_type2=null, egw_db $db=null)
public static function get($app, $all_private_too=false, $only_type2=null, Api\Db $db=null)
{
$cache_key = $app.':'.($all_private_too?'all':$GLOBALS['egw_info']['user']['account_id']).':'.$only_type2;
$cfs = Api\Cache::getInstance(__CLASS__, $cache_key);

View File

@ -52,7 +52,7 @@ class Sharing
/**
* Reference to global db object
*
* @var egw_db
* @var Api\Db
*/
protected static $db;