From e1b59cb0a83e8b6cff7b05ea18cd8cdd985a9af7 Mon Sep 17 00:00:00 2001 From: gweltas Date: Sun, 11 Jan 2004 23:40:39 +0000 Subject: Corrections de quelques warnings php. git-svn-id: http://piwigo.org/svn/branches/release-1_3@274 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions.inc.php | 3 ++- include/user.inc.php | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/functions.inc.php b/include/functions.inc.php index 7ff3eda67..94050d13b 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -306,7 +306,7 @@ function replace_search( $string, $search ) function database_connection() { include( PREFIX_INCLUDE.'./include/mysql.inc.php' ); - define( PREFIX_TABLE, $prefixeTable ); + define( 'PREFIX_TABLE', $prefixeTable ); @mysql_connect( $cfgHote, $cfgUser, $cfgPassword ) or die ( "Could not connect to server" ); @@ -334,6 +334,7 @@ function templatize_array( $array, $global_array_name, $handle ) global $vtp, $lang, $page, $user, $conf; foreach ( $array as $value ) { + if (isset(${$global_array_name}[$value])) $vtp->setGlobalVar( $handle, $value, ${$global_array_name}[$value] ); } } diff --git a/include/user.inc.php b/include/user.inc.php index e33809430..a640ec4eb 100644 --- a/include/user.inc.php +++ b/include/user.inc.php @@ -29,7 +29,7 @@ $infos = array( 'id', 'username', 'mail_address', 'nb_image_line', $query_user = 'SELECT '; foreach ( $infos as $i => $info ) { - if ( $i > 0 ) $query_user.= ','; + if ( $i > 0 ) $query_user.= ', '; $query_user.= $info; } $query_user.= ' FROM '.PREFIX_TABLE.'users'; @@ -97,7 +97,6 @@ if ( !$query_done ) $user['is_the_guest'] = true; } $query_user .= ';'; - $row = mysql_fetch_array( mysql_query( $query_user ) ); // affectation of each value retrieved in the users table into a variable -- cgit v1.2.3