Restructured "dba::exists" function

This commit is contained in:
Michael 2017-08-12 08:55:50 +00:00
parent b14b44e8a8
commit 1d8c91c478
9 changed files with 33 additions and 35 deletions

View file

@ -121,8 +121,7 @@ function reload_plugins() {
* @return boolean
*/
function plugin_enabled($plugin) {
$r = dba::select('addon', array('id'), array('installed' => true, 'name' => $plugin), array('limit' => 1));
return ((dbm::is_result($r)) && (count($r) > 0));
return dba::exists('addon', array('installed' => true, 'name' => $plugin));
}