private function setup_dev_environment() { $handler_path = NeechyPath::join(NEECHY_HANDLER_CORE_PATH, 'install', 'handler.php'); require_once $handler_path; if (NeechyDatabase::database_exists(NeechyConfig::get('mysql_database'))) { error_log('Test database found.'); } else { error_log('Setting up dev environment using test configuration file.'); # Buffer console output. ob_start(); $handler = new InstallHandler($this->request); $handler->setup_dev(); ob_end_clean(); } }
/** * Execute upgrade. */ function installUpgrade() { InstallHandler::validate(); $installForm =& new UpgradeForm(); $installForm->readInputData(); if ($installForm->validate()) { $installForm->execute(); } else { $installForm->display(); } }
$installer = new InstallHandler(); $installer->begin_install(); } /* Habari is installed and we established a connection with the database */ // Set the locale from database or default locale if (Options::get('locale')) { HabariLocale::set(Options::get('locale')); } else { HabariLocale::set('en-us'); } if (Options::get('system_locale')) { HabariLocale::set_system_locale(Options::get('system_locale')); } // Verify if the database has to be upgraded. if (Version::requires_upgrade()) { $installer = new InstallHandler(); $installer->upgrade_db(); } // If we're doing unit testing, stop here if (defined('UNIT_TEST')) { return; } // if this is an asyncronous call, ignore abort. if (isset($_GET['asyncronous']) && Utils::crypt(Options::get('guid'), $_GET['asyncronous'])) { ignore_user_abort(true); } // Send the Content-Type HTTP header. // @todo Find a better place to put this. header('Content-Type: text/html;charset=utf-8'); /** * Include all the active plugins.
public function testHandlerFromWeb() { $request = new NeechyRequest(); $handler = new InstallHandler($request); $handler->is_console = false; $content = $handler->handle(); $this->assertEquals('<h4>Install runs from the console.</h4>', $content); }
?> " tabindex="<?php echo $tab++; ?> " class="theme_selection" data-requires="<?php echo isset($theme['requires']) ? (string) InstallHandler::get_feature_list($theme['requires']) : ''; ?> " data-provides="<?php echo isset($theme['provides']) ? (string) InstallHandler::get_feature_list($theme['provides']) : ''; ?> " data-conflicts="<?php echo isset($theme['conflicts']) ? (string) InstallHandler::get_feature_list($theme['conflicts']) : ''; ?> " /> </span> <label for="theme_<?php echo $theme['dir']; ?> " class="name"><?php echo $theme['info']->name; ?> <span class="version"><?php echo $theme['info']->version; ?> </span></label> <label for="theme_<?php