aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/styles/prosilver
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-07-25 13:25:48 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-07-25 13:27:49 +0200
commit75aef80104351d276dda5dd3e6cf0b0dfa40d02d (patch)
tree56402f44e4c0d2f894f891be7c97f83400d13422 /phpBB/styles/prosilver
parent9e1802396f7fdc3a9908d7c2c4d3bfb8f6156e75 (diff)
downloadforums-75aef80104351d276dda5dd3e6cf0b0dfa40d02d.tar
forums-75aef80104351d276dda5dd3e6cf0b0dfa40d02d.tar.gz
forums-75aef80104351d276dda5dd3e6cf0b0dfa40d02d.tar.bz2
forums-75aef80104351d276dda5dd3e6cf0b0dfa40d02d.tar.xz
forums-75aef80104351d276dda5dd3e6cf0b0dfa40d02d.zip
[ticket/12891] Replace template loops with 1 loop to reduce generation time
PHPBB3-12891
Diffstat (limited to 'phpBB/styles/prosilver')
-rw-r--r--phpBB/styles/prosilver/template/mcp_ban.html33
1 files changed, 20 insertions, 13 deletions
diff --git a/phpBB/styles/prosilver/template/mcp_ban.html b/phpBB/styles/prosilver/template/mcp_ban.html
index 9504d16284..5a7eaa7840 100644
--- a/phpBB/styles/prosilver/template/mcp_ban.html
+++ b/phpBB/styles/prosilver/template/mcp_ban.html
@@ -5,27 +5,34 @@
var ban_length = new Array();
ban_length[-1] = '';
- <!-- BEGIN ban_length -->
- ban_length['{ban_length.BAN_ID}'] = '{ban_length.A_LENGTH}';
- <!-- END ban_length -->
-
var ban_reason = new Array();
ban_reason[-1] = '';
- <!-- BEGIN ban_reason -->
- ban_reason['{ban_reason.BAN_ID}'] = '{ban_reason.A_REASON}';
- <!-- END ban_reason -->
-
var ban_give_reason = new Array();
ban_give_reason[-1] = '';
- <!-- BEGIN ban_give_reason -->
- ban_give_reason['{ban_give_reason.BAN_ID}'] = '{ban_give_reason.A_REASON}';
- <!-- END ban_give_reason -->
+
+ <!-- BEGIN bans -->
+ ban_length['{bans.BAN_ID}'] = '{bans.A_LENGTH}';
+ <!-- IF bans.A_REASON -->
+ ban_reason['{bans.BAN_ID}'] = '{bans.A_REASON}';
+ <!-- ENDIF -->
+ <!-- IF bans.A_GIVE_REASON -->
+ ban_give_reason['{bans.BAN_ID}'] = '{bans.A_GIVE_REASON}';
+ <!-- ENDIF -->
+ <!-- END bans -->
function display_details(option)
{
- document.getElementById('unbangivereason').innerHTML = ban_give_reason[option];
- document.getElementById('unbanreason').innerHTML = ban_reason[option];
document.getElementById('unbanlength').innerHTML = ban_length[option];
+ if (option in ban_reason) {
+ document.getElementById('unbanreason').innerHTML = ban_reason[option];
+ } else {
+ document.getElementById('unbanreason').innerHTML = '';
+ }
+ if (option in ban_give_reason) {
+ document.getElementById('unbangivereason').innerHTML = ban_give_reason[option];
+ } else {
+ document.getElementById('unbangivereason').innerHTML = '';
+ }
}
// ]]>