Show
Ignore:
Timestamp:
02/12/07 09:07:47 (6 years ago)
Author:
diego_iastrubni
Message:

sqlite2 -> out
sqlite3 -> in

freepbx 2.3 will only support sqlite3. I will start making the newinstall.sql work on mysql and sqlite3, if anyone wants to make it work with pgsql:

it should work.
i don't know pgsql.
you fix it.

expect things to be broken. :)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk/install_amp

    r3771 r3778  
    431431          install_sqlupdate( $version, $file ); 
    432432        } 
    433         elseif ((strtolower(substr($file,-4)) == ".sql") && ( ($db_engine  == "mysql")  ||  ($db_engine  == "pgsql")) ) { 
     433        elseif ((strtolower(substr($file,-4)) == ".sql") &&  
     434            ( ($db_engine  == "mysql")  ||  ($db_engine  == "pgsql") || ($db_engine == "sqlite3") ) ) { 
    434435          install_sqlupdate( $version, $file ); 
    435436        } 
     
    979980    break; 
    980981   
     982  case "sqlite3": 
     983    if (!isset($amp_conf["AMPDBFILE"])) 
     984      die("You must setup properly AMPDBFILE in /etc/amportal.conf"); 
     985       
     986    if (isset($amp_conf["AMPDBFILE"]) == "") 
     987      die("AMPDBFILE in /etc/amportal.conf cannot be blank"); 
     988 
     989    require_once('DB/sqlite3.php'); 
     990    $datasource = "sqlite3:///" . $amp_conf["AMPDBFILE"] . "?mode=0666"; 
     991    $db = DB::connect($datasource); 
     992    break; 
     993 
    981994  default: 
    982995    die( "Unknown SQL engine: [$db_engine]");