X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fplugin.php;h=0108ce62162b72f5b1c2fc0fcf2a44cb0f8f8982;hb=98b727029570b96febd0c5046b688cab1a9bb882;hp=487ab575156d4812d6d959922496ac5f04efdb1a;hpb=52f12ee28db97b29ce0f10c8ecf76144b80d4216;p=friendica.git diff --git a/include/plugin.php b/include/plugin.php index 487ab57515..0108ce6216 100644 --- a/include/plugin.php +++ b/include/plugin.php @@ -129,7 +129,7 @@ function reload_plugins() { */ function plugin_enabled($plugin) { $r = q("SELECT * FROM `addon` WHERE `installed` = 1 AND `name` = '%s'", $plugin); - return((bool)(count($r) > 0)); + return ((dbm::is_result($r)) && (count($r) > 0)); } @@ -410,13 +410,12 @@ function get_theme_info($theme){ * @return string */ function get_theme_screenshot($theme) { - $a = get_app(); $exts = array('.png','.jpg'); foreach($exts as $ext) { if(file_exists('view/theme/' . $theme . '/screenshot' . $ext)) - return($a->get_baseurl() . '/view/theme/' . $theme . '/screenshot' . $ext); + return(App::get_baseurl() . '/view/theme/' . $theme . '/screenshot' . $ext); } - return($a->get_baseurl() . '/images/blank.png'); + return(App::get_baseurl() . '/images/blank.png'); } // install and uninstall theme