public static function loadStorageConnections() { $config = self::getConfig(); if (isset($config->application['attributes']['storage'])) { foreach ($config->application['attributes']['storage'] as $vals) { $tag = $vals['tag']; $required = isset($vals['required']) ? $vals['required'] : false; $cs = null; if (isset($vals['cs'])) { $cs = $vals['cs']; } elseif (function_exists('storage_cs_key_provider')) { $cs = storage_cs_key_provider($tag, $config->application['location_id']); } storage::dao_AddDefinition($tag, $cs, $required); storage::dao_MakeDefinitionAvailable($tag); } } }
public static function loadStorageConnections() { $config = self::getConfig(); $db = storage::int_get_storage("rea"); if (isset($config->application['attributes']['storage'])) { foreach ($config->application['attributes']['storage'] as $vals) { $tag = $vals['tag']; $required = isset($vals['required']) ? $vals['required'] : false; $cs = null; $rs = $db->where("tag", $tag, 'location_id', '*')->get("db_storage"); if ($rs->read()) { $cs = $rs->fields['cs']; } $rs = $db->where("tag", $tag, 'location_id', $config->application['location_id'])->get("db_storage"); if ($rs->read()) { $cs = $rs->fields['cs']; } storage::dao_AddDefinition($tag, $cs, $required); storage::dao_MakeDefinitionAvailable($tag); } } }