Changeset View
Changeset View
Standalone View
Standalone View
plugins/libkolab/lib/kolab_storage_cache.php
Show First 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | class kolab_storage_cache | ||||
} | } | ||||
/** | /** | ||||
* Direct access to cache by folder_id | * Direct access to cache by folder_id | ||||
* (only for internal use) | * (only for internal use) | ||||
*/ | */ | ||||
public function select_by_id($folder_id) | public function select_by_id($folder_id) | ||||
{ | { | ||||
$sql_arr = $this->db->fetch_assoc($this->db->query("SELECT * FROM `{$this->folders_table}` WHERE `folder_id` = ?", $folder_id)); | $query = $this->db->query("SELECT * FROM `{$this->folders_table}` WHERE `folder_id` = ?", $folder_id); | ||||
if ($sql_arr) { | if ($sql_arr = $this->db->fetch_assoc($query)) { | ||||
$this->metadata = $sql_arr; | $this->metadata = $sql_arr; | ||||
$this->folder_id = $sql_arr['folder_id']; | $this->folder_id = $sql_arr['folder_id']; | ||||
$this->folder = new StdClass; | $this->folder = new StdClass; | ||||
$this->folder->type = $sql_arr['type']; | $this->folder->type = $sql_arr['type']; | ||||
$this->resource_uri = $sql_arr['resource']; | $this->resource_uri = $sql_arr['resource']; | ||||
$this->cache_table = $this->db->table_name('kolab_cache_' . $sql_arr['type']); | $this->cache_table = $this->db->table_name('kolab_cache_' . $sql_arr['type']); | ||||
$this->ready = true; | $this->ready = true; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,345 Lines • Show Last 20 Lines |