summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-CompatInfo-4.0.0-pr163.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-01-20 10:43:42 +0100
committerRemi Collet <fedora@famillecollet.com>2015-01-20 10:43:42 +0100
commite168930ed90c92aead83ff2f5ced9733980892d3 (patch)
tree5b05605ae28e3d779a154be9fe46710d83c87743 /php-bartlett-PHP-CompatInfo-4.0.0-pr163.patch
parent0f5c2c3b86b28ebe38e43019aa76a0a479c982c6 (diff)
php-bartlett-PHP-CompatInfo: add patch for DB path
Diffstat (limited to 'php-bartlett-PHP-CompatInfo-4.0.0-pr163.patch')
-rw-r--r--php-bartlett-PHP-CompatInfo-4.0.0-pr163.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/php-bartlett-PHP-CompatInfo-4.0.0-pr163.patch b/php-bartlett-PHP-CompatInfo-4.0.0-pr163.patch
new file mode 100644
index 0000000..710947a
--- /dev/null
+++ b/php-bartlett-PHP-CompatInfo-4.0.0-pr163.patch
@@ -0,0 +1,25 @@
+From 2154b3581ec69bd38bfbc68fe355e6383756ec8f Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Tue, 20 Jan 2015 10:28:07 +0100
+Subject: [PATCH] allow to set compatinfo.sqlite path using
+ BARTLETT_COMPATINFO_DB
+
+---
+ src/Bartlett/CompatInfo/Environment.php | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Bartlett/CompatInfo/Environment.php b/src/Bartlett/CompatInfo/Environment.php
+index e50eec5..c10ef97 100644
+--- a/src/Bartlett/CompatInfo/Environment.php
++++ b/src/Bartlett/CompatInfo/Environment.php
+@@ -22,6 +22,10 @@ class Environment
+ */
+ public static function initRefDb()
+ {
++ if ($database = getenv('BARTLETT_COMPATINFO_DB')) {
++ return new \PDO('sqlite:' . $database);
++ }
++
+ $database = 'compatinfo.sqlite';
+ $tempDir = sys_get_temp_dir() . '/bartlett';
+