aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-12-20 14:09:30 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-12-20 14:09:30 +0100
commit1cfb83f0036e0ea3cfd216331b59e3280085ca13 (patch)
tree1fbf9b69c9bbd5fd5ac0ed4e325e29410b7802b8 /include
parent628e565a6c5ee52341ba6de0b5ecf6495cbb78f8 (diff)
parente2692a4baaf031bd0d9c0893c3762637b1f6b201 (diff)
downloadvolse-hubzilla-1cfb83f0036e0ea3cfd216331b59e3280085ca13.tar.gz
volse-hubzilla-1cfb83f0036e0ea3cfd216331b59e3280085ca13.tar.bz2
volse-hubzilla-1cfb83f0036e0ea3cfd216331b59e3280085ca13.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include')
-rw-r--r--include/comanche.php9
-rw-r--r--include/deliver.php2
-rwxr-xr-xinclude/plugin.php10
-rw-r--r--include/zot.php2
4 files changed, 19 insertions, 4 deletions
diff --git a/include/comanche.php b/include/comanche.php
index ef71886f2..1537226ca 100644
--- a/include/comanche.php
+++ b/include/comanche.php
@@ -284,8 +284,13 @@ function comanche_widget($name, $text) {
$func = 'widget_' . trim($name);
- if((! function_exists($func)) && file_exists('widget/' . trim($name) . '.php'))
- require_once('widget/' . trim($name) . '.php');
+ if(! function_exists($func)) {
+ if(file_exists('widget/' . trim($name) . '.php'))
+ require_once('widget/' . trim($name) . '.php');
+ elseif(folder_exists('widget/'. trim($name))
+ && (file_exists('widget/' . trim($name) . '/' . trim($name) . '.php')))
+ require_once('widget/' . trim($name) . '/' . trim($name) . '.php');
+ }
else {
$theme_widget = $func . '.php';
if((! function_exists($func)) && theme_include($theme_widget))
diff --git a/include/deliver.php b/include/deliver.php
index 60d935d02..7ff0fa125 100644
--- a/include/deliver.php
+++ b/include/deliver.php
@@ -66,7 +66,7 @@ function deliver_run($argv, $argc) {
}
}
- q("delete from dreport where dreport_queue = '%s' limit 1",
+ q("delete from dreport where dreport_queue = '%s'",
dbesc($argv[$x])
);
}
diff --git a/include/plugin.php b/include/plugin.php
index 1f4d60736..4a35a0170 100755
--- a/include/plugin.php
+++ b/include/plugin.php
@@ -636,3 +636,13 @@ function get_std_version() {
return STD_VERSION;
return '0.0.0';
}
+
+
+function folder_exists($folder)
+{
+ // Get canonicalized absolute pathname
+ $path = realpath($folder);
+
+ // If it exist, check if it's a directory
+ return (($path !== false) && is_dir($path)) ? $path : false;
+} \ No newline at end of file
diff --git a/include/zot.php b/include/zot.php
index ce3bef783..922637bc1 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1000,7 +1000,7 @@ function zot_process_response($hub, $arr, $outq) {
// we have a more descriptive delivery report, so discard the per hub 'queued' report.
- q("delete from dreport where dreport_queue = '%s' limit 1",
+ q("delete from dreport where dreport_queue = '%s' ",
dbesc($outq['outq_hash'])
);