[Pkg-voip-commits] r3865 - freepbx/trunk/debian/patches
elcuco-guest at alioth.debian.org
elcuco-guest at alioth.debian.org
Tue Jul 31 09:27:37 UTC 2007
Author: elcuco-guest
Date: 2007-07-31 09:27:37 +0000 (Tue, 31 Jul 2007)
New Revision: 3865
Modified:
freepbx/trunk/debian/patches/use-conf-defaults.dpatch
Log:
using entries in /etc/amportal.conf was broken, and when writing the file back the entries were duplicated
Modified: freepbx/trunk/debian/patches/use-conf-defaults.dpatch
===================================================================
--- freepbx/trunk/debian/patches/use-conf-defaults.dpatch 2007-07-30 18:04:18 UTC (rev 3864)
+++ freepbx/trunk/debian/patches/use-conf-defaults.dpatch 2007-07-31 09:27:37 UTC (rev 3865)
@@ -11,7 +11,7 @@
@DPATCH@
diff -urNad upstream~/amp_conf/bin/archive_recordings upstream/amp_conf/bin/archive_recordings
--- upstream~/amp_conf/bin/archive_recordings 2007-05-03 19:31:38.000000000 +0300
-+++ upstream/amp_conf/bin/archive_recordings 2007-06-26 16:40:54.000000000 +0300
++++ upstream/amp_conf/bin/archive_recordings 2007-07-31 12:00:50.000000000 +0300
@@ -39,12 +39,47 @@
}
@@ -73,7 +73,7 @@
diff -urNad upstream~/amp_conf/bin/callback upstream/amp_conf/bin/callback
--- upstream~/amp_conf/bin/callback 2007-05-03 19:31:38.000000000 +0300
-+++ upstream/amp_conf/bin/callback 2007-06-26 16:40:54.000000000 +0300
++++ upstream/amp_conf/bin/callback 2007-07-31 12:00:50.000000000 +0300
@@ -111,12 +111,47 @@
@@ -127,7 +127,7 @@
diff -urNad upstream~/amp_conf/bin/module_admin upstream/amp_conf/bin/module_admin
--- upstream~/amp_conf/bin/module_admin 2007-05-03 19:31:38.000000000 +0300
-+++ upstream/amp_conf/bin/module_admin 2007-06-26 16:40:54.000000000 +0300
++++ upstream/amp_conf/bin/module_admin 2007-07-31 12:00:50.000000000 +0300
@@ -42,12 +42,47 @@
@@ -181,7 +181,7 @@
diff -urNad upstream~/amp_conf/bin/retrieve_conf upstream/amp_conf/bin/retrieve_conf
--- upstream~/amp_conf/bin/retrieve_conf 2007-05-14 16:21:31.000000000 +0300
-+++ upstream/amp_conf/bin/retrieve_conf 2007-06-26 16:40:54.000000000 +0300
++++ upstream/amp_conf/bin/retrieve_conf 2007-07-31 12:00:50.000000000 +0300
@@ -40,30 +40,47 @@
@@ -248,8 +248,8 @@
diff -urNad upstream~/install_amp upstream/install_amp
--- upstream~/install_amp 2007-06-09 04:55:31.000000000 +0300
-+++ upstream/install_amp 2007-06-26 16:43:25.000000000 +0300
-@@ -103,26 +103,47 @@
++++ upstream/install_amp 2007-07-31 12:01:53.000000000 +0300
+@@ -103,24 +103,41 @@
}
function install_parse_amportal_conf($filename) {
@@ -261,6 +261,7 @@
+ 'USECATEGORIES' => true,
+ 'ASTETCDIR' => '/etc/asterisk',
+ 'ASTMANAGERPORT' => '5038',
++// 'AMPDBFILE' => "/var/lib/freepbx/freepbx.sqlite" <- only for sqlite3 engines
+ );
+ // boolean values, will be converted to true/false
+ // "yes", "true", 1 (case-insensitive) will be treated as true, everything else is false
@@ -302,11 +303,14 @@
+ $conf[$key] = isset($conf[$key]) && ($conf[$key] === true || strtolower($conf[$key]) == 'true' || $conf[$key] === 1 || $conf[$key] == '1' || strtolower($conf[$key]) == 'yes');
}
-+/*
-+ if (($amp_conf["AMPDBENGINE"] == "sqlite") && (!isset($amp_conf["AMPDBENGINE"])))
-+ $amp_conf["AMPDBFILE"] = "/var/lib/freepbx/freepbx.sqlite";
-+*/
-+
return $conf;
- }
-
+@@ -162,7 +179,8 @@
+ $file = file($filename);
+ // parse through the file
+ foreach (array_keys($file) as $key) {
+- if (preg_match("/^\s*([a-zA-Z0-9]+)\s*=\s*(.*)\s*([;#].*)?/",$file[$key],$matches)) {
++// if (preg_match("/^\s*([a-zA-Z0-9_]+)\s*=\s*(.*)\s*([;#].*)?/",$file[$key],$matches)) {
++ if (preg_match("/^\s*([a-zA-Z0-9_]+)\s*=\s*([a-zA-Z0-9 .&-@=_<>\"\']+)\s*$/",$line,$matches)) {
+ // this is an option=value line
+ if (isset($conf[ $matches[1] ])) {
+ // rewrite the line, if we have this in $conf
More information about the Pkg-voip-commits
mailing list