diff --git a/appinfo/application.php b/app/registration.php similarity index 96% rename from appinfo/application.php rename to app/registration.php index 921a113..9bbb677 100644 --- a/appinfo/application.php +++ b/app/registration.php @@ -9,7 +9,7 @@ * @copyright Pellaeon Lin 2014 */ -namespace OCA\Registration\AppInfo; +namespace OCA\Registration\App; use \OCP\AppFramework\App; @@ -19,7 +19,7 @@ use \OCA\Registration\Wrapper; use \OCA\Registration\Db\PendingRegist; -class Application extends App { +class Registration extends App { public function __construct (array $urlParams=array()) { parent::__construct('registration', $urlParams); diff --git a/appinfo/app.php b/appinfo/app.php index 1eafd36..1b449f0 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -9,4 +9,9 @@ * @copyright Pellaeon Lin 2014 */ -namespace OCA\Registration\AppInfo; +namespace OCA\Registration\App; + +$app = new Registration(); +$c = $app->getContainer(); + +\OC_App::registerLogIn(array('name' => $c->query('L10N')->t('Register'), 'href' => $c->query('URLGenerator')->linkToRoute('registration.register.askEmail'))); diff --git a/appinfo/routes.php b/appinfo/routes.php index b54382f..67e83c0 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -9,7 +9,7 @@ * @copyright Pellaeon Lin 2014 */ -namespace OCA\Registration\AppInfo; +namespace OCA\Registration\App; /** * Create your routes in here. The name is the lowercase name of the controller @@ -19,7 +19,7 @@ namespace OCA\Registration\AppInfo; * The controller class has to be registered in the application.php file since * it's instantiated in there */ -$application = new Application(); +$application = new Registration(); $application->registerRoutes($this, array('routes' => array( array('name' => 'register#askEmail', 'url' => '/', 'verb' => 'GET'),