[Pkg-voip-commits] r3146 - freepbx/trunk/debian/patches
Diego Iastrubni
elcuco-guest at alioth.debian.org
Tue Feb 13 16:19:38 CET 2007
Author: elcuco-guest
Date: 2007-02-13 16:19:38 +0100 (Tue, 13 Feb 2007)
New Revision: 3146
Modified:
freepbx/trunk/debian/patches/add-sqlite3-support.dpatch
Log:
update the sqlite3 patch - core module works now
Modified: freepbx/trunk/debian/patches/add-sqlite3-support.dpatch
===================================================================
--- freepbx/trunk/debian/patches/add-sqlite3-support.dpatch 2007-02-13 14:49:40 UTC (rev 3145)
+++ freepbx/trunk/debian/patches/add-sqlite3-support.dpatch 2007-02-13 15:19:38 UTC (rev 3146)
@@ -7,7 +7,7 @@
@DPATCH@
diff -urNad upstream~/amp_conf/bin/retrieve_conf upstream/amp_conf/bin/retrieve_conf
--- upstream~/amp_conf/bin/retrieve_conf 2007-01-04 02:48:29.000000000 +0200
-+++ upstream/amp_conf/bin/retrieve_conf 2007-02-12 12:50:57.000000000 +0200
++++ upstream/amp_conf/bin/retrieve_conf 2007-02-12 17:05:40.000000000 +0200
@@ -223,6 +223,18 @@
$db->connect( $DSN );
break;
@@ -29,7 +29,7 @@
}
diff -urNad upstream~/amp_conf/bin/retrieve_iax_conf_from_mysql.pl upstream/amp_conf/bin/retrieve_iax_conf_from_mysql.pl
--- upstream~/amp_conf/bin/retrieve_iax_conf_from_mysql.pl 2006-11-27 04:53:24.000000000 +0200
-+++ upstream/amp_conf/bin/retrieve_iax_conf_from_mysql.pl 2007-02-12 12:52:09.000000000 +0200
++++ upstream/amp_conf/bin/retrieve_iax_conf_from_mysql.pl 2007-02-12 17:05:40.000000000 +0200
@@ -60,6 +60,15 @@
my $db_file = $ampconf->{"AMPDBFILE"};
$dbh = DBI->connect("dbi:SQLite2:dbname=$db_file","","");
@@ -47,8 +47,8 @@
# Load the 'register' lines into iax_registrations.conf
diff -urNad upstream~/amp_conf/bin/retrieve_op_conf_from_mysql.pl upstream/amp_conf/bin/retrieve_op_conf_from_mysql.pl
---- upstream~/amp_conf/bin/retrieve_op_conf_from_mysql.pl 2007-02-12 12:50:56.000000000 +0200
-+++ upstream/amp_conf/bin/retrieve_op_conf_from_mysql.pl 2007-02-12 12:52:17.000000000 +0200
+--- upstream~/amp_conf/bin/retrieve_op_conf_from_mysql.pl 2007-02-12 17:05:40.000000000 +0200
++++ upstream/amp_conf/bin/retrieve_op_conf_from_mysql.pl 2007-02-12 17:05:40.000000000 +0200
@@ -178,6 +178,15 @@
my $db_file = $ampconf->{"AMPDBFILE"};
$dbh = DBI->connect("dbi:SQLite2:dbname=$db_file","","");
@@ -67,7 +67,7 @@
print EXTEN $warning_banner;
diff -urNad upstream~/amp_conf/bin/retrieve_queues_conf_from_mysql.pl upstream/amp_conf/bin/retrieve_queues_conf_from_mysql.pl
--- upstream~/amp_conf/bin/retrieve_queues_conf_from_mysql.pl 2006-11-27 04:53:24.000000000 +0200
-+++ upstream/amp_conf/bin/retrieve_queues_conf_from_mysql.pl 2007-02-12 12:52:29.000000000 +0200
++++ upstream/amp_conf/bin/retrieve_queues_conf_from_mysql.pl 2007-02-12 17:05:40.000000000 +0200
@@ -56,6 +56,15 @@
my $db_file = $ampconf->{"AMPDBFILE"};
$dbh = DBI->connect("dbi:SQLite2:dbname=$db_file","","");
@@ -86,7 +86,7 @@
my $result = $dbh->selectall_arrayref($statement);
diff -urNad upstream~/amp_conf/bin/retrieve_sip_conf_from_mysql.pl upstream/amp_conf/bin/retrieve_sip_conf_from_mysql.pl
--- upstream~/amp_conf/bin/retrieve_sip_conf_from_mysql.pl 2006-11-27 04:53:24.000000000 +0200
-+++ upstream/amp_conf/bin/retrieve_sip_conf_from_mysql.pl 2007-02-12 12:52:35.000000000 +0200
++++ upstream/amp_conf/bin/retrieve_sip_conf_from_mysql.pl 2007-02-12 17:05:40.000000000 +0200
@@ -60,6 +60,15 @@
my $db_file = $ampconf->{"AMPDBFILE"};
$dbh = DBI->connect("dbi:SQLite2:dbname=$db_file","","");
@@ -105,7 +105,7 @@
my $result = $dbh->selectall_arrayref($statement);
diff -urNad upstream~/amp_conf/bin/retrieve_zap_conf_from_mysql.pl upstream/amp_conf/bin/retrieve_zap_conf_from_mysql.pl
--- upstream~/amp_conf/bin/retrieve_zap_conf_from_mysql.pl 2006-11-27 04:53:24.000000000 +0200
-+++ upstream/amp_conf/bin/retrieve_zap_conf_from_mysql.pl 2007-02-12 12:52:39.000000000 +0200
++++ upstream/amp_conf/bin/retrieve_zap_conf_from_mysql.pl 2007-02-12 17:05:40.000000000 +0200
@@ -61,6 +61,15 @@
my $db_file = $ampconf->{"AMPDBFILE"};
$dbh = DBI->connect("dbi:SQLite2:dbname=$db_file","","");
@@ -124,7 +124,7 @@
my $result = $dbh->selectall_arrayref($statement);
diff -urNad upstream~/amp_conf/htdocs/admin/common/db_connect.php upstream/amp_conf/htdocs/admin/common/db_connect.php
--- upstream~/amp_conf/htdocs/admin/common/db_connect.php 2006-06-25 13:37:15.000000000 +0300
-+++ upstream/amp_conf/htdocs/admin/common/db_connect.php 2007-02-12 12:50:57.000000000 +0200
++++ upstream/amp_conf/htdocs/admin/common/db_connect.php 2007-02-12 17:05:40.000000000 +0200
@@ -49,6 +49,18 @@
$db->connect( $DSN );
break;
@@ -146,7 +146,7 @@
}
diff -urNad upstream~/amp_conf/htdocs/admin/modules/core/functions.inc.php upstream/amp_conf/htdocs/admin/modules/core/functions.inc.php
--- upstream~/amp_conf/htdocs/admin/modules/core/functions.inc.php 2007-01-03 03:33:31.000000000 +0200
-+++ upstream/amp_conf/htdocs/admin/modules/core/functions.inc.php 2007-02-12 12:50:57.000000000 +0200
++++ upstream/amp_conf/htdocs/admin/modules/core/functions.inc.php 2007-02-12 17:07:36.000000000 +0200
@@ -1411,7 +1411,7 @@
global $db;
global $amp_conf;
@@ -165,9 +165,31 @@
{
// TODO: sqlite work arround - diego
$results = sql("SELECT DISTINCT context FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context ","getAll");
+@@ -1806,13 +1806,19 @@
+ die($result->getMessage(). $sql);
+ }
+ }
+-
+- $sql = "SELECT DISTINCT SUBSTRING(context,7) FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context ";
++
++ if ( $amp_conf["AMPDBENGINE"] != "sqlite3")
++ $sql = "SELECT DISTINCT SUBSTRING(context,7) FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context ";
++ else
++ $sql = "SELECT DISTINCT context FROM extensions WHERE context LIKE 'outrt-%' ORDER BY context ";
++
+ // we SUBSTRING() to remove "outrt-"
+ $routepriority = $db->getAll($sql);
+ if(DB::IsError($routepriority)) {
+ die($routepriority->getMessage());
+ }
++
++ // TODO: strip the context on the sqlite3 backend
+ return ($routepriority);
+
+ }
diff -urNad upstream~/install_amp upstream/install_amp
---- upstream~/install_amp 2007-02-12 12:50:56.000000000 +0200
-+++ upstream/install_amp 2007-02-12 12:50:57.000000000 +0200
+--- upstream~/install_amp 2007-02-12 17:05:40.000000000 +0200
++++ upstream/install_amp 2007-02-12 17:05:40.000000000 +0200
@@ -424,7 +424,8 @@
if ( (strtolower(substr($file,-4)) == ".sqlite") && ($db_engine == "sqlite") ) {
install_sqlupdate( $version, $file );
More information about the Pkg-voip-commits
mailing list