summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-11 15:28:06 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-11 15:28:06 +0100
commitcd5342d0ff2852f5b2efcad67adc4dffc4eed6cc (patch)
tree8b9d008db17c1cbb7df7783e3e69489807cdbd99 /lib
parentd04a6bce6f81df4ee4351a311a630b14e8ecd8a3 (diff)
parent32ccd6621465457fe95c77b4be9f9e0b3ec819ba (diff)
downloadnextcloud-server-cd5342d0ff2852f5b2efcad67adc4dffc4eed6cc.tar.gz
nextcloud-server-cd5342d0ff2852f5b2efcad67adc4dffc4eed6cc.zip
Merge pull request #18202 from owncloud/revert-route-breaking-changes
Revert route breaking changes
Diffstat (limited to 'lib')
-rw-r--r--lib/private/app.php13
-rw-r--r--lib/private/defaults.php19
-rw-r--r--lib/private/route/router.php6
3 files changed, 1 insertions, 37 deletions
diff --git a/lib/private/app.php b/lib/private/app.php
index e51fe73cb19..6c6f79dfa9d 100644
--- a/lib/private/app.php
+++ b/lib/private/app.php
@@ -74,16 +74,6 @@ class OC_App {
}
/**
- * Check if an app is loaded
- *
- * @param string $app
- * @return bool
- */
- public static function isAppLoaded($app) {
- return in_array($app, self::$loadedApps, true);
- }
-
- /**
* loads all apps
*
* @param array $types
@@ -431,7 +421,6 @@ class OC_App {
*/
public static function getSettingsNavigation() {
$l = \OC::$server->getL10N('lib');
- $defaults = new OC_Defaults();
$settings = array();
// by default, settings only contain the help menu
@@ -442,7 +431,7 @@ class OC_App {
array(
"id" => "help",
"order" => 1000,
- "href" => $defaults->getKnowledgeBaseUrl(),
+ "href" => OC_Helper::linkToRoute("settings_help"),
"name" => $l->t("Help"),
"icon" => OC_Helper::imagePath("settings", "help.svg")
)
diff --git a/lib/private/defaults.php b/lib/private/defaults.php
index b86805357bd..16f45943f54 100644
--- a/lib/private/defaults.php
+++ b/lib/private/defaults.php
@@ -46,11 +46,9 @@ class OC_Defaults {
private $defaultSlogan;
private $defaultLogoClaim;
private $defaultMailHeaderColor;
- private $defaultKnowledgeBaseUrl;
function __construct() {
$this->l = \OC::$server->getL10N('lib');
- $urlGenerator = \OC::$server->getURLGenerator();
$version = OC_Util::getVersion();
$this->defaultEntity = 'ownCloud'; /* e.g. company name, used for footers and copyright notices */
@@ -66,7 +64,6 @@ class OC_Defaults {
$this->defaultSlogan = $this->l->t('web services under your control');
$this->defaultLogoClaim = '';
$this->defaultMailHeaderColor = '#1d2d44'; /* header color of mail notifications */
- $this->defaultKnowledgeBaseUrl = $urlGenerator->linkToRoute('settings_help');
$themePath = OC::$SERVERROOT . '/themes/' . OC_Util::getTheme() . '/defaults.php';
if (file_exists($themePath)) {
@@ -82,7 +79,6 @@ class OC_Defaults {
/**
* @param string $method
- * @return bool
*/
private function themeExist($method) {
if (isset($this->theme) && method_exists($this->theme, $method)) {
@@ -284,19 +280,4 @@ class OC_Defaults {
}
}
- /**
- * get knowledge base URL, will be used for the "Help"-Link in the top
- * right menu
- *
- * @return string
- */
- public function getKnowledgeBaseUrl() {
- if ($this->themeExist('getKnowledgeBaseUrl')) {
- return $this->theme->getKnowledgeBaseUrl();
- } else {
- return $this->defaultKnowledgeBaseUrl;
- }
-
- }
-
}
diff --git a/lib/private/route/router.php b/lib/private/route/router.php
index 33669452f2d..48992366092 100644
--- a/lib/private/route/router.php
+++ b/lib/private/route/router.php
@@ -150,12 +150,6 @@ class Router implements IRouter {
\OC::$server->getEventLogger()->start('loadroutes' . $requestedApp, 'Loading Routes');
foreach ($routingFiles as $app => $file) {
if (!isset($this->loadedApps[$app])) {
- if (!\OC_App::isAppLoaded($app)) {
- // app MUST be loaded before app routes
- // try again next time loadRoutes() is called
- $this->loaded = false;
- continue;
- }
$this->loadedApps[$app] = true;
$this->useCollection($app);
$this->requireRouteFile($file, $app);