aboutsummaryrefslogtreecommitdiffstats
path: root/include/user.inc.php
diff options
context:
space:
mode:
authorz0rglub <z0rglub@piwigo.org>2004-01-18 22:06:34 +0000
committerz0rglub <z0rglub@piwigo.org>2004-01-18 22:06:34 +0000
commit6dbfba37197a1cc149db70fe627c9e1ba64ad67d (patch)
treec02995850256cd38c211146a0c90ec0956af68b7 /include/user.inc.php
parent3d1277bf4d35dcd97c1bac312d1b065eea854fc9 (diff)
Simplifying concatenation of $infos variables to select in the database
git-svn-id: http://piwigo.org/svn/branches/release-1_3@297 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/user.inc.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/include/user.inc.php b/include/user.inc.php
index ba1b65dda..b2d0ea727 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -27,11 +27,7 @@ $infos = array( 'id', 'username', 'mail_address', 'nb_image_line',
'maxheight', 'expand', 'show_nb_comments', 'short_period',
'long_period', 'template', 'forbidden_categories' );
-$query_user = 'SELECT ';
-foreach ( $infos as $i => $info ) {
- if ( $i > 0 ) $query_user.= ', ';
- $query_user.= $info;
-}
+$query_user = 'SELECT '.implode( ',', $infos );
$query_user.= ' FROM '.PREFIX_TABLE.'users';
$query_done = false;
$user['is_the_guest'] = false;