Skip to content

Commit

Permalink
Merge pull request #549 from nextcloud/backport-530-theming-autoloadi…
Browse files Browse the repository at this point in the history
…ng-9

[stable9] Make sure we try to autoload the class
  • Loading branch information
nickvergessen authored Jul 25, 2016
2 parents d2396b9 + 593608f commit 6175e5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion lib/private/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,13 @@ public function __construct($webRoot, \OC\Config $config) {
return $factory->getManager();
});
$this->registerService('ThemingDefaults', function(Server $c) {
if(class_exists('OCA\Theming\Template', false) && $this->getConfig()->getSystemValue('installed', false) && $this->getAppManager()->isInstalled('theming')) {
try {
$classExists = class_exists('OCA\Theming\Template');
} catch (\OCP\AutoloadNotAllowedException $e) {
// App disabled or in maintenance mode
$classExists = false;
}
if ($classExists && $this->getConfig()->getSystemValue('installed', false) && $this->getAppManager()->isInstalled('theming')) {
return new Template(
$this->getConfig(),
$this->getL10N('theming'),
Expand Down
3 changes: 2 additions & 1 deletion lib/private/urlgenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
*/

namespace OC;
use OC_Defaults;


use OCP\ICacheFactory;
use OCP\IConfig;
use OCP\IURLGenerator;
Expand Down

0 comments on commit 6175e5d

Please sign in to comment.