View of /branches/mambo5/app/controllers/main_controller.php
Parent Directory
|
Revision Log
Revision 2 -
(download)
(annotate)
Fri Dec 3 04:30:31 2010 UTC (2 years, 6 months ago) by enjoyman
File size: 1598 byte(s)
Fri Dec 3 04:30:31 2010 UTC (2 years, 6 months ago) by enjoyman
File size: 1598 byte(s)
first commit mambo5 with cakephp1.3.6.
<?php /** * @package Mambo * @author Mambo Foundation Inc see README.php * @copyright (C) 2000 - 2009 Mambo Foundation Inc. * See COPYRIGHT.php for copyright notices and details. * @license GNU/GPL Version 2, see http://www.opensource.org/licenses/gpl-2.0.php * * Redistributions of files must retain the above copyright notice. * * Mambo is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 of the License. */ /** * This class is in no way finished! It is simply here to show off the installer for now. * More to come... * */ class MainController extends AppController { public $name = 'Main'; public $uses = array('Content'); //public $uses = null; works too public $helpers = array('Html', 'Form'); function index() { //Run installation check $this->installCheck(); //Find 1 article to use as a sample for now to show the db is working... $this->set('sample', $this->Content->find("id=15")); } function administrator_index() { } private function installCheck() { //Check for a valid install and redirect if one does not exist if (@!file_exists(CONFIGS.'database.php') || filesize(CONFIGS.'database.php')===0 || @!file_exists(CONFIGS.'configuration.xml') || filesize(CONFIGS.'configuration.xml')===0) { $this->redirect('/installation/index'); exit; } else if (@file_exists(VENDORS.'mambo')) { $this->redirect('/main/offline'); exit; } } function offline() { $this->set('install_dir', VENDORS.'mambo'); } } ?>
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

