Skip to content

Commit

Permalink
Another webdip-code-merge
Browse files Browse the repository at this point in the history
Conflicts:
	board.php
	gamemaster/game.php
	locales/English/gamecreate.php

all resolved.
  • Loading branch information
Sleepcap committed Sep 21, 2017
2 parents 0f9848f + e82e183 commit d2a5179
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 30 deletions.
11 changes: 7 additions & 4 deletions board.php
Expand Up @@ -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."));
Expand All @@ -46,6 +43,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.
Expand Down Expand Up @@ -80,7 +80,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());

// In an game with strict rlPolicy don't allow users to join from a Left if they know someone else in this game
// Usually after a Mod set them to CD.
if ( $Game->Members->isJoined() && $Game->rlPolicy == 'Strict' && $User->rlGroup < 0 && $Game->Members->ByUserID[$User->id]->status == 'Left')
Expand Down
12 changes: 8 additions & 4 deletions forum.php
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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'] )
Expand Down Expand Up @@ -307,8 +311,8 @@
<div class="message-body threadalternate1 postboxadvice">
'.l_t('If your post relates to a particular game please include the <strong>URL or ID#</strong>
of the game.').'<br />
'.l_t('If you are posting a <strong>feature request</strong> please check that it isn\'t mentioned in the '.
'<a href="http://forum.webdiplomacy.net">todo list</a>.').'<br />
'.l_t('We get a lot of feature requests. If your feature request isn\'t already on our <a href="https://github.com/kestasjk/webDiplomacy/issues">issue tracker</a>,
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.').'<br />
'.l_t('If you are posting a question please <strong>check the <a href="faq.php">FAQ</a></strong> before posting.').'<br />
'.l_t('If your message is long you may need to write a summary message, and add the full message as a reply.').'
Expand Down
4 changes: 2 additions & 2 deletions gamemaster/game.php
Expand Up @@ -467,9 +467,9 @@ public function resetMinimumBet()
$this->minimumBet = null;
}
// The new value isn't the same, and it isn't comparing false with null (which are the same in this case)
elseif ( $minimumBet != $this->minimumBet && !( $minimumBet==false && is_null($this->minimumBet)) )
elseif ( ($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;
}

Expand Down
8 changes: 0 additions & 8 deletions gamepanel/game.php
Expand Up @@ -182,14 +182,6 @@ function gameGameOverDetails()
}
}

/**
* Game name
* @return string
*/
function titleBarName()
{
return $this->name;
}

/**
* Icons for the game, e.g. private padlock and featured star
Expand Down
23 changes: 14 additions & 9 deletions locales/English/credits.php
Expand Up @@ -27,6 +27,18 @@
?>
<div>
<?php

// Get moderator list
global $DB;
$query = "SELECT CONCAT('<a href=\"profile.php?userID=',id,'\">',username,'</a>,')
FROM wD_Users WHERE type LIKE '%Moderator%'";
$tabl = $DB->sql_tabl($query);
$moderators = '';
while( list($row) = $DB->tabl_row($tabl) )
{
$moderators .= $row . '<br/>';
}

$credits = array(
array('
<a href="http://www.wizards.com/default.asp?x=ah/prod/diplomacy">Avalon Hill</a>
Expand All @@ -41,14 +53,7 @@
,array('<a href="http://www.webdiplomacy.net/profile.php?userID=33599">Zultar</a>
','Co-Owner')

,array('<a href="http://www.webdiplomacy.net/profile.php?userID=15658">jmo1121109</a>,
<a href="http://www.webdiplomacy.net/profile.php?userID=37127">2ndWhiteLine</a>,
<a href="http://www.webdiplomacy.net/profile.php?userID=48609">TheMinisterOfWar</a>,
<a href="http://www.webdiplomacy.net/profile.php?userID=8938">damian</a>,
<a href="http://www.webdiplomacy.net/profile.php?userID=23172">Hellenic Riot</a>,
<a href="http://www.webdiplomacy.net/profile.php?userID=37168">ghug</a>,^M
<a href="http://www.webdiplomacy.net/profile.php?userID=41379">captainmeme</a>,
','The Current WebDiplomacy Moderators, reachable at webdipmod@gmail.com')
,array($moderators,'The Current WebDiplomacy Moderators, reachable at ' . Config::$modEMail)

,array('<a href="http://www.webdiplomacy.net/profile.php?userID=54909">A_Tin_Can</a>
','Coding Updates and Site Improvements')
Expand Down Expand Up @@ -145,4 +150,4 @@

?>
<div style="clear:both"></div>
</div>
</div>
4 changes: 2 additions & 2 deletions locales/English/gamecreate.php
Expand Up @@ -222,7 +222,7 @@ function setExtOptions(i){
<script type="text/javascript">
setExtOptions(<?php print $first;?>);
</script>

<div id="potType">
<li class="formlisttitle">Pot type:</li>
<li class="formlistfield">
Expand All @@ -235,7 +235,7 @@ function setExtOptions(i){

<strong>Default:</strong> Winner-takes-all (WTA)
</li>
</div>
</div>

<li class="formlisttitle">
Anonymous players:
Expand Down
9 changes: 8 additions & 1 deletion locales/English/recentchanges.php
Expand Up @@ -29,11 +29,18 @@
margin-left:30px;
}
</style>
December 24th, 2015
<ul>
<li>Game title now visible as the page title on the game board (instead of 'board').</li>
<li>Forum posts no longer repost when a page is refreshed.</li>
<li>Improved text on new thread post.</li>
<li>Credits page now automatically lists the moderators.</li>
</ul>
<div class="hr"></div>
December 22nd, 2015
<ul>
<li>Unranked games now available. Unranked games return the player's bet at the end of the game.</li>
<li>Sum-of-Squares scoring now available as "Center-Count Scoring".</li>
<li>Sum-of-Squares scoring now available.</li>
<li>WTA has been renamed "Draw-Size Scoring".</li>
<li>PPSC has been renamed "Survivors-Win Scoring".</li>
<li>The 'worth' section at the bottom of the game panel now tells you what your score would be if the game drew.</li>
Expand Down
8 changes: 8 additions & 0 deletions objects/game.php
Expand Up @@ -770,6 +770,14 @@ function needsProcess()
else
return false;
}
/**
* Game name
* @return string
*/
function titleBarName()
{
return $this->name;
}
}


Expand Down

0 comments on commit d2a5179

Please sign in to comment.