Changeset 3662

Show
Ignore:
Timestamp:
01/28/07 05:46:05 (2 years ago)
Author:
diego_iastrubni
Message:

support for sqlite3. WIP.

SUBSTRING is not working for example. great.
The AUTOINCREMENT syntax we use in the newinstall.sql is broken. great
Some other things are broken here and there, I will try and find them all...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/amp_conf/htdocs/admin/common/db_connect.php

    r2086 r3662  
    4949                $db->connect( $DSN ); 
    5050                break; 
     51 
     52        case "sqlite3": 
     53                if (!isset($amp_conf["AMPDBFILE"])) 
     54                        die("You must setup properly AMPDBFILE in /etc/amportal.conf"); 
     55 
     56                if (isset($amp_conf["AMPDBFILE"]) == "") 
     57                        die("AMPDBFILE in /etc/amportal.conf cannot be blank"); 
     58 
     59                require_once('DB/sqlite3.php'); 
     60                $datasource = "sqlite3:///" . $amp_conf["AMPDBFILE"] . "?mode=0666"; 
     61                $db = DB::connect($datasource); 
     62                break; 
    5163         
    5264        default: 
  • freepbx/trunk/amp_conf/htdocs/admin/modules/core/functions.inc.php

    r3659 r3662  
    14881488        global $amp_conf; 
    14891489         
    1490         if ( $amp_conf["AMPDBENGINE"] == "sqlite"
     1490        if ( ($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")
    14911491        { 
    14921492                // TODO: sqlite work arround - diego  
     
    17571757        global $amp_conf; 
    17581758         
    1759         if ( $amp_conf["AMPDBENGINE"] == "sqlite"
     1759        if ( ($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")
    17601760        { 
    17611761                // TODO: sqlite work arround - diego 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads