Пример #1
0
 /**
  * Trigger install.
  */
 public function main()
 {
     $this->setSteps(array('Check Database Configuration' => 'checkDbConfig', 'Set Table Prefix' => 'checkTablePrefix', 'Set Users Table' => 'checkUsersTable', 'Check Table Status' => 'checkRequiredTables', 'Create Database Tables' => 'createTables', 'Setup ACL' => 'setupAcl', 'Finish Installation' => 'finish'))->setDbConfig(ADMIN_DATABASE)->setTablePrefix(ADMIN_PREFIX)->setRequiredTables(array('aros', 'acos', 'aros_acos'));
     $this->out('Plugin: Admin v' . Configure::read('Admin.version'));
     $this->out('Copyright: Miles Johnson, 2010-' . date('Y'));
     $this->out('Help: http://milesj.me/code/cakephp/admin');
     parent::main();
 }
Пример #2
0
 /**
  * Trigger install.
  */
 public function main()
 {
     if (!CakePlugin::loaded('Admin')) {
         $this->err('Admin plugin is not installed, aborting!');
         return;
     }
     $this->setSteps(array('Check Database Configuration' => 'checkDbConfig', 'Set Table Prefix' => 'checkTablePrefix', 'Set Users Table' => 'checkUsersTable', 'Check Table Status' => 'checkRequiredTables', 'Create Database Tables' => 'createTables', 'Finish Installation' => 'finish'))->setDbConfig(FORUM_DATABASE)->setTablePrefix(FORUM_PREFIX)->setRequiredTables(array('aros', 'acos', 'aros_acos'));
     $this->out('Plugin: Forum v' . Configure::read('Forum.version'));
     $this->out('Copyright: Miles Johnson, 2010-' . date('Y'));
     $this->out('Help: http://milesj.me/code/cakephp/forum');
     parent::main();
 }