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

@ -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);