aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhruv Goel <dhruv.goel92@gmail.com>2012-04-11 03:34:29 +0530
committerDhruv Goel <dhruv.goel92@gmail.com>2012-05-17 14:02:25 +0530
commitbdf66b27ab6e46cfb1978feb05b13c83c9bd9597 (patch)
tree838feefc0346c408d0a2dc1535809edbb2adc6a3
parentd5b1e108f92e7bae9a0c4afa972f85276e84df2a (diff)
downloadforums-bdf66b27ab6e46cfb1978feb05b13c83c9bd9597.tar
forums-bdf66b27ab6e46cfb1978feb05b13c83c9bd9597.tar.gz
forums-bdf66b27ab6e46cfb1978feb05b13c83c9bd9597.tar.bz2
forums-bdf66b27ab6e46cfb1978feb05b13c83c9bd9597.tar.xz
forums-bdf66b27ab6e46cfb1978feb05b13c83c9bd9597.zip
[feature/delete-auto-logins] using loop for errors
instead of hardcoding html code into ERROR variable, we use errors array and use loop in template file. PHPBB3-9647
-rw-r--r--phpBB/includes/ucp/ucp_profile.php2
-rw-r--r--phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html8
2 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index d4e5d75c10..a7b6eb29a1 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -661,7 +661,7 @@ class ucp_profile
while ($row = $db->sql_fetchrow($result))
{
$template->assign_block_vars('sessions', array(
- 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
+ 'errors' => $error,
'KEY' => $row['key_id'],
'IP' => $row['last_ip'],
diff --git a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html
index 7767943d5c..89913d21bf 100644
--- a/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html
+++ b/phpBB/styles/prosilver/template/ucp_profile_autologin_keys.html
@@ -7,7 +7,13 @@
<div class="inner">
<fieldset>
- <!-- IF ERROR --><p class="error">{ERROR}</p><!-- ENDIF -->
+ <!-- IF .errors -->
+ <p class="error">
+ <!-- BEGIN errors -->
+ {errors} <br />
+ <!-- END errors -->
+ </p>
+ <!-- ENDIF -->
<!-- IF .sessions -->
<p>{L_PROFILE_AUTOLOGIN_KEYS}</p>
<table>