From 3dcd718df8251bf9e822aad3b20b288de6aa1482 Mon Sep 17 00:00:00 2001 From: flynsarmy Date: Wed, 4 Feb 2015 13:40:01 +1000 Subject: [PATCH] Display active plugin count on updates page --- modules/system/models/PluginVersion.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/system/models/PluginVersion.php b/modules/system/models/PluginVersion.php index 21045996c..460f79731 100644 --- a/modules/system/models/PluginVersion.php +++ b/modules/system/models/PluginVersion.php @@ -77,6 +77,16 @@ class PluginVersion extends Model } + /** + * Only include enabled plugins + * @param $query + * @return mixed + */ + public function scopeEnabled($query) + { + return $query->where('is_disabled', '!=', 1); + } + /** * Returns the current version for a plugin * @param string $pluginCode Plugin code. Eg: Acme.Blog