page: cosmetic refactor
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/672/head
parent
0c5e1cb5b0
commit
24644c646f
|
@ -11,28 +11,23 @@ use OCP\AppFramework\Http\Template\PublicTemplateResponse;
|
||||||
use OCP\AppFramework\Http\TemplateResponse;
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\EventDispatcher\IEventDispatcher;
|
use OCP\EventDispatcher\IEventDispatcher;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use OCP\IUserSession;
|
|
||||||
use OCP\Util as OCPUtil;
|
|
||||||
|
|
||||||
class PageController extends Controller
|
class PageController extends Controller
|
||||||
{
|
{
|
||||||
protected $userId;
|
protected $userId;
|
||||||
protected $appName;
|
protected $appName;
|
||||||
protected IEventDispatcher $eventDispatcher;
|
protected IEventDispatcher $eventDispatcher;
|
||||||
private IUserSession $userSession;
|
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
string $AppName,
|
string $AppName,
|
||||||
IRequest $request,
|
IRequest $request,
|
||||||
$UserId,
|
$UserId,
|
||||||
IEventDispatcher $eventDispatcher,
|
IEventDispatcher $eventDispatcher
|
||||||
IUserSession $userSession
|
|
||||||
) {
|
) {
|
||||||
parent::__construct($AppName, $request);
|
parent::__construct($AppName, $request);
|
||||||
$this->userId = $UserId;
|
$this->userId = $UserId;
|
||||||
$this->appName = $AppName;
|
$this->appName = $AppName;
|
||||||
$this->eventDispatcher = $eventDispatcher;
|
$this->eventDispatcher = $eventDispatcher;
|
||||||
$this->userSession = $userSession;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -49,12 +44,12 @@ class PageController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scripts
|
// Scripts
|
||||||
OCPUtil::addScript($this->appName, 'memories-main');
|
\OCP\Util::addScript($this->appName, 'memories-main');
|
||||||
|
|
||||||
// Extra translations
|
// Extra translations
|
||||||
if (Util::recognizeIsEnabled()) {
|
if (Util::recognizeIsEnabled()) {
|
||||||
// Auto translation for tags
|
// Auto translation for tags
|
||||||
OCPUtil::addTranslations('recognize');
|
\OCP\Util::addTranslations('recognize');
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = new TemplateResponse($this->appName, 'main', self::getMainParams());
|
$response = new TemplateResponse($this->appName, 'main', self::getMainParams());
|
||||||
|
|
Loading…
Reference in New Issue