Changeset 1319


Ignore:
Timestamp:
May 23, 2006, 11:15:34 PM (18 years ago)
Author:
plg
Message:

bug fixed: many errors reported if your database contains something else
than PhpWebGallery tables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_6/upgrade.php

    r1209 r1319  
    8282  while ($row = mysql_fetch_row($result))
    8383  {
    84     array_push(
    85       $tables,
    86       preg_replace('/^'.PREFIX_TABLE.'/', '', $row[0])
    87       );
     84    if (preg_match('/^'.PREFIX_TABLE.'/', $row[0]))
     85    {
     86      array_push($tables, $row[0]);
     87    }
    8888  }
    8989
     
    103103  {
    104104    $query = '
    105 DESC '.PREFIX_TABLE.$table.'
     105DESC '.$table.'
    106106;';
    107107    $result = mysql_query($query);
     
    162162  $columns_of = get_columns_of($tables);
    163163
    164   if (!in_array('param', $columns_of['config']))
     164  if (!in_array('param', $columns_of[PREFIX_TABLE.'config']))
    165165  {
    166166    // we're in branch 1.3, important upgrade, isn't it?
    167     if (in_array('user_category', $tables))
     167    if (in_array(PREFIX_TABLE.'user_category', $tables))
    168168    {
    169169      $current_release = '1.3.1';
     
    174174    }
    175175  }
    176   else if (!in_array('user_cache', $tables))
     176  else if (!in_array(PREFIX_TABLE.'user_cache', $tables))
    177177  {
    178178    $current_release = '1.4.0';
    179179  }
    180   else if (!in_array('tags', $tables))
     180  else if (!in_array(PREFIX_TABLE.'tags', $tables))
    181181  {
    182182    $current_release = '1.5.0';
Note: See TracChangeset for help on using the changeset viewer.