diff options
author | Mario <mario@mariovavti.com> | 2023-01-13 20:01:05 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-01-13 20:01:05 +0000 |
commit | 2805520d1bcb2640fc079d54f5f230f7b87d1f84 (patch) | |
tree | 43b3e5bb7c71522d04560015478765a7b763a5fe /include/plugin.php | |
parent | f6d940606350eb8685c278af6d87f3a0b8c0f5e5 (diff) | |
parent | fb7ca18820e7618325dded78a3c3a464dd01b391 (diff) | |
download | volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.tar.gz volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.tar.bz2 volse-hubzilla-2805520d1bcb2640fc079d54f5f230f7b87d1f84.zip |
Merge remote-tracking branch 'origin/8.0RC'8.0
Diffstat (limited to 'include/plugin.php')
-rw-r--r-- | include/plugin.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/include/plugin.php b/include/plugin.php index ff5014c8b..ae73a847c 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -189,7 +189,7 @@ function plugin_is_installed($name) { function reload_plugins() { $plugins = get_config('system', 'addon'); if(strlen($plugins)) { - $r = q("SELECT * FROM addon WHERE installed = 1"); + $r = dbq("SELECT * FROM addon WHERE installed = 1"); if(count($r)) $installed = $r; else @@ -243,7 +243,7 @@ function reload_plugins() { function plugins_installed_list() { - $r = q("select * from addon where installed = 1 order by aname asc"); + $r = dbq("select * from addon where installed = 1 order by aname asc"); return(($r) ? ids_to_array($r,'aname') : []); } @@ -313,7 +313,7 @@ function plugins_sync() { */ function visible_plugin_list() { - $r = q("select * from addon where hidden = 0 order by aname asc"); + $r = dbq("select * from addon where hidden = 0 order by aname asc"); $x = (($r) ? ids_to_array($r,'aname') : array()); $y = []; if($x) { @@ -392,7 +392,7 @@ function load_hooks() { App::$hooks = []; - $r = q("SELECT * FROM hook WHERE true ORDER BY priority DESC"); + $r = dbq("SELECT * FROM hook WHERE true ORDER BY priority DESC"); if($r) { foreach($r as $rv) { @@ -613,6 +613,17 @@ function get_widget_info($widget){ "addon/$widget.php" ]; + $addons = plugins_installed_list(); + + if ($addons) { + foreach ($addons as $name) { + $path = 'addon/' . $name . '/Widget/' . $ucwidget . '.php'; + if (is_file($path)) { + $checkpaths[] = $path ; + } + } + } + $widget_found = false; foreach ($checkpaths as $path) { |