Permalink
Browse files

1.31

  • Loading branch information...
1 parent 5391fd4 commit 6a8dbadae6aadf46d0d31a07f2b1bd447f5788f7 @kestasjk committed Mar 30, 2013
Showing with 1,672 additions and 1,643 deletions.
  1. +1 −0 .gitignore
  2. +83 −90 admin/adminActions.php
  3. +31 −31 admin/adminActionsForms.php
  4. +19 −25 admin/adminActionsForum.php
  5. +80 −44 admin/adminActionsRestricted.php
  6. +1 −1 admin/adminLog.php
  7. +30 −32 admin/adminMultiFinder.php
  8. +15 −15 admin/adminStatusLists.php
  9. +4 −4 admin/systemTasks/defragTables.php
  10. +7 −7 admin/systemTasks/resetCountryBalancer.php
  11. +33 −27 admincp.php
  12. +6 −6 ajax.php
  13. +37 −33 board.php
  14. +12 −12 board/chatbox.php
  15. +1 −1 board/info/graph.php
  16. +5 −5 board/info/maps.php
  17. +1 −1 board/info/messages.php
  18. +20 −20 board/info/orders.php
  19. +1 −1 board/member.php
  20. +3 −3 board/orders/base/order.php
  21. +1 −1 board/orders/base/unit.php
  22. +1 −1 board/orders/builds.php
  23. +3 −3 board/orders/diplomacy.php
  24. +3 −3 board/orders/order.php
  25. +25 −34 board/orders/orderinterface.php
  26. +10 −28 config.sample.php
  27. +1 −1 contrib/PHPMailer_v5.1/examples/test_mail_advanced.php
  28. +2 −2 credits.php
  29. +5 −136 datc.php
  30. +22 −19 datc/datcGame.php
  31. +14 −15 datc/interactive.php
  32. +1 −1 developers.php
  33. 0 facebook/admincp.php
  34. 0 facebook/ajax.php
  35. 0 facebook/board.php
  36. 0 facebook/config.php
  37. 0 facebook/config.sample.php
  38. 0 facebook/credits.php
  39. 0 facebook/datc.php
  40. 0 facebook/developers.php
  41. 0 facebook/faq.php
  42. 0 facebook/forum.php
  43. 0 facebook/gamecreate.php
  44. 0 facebook/gamelistings.php
  45. 0 facebook/gamemaster.php
  46. 0 facebook/halloffame.php
  47. 0 facebook/header.php
  48. 0 facebook/help.php
  49. 0 facebook/intro.php
  50. 0 facebook/invite.php
  51. 0 facebook/logon.php
  52. 0 facebook/map.php
  53. 0 facebook/points.php
  54. 0 facebook/profile.php
  55. 0 facebook/register.php
  56. 0 facebook/roadmap.php
  57. 0 facebook/rules.php
  58. 0 facebook/translating.php
  59. 0 facebook/usercp.php
  60. 0 facebook/variants.php
  61. +1 −1 faq.php
  62. +51 −51 forum.php
  63. +19 −20 gamecreate.php
  64. +30 −30 gamelistings.php
  65. +16 −16 gamemaster.php
  66. +7 −7 gamemaster/adjudicator/diplomacy.php
  67. +2 −2 gamemaster/adjudicator/diplomacy/dependencyNode.php
  68. +2 −2 gamemaster/adjudicator/diplomacy/paradox.php
  69. +21 −22 gamemaster/game.php
  70. +31 −35 gamemaster/member.php
  71. +19 −19 gamemaster/members.php
  72. +41 −41 gamepanel/game.php
  73. +13 −13 gamepanel/gameboard.php
  74. +13 −13 gamepanel/gamehome.php
  75. +23 −23 gamepanel/member.php
  76. +1 −1 gamepanel/memberhome.php
  77. +4 −4 gamepanel/members.php
  78. +2 −2 gamepanel/membershome.php
  79. +6 −6 gamesearch/search.php
  80. +11 −11 gamesearch/searchItemSettings.php
  81. +3 −3 gamesearch/searchItems.php
  82. +3 −3 gamesearch/searchOptions.php
  83. +1 −1 global/definitions.php
  84. +5 −7 halloffame.php
  85. +21 −13 header.php
  86. +1 −1 help.php
  87. +39 −39 index.php
  88. +12 −0 install/install.php
  89. +1 −1 intro.php
  90. +4 −4 invite.php
  91. +11 −11 javascript/mapUI.js
  92. +3 −3 javascript/orders/form.js
  93. +8 −8 javascript/orders/order.js
  94. +4 −4 javascript/orders/phaseBuilds.js
  95. +15 −15 javascript/orders/phaseDiplomacy.js
  96. +3 −3 javascript/orders/phaseRetreats.js
  97. +10 −10 javascript/timeHandler.js
  98. +1 −1 javascript/utility.js
  99. +21 −16 lib/auth.php
  100. +1 −1 lib/cache.php
  101. +1 −1 lib/gamemessage.php
  102. +147 −90 lib/html.php
  103. +1 −1 lib/message.php
  104. +8 −8 lib/time.php
  105. +4 −4 lib/variant.php
  106. +6 −0 locales/English/credits.php
  107. +0 −2 locales/English/translating.php
  108. +0 −2 locales/English/user.php
  109. +29 −34 logon.php
  110. +7 −5 map.php
  111. +1 −1 map/drawMap.php
  112. +10 −10 objects/basic/set.php
  113. +9 −9 objects/database.php
  114. +8 −8 objects/game.php
  115. +18 −14 objects/mailer.php
  116. +1 −1 objects/member.php
  117. +6 −6 objects/members.php
  118. +4 −0 objects/misc.php
  119. +4 −4 objects/notice.php
  120. +8 −8 objects/silence.php
  121. +15 −36 objects/user.php
  122. +16 −15 pager/pager.php
  123. +1 −1 pager/pagerforum.php
  124. +1 −1 pager/pagergame.php
  125. +1 −1 pager/pagerthread.php
  126. +2 −2 points.php
  127. +95 −95 profile.php
  128. +47 −47 register.php
  129. +17 −19 register/processUserForm.php
  130. +0 −4 roadmap.php
  131. +2 −2 rules.php
  132. +1 −1 translating.php
  133. +32 −34 usercp.php
  134. +25 −25 variants.php
  135. +10 −10 variants/AncMed/classes/drawMap.php
  136. +4 −4 variants/AncMed/variant.php
  137. +3 −3 variants/BuildAnywhere/classes/OrderInterface.php
  138. +10 −10 variants/Classic/classes/drawMap.php
  139. +1 −0 variants/Classic/install.php
  140. +4 −4 variants/Classic/variant.php
  141. +12 −12 variants/Colonial/classes/drawMap.php
  142. +4 −4 variants/Colonial/variant.php
  143. +10 −10 variants/World/classes/drawMap.php
  144. +5 −5 variants/World/variant.php
  145. +111 −14 variants/install.php
  146. +13 −11 variants/variant.php
View
@@ -18,4 +18,5 @@ pointlog.txt
/.project
/datc/maps/
!.htaccess
+variants/*/cache/
View
Oops, something went wrong.
@@ -20,9 +20,9 @@
defined('IN_CODE') or die('This script can not be run by itself.');
-require_once('admin/adminActions.php');
-require_once('admin/adminActionsForum.php');
-require_once('admin/adminActionsRestricted.php');
+require_once(l_r('admin/adminActions.php'));
+require_once(l_r('admin/adminActionsForum.php'));
+require_once(l_r('admin/adminActionsRestricted.php'));
/**
* This class uses data about admin tasks, provided by child classes, to
@@ -66,7 +66,7 @@ private static function form($actionName, array $params, $description="")
print '<input type="hidden" name="globalPostID" value="'.intval($_REQUEST['globalPostID']).'" />';
if ($description)
- print '<li class="formlistdesc" style="margin-bottom:10px">'.$description.'</li>';
+ print '<li class="formlistdesc" style="margin-bottom:10px">'.l_t($description).'</li>';
foreach( $params as $paramCode=>$paramName )
{
@@ -83,14 +83,14 @@ private static function form($actionName, array $params, $description="")
$defaultValue = '';
print '<li class="formlistfield">
- <label for="'.$paramCode.'">'.$paramName.'</label>:
+ <label for="'.$paramCode.'">'.l_t($paramName).'</label>:
<input type="text" name="'.$paramCode.'" value="'.$defaultValue.'" length="50" />
</li>';
}
print '<li class="formlistfield" style="margin-bottom:20px">
- <input class="form-submit" type="submit" name="Submit" value="Submit" /> '.
- ( self::isActionDangerous($actionName) ? '<em>(Careful; not confirmed!)</em>' : '').'
+ <input class="form-submit" type="submit" name="Submit" value="'.l_t('Submit').'" /> '.
+ ( self::isActionDangerous($actionName) ? '<em>('.l_t('Careful; not confirmed!').')</em>' : '').'
</li>';
print '</form>';
@@ -137,7 +137,7 @@ public function process($actionName)
extract(adminActions::$actions[$actionName]);
print '<li class="formlisttitle">
- <a name="'.$actionName.'"></a>'.$name.'</li>';
+ <a name="'.$actionName.'"></a>'.l_t($name).'</li>';
try
{
@@ -154,21 +154,21 @@ public function process($actionName)
if ( isset($paramValues['gameID']) )
{
- require_once('objects/game.php');
+ require_once(l_r('objects/game.php'));
$Variant=libVariant::loadFromGameID((int)$paramValues['gameID']);
$Game = $Variant->Game((int)$paramValues['gameID']);
- print '<p>Game link: <a href="board.php?gameID='.$Game->id.'">'.$Game->name.'</a></p>';
+ print '<p>'.l_t('Game link').': <a href="board.php?gameID='.$Game->id.'">'.$Game->name.'</a></p>';
}
if( isset($paramValues['userID']) )
{
$User = new User((int)$paramValues['userID']);
- print '<p>User link: '.$User->profile_link().'</p>';
+ print '<p>'.l_t('User link').': '.$User->profile_link().'</p>';
}
if( isset($paramValues['postID']) )
{
- print '<p>Post link: '.libHTML::threadLink($paramValues['postID']).'</p>';
+ print '<p>'.l_t('Post link').': '.libHTML::threadLink($paramValues['postID']).'</p>';
}
// If it needs confirming but ( hasn't been confirmed or is being resubmitted ):
@@ -196,7 +196,7 @@ public function process($actionName)
self::save($name, $paramValues, $details);
$description = '<p class="notice">'.$details.'</p>
- <p>'.$description.'</p>';
+ <p>'.l_t($description).'</p>';
$Misc->LastModAction = time();
}
@@ -206,8 +206,8 @@ public function process($actionName)
}
catch(Exception $e)
{
- $description = '<p><strong>Error:</strong> '.$e->getMessage().'</p>
- <p>'.$description.'</p>';
+ $description = '<p><strong>'.l_t('Error').':</strong> '.$e->getMessage().'</p>
+ <p>'.l_t($description).'</p>';
}
self::form($actionName, $params, $description);
@@ -221,18 +221,18 @@ public static function printActionShortcuts()
global $User;
$modActions=array();
- $modActions[] = '<a href="gamemaster.php" class="light">Run gamemaster</a><br />';
- $modActions[] = libHTML::admincp('panic', null, 'Toggle panic-mode');
+ $modActions[] = '<a href="gamemaster.php" class="light">'.l_t('Run gamemaster').'</a><br />';
+ $modActions[] = libHTML::admincp('panic', null, l_t('Toggle panic-mode'));
if($User->type['Admin'])
{
- $modActions[] = libHTML::admincp('notice', null, 'Toggle the site-wide notice');
- $modActions[] = libHTML::admincp('maintenance', null, 'Toggle maintenance-mode').'<br />';
- $modActions[] = libHTML::admincp('clearErrorLogs', null, 'Clear error-logs');
- $modActions[] = libHTML::admincp('clearOrderLogs', null, 'Clear order-logs');
- $modActions[] = libHTML::admincp('clearAccessLogs', null, 'Clear access-logs');
- $modActions[] = libHTML::admincp('clearAdminLogs', null, 'Clear admin-logs').'<br />';
- $modActions[] = libHTML::admincp('unCrashGames', array('excludeGameIDs'=>''), 'Un-crash any crashed games');
+ $modActions[] = libHTML::admincp('notice', null, l_t('Toggle the site-wide notice'));
+ $modActions[] = libHTML::admincp('maintenance', null, l_t('Toggle maintenance-mode')).'<br />';
+ $modActions[] = libHTML::admincp('clearErrorLogs', null, l_t('Clear error-logs'));
+ $modActions[] = libHTML::admincp('clearOrderLogs', null, l_t('Clear order-logs'));
+ $modActions[] = libHTML::admincp('clearAccessLogs', null, l_t('Clear access-logs'));
+ $modActions[] = libHTML::admincp('clearAdminLogs', null, l_t('Clear admin-logs')).'<br />';
+ $modActions[] = libHTML::admincp('unCrashGames', array('excludeGameIDs'=>''), l_t('Un-crash any crashed games'));
}
if($modActions)
@@ -292,14 +292,14 @@ public static function printActionLinks( array $actionCodes )
print '<div style="float:right; width:50%; text-align:left">';
for($i=$actionMidPoint; $i<$actionCount; $i++)
{
- print '<a href="#'.$actionCodes[$i].'">'.adminActions::$actions[$actionCodes[$i]]['name'].'</a><br />';
+ print '<a href="#'.$actionCodes[$i].'">'.l_t(adminActions::$actions[$actionCodes[$i]]['name']).'</a><br />';
}
print '</div>';
print '<div style="width:45%">';
for($i=0; $i<$actionMidPoint; $i++)
{
- print '<a href="#'.$actionCodes[$i].'">'.adminActions::$actions[$actionCodes[$i]]['name'].'</a><br />';
+ print '<a href="#'.$actionCodes[$i].'">'.l_t(adminActions::$actions[$actionCodes[$i]]['name']).'</a><br />';
}
print '</div>';
print '<div style="clear:both"></div>';
@@ -320,7 +320,7 @@ public static function printActionLinks( array $actionCodes )
// A shortcut command area
adminActionsLayout::printActionShortcuts();
-require_once('lib/gamemessage.php');
+require_once(l_r('lib/gamemessage.php'));
// Include the admin-only tasks?
if ( $User->type['Admin'] )
@@ -335,21 +335,21 @@ public static function printActionLinks( array $actionCodes )
$actionCodesByType = adminActionsLayout::actionCodesByType();
-print '<h3>Admin actions</h3>';
+print '<h3>'.l_t('Admin actions').'</h3>';
foreach($actionCodesByType as $type=>$actionCodes)
{
- print '<a name="'.strtolower($type).'Actions"></a><h4>'.$type.' actions</h4>';
+ print '<a name="'.strtolower($type).'Actions"></a><h4>'.l_t($type.' actions').'</h4>';
adminActionsLayout::printActionLinks($actionCodes);
}
print '<div class="hr"></div>';
-print '<h3>Forms</h3>';
+print '<h3>'.l_t('Forms').'</h3>';
// For each task display the form, and run the task if data entered from the corresponding form
print '<ul class="formlist">';
foreach($actionCodesByType as $type=>$actionCodes)
{
- print '<h4>'.$type.' actions</h4>';
+ print '<h4>'.l_t($type.' actions').'</h4>';
foreach($actionCodes as $actionCode)
$adminActions->process($actionCode);
@@ -141,13 +141,13 @@ public function disableSilence(array $params) {
self::setNextActiveUserSilence($silence->id);
self::setNextActivePostSilence($silence->id);
- return $silence->toString().' disabled.';
+ return l_t('%s disabled.',$silence->toString());
}
public function disableSilenceConfirm(array $params) {
$silence = new Silence($params['silenceID']);
- return 'Are you sure you want to disable this silence: <b>'.$silence->toString().'</b>?';
+ return l_t('Are you sure you want to disable this silence:').' <b>'.$silence->toString().'</b>?';
}
public function changeSilenceLength(array $params) {
@@ -164,40 +164,37 @@ public function changeSilenceLength(array $params) {
self::setNextActiveUserSilence($silence->id);
}
- return $silence->toString().' changed from <i>'.
- Silence::printLength($previousLength).'</i> to <i>'.
- Silence::printLength($silence->length).'</i>.';
+ return l_t('%s changed from <i>%s</i> to <i>%s</i>.',$silence->toString(),Silence::printLength($previousLength),Silence::printLength($silence->length));
}
public function changeSilenceLengthConfirm(array $params) {
$silence = new Silence($params['silenceID']);
if( $params['length'] < 0 )
- throw new Exception("Silence length must be non-negative.");
+ throw new Exception(l_t("Silence length must be non-negative."));
- return 'Are you sure you want to change the silence length from <i>'.
- Silence::printLength($silence->length).'</i> to <i>'.
- Silence::printLength($params['length']).'</i>,
- for <b>'.$silence->toString().'</b>?';
+ return l_t('Are you sure you want to change the silence length from <i>%s</i> to <i>%s</i>, for <b>%s</b>?',
+ Silence::printLength($silence->length),
+ Silence::printLength($params['length']),$silence->toString());
}
private static function checkSilenceParams(array $params) {
global $DB;
if( strlen($params['reason']) < 10 )
- throw new Exception("Please give a reason.");
+ throw new Exception(l_t("Please give a reason."));
if( isset($params['userID']) ) {
$SilencedUser = new User((int)$params['userID']);
if( $params['length'] < 0 )
- throw new Exception("Length in days must be greater than 0.");
+ throw new Exception(l_t("Length in days must be greater than 0."));
}
if( isset($params['postID']) ) {
list($threadsFound) = $DB->sql_row("SELECT COUNT(*) FROM wD_ForumMessages WHERE id = ".$params['postID']);
if( $threadsFound == 0 )
- throw new Exception("Thread ID # ".$params['postID']." does not exist.");
+ throw new Exception(l_t("Thread ID # %s does not exist.",$params['postID']));
}
}
@@ -216,17 +213,17 @@ public function createUserSilence(array $params)
);
$silence = new Silence($silenceID);
- return 'User silenced: <br/>' .$silence->toString();
+ return l_t('User silenced:').' <br/>' .$silence->toString();
}
public function createUserSilenceConfirm(array $params)
{
self::checkSilenceParams($params);
$UserSilence = new User($params['userID']);
- return 'Are you sure you want to silence this user '.
- Silence::printLength($params['length']).' because <i>'.
- $params['reason'].'</i> ?';
+ return l_t('Are you sure you want to silence this user %s because <i>%s</i> ?',
+ Silence::printLength($params['length']),
+ $params['reason']);
}
public function createThreadSilence(array $params)
@@ -242,15 +239,13 @@ public function createThreadSilence(array $params)
);
$silence = new Silence($silenceID);
- return 'Thread silenced: <br/>' .$silence->toString();
+ return l_t('Thread silenced:').' <br/>' .$silence->toString();
}
public function createThreadSilenceConfirm(array $params)
{
self::checkSilenceParams($params);
- return 'Are you sure you want to silence the thread containing post ID # '.
- $params['postID'].' indefinitely because <i>'.
- $params['reason'].'</i> ?';
+ return l_t('Are you sure you want to silence the thread containing post ID # %s indefinitely because <i>%s</i> ?',$params['postID'],$params['reason']);
}
public function createUserThreadSilence(array $params)
@@ -268,15 +263,14 @@ public function createUserThreadSilence(array $params)
);
$silence = new Silence($silenceID);
- return 'User and thread silenced: <br/>' .$silence->toString();
+ return l_t('User and thread silenced:').' <br/>' .$silence->toString();
}
public function createUserThreadSilenceConfirm(array $params)
{
self::checkSilenceParams($params);
- return 'Are you sure you want to silence this user '.
- Silence::printLength($params['length']).', and silence the thread they were posting in,
- because <i>'.$params['reason'].'</i> ?';
+ return l_t('Are you sure you want to silence this user %s, and silence the thread they were posting in, because <i>%s</i> ?',
+ Silence::printLength($params['length']),$params['reason']);
}
}
Oops, something went wrong.

0 comments on commit 6a8dbad

Please sign in to comment.