mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
9bbe275903
git-svn-id: https://svn.cakephp.org/repo/trunk/cake@207 3807eeeb-6ff5-0310-8944-8be069107fe0
25 lines
No EOL
417 B
PHP
25 lines
No EOL
417 B
PHP
<?PHP
|
|
|
|
class PagesController extends PagesHelper {
|
|
|
|
/**
|
|
* Displays a view
|
|
*/
|
|
function display () {
|
|
|
|
if (!func_num_args())
|
|
$this->redirect('/');
|
|
|
|
$path = func_get_args();
|
|
if (!count($path))
|
|
$this->redirect('/');
|
|
|
|
$this->set('page', $path[0]);
|
|
$this->set('subpage', empty($path[1])? null: $path[1]);
|
|
$this->set('title', ucfirst($path[count($path)-1]));
|
|
$this->render(join('/', $path));
|
|
}
|
|
|
|
}
|
|
|
|
?>
|