mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
4a87a75332
- Helpers for controllers -- each controller has it's own helper in the /app/helpers directory - /logs and /modules directories - The application runs just fine without /config/database.php if controllers don't ask for db access - Changed the name of /public/dispatch.php to /public/index.php, it's nicer and more standard, won't you agree? Kamil's fix for no-mod_rewrite needs to be re-implemented - Cleanups, fixes, and even one or two comments ;) git-svn-id: https://svn.cakephp.org/repo/trunk/cake@158 3807eeeb-6ff5-0310-8944-8be069107fe0
22 lines
No EOL
386 B
PHP
22 lines
No EOL
386 B
PHP
<?PHP
|
|
|
|
class PagesController extends PagesHelper {
|
|
|
|
function view () {
|
|
|
|
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));
|
|
}
|
|
|
|
}
|
|
|
|
?>
|