]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update controller.php
authorBernhard Posselt <Raydiation@users.noreply.github.com>
Thu, 10 Apr 2014 14:43:57 +0000 (16:43 +0200)
committerBernhard Posselt <Raydiation@users.noreply.github.com>
Thu, 10 Apr 2014 14:43:57 +0000 (16:43 +0200)
Backwards compability fix for faster merge ;)

lib/public/appframework/controller.php

index 81dc568e53adeee67d5e014268f4269049db52b7..93f4d2ff5d3f9d75aafc5b4f6bdec3f77e3c4fb5 100644 (file)
@@ -49,13 +49,21 @@ abstract class Controller {
         */
        protected $request;
 
+       protected $app; // removed in oc7, backwards compability change for oc 6
+
        /**
         * constructor of the controller
         * @param string $appName the name of the app
         * @param IRequest $request an instance of the request
         */
        public function __construct($appName, IRequest $request){
-               $this->appName = $appName;
+               // backwards compatibility fix, removed in oc7
+               if($appName instanceof IAppContainer) {
+                       $this->appName = $appName->getAppName();
+                       $this->app = $appName;
+               } else {
+                       $this->appName = $appName;      
+               }
                $this->request = $request;
        }