diff options
author | Olivier van Helden <olivier@van-helden.net> | 2014-12-03 17:54:07 -0400 |
---|---|---|
committer | Olivier van Helden <olivier@van-helden.net> | 2014-12-03 17:54:07 -0400 |
commit | e523061b7261439a71bdacf8f46d4c614740b356 (patch) | |
tree | 1a0577c64197c4289ed154d2c2d5fdf48a7e5192 /include/config.php | |
parent | 13fd91d6f5723774a1b96257f8096acb2873b4ed (diff) | |
parent | b71b45aafc618d32d23c099a4d4db8bad2f09e54 (diff) | |
download | volse-hubzilla-e523061b7261439a71bdacf8f46d4c614740b356.tar.gz volse-hubzilla-e523061b7261439a71bdacf8f46d4c614740b356.tar.bz2 volse-hubzilla-e523061b7261439a71bdacf8f46d4c614740b356.zip |
Merge pull request #1 from friendica/master
Merge master from friendica
Diffstat (limited to 'include/config.php')
-rw-r--r-- | include/config.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/include/config.php b/include/config.php index 3292059d1..87b91e51a 100644 --- a/include/config.php +++ b/include/config.php @@ -154,7 +154,7 @@ function set_config($family, $key, $value) { return $ret; } - $ret = q("UPDATE config SET v = '%s' WHERE cat = '%s' AND k = '%s' LIMIT 1", + $ret = q("UPDATE config SET v = '%s' WHERE cat = '%s' AND k = '%s'", dbesc($dbvalue), dbesc($family), dbesc($key) @@ -185,7 +185,7 @@ function del_config($family, $key) { if(array_key_exists($family, $a->config) && array_key_exists($key, $a->config[$family])) unset($a->config[$family][$key]); - $ret = q("DELETE FROM config WHERE cat = '%s' AND k = '%s' LIMIT 1", + $ret = q("DELETE FROM config WHERE cat = '%s' AND k = '%s'", dbesc($family), dbesc($key) ); @@ -212,7 +212,7 @@ function load_pconfig($uid) { if(! array_key_exists($uid, $a->config)) $a->config[$uid] = array(); - $r = q("SELECT * FROM `pconfig` WHERE `uid` = %d", + $r = q("SELECT * FROM pconfig WHERE uid = %d", intval($uid) ); @@ -318,7 +318,7 @@ function set_pconfig($uid, $family, $key, $value) { return $ret; } - $ret = q("UPDATE pconfig SET v = '%s' WHERE uid = %d and cat = '%s' AND k = '%s' LIMIT 1", + $ret = q("UPDATE pconfig SET v = '%s' WHERE uid = %d and cat = '%s' AND k = '%s'", dbesc($dbvalue), intval($uid), dbesc($family), @@ -362,7 +362,7 @@ function del_pconfig($uid, $family, $key) { if(x($a->config[$uid][$family], $key)) unset($a->config[$uid][$family][$key]); - $ret = q("DELETE FROM pconfig WHERE uid = %d AND cat = '%s' AND k = '%s' LIMIT 1", + $ret = q("DELETE FROM pconfig WHERE uid = %d AND cat = '%s' AND k = '%s'", intval($uid), dbesc($family), dbesc($key) @@ -390,7 +390,7 @@ function load_xconfig($xchan) { if(! array_key_exists($xchan, $a->config)) $a->config[$xchan] = array(); - $r = q("SELECT * FROM `xconfig` WHERE `xchan` = '%s'", + $r = q("SELECT * FROM xconfig WHERE xchan = '%s'", dbesc($xchan) ); @@ -483,7 +483,7 @@ function set_xconfig($xchan, $family, $key, $value) { return $ret; } - $ret = q("UPDATE xconfig SET v = '%s' WHERE xchan = '%s' and cat = '%s' AND k = '%s' LIMIT 1", + $ret = q("UPDATE xconfig SET v = '%s' WHERE xchan = '%s' and cat = '%s' AND k = '%s'", dbesc($dbvalue), dbesc($xchan), dbesc($family), @@ -517,7 +517,7 @@ function del_xconfig($xchan, $family, $key) { if(x($a->config[$xchan][$family], $key)) unset($a->config[$xchan][$family][$key]); - $ret = q("DELETE FROM `xconfig` WHERE `xchan` = '%s' AND `cat` = '%s' AND `k` = '%s' LIMIT 1", + $ret = q("DELETE FROM xconfig WHERE xchan = '%s' AND cat = '%s' AND k = '%s'", dbesc($xchan), dbesc($family), dbesc($key) |