From 570963a58b04d43aa547a5752692fc98ce84b662 Mon Sep 17 00:00:00 2001 From: Jason Kleban Date: Sat, 22 Aug 2015 16:54:58 -0400 Subject: [PATCH 01/10] Fix for #62: Automated moderators list for Credits page --- locales/English/credits.php | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/locales/English/credits.php b/locales/English/credits.php index c7d5338f3..4c7ec59e6 100755 --- a/locales/English/credits.php +++ b/locales/English/credits.php @@ -27,6 +27,18 @@ ?>
',username,',') +FROM wD_Users WHERE type LIKE '%Moderator%'"; +$tabl = $DB->sql_tabl($query); +$moderators = ''; +while( list($row) = $DB->tabl_row($tabl) ) +{ + $moderators .= $row; +} + $credits = array( array(' Avalon Hill @@ -41,14 +53,7 @@ ,array('Zultar ','Co-Owner') - ,array('jmo1121109, - 2ndWhiteLine, - TheMinisterOfWar, - damian, - Hellenic Riot, - ghug,^M - captainmeme, - ','The Current WebDiplomacy Moderators, reachable at webdipmod@gmail.com') + ,array($moderators,'The Current WebDiplomacy Moderators, reachable at webdipmod@gmail.com') ,array('A_Tin_Can ','Coding Updates and Site Improvements') From 7d86e0be015fb8c64fc27cbee44e941060c9b581 Mon Sep 17 00:00:00 2001 From: Jason Kleban Date: Sun, 23 Aug 2015 19:46:29 -0400 Subject: [PATCH 02/10] Moderator email from config displayed --- locales/English/credits.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locales/English/credits.php b/locales/English/credits.php index 4c7ec59e6..eb1086525 100755 --- a/locales/English/credits.php +++ b/locales/English/credits.php @@ -53,7 +53,7 @@ ,array('Zultar ','Co-Owner') - ,array($moderators,'The Current WebDiplomacy Moderators, reachable at webdipmod@gmail.com') + ,array($moderators,'The Current WebDiplomacy Moderators, reachable at ' . Config::$modEMail) ,array('A_Tin_Can ','Coding Updates and Site Improvements') @@ -150,4 +150,4 @@ ?>
-
\ No newline at end of file + From c4d9618b77ec784231a96380e3feaca63fb1c590 Mon Sep 17 00:00:00 2001 From: deltachemist Date: Fri, 11 Dec 2015 09:33:53 +0100 Subject: [PATCH 03/10] Delayed the call of libhtml::starthtml to allow the use of the game name in the page header. --- board.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/board.php b/board.php index 0cf925dfa..6560f81a6 100755 --- a/board.php +++ b/board.php @@ -24,9 +24,6 @@ require_once('header.php'); -// If viewing an archive page make that the title, otherwise us the default -libHTML::starthtml(isset($_REQUEST['viewArchive'])?$_REQUEST['viewArchive']:false); - if ( ! isset($_REQUEST['gameID']) ) { libHTML::error(l_t("You haven't specified a game to view, please go back to the game listings and choose one.")); @@ -45,6 +42,9 @@ libVariant::setGlobals($Variant); $Game = $Variant->processGame($gameID); + // If viewing an archive page make that the title, otherwise us the name of the game + libHTML::starthtml(isset($_REQUEST['viewArchive'])?$_REQUEST['viewArchive']:$Game->titleBarName()); + if ( isset($_REQUEST['join']) ) { // They will be stopped here if they're not allowed. @@ -79,7 +79,10 @@ $Variant=libVariant::loadFromGameID($gameID); libVariant::setGlobals($Variant); $Game = $Variant->panelGameBoard($gameID); - + + // If viewing an archive page make that the title, otherwise us the name of the game + libHTML::starthtml(isset($_REQUEST['viewArchive'])?$_REQUEST['viewArchive']:$Game->titleBarName()); + if ( $Game->Members->isJoined() ) { // We are a member, load the extra code that we might need From 5ff4c92f8fef61216ddaea8e29876a1f380ac732 Mon Sep 17 00:00:00 2001 From: Jason Kleban Date: Sat, 19 Dec 2015 09:25:00 -0500 Subject: [PATCH 04/10] Forum reply redirects to eliminate double post bug --- forum.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/forum.php b/forum.php index cc8039959..25e303654 100755 --- a/forum.php +++ b/forum.php @@ -230,8 +230,7 @@ $_SESSION['lastPostTime']=time(); $_SESSION['lastPostType']='ThreadReply'; - $messageproblem=l_t("Reply posted sucessfully."); - $new['message']=""; $new['subject']=""; + header("Location: " . $_SERVER['REQUEST_URI'] . '&reply=success'); } catch(Exception $e) { @@ -266,6 +265,11 @@ $_SESSION['viewthread'] = $viewthread; +if (isset($_REQUEST['reply']) && $_REQUEST['reply'] == 'success') { + $messageproblem=l_t("Reply posted sucessfully."); + $new['message']=""; $new['subject']=""; $new['sendtothread']=$viewthread; +} + libHTML::starthtml(); if( $User->type['Guest'] ) From 5c31fdf5430c9db5b2ef937368395ae582cc6e3f Mon Sep 17 00:00:00 2001 From: deltachemist Date: Mon, 21 Dec 2015 10:50:36 +0100 Subject: [PATCH 05/10] Changed message upon creation of new thread to refer to the issue tracker on GitHub. --- forum.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/forum.php b/forum.php index cc8039959..39ccaca9b 100755 --- a/forum.php +++ b/forum.php @@ -307,8 +307,8 @@
'.l_t('If your post relates to a particular game please include the URL or ID# of the game.').'
- '.l_t('If you are posting a feature request please check that it isn\'t mentioned in the '. - 'todo list.').'
+ '.l_t('We get a lot of feature requests. If your feature request isn\'t already on our issue tracker, + then the best place to ask is the forum. This will help us gauge support for your ideas, before we add it to the todo list.').'
'.l_t('If you are posting a question please check the FAQ before posting.').'
'.l_t('If your message is long you may need to write a summary message, and add the full message as a reply.').' From 05512ba0729138e1d235913c74c2f4f4b4b1338b Mon Sep 17 00:00:00 2001 From: Timothy Jones Date: Wed, 23 Dec 2015 22:33:30 +1300 Subject: [PATCH 06/10] Small capitalisation fix --- locales/English/gamecreate.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/English/gamecreate.php b/locales/English/gamecreate.php index 571ebc5e8..142940316 100755 --- a/locales/English/gamecreate.php +++ b/locales/English/gamecreate.php @@ -159,7 +159,7 @@
  • This setting determines how points are split up if/when the game draws.

    - In draw-size scoring, the pot is split equally between the remaining players when the game draws (this setting used to be called WTA). + In Draw-Size Scoring, the pot is split equally between the remaining players when the game draws (this setting used to be called WTA).

    In Sum-of-Squares scoring, the pot is divided depending on how many centers you control when the game draws.
    From f717ace2b037221d6595495088d320a181df066d Mon Sep 17 00:00:00 2001 From: Timothy Jones Date: Thu, 24 Dec 2015 15:17:42 +1300 Subject: [PATCH 07/10] Added new lines on auto moderator list. --- locales/English/credits.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/English/credits.php b/locales/English/credits.php index eb1086525..8be0ea908 100755 --- a/locales/English/credits.php +++ b/locales/English/credits.php @@ -36,7 +36,7 @@ $moderators = ''; while( list($row) = $DB->tabl_row($tabl) ) { - $moderators .= $row; + $moderators .= $row . '
    '; } $credits = array( From 1975229ff3ae84e1148fbc24b00de5f72c256f26 Mon Sep 17 00:00:00 2001 From: Timothy Jones Date: Thu, 24 Dec 2015 15:20:22 +1300 Subject: [PATCH 08/10] Updated recent changes --- locales/English/recentchanges.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/locales/English/recentchanges.php b/locales/English/recentchanges.php index 8df93f9ab..9d670a1f7 100755 --- a/locales/English/recentchanges.php +++ b/locales/English/recentchanges.php @@ -29,11 +29,18 @@ margin-left:30px; } +December 24th, 2015 +
      +
    • Game title now visible as the page title on the game board (instead of 'board').
    • +
    • Forum posts no longer repost when a page is refreshed.
    • +
    • Improved text on new thread post.
    • +
    • Credits page now automatically lists the moderators.
    • +
    December 22nd, 2015
    • Unranked games now available. Unranked games return the player's bet at the end of the game.
    • -
    • Sum-of-Squares scoring now available as "Center-Count Scoring".
    • +
    • Sum-of-Squares scoring now available.
    • WTA has been renamed "Draw-Size Scoring".
    • PPSC has been renamed "Survivors-Win Scoring".
    • The 'worth' section at the bottom of the game panel now tells you what your score would be if the game drew.
    • From b61f0f8ac6ddf0ae1567e8d47852deaef6f5f20d Mon Sep 17 00:00:00 2001 From: Timothy Jones Date: Thu, 24 Dec 2015 16:16:32 +1300 Subject: [PATCH 09/10] Fixes #195: Undefined function --- gamepanel/game.php | 8 -------- objects/game.php | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gamepanel/game.php b/gamepanel/game.php index e92ec24fe..80d1ffc33 100755 --- a/gamepanel/game.php +++ b/gamepanel/game.php @@ -175,14 +175,6 @@ function gameGameOverDetails() } } - /** - * Game name - * @return string - */ - function titleBarName() - { - return $this->name; - } /** * Icons for the game, e.g. private padlock and featured star diff --git a/objects/game.php b/objects/game.php index 04a8ff6bd..27003228c 100755 --- a/objects/game.php +++ b/objects/game.php @@ -579,6 +579,14 @@ function needsProcess() else return false; } + /** + * Game name + * @return string + */ + function titleBarName() + { + return $this->name; + } } From e82e1833451734737db61ee0b7fcf604edbe432d Mon Sep 17 00:00:00 2001 From: Timothy Jones Date: Fri, 25 Dec 2015 20:23:59 +1300 Subject: [PATCH 10/10] Updated resetMinimumBet to be happy with 0-point takeovers. --- gamemaster/game.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamemaster/game.php b/gamemaster/game.php index 8f554bcf6..9bae72e9f 100755 --- a/gamemaster/game.php +++ b/gamemaster/game.php @@ -400,9 +400,9 @@ public function resetMinimumBet() } // The new value isn't the same, and it isn't comparing false with null (which are the same in this case) - if ( $minimumBet != $this->minimumBet && !( $minimumBet==false && is_null($this->minimumBet)) ) + if ( ($minimumBet === 0 || $minimumBet != $this->minimumBet) && !( $minimumBet===false && is_null($this->minimumBet)) ) { - $DB->sql_put("UPDATE wD_Games SET minimumBet = ".($minimumBet?$minimumBet:'NULL')." WHERE id=".$this->id); + $DB->sql_put("UPDATE wD_Games SET minimumBet = ".($minimumBet !== false?$minimumBet:'NULL')." WHERE id=".$this->id); $this->minimumBet = $minimumBet; } }