aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-05-08 21:30:54 -0700
committerfriendica <info@friendica.com>2013-05-08 21:30:54 -0700
commitcb0a90d6281a0fef998bfa342612fe47f91a2099 (patch)
tree71ed1ec0ae1674fb11046cf1b160e6ae32da355a /include
parent51c27579ba79d32c26052c0d1f1218a16315234b (diff)
downloadvolse-hubzilla-cb0a90d6281a0fef998bfa342612fe47f91a2099.tar.gz
volse-hubzilla-cb0a90d6281a0fef998bfa342612fe47f91a2099.tar.bz2
volse-hubzilla-cb0a90d6281a0fef998bfa342612fe47f91a2099.zip
small updates
Diffstat (limited to 'include')
-rw-r--r--include/config.php4
-rw-r--r--include/plugin.php6
-rw-r--r--include/zot.php3
3 files changed, 7 insertions, 6 deletions
diff --git a/include/config.php b/include/config.php
index 9b36b1a1e..5db0a3d05 100644
--- a/include/config.php
+++ b/include/config.php
@@ -17,8 +17,8 @@
function load_config($family) {
global $a;
- $r = q("SELECT * FROM `config` WHERE `cat` = '%s'", dbesc($family));
- if(count($r)) {
+ $r = q("SELECT * FROM config WHERE cat = '%s'", dbesc($family));
+ if($r) {
foreach($r as $rr) {
$k = $rr['k'];
if ($family === 'config') {
diff --git a/include/plugin.php b/include/plugin.php
index 31427e117..79f6ed9c7 100644
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -169,7 +169,7 @@ function register_hook($hook,$file,$function,$priority=0) {
function unregister_hook($hook,$file,$function) {
- $r = q("DELETE FROM `hook` WHERE `hook` = '%s' AND `file` = '%s' AND `function` = '%s' LIMIT 1",
+ $r = q("DELETE FROM hook WHERE hook = '%s' AND `file` = '%s' AND `function` = '%s' LIMIT 1",
dbesc($hook),
dbesc($file),
dbesc($function)
@@ -187,8 +187,8 @@ function unregister_hook($hook,$file,$function) {
function load_hooks() {
$a = get_app();
$a->hooks = array();
- $r = q("SELECT * FROM `hook` WHERE 1 ORDER BY `priority` DESC");
- if(count($r)) {
+ $r = q("SELECT * FROM hook WHERE true ORDER BY priority DESC");
+ if($r) {
foreach($r as $rr) {
if(! array_key_exists($rr['hook'],$a->hooks))
$a->hooks[$rr['hook']] = array();
diff --git a/include/zot.php b/include/zot.php
index d53148952..f36f15dc5 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1218,6 +1218,7 @@ function import_directory_profile($hash,$profile) {
import_directory_keywords($hash,$profile['keywords']);
foreach($profile['keywords'] as $kw) {
$kw = trim(htmlentities($kw,ENT_COMPAT,'UTF-8',false));
+ $kw = trim($kw,',');
}
$clean[] = $kw;
}
@@ -1312,7 +1313,7 @@ function import_directory_keywords($hash,$keywords) {
}
foreach($clean as $x) {
if(! in_array($x,$existing))
- $r = q("insert int xtag ( xtag_hash, xtag_term) values ( '%s' ,'%s' )",
+ $r = q("insert into xtag ( xtag_hash, xtag_term) values ( '%s' ,'%s' )",
dbesc($hash),
dbesc($x)
);