summaryrefslogtreecommitdiffstats
path: root/php-bartlett-PHP-CompatInfo-4.0.0-pr163.patch
blob: 710947a95adacbcde5068d560c446c669871c05d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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';