aboutsummaryrefslogtreecommitdiffstats
path: root/include/plugin.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-01-04 14:25:46 +0000
committerMario <mario@mariovavti.com>2023-01-04 14:25:46 +0000
commite16ea1ae0568238fa4c2236d1f050ef4a85749c7 (patch)
tree950f23a52ad95d46b2f4cb46d821850b5c347740 /include/plugin.php
parent941135a0a63d72d6300ab93a608cd5c8354d9e0a (diff)
downloadvolse-hubzilla-e16ea1ae0568238fa4c2236d1f050ef4a85749c7.tar.gz
volse-hubzilla-e16ea1ae0568238fa4c2236d1f050ef4a85749c7.tar.bz2
volse-hubzilla-e16ea1ae0568238fa4c2236d1f050ef4a85749c7.zip
pdl editor for addon iitial commit
Diffstat (limited to 'include/plugin.php')
-rw-r--r--include/plugin.php19
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) {