mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-09 02:03:18 +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:
@@ -67,11 +67,7 @@ $infos = array( 'prefix_thumbnail', 'webmaster', 'mail_webmaster', 'access',
|
||||
'upload_maxheight_thumbnail','log','comments_validation',
|
||||
'comments_forall','authorize_cookies','mail_notification' );
|
||||
|
||||
$query = 'SELECT ';
|
||||
foreach ( $infos as $i => $info ) {
|
||||
if ( $i > 0 ) $query.= ',';
|
||||
$query.= $info;
|
||||
}
|
||||
$query = 'SELECT '.implode( ',', $infos );
|
||||
$query.= ' FROM '.PREFIX_TABLE.'config;';
|
||||
|
||||
$row = mysql_fetch_array( mysql_query( $query ) );
|
||||
|
||||
Reference in New Issue
Block a user