]> git.mxchange.org Git - friendica.git/blobdiff - include/plugin.php
more reverts ...
[friendica.git] / include / plugin.php
index 28b02f9954caf551c0a5fec7185677e407adc47c..487ab575156d4812d6d959922496ac5f04efdb1a 100644 (file)
@@ -79,7 +79,7 @@ function reload_plugins() {
        if(strlen($plugins)) {
 
                $r = q("SELECT * FROM `addon` WHERE `installed` = 1");
-               if(dbm::is_result($r))
+               if (dbm::is_result($r))
                        $installed = $r;
                else
                        $installed = array();
@@ -150,7 +150,7 @@ function register_hook($hook,$file,$function,$priority=0) {
                dbesc($file),
                dbesc($function)
        );
-       if(dbm::is_result($r))
+       if (dbm::is_result($r))
                return true;
 
        $r = q("INSERT INTO `hook` (`hook`, `file`, `function`, `priority`) VALUES ( '%s', '%s', '%s', '%s' ) ",
@@ -187,7 +187,7 @@ function load_hooks() {
        $a = get_app();
        $a->hooks = array();
        $r = q("SELECT * FROM `hook` WHERE 1 ORDER BY `priority` DESC, `file`");
-       if(dbm::is_result($r)) {
+       if (dbm::is_result($r)) {
                foreach($r as $rr) {
                        if(! array_key_exists($rr['hook'],$a->hooks))
                                $a->hooks[$rr['hook']] = array();
@@ -473,7 +473,7 @@ function service_class_allows($uid,$property,$usage = false) {
                $r = q("SELECT `service_class` FROM `user` WHERE `uid` = %d LIMIT 1",
                        intval($uid)
                );
-               if($r !== false and count($r)) {
+               if (dbm::is_result($r)) {
                        $service_class = $r[0]['service_class'];
                }
        }
@@ -503,7 +503,7 @@ function service_class_fetch($uid,$property) {
                $r = q("SELECT `service_class` FROM `user` WHERE `uid` = %d LIMIT 1",
                        intval($uid)
                );
-               if($r !== false and count($r)) {
+               if (dbm::is_result($r)) {
                        $service_class = $r[0]['service_class'];
                }
        }