summaryrefslogtreecommitdiffstats
path: root/lib/public/app.php
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-02 18:54:31 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-02 18:54:31 +0200
commit10bbbc8cd2032485fa081ab1611843b648b900d0 (patch)
tree5f8a46d7915f85fd67ad934a29e4650d3edb6f7a /lib/public/app.php
parent33c343ed1185598c82908f0c89a984785b2287b3 (diff)
downloadnextcloud-server-10bbbc8cd2032485fa081ab1611843b648b900d0.tar.gz
nextcloud-server-10bbbc8cd2032485fa081ab1611843b648b900d0.zip
new checkAppEnabled call
Diffstat (limited to 'lib/public/app.php')
-rw-r--r--lib/public/app.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/public/app.php b/lib/public/app.php
index 70894c3648d..80d0fd22b6b 100644
--- a/lib/public/app.php
+++ b/lib/public/app.php
@@ -41,6 +41,7 @@ class App {
return \OC_USER::getUser();
}
+
/**
* @brief makes owncloud aware of this app
* @param $data array with all information
@@ -62,7 +63,6 @@ class App {
}
-
/**
* register an admin form to be shown
*/
@@ -92,6 +92,7 @@ class App {
return \OC_App::addNavigationEntry($data);
}
+
/**
* @brief Read app metadata from the info.xml file
* @param string $appid id of the app or the path of the info.xml file
@@ -102,6 +103,7 @@ class App {
return \OC_App::getAppInfo($appid,$path);
}
+
/**
* register a personal form to be shown
*/
@@ -123,6 +125,7 @@ class App {
return \OC_App::setActiveNavigationEntry($id);
}
+
/**
* @brief checks whether or not an app is enabled
* @param $app app
@@ -134,6 +137,15 @@ class App {
return \OC_App::isEnabled( $app );
}
+
+ /**
+ * Check if the app is enabled, redirects to home if not
+ */
+ public static function checkAppEnabled($app){
+ return \OC_Util::checkAppEnabled( $app );
+ }
+
+
/**
* get the last version of the app, either from appinfo/version or from appinfo/info.xml
*/
@@ -141,6 +153,7 @@ class App {
return \OC_App::getAppVersion( $appid );
}
+
/**
* @param string appid
* @return OC_FilesystemView