diff options
author | root <root@diekershoff.homeunix.net> | 2010-12-24 11:19:31 +0100 |
---|---|---|
committer | root <root@diekershoff.homeunix.net> | 2010-12-24 11:19:31 +0100 |
commit | 6f8c4169e57188093b3d2ce6d0e66f1364b5a5fb (patch) | |
tree | 3863921df5d5a631356cef120e133182d4f1887b /boot.php | |
parent | 2f532f579c8b3a7052f67c72af901bf2926a85bf (diff) | |
parent | 1438b3d67de99a68b1790ad07dde88db8a41a2b8 (diff) | |
download | volse-hubzilla-6f8c4169e57188093b3d2ce6d0e66f1364b5a5fb.tar.gz volse-hubzilla-6f8c4169e57188093b3d2ce6d0e66f1364b5a5fb.tar.bz2 volse-hubzilla-6f8c4169e57188093b3d2ce6d0e66f1364b5a5fb.zip |
Merge branch 'master' of git://github.com/friendika/friendika
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -1199,11 +1199,12 @@ 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", - intval($uid), dbesc($value), + intval($uid), dbesc($family), dbesc($key) ); + if($ret) return $value; return $ret; @@ -2046,6 +2047,14 @@ function profile_sidebar($profile) { if(! function_exists('register_hook')) { function register_hook($hook,$file,$function) { + $r = q("SELECT FROM `hook` WHERE `hook` = '%s' AND `file` = '%s' AND `function` = '%s' LIMIT 1", + dbesc($hook), + dbesc($file), + dbesc($function) + ); + if(count($r)) + return true; + $r = q("INSERT INTO `hook` (`hook`, `file`, `function`) VALUES ( '%s', '%s', '%s' ) ", dbesc($hook), dbesc($file), @@ -2079,7 +2088,7 @@ function load_hooks() { if(! function_exists('call_hooks')) { -function call_hooks($name, $data = null) { +function call_hooks($name, &$data = null) { $a = get_app(); if(count($a->hooks)) { |