Changeset 274


Ignore:
Timestamp:
Jan 12, 2004, 12:40:39 AM (20 years ago)
Author:
gweltas
Message:

Corrections de quelques warnings php.

Location:
branches/release-1_3
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/release-1_3/admin/admin.php

    r202 r274  
    3636$page_valide = false;
    3737$title = '';
     38if (isset( $_GET['page'] ))
    3839switch ( $_GET['page'] )
    3940{
  • branches/release-1_3/admin/include/isadmin.inc.php

    r57 r274  
    1717 *                                                                         *
    1818 ***************************************************************************/
    19 define( PREFIX_INCLUDE, '.' );
     19define( 'PREFIX_INCLUDE', '.' );
    2020
    2121include_once( '../include/config.inc.php' );
  • branches/release-1_3/admin/install.php

    r205 r274  
    1919
    2020//-------------------------------------------------------------------- includes
    21 define( PREFIX_INCLUDE, '.' );
     21define( 'PREFIX_INCLUDE', '.' );
    2222include( '../include/vtemplate.class.php' );
    2323include( '../include/functions.inc.php' );
     
    4646}
    4747//---------------------- Step 1 : connection informations, write of config file
    48 if ( $_GET['step'] == 1 )
     48if ( isset($_GET['step']) && $_GET['step'] == 1 )
    4949{
    5050  $errors = array();
     
    151151      $vtp->setVar( $handle, 'step1.f_host', $_POST['cfgHote'] );
    152152    // user
    153     $vtp->setVar( $handle, 'step1.f_user', $_POST['cfgUser'] );
     153        if ( isset( $_POST['cfgUser'] ) )
     154            $vtp->setVar( $handle, 'step1.f_user', $_POST['cfgUser'] );
    154155    // base
    155     $vtp->setVar( $handle, 'step1.f_base', $_POST['cfgBase'] );
     156        if ( isset( $_POST['cfgBase'] ) )
     157            $vtp->setVar( $handle, 'step1.f_base', $_POST['cfgBase'] );
    156158    // prefixeTable
    157159    if ( !isset( $_POST['prefixeTable'] ) )
     
    164166}
    165167//------------------------------------- Step 2 : creation of tables in database
    166 else if ( $_GET['step'] == 2 )
     168else if (  isset($_GET['step']) && $_GET['step'] == 2 )
    167169{
    168170  $errors = array();
     
    268270  {
    269271    $vtp->addSession( $handle, 'step2' );
     272        if ( isset( $_POST['webmaster'] ))
    270273    $vtp->setVar( $handle, 'step2.f_webmaster', $_POST['webmaster'] );
     274        if ( isset( $_POST['mail_webmaster'] ))
    271275    $vtp->setVar( $handle, 'step2.f_mail_webmaster', $_POST['mail_webmaster']);
    272276    $vtp->closeSession( $handle, 'step2' );
  • branches/release-1_3/category.php

    r252 r274  
    2424include_once( './include/init.inc.php' );
    2525//---------------------------------------------------------------------- logout
    26 if ( $_GET['act'] == 'logout' and isset( $_COOKIE['id'] ) )
     26if ( isset( $_GET['act'] ) && $_GET['act'] == 'logout' && isset( $_COOKIE['id'] ) )
    2727{
    2828  // cookie deletion if exists
     
    3535}
    3636//-------------------------------------------------- access authorization check
    37 check_cat_id( $_GET['cat'] );
     37if ( isset( $_GET['act'] ))
     38        check_cat_id( $_GET['cat'] );
    3839check_login_authorization();
    39 if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
     40if ( isset( $page['cat'] ) && is_numeric( $page['cat'] ) )
    4041{
    4142  check_restrictions( $page['cat'] );
     
    6364  }
    6465}
    65 if ( is_numeric( $page['cat'] ) )
     66if ( isset($page['cat']) && is_numeric( $page['cat'] ) )
    6667{
    6768  // the category displayed (in the URL cat=23) must be seen in the menu ->
     
    7778// The $page['expand'] equals 'all' and
    7879// $page['tab_expand'] contains all the authorized cat ids
    79 if ( $user['expand'] or $_GET['expand'] == 'all' )
     80if ( $user['expand'] || (isset($_GET['expand']) && $_GET['expand'] == 'all' ))
    8081{
    8182  $page['tab_expand'] = array();
     
    8687// We have to find the right $page['start'] that show the num picture
    8788// in this category
    88 if ( is_numeric( $_GET['num'] ) and $_GET['num'] >= 0 )
     89if ( isset($_GET['num']) && is_numeric( $_GET['num'] ) && $_GET['num'] >= 0 )
    8990{
    9091  $page['start'] = floor( $_GET['num'] / $user['nb_image_page'] );
     
    179180  // customization link
    180181  $vtp->addSession( $handle, 'summary' );
    181   $url = './profile.php?cat='.$page['cat'];
    182   $url.= '&expand='.$page['expand'];
    183   if ( $page['cat'] == 'search' )
     182  $url = './profile.php';
     183  if (isset($page['cat']) && isset($page['expand']))
     184        $url.='?cat='.$page['cat'].'&expand='.$page['expand'];
     185  if ( isset($page['cat']) && $page['cat'] == 'search' )
    184186  {
    185187    $url.= '&search='.$_GET['search'].'&mode='.$_GET['mode'];
     
    350352           and $page['cat_nb_images'] == 0
    351353           and $page['plain_structure'][$page['cat']]['nb_sub_categories'] > 0)
    352          or $_GET['cat'] == '' )
     354         or (!isset($_GET['cat'])))
    353355{
    354356  $vtp->addSession( $handle, 'thumbnails' );
    355357  $vtp->addSession( $handle, 'line' );
    356358
    357   $subcats = get_non_empty_subcat_ids( $page['cat'] );
     359  $subcats=array();
     360  if (isset ($page['cat'] ))
     361        $subcats = get_non_empty_subcat_ids( $page['cat'] );
    358362  $cell_number = 1;
    359363  $i = 0;
  • branches/release-1_3/comments.php

    r250 r274  
    141141$vtp->setGlobalVar( $handle, 'text_color', $user['couleur_text'] );
    142142//--------------------------------------------------- number of days to display
    143 if ( isset( $_GET['last_days'] ) ) define( MAX_DAYS, $_GET['last_days'] );
    144 else                               define( MAX_DAYS, 0 );
     143if ( isset( $_GET['last_days'] ) ) define( 'MAX_DAYS', $_GET['last_days'] );
     144else                               define( 'MAX_DAYS', 0 );
    145145//----------------------------------------- non specific section initialization
    146146$array_cat_directories = array();
  • branches/release-1_3/include/functions.inc.php

    r264 r274  
    307307{
    308308  include( PREFIX_INCLUDE.'./include/mysql.inc.php' );
    309   define( PREFIX_TABLE, $prefixeTable );
     309  define( 'PREFIX_TABLE', $prefixeTable );
    310310
    311311  @mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
     
    335335
    336336  foreach ( $array as $value ) {
     337  if (isset(${$global_array_name}[$value]))
    337338    $vtp->setGlobalVar( $handle, $value, ${$global_array_name}[$value] );
    338339  }
  • branches/release-1_3/include/user.inc.php

    r241 r274  
    3030$query_user  = 'SELECT ';
    3131foreach ( $infos as $i => $info ) {
    32   if ( $i > 0 ) $query_user.= ',';
     32  if ( $i > 0 ) $query_user.= ', ';
    3333  $query_user.= $info;
    3434}
     
    9898}
    9999$query_user .= ';';
    100 
    101100$row = mysql_fetch_array( mysql_query( $query_user ) );
    102101
  • branches/release-1_3/language/english.php

    r239 r274  
    156156$lang['upload_successful'] = 'Picture uploaded with success, an administrator will validate it as soon as possible';
    157157// new or modified in release 1.3
    158 $lang['charset'] = 'ISO_8859-1';
     158$lang['charset'] = 'ISO-8859-1';
    159159$lang['no'] = 'no';
    160160$lang['yes'] = 'yes';
  • branches/release-1_3/language/francais.php

    r239 r274  
    148148$lang['upload_successful'] = 'Image uploadée avec succès, un administrateur validera celle-ci dès que possible.';
    149149// new or modified in release 1.3
    150 $lang['charset'] = 'ISO_8859-1';
     150$lang['charset'] = 'ISO-8859-1';
    151151$lang['no'] = 'non';
    152152$lang['yes'] = 'oui';
     
    216216$lang['mail_new_comment_subject'] = 'Nouveau commentaire sur le site';
    217217$lang['mail_new_comment_content'] = 'Un nouveau commentaire a été posté sur la galerie. Si vous avez activé la validation des commentaires, il faut d\'abord valider le commentaire dans la zone d\'administration pour le voir apparaître.'."\n\n".'Vous avez accès aux derniers commentaires dans la zone d\'administration.';
     218if (isset($conf))
    218219$lang['about_message'] = '<div style="text-align:center;font-weigh:bold;">Informations sur le PhpWebGallery</div>
    219220<ul>
     
    539540  $lang['help_access'][2] = '2. Sur les pages des permissions (d\'un groupe, d\'utilisateur) la catégorie apparaîtra et vous pourrez autoriser l\'accès ou non.';
    540541  $lang['help_infos'][2] = 'Pour n\'importe quelle question, n\'hésitez pas à consulter le forum ou à y poser une question, sur le site';
     542if (isset($conf))
    541543  $lang['help_infos'][2] = 'Pour n\'importe quelle question, n\'hésitez pas à consulter le <a href="'.$conf['forum_url'].'" style="text-decoration:underline">forum</a> ou à y poser une question, sur le site';
    542544  $lang['step1_err_copy'] = 'Copiez le texte en bleu entre les tirets et collez-le dans le fichier mysql.inc.php qui se trouve dans le répertoire "include" à la base de l\'endroit où vous avez installé PhpWebGallery (le fichier mysql.inc.php ne doit comporter QUE ce qui est en bleu entre les tirets, aucun retour à la ligne ou espace n\'est autorisé)';
  • branches/release-1_3/template/default/style.inc.php

    r57 r274  
    107107      }
    108108      body {';
    109 $image = './theme/'.$user['theme'].'/background.gif';
     109$image = './theme/'.$user['template'].'/background.gif';
    110110if ( @is_file( $image ) )
    111111{
Note: See TracChangeset for help on using the changeset viewer.