Changeset 147 for trunk/admin/update.php


Ignore:
Timestamp:
Sep 20, 2003, 11:43:39 PM (21 years ago)
Author:
z0rglub
Message:

If a category with a wrong directory name (accentuated characters) even
exists (from a previous release of PhpWebGallery), a warning message is
displayed but the update goes on

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/update.php

    r130 r147  
    8787          $output.= '<span style="color:red;">"'.$file.'" : ';
    8888          $output.= $lang['update_wrong_dirname'].'</span><br />';
     89          // if the category even exists (from a previous release of
     90          // PhpWebGallery), we keep it in our $subdirs array
     91          $query = 'SELECT id';
     92          $query.= ' FROM '.PREFIX_TABLE.'categories';
     93          $query.= ' WHERE site_id = '.$site_id;
     94          $query.= " AND dir = '".$file."'";
     95          $query.= ' AND id_uppercat';
     96          if ( !is_numeric( $cat_id ) ) $query.= ' IS NULL';
     97          else                          $query.= ' = '.$cat_id;
     98          $query.= ';';
     99          $result = mysql_query( $query );
     100          if ( mysql_num_rows( $result ) != 0 )
     101          {
     102            array_push( $subdirs, $file );
     103          }
    89104        }
    90105      }
Note: See TracChangeset for help on using the changeset viewer.