30 $this->CONFIG = $CONFIG;
41 function remove(
$name, $site_guid = 0) {
44 $site_guid = (int) $site_guid;
45 if ($site_guid == 0) {
46 $site_guid = (int) $this->CONFIG->site_guid;
49 if ($site_guid == $this->CONFIG->site_guid && isset($this->CONFIG->$name)) {
50 unset($this->CONFIG->$name);
54 $query =
"DELETE FROM {$this->CONFIG->dbprefix}config WHERE name = '$escaped_name' AND site_guid = $site_guid";
87 _elgg_services()->logger->error(
"The name length for configuration variables cannot be greater than 255");
91 $site_guid = (int) $site_guid;
92 if ($site_guid == 0) {
93 $site_guid = (int) $this->CONFIG->site_guid;
96 if ($site_guid == $this->CONFIG->site_guid) {
97 $this->CONFIG->$name =
$value;
103 SET name = '$escaped_name', value = '$escaped_value', site_guid = $site_guid 104 ON DUPLICATE KEY UPDATE value = '$escaped_value'");
124 function get(
$name, $site_guid = 0) {
127 $site_guid = (int) $site_guid;
134 $new_name =
'plugins_path';
138 $new_name =
'site_name';
150 if ($site_guid == 0) {
151 $site_guid = (int) $this->CONFIG->site_guid;
155 if ($site_guid == $this->CONFIG->site_guid && isset($this->CONFIG->$name)) {
156 return $this->CONFIG->$name;
161 WHERE name = '$escaped_name' AND site_guid = $site_guid");
166 if ($site_guid == $this->CONFIG->site_guid) {
167 $this->CONFIG->$name =
$result;
if($guid==elgg_get_logged_in_user_guid()) $name
__construct()
Constructor.
sanitize_string($string)
Sanitizes a string for use in a query.
elgg_strlen()
Wrapper function for mb_strlen().
elgg global
Pointer to the global context.
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.