diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/config.inc.php | 18 | ||||
-rw-r--r-- | include/functions_session.inc.php | 6 | ||||
-rw-r--r-- | include/functions_user.inc.php | 1 |
3 files changed, 13 insertions, 12 deletions
diff --git a/include/config.inc.php b/include/config.inc.php index 719edf156..fec4fa170 100644 --- a/include/config.inc.php +++ b/include/config.inc.php @@ -37,16 +37,16 @@ include_once( PREFIXE_INCLUDE.'./include/vtemplate.class.php' ); // 2. $conf['order_by'] = " order by file asc"; // will only order pictures by file ascending // without taking into account the date_available -$conf['order_by'] = " order by date_available desc, file asc"; +$conf['order_by'] = ' order by date_available desc, file asc'; $conf['repertoire_image'] = './images/'; -$conf['nb_image_row'] = array ('4','5','6','7','8'); -$conf['nb_row_page'] = array ('2','3','4','5','6','7','10','20','1000'); +$conf['nb_image_row'] = array('4','5','6','7','8'); +$conf['nb_row_page'] = array('2','3','4','5','6','7','10','20','1000'); $conf['version'] = '1.3'; $conf['site_url'] = 'http://www.phpwebgallery.net'; $conf['forum_url'] = 'http://forum.phpwebgallery.net'; -$conf['picture_ext'] = array ( 'jpg','JPG','gif','GIF','png','PNG' ); -$conf['document_ext'] = array( 'doc','pdf','zip' ); +$conf['picture_ext'] = array('jpg','JPG','gif','GIF','png','PNG'); +$conf['document_ext'] = array('doc','pdf','zip'); database_connection(); // rertieving the configuration informations for site @@ -61,7 +61,7 @@ $infos = array( 'prefixe_thumbnail', 'webmaster', 'mail_webmaster', 'acces', 'upload_maxheight', 'upload_maxwidth_thumbnail', 'upload_maxheight_thumbnail' ); -$query = 'select'; +$query = 'SELECT'; for ( $i = 0; $i < sizeof( $infos ); $i++ ) { if ( $i > 0 ) @@ -74,7 +74,7 @@ for ( $i = 0; $i < sizeof( $infos ); $i++ ) } $query.= $infos[$i]; } -$query .= ' from '.PREFIX_TABLE.'config;'; +$query .= ' FROM '.PREFIX_TABLE.'config;'; $row = mysql_fetch_array( mysql_query( $query ) ); @@ -90,6 +90,6 @@ for ( $i = 0; $i < sizeof( $infos ); $i++ ) $conf[$infos[$i]] = get_boolean( $row[$infos[$i]] ); } } -$conf['log'] = false; -$conf['top_number'] = 10; +$conf['log'] = false; +$conf['top_number'] = 20; ?>
\ No newline at end of file diff --git a/include/functions_session.inc.php b/include/functions_session.inc.php index 352e7cd7d..6109456cc 100644 --- a/include/functions_session.inc.php +++ b/include/functions_session.inc.php @@ -18,17 +18,17 @@ function generate_key() { global $conf; $md5 = md5( substr( microtime(), 2, 6 ).$conf['session_keyword'] ); - $init = ""; + $init = ''; for ( $i = 0; $i < strlen( $md5 ); $i++ ) { if ( is_numeric( $md5[$i] ) ) { - $init.= "$md5[$i]"; + $init.= $md5[$i]; } } $init = substr( $init, 0, 8 ); mt_srand( $init ); - $key = ""; + $key = ''; for ( $i = 0; $i < $conf['session_id_size']; $i++ ) { $c = mt_rand( 0, 2 ); diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index e9d3558d8..b19e53f18 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -207,6 +207,7 @@ function update_user( $user_id, $mail_address, $status, function check_login_authorization() { global $user,$lang,$conf,$page; + if ( $user['is_the_guest'] and ( $conf['acces'] == 'restreint' or $page['cat'] == 'fav' ) ) { |