Merge pull request #21292 from owncloud/checkAppEnabled-not-needed-anymore
core will handle invalid URLs and redirects properly
This commit is contained in:
commit
0f5132552c
|
@ -965,20 +965,6 @@ class OC_Util {
|
||||||
OC_Template::printGuestPage("", "login", $parameters);
|
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
|
* Check if the user is logged in, redirects to home if not. With
|
||||||
* redirect URL parameter to the request URI.
|
* redirect URL parameter to the request URI.
|
||||||
|
|
|
@ -136,9 +136,9 @@ class App {
|
||||||
* @param string $app
|
* @param string $app
|
||||||
* @return void
|
* @return void
|
||||||
* @since 4.0.0
|
* @since 4.0.0
|
||||||
|
* @deprecated 9.0.0 ownCloud core will handle disabled apps and redirects to valid URLs
|
||||||
*/
|
*/
|
||||||
public static function checkAppEnabled( $app ) {
|
public static function checkAppEnabled( $app ) {
|
||||||
\OC_Util::checkAppEnabled( $app );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue