Finished install script

Updated configuration data loading
Added Website and Game models

Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
Gregory PLANCHAT 2011-12-27 19:37:28 +01:00
commit dfa3dfb086
34 changed files with 362 additions and 510 deletions

View file

@ -13,12 +13,12 @@ if (!defined('DEBUG')) {
@error_reporting(E_ALL | E_STRICT);
}
defined('ROOT_PATH') || define('ROOT_PATH', dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR);
defined('APPLICATION_PATH') || define('APPLICATION_PATH', ROOT_PATH . 'includes' . DIRECTORY_SEPARATOR . 'application' . DIRECTORY_SEPARATOR);
defined('ROOT_PATH') || define('ROOT_PATH', dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR);
defined('APPLICATION_PATH') || define('APPLICATION_PATH', ROOT_PATH . 'application' . DIRECTORY_SEPARATOR);
defined('PHPEXT') || define('PHPEXT', require ROOT_PATH . 'extension.inc');
defined('PHPEXT') || define('PHPEXT', 'php');
defined('VERSION') || define('VERSION', '2009.5');
defined('VERSION') || define('VERSION', '1.5');
set_include_path(implode(PATH_SEPARATOR, array(
APPLICATION_PATH . DIRECTORY_SEPARATOR . 'code' . DIRECTORY_SEPARATOR . 'core',

View file

@ -2,42 +2,8 @@
include './bootstrap.php';
$username = uniqid();
$email = $username . '@wootook.org';
$password = substr(sha1(uniqid()), mt_rand(0, 32), 8);
header('Content-Type: text/csv');
header('Content-Disposition: attachment; filename="test.csv"');
/*
$datas = array(
'galaxy' => array(),
'system' => array(),
);
*/
for ($i = 0; $i < 10000; $i++) {
$collection = Legacies_Empire_Model_Planet::searchMostFreeSystems();
$collection->limit(1)->load();
$systemInfo = $collection->current();
//var_dump($systemInfo->getallDatas());
echo $systemInfo->getData('galaxy') . ';' . $systemInfo->getData('system') . PHP_EOL;
/*
$galaxy = $systemInfo->getData('galaxy');
if (!isset($datas['galaxy'][$galaxy])) {
$datas['galaxy'][$galaxy] = 1;
} else {
$datas['galaxy'][$galaxy]++;
}
$system = $systemInfo->getData('system');
if (!isset($datas['system'][$system])) {
$datas['system'][$system] = 1;
} else {
$datas['system'][$system]++;
}
*/
}
/*
asort($datas['galaxy'], SORT_NUMERIC);
asort($datas['system'], SORT_NUMERIC);
var_dump($datas);
*/
Wootook_Empire_Model_User::register($username, $email, $password);