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_sqlite.inc.php

    r5503 r6090  
    6565}
    6666
     67function pwg_db_check_version()
     68{
     69  $current_version = pwg_get_db_version();
     70  if (version_compare($current_version, REQUIRED_SQLITE_VERSION, '<'))
     71  {
     72    fatal_error(
     73      sprintf(
     74        'your database version is too old, you have "%s" and you need at least "%s"',
     75        $current_version,
     76        REQUIRED_SQLITE_VERSION
     77        )
     78      );
     79  }
     80}
     81
    6782function pwg_db_check_charset()
    6883{
Note: See TracChangeset for help on using the changeset viewer.