3 require_once("include/PConfig.php");
4 require_once("include/Config.php");
7 * @file include/config.php
9 * @brief (Deprecated) Arbitrary configuration storage
11 * Please do not store booleans - convert to 0/1 integer values
12 * The get_?config() functions return boolean false for keys that are unset,
13 * and this could lead to subtle bugs.
15 * There are a few places in the code (such as the admin panel) where boolean
16 * configurations need to be fixed as of 10/08/2011.
20 * @brief (Deprecated) Loads all configuration values of family into a cached storage.
22 * Note: This function is deprecated. Use Config::load() instead.
24 * @param string $family
25 * The category of the configuration value
28 function load_config($family) {
29 return Config::load($family);
33 * @brief (Deprecated) Get a particular user's config variable given the category name
34 * ($family) and a key.
36 * Note: This function is deprecated. Use Config::get() instead.
38 * @param string $family
39 * The category of the configuration value
41 * The configuration key to query
42 * @param boolean $refresh
43 * If true the config is loaded from the db and not from the cache
44 * @return mixed Stored value or false if it does not exist
46 function get_config($family, $key, $refresh = false) {
47 $v = Config::get($family, $key, $refresh);
55 * @brief (Deprecated) Sets a configuration value for system config
57 * Note: This function is deprecated. Use Config::set() instead.
59 * @param string $family
60 * The category of the configuration value
62 * The configuration key to set
63 * @param string $value
65 * @return mixed Stored $value or false if the database update failed
67 function set_config($family,$key,$value) {
68 return Config::set($family, $key, $value);
72 * @brief (Deprecated) Deletes the given key from the system configuration.
74 * Note: This function is deprecated. Use Config::delete() instead.
76 * @param string $family
77 * The category of the configuration value
79 * The configuration key to delete
82 function del_config($family,$key) {
83 return Config::delete($family, $key);
87 * @brief (Deprecated) Loads all configuration values of a user's config family into a cached storage.
89 * Note: This function is deprecated. Use PConfig::load() instead.
93 * @param string $family
94 * The category of the configuration value
97 function load_pconfig($uid,$family) {
98 return PConfig::load($uid, $family);
102 * @brief (Deprecated) Get a particular user's config variable given the category name
103 * ($family) and a key.
105 * Note: This function is deprecated. Use PConfig::get() instead.
109 * @param string $family
110 * The category of the configuration value
112 * The configuration key to query
113 * @param boolean $refresh
114 * If true the config is loaded from the db and not from the cache
115 * @return mixed Stored value or false if it does not exist
117 function get_pconfig($uid, $family, $key, $refresh = false) {
118 $v = PConfig::get($uid, $family, $key, $refresh);
126 * @brief (Deprecated) Sets a configuration value for a user
128 * Note: This function is deprecated. Use PConfig::set() instead.
132 * @param string $family
133 * The category of the configuration value
135 * The configuration key to set
136 * @param string $value
138 * @return mixed Stored $value or false
140 function set_pconfig($uid,$family,$key,$value) {
141 return PConfig::set($uid, $family, $key, $value);
145 * @brief (Deprecated) Deletes the given key from the users's configuration.
147 * Note: This function is deprecated. Use PConfig::delete() instead.
149 * @param string $uid The user_id
150 * @param string $family
151 * The category of the configuration value
153 * The configuration key to delete
156 function del_pconfig($uid,$family,$key) {
157 return PConfig::delete($uid, $family, $key);