mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 01:03:31 +02:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user