mirror of
https://github.com/Mibew/mibew.git
synced 2025-03-02 09:58:32 +03:00
Replace license.php with controller's action
This commit is contained in:
parent
18a2718888
commit
f809557679
src/mibew
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright 2005-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
namespace Mibew\Controller;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* Serve license info page
|
||||
*/
|
||||
class LicenseController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* Generate content for "/license" route.
|
||||
*
|
||||
* @param Request $request
|
||||
* @return string Rendered page content
|
||||
*/
|
||||
public function indexAction(Request $request)
|
||||
{
|
||||
return $this->render(
|
||||
'license',
|
||||
array(
|
||||
'title' => getlocal("license.title"),
|
||||
'no_right_menu' => true,
|
||||
'fixedwrap' => true,
|
||||
'show_small_login' => true,
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
license:
|
||||
path: /license
|
||||
defaults: { _controller: Mibew\Controller\LicenseController::indexAction }
|
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright 2005-2014 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// Import namespaces and classes of the core
|
||||
use Mibew\Style\PageStyle;
|
||||
|
||||
// Initialize libraries
|
||||
require_once(dirname(__FILE__) . '/libs/init.php');
|
||||
|
||||
$page = array();
|
||||
$page['title'] = getlocal("license.title");
|
||||
$page['no_right_menu'] = true;
|
||||
$page['fixedwrap'] = true;
|
||||
$page['show_small_login'] = false;
|
||||
|
||||
$page_style = new PageStyle(PageStyle::getCurrentStyle());
|
||||
$page_style->render('license', $page);
|
@ -74,6 +74,6 @@
|
||||
{{/if}}
|
||||
|
||||
<br/>
|
||||
<a href="{{mibewRoot}}/license.php">{{l10n "install.license"}}</a>
|
||||
<a href="{{mibewRoot}}/license">{{l10n "install.license"}}</a>
|
||||
{{/override}}
|
||||
{{/extends}}
|
Loading…
Reference in New Issue
Block a user