Ignore:
Timestamp:
May 7, 2010, 2:34:56 AM (14 years ago)
Author:
plg
Message:

bug 1648 fixed: add the pwg_db_check_version functions for pdo-sqlite, sqlite
and pgsql, also make the $pwg_db_link global in the install_db_connect function
so that it can be used in SQLite functions.

bug fixed: with pdo-sqlite, pwg_db_num_rows always returns 0, so when
initializing user data, it tries to insert the same row twice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/dblayer/functions_pgsql.inc.php

    r5267 r6090  
    5858  {
    5959    return $link;
     60  }
     61}
     62
     63function pwg_db_check_version()
     64{
     65  $current_version = pwg_get_db_version();
     66  if (version_compare($current_version, REQUIRED_PGSQL_VERSION, '<'))
     67  {
     68    fatal_error(
     69      sprintf(
     70        'your database version is too old, you have "%s" and you need at least "%s"',
     71        $current_version,
     72        REQUIRED_PGSQL_VERSION
     73        )
     74      );
    6075  }
    6176}
Note: See TracChangeset for help on using the changeset viewer.