Merge pull request #21292 from owncloud/checkAppEnabled-not-needed-anymore

core will handle invalid URLs and redirects properly
This commit is contained in:
Thomas Müller 2016-01-08 13:36:11 +01:00
commit 0f5132552c
2 changed files with 1 additions and 15 deletions

View File

@ -965,20 +965,6 @@ class OC_Util {
OC_Template::printGuestPage("", "login", $parameters);
}
/**
* Check if the app is enabled, redirects to home if not
*
* @param string $app
* @return void
*/
public static function checkAppEnabled($app) {
if (!OC_App::isEnabled($app)) {
header('Location: ' . \OCP\Util::linkToAbsolute('', 'index.php'));
exit();
}
}
/**
* Check if the user is logged in, redirects to home if not. With
* redirect URL parameter to the request URI.

View File

@ -136,9 +136,9 @@ class App {
* @param string $app
* @return void
* @since 4.0.0
* @deprecated 9.0.0 ownCloud core will handle disabled apps and redirects to valid URLs
*/
public static function checkAppEnabled( $app ) {
\OC_Util::checkAppEnabled( $app );
}
/**