only get asset hash for enabled apps
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 17 Jul 2017 14:13:30 +0000 (16:13 +0200)
committerCornelius Weiss <c.weiss@metaways.de>
Mon, 17 Jul 2017 14:13:59 +0000 (16:13 +0200)
Change-Id: I6aeee99ce94297f34c982b84575d3254c48d911e
Reviewed-on: http://gerrit.tine20.com/customers/5215
Reviewed-by: Cornelius Weiss <c.weiss@metaways.de>
Tested-by: Cornelius Weiss <c.weiss@metaways.de>
tine20/Tinebase/Frontend/Http.php

index a08e773..e16806f 100644 (file)
@@ -570,12 +570,17 @@ class Tinebase_Frontend_Http extends Tinebase_Frontend_Http_Abstract
         return $asJson ? $json : json_decode($json, true);
     }
 
         return $asJson ? $json : json_decode($json, true);
     }
 
+    /**
+     * @return string
+     * @throws Exception
+     * @throws Tinebase_Exception_InvalidArgument
+     */
     public static function getAssetHash()
     {
     public static function getAssetHash()
     {
-        $installedApps = Tinebase_Application::getInstance()->getApplications();
+        $enabledApplications = Tinebase_Application::getInstance()->getApplicationsByState(Tinebase_Application::ENABLED)->name;
         $map = self::getAssetsMap();
         foreach($map as $asset => $ressources) {
         $map = self::getAssetsMap();
         foreach($map as $asset => $ressources) {
-            if (! $installedApps->filter('name', basename($asset))->count()) {
+            if (! $enabledApplications->filter('name', basename($asset))->count()) {
                 unset($map[$asset]);
             }
         }
                 unset($map[$asset]);
             }
         }