Update# properly use the app framework

This commit is contained in:
Pellaeon Lin 2015-09-02 17:03:38 +08:00
parent b56846dc15
commit 044d22d971
3 changed files with 6 additions and 6 deletions

View File

@ -9,8 +9,8 @@
* @copyright Pellaeon Lin 2015 * @copyright Pellaeon Lin 2015
*/ */
namespace OCA\Registration\App; namespace OCA\Registration\AppInfo;
$app = new Registration(); $app = new Application();
$controller = $app->getContainer()->query('SettingsController'); $controller = $app->getContainer()->query('SettingsController');
return $controller->displayPanel()->render(); return $controller->displayPanel()->render();

View File

@ -9,9 +9,9 @@
* @copyright Pellaeon Lin 2014 * @copyright Pellaeon Lin 2014
*/ */
namespace OCA\Registration\App; namespace OCA\Registration\AppInfo;
$app = new Registration(); $app = new Application();
$c = $app->getContainer(); $c = $app->getContainer();
\OC_App::registerLogIn(array('name' => $c->query('L10N')->t('Register'), 'href' => $c->query('URLGenerator')->linkToRoute('registration.register.askEmail'))); \OC_App::registerLogIn(array('name' => $c->query('L10N')->t('Register'), 'href' => $c->query('URLGenerator')->linkToRoute('registration.register.askEmail')));

View File

@ -9,7 +9,7 @@
* @copyright Pellaeon Lin 2014 * @copyright Pellaeon Lin 2014
*/ */
namespace OCA\Registration\App; namespace OCA\Registration\AppInfo;
use \OCP\AppFramework\App; use \OCP\AppFramework\App;
@ -19,7 +19,7 @@ use \OCA\Registration\Wrapper;
use \OCA\Registration\Db\PendingRegist; use \OCA\Registration\Db\PendingRegist;
class Registration extends App { class Application extends App {
public function __construct (array $urlParams=array()) { public function __construct (array $urlParams=array()) {
parent::__construct('registration', $urlParams); parent::__construct('registration', $urlParams);