aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-23 17:07:19 -0800
committerFriendika <info@friendika.com>2010-12-23 17:07:19 -0800
commita1a838f69e06fd743402fa3200b48e0507835363 (patch)
tree2e0d3b1896da6c054565fca48de75f17293b2e84 /boot.php
parentcd073f94f81708d39de6590551e2bed2432c70d0 (diff)
downloadvolse-hubzilla-a1a838f69e06fd743402fa3200b48e0507835363.tar.gz
volse-hubzilla-a1a838f69e06fd743402fa3200b48e0507835363.tar.bz2
volse-hubzilla-a1a838f69e06fd743402fa3200b48e0507835363.zip
debugging the plugin logic, couple of issues found
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/boot.php b/boot.php
index 57d69a5e1..c34002809 100644
--- a/boot.php
+++ b/boot.php
@@ -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)) {