core will handle invalid URLs and redirects properly

This commit is contained in:
Morris Jobke 2015-12-18 15:51:03 +01:00
parent a743047e82
commit 2f98f64241
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 );
}
/**