]> source.dussan.org Git - nextcloud-server.git/commitdiff
better name for getAppsEnabledForUser
authorRobin Appelman <icewind@owncloud.com>
Thu, 5 Feb 2015 14:11:07 +0000 (15:11 +0100)
committerRobin Appelman <icewind@owncloud.com>
Tue, 17 Feb 2015 14:05:29 +0000 (15:05 +0100)
lib/private/app.php
lib/private/app/appmanager.php
lib/public/app/iappmanager.php
tests/lib/app/manager.php

index c767ddaec991a59db77289c3a7df12bcc99323b4..2e640aa2a4040f15253d66eb197b7d4c10b44aca 100644 (file)
@@ -220,7 +220,7 @@ class OC_App {
                if (is_null($user)) {
                        $apps = $appManager->getInstalledApps();
                } else {
-                       $apps = $appManager->getAppsEnabledForUser($user);
+                       $apps = $appManager->getEnabledAppsForUser($user);
                }
                $apps = array_filter($apps, function ($app) {
                        return $app !== 'files';//we add this manually
index c5006593e5db7f9053280f939550b3f21b0eddaa..860d9e70a4554a6785afe68b8bcabd664e278e66 100644 (file)
@@ -76,7 +76,7 @@ class AppManager implements IAppManager {
         * @param \OCP\IUser $user
         * @return string[]
         */
-       public function getAppsEnabledForUser(IUser $user) {
+       public function getEnabledAppsForUser(IUser $user) {
                $apps = $this->getInstalledAppsValues();
                $appsForUser = array_filter($apps, function ($enabled) use ($user) {
                        return $this->checkAppForUser($enabled, $user);
index c79dcf9a573d2693aea3a4a0d786b6fad4bc49b5..495b82e0bdf7cc7cd38c0ac78f9e6cf5334e5106 100644 (file)
@@ -57,7 +57,7 @@ interface IAppManager {
         * @param \OCP\IUser $user
         * @return string[]
         */
-       public function getAppsEnabledForUser(IUser $user);
+       public function getEnabledAppsForUser(IUser $user);
 
        /**
         * List all installed apps
index 4eaf4f08be99e2694a924d6e5f416b0ba4146376..cb41f7374695a47048a13a519a340ba8d361c2f3 100644 (file)
@@ -222,6 +222,6 @@ class Manager extends \PHPUnit_Framework_TestCase {
                $appConfig->setValue('test2', 'enabled', 'no');
                $appConfig->setValue('test3', 'enabled', '["foo"]');
                $appConfig->setValue('test4', 'enabled', '["asd"]');
-               $this->assertEquals(['test1', 'test3'], $manager->getAppsEnabledForUser($user));
+               $this->assertEquals(['test1', 'test3'], $manager->getEnabledAppsForUser($user));
        }
 }