Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Do not open PlayerCard, if Module is inactive
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Oct 17, 2015
1 parent 72927da commit 560c52f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions includes/pages/game/AbstractGamePage.class.php
Expand Up @@ -201,6 +201,7 @@ protected function getPageData()
'debug' => $config->debug,
'VERSION' => $config->VERSION,
'date' => explode("|", date('Y\|n\|j\|G\|i\|s\|Z', TIMESTAMP)),
'isPlayerCardActive' => isModuleAvailable(MODULE_PLAYERCARD),
'REV' => substr($config->VERSION, -4),
'Offset' => $dateTimeUser->getOffset() - $dateTimeServer->getOffset(),
'queryString' => $this->getQueryString(),
Expand Down
2 changes: 1 addition & 1 deletion scripts/game/base.js
Expand Up @@ -167,7 +167,7 @@ var Dialog = {
},

Playercard: function(ID) {
return Dialog.open('game.php?page=playerCard&id='+ID, 650, 600);
return isPlayerCardActive && Dialog.open('game.php?page=playerCard&id='+ID, 650, 600);
},

Buddy: function(ID) {
Expand Down
1 change: 1 addition & 0 deletions styles/templates/game/main.header.tpl
Expand Up @@ -41,6 +41,7 @@
var months = {$LNG.months|json|default:'[]'} ;
var tdformat = "{$LNG.js_tdformat}";
var queryString = "{$queryString|escape:'javascript'}";
var isPlayerCardActive = "{$isPlayerCardActive|json}";
setInterval(function() {
serverTime.setSeconds(serverTime.getSeconds()+1);
Expand Down
2 changes: 1 addition & 1 deletion styles/templates/game/page.phalanx.default.tpl
@@ -1,4 +1,4 @@
{block name="title" prepend}{$LNG.lm_playercard}{/block}
{block name="title" prepend}{$LNG.gl_phalanx}{/block}
{block name="content"}
<table width="90%">
<tr>
Expand Down

0 comments on commit 560c52f

Please sign in to comment.