diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/config.inc.php | 6 | ||||
-rw-r--r-- | include/user.inc.php | 6 |
2 files changed, 2 insertions, 10 deletions
diff --git a/include/config.inc.php b/include/config.inc.php index e067c7905..d7db7fbab 100644 --- a/include/config.inc.php +++ b/include/config.inc.php @@ -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 ) ); 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; |