aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/PConfig.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2019-01-28 02:48:57 -0800
committerzotlabs <mike@macgirvin.com>2019-01-28 02:48:57 -0800
commit043f7bf2abe069c7ac504e0b944db3c0e4318688 (patch)
treef9634791642a874745c079643b340c9396b64cd7 /Zotlabs/Lib/PConfig.php
parent625cdde9a40d13b47a794c6202add2c8f647aebe (diff)
parente3d39fbf3fe99c6ce9de256290e83c49fea8808b (diff)
downloadvolse-hubzilla-043f7bf2abe069c7ac504e0b944db3c0e4318688.tar.gz
volse-hubzilla-043f7bf2abe069c7ac504e0b944db3c0e4318688.tar.bz2
volse-hubzilla-043f7bf2abe069c7ac504e0b944db3c0e4318688.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into xdev_merge
Diffstat (limited to 'Zotlabs/Lib/PConfig.php')
-rw-r--r--Zotlabs/Lib/PConfig.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/Zotlabs/Lib/PConfig.php b/Zotlabs/Lib/PConfig.php
index 69f4de2db..c08c11e75 100644
--- a/Zotlabs/Lib/PConfig.php
+++ b/Zotlabs/Lib/PConfig.php
@@ -112,9 +112,11 @@ class PConfig {
* The configuration key to set
* @param string $value
* The value to store
+ * @param string $updated (optional)
+ * The datetime to store
* @return mixed Stored $value or false
*/
- static public function Set($uid, $family, $key, $value, $updated=NULL) {
+ static public function Set($uid, $family, $key, $value, $updated = NULL) {
// this catches subtle errors where this function has been called
// with local_channel() when not logged in (which returns false)
@@ -239,7 +241,9 @@ class PConfig {
* The category of the configuration value
* @param string $key
* The configuration key to delete
- * @return mixed
+ * @param string $updated (optional)
+ * The datetime to store
+ * @return boolean
*/
static public function Delete($uid, $family, $key, $updated = NULL) {
@@ -271,22 +275,13 @@ class PConfig {
dbesc($key)
);
+ // Synchronize delete with clones.
+
if ($family != 'hz_delpconfig') {
$hash = hash('sha256',$family.':'.$key);
set_pconfig($uid,'hz_delpconfig',$hash,$updated);
}
- // Synchronize delete with clones.
-
- if(! array_key_exists('transient', \App::$config[$uid]))
- \App::$config[$uid]['transient'] = array();
- if(! array_key_exists($family, \App::$config[$uid]['transient']))
- \App::$config[$uid]['transient'][$family] = array();
-
- if ($new) {
- \App::$config[$uid]['transient'][$family]['pcfgdel:'.$key] = $updated;
- }
-
return $ret;
}