[Pkg-owncloud-commits] [owncloud] 111/134: Update controller.php

David Prévot taffit at moszumanska.debian.org
Fri Apr 18 21:44:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 22632a227c1038a6458dc82257a295f645835e1c
Author: Bernhard Posselt <Raydiation at users.noreply.github.com>
Date:   Thu Apr 10 16:43:57 2014 +0200

    Update controller.php
    
    Backwards compability fix for faster merge ;)
---
 lib/public/appframework/controller.php | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lib/public/appframework/controller.php b/lib/public/appframework/controller.php
index 81dc568..93f4d2f 100644
--- a/lib/public/appframework/controller.php
+++ b/lib/public/appframework/controller.php
@@ -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;
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list