Added application handler

Fixed fleet bugs
Fixed colonization bug
Updated mail handler support
Fixed galaxy bugs
Updated license block

Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
Gregory PLANCHAT 2012-05-28 23:18:54 +02:00
commit 9e3c1e68bf
89 changed files with 4256 additions and 2168 deletions

View file

@ -189,6 +189,11 @@ class Wootook
return Wootook_Core_Model_Session::factory($namespace);
}
/**
* @static
* @param string|null $locale
* @return Wootook_Core_Model_Translator
*/
public static function getTranslator($locale = null)
{
if ($locale === null) {
@ -381,7 +386,7 @@ class Wootook
}
try {
$adapter = Wootook_Core_Database_ConnectionManager::getSingleton()
$adapter = Wootook_Core_Database_ConnectionManager::getSingleton()
->getConnection('core_read');
} catch (Wootook_Core_Exception_Database_AdapterError $e) {
self::$isInstalled = false;
@ -394,24 +399,21 @@ class Wootook
switch ($type) {
case 'website':
$select->where(new Wootook_Core_Database_Sql_Placeholder_Expression('website_id = :website_id', array('website_id' => $model->getId())));
$statement = $adapter->prepare($select);
$statement->execute();
break;
case 'game':
$select->where(new Wootook_Core_Database_Sql_Placeholder_Expression('game_id = :game_id', array('game_id' => $model->getId())));
$statement = $adapter->prepare($select);
$statement->execute();
break;
default:
$select->where('website_id', 0);
$select->where('game_id', 0);
$statement = $adapter->prepare($select);
$statement->execute();
break;
}
$statement = $select->prepare();
$statement->execute();
foreach ($statement as $row) {
$config->setConfig($row['config_path'], $row['config_value']);
}
@ -598,6 +600,7 @@ class Wootook
if (self::$_config === null) {
self::loadConfig();
}
if (!self::$isInstalled) {
if (isset(self::$_config['default'])) {
self::$_gameConfigs[Wootook_Core_Model_Game::DEFAULT_CODE] = clone self::$_config['default'];
@ -781,6 +784,7 @@ class Wootook
$queryParams = array();
if (isset($params['_query'])) {
$queryParams = $params['_query'];
unset($params['_query']);
}
$serializedParams = array();