]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Split up check_setup.php into two files. The new file check_essentials.php takes... 780/head
authorMarc Wilhelm <marc@suxez.com>
Tue, 22 Jul 2014 09:52:18 +0000 (11:52 +0200)
committerMarc Wilhelm <marc@suxez.com>
Tue, 22 Jul 2014 09:52:18 +0000 (11:52 +0200)
check_essentials.php [new file with mode: 0644]
check_setup.php
index.php

diff --git a/check_essentials.php b/check_essentials.php
new file mode 100644 (file)
index 0000000..a47cd5a
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+// PHP 5.3 minimum
+if (version_compare(PHP_VERSION, '5.3.3', '<')) {
+    die('This software require PHP 5.3.3 minimum');
+}
+
+// Short tags must be enabled for PHP < 5.4
+if (version_compare(PHP_VERSION, '5.4.0', '<')) {
+
+    if (! ini_get('short_open_tag')) {
+        die('This software require to have short tags enabled, check your php.ini => "short_open_tag = On"');
+    }
+}
\ No newline at end of file
index 2b84a7440d358d486e98119b2f23ee7396b076d2..7e378b1537ee0b6e0c1a3fc5d84c43919f60ce05 100644 (file)
@@ -1,25 +1,12 @@
 <?php
 
-// PHP 5.3 minimum
-if (version_compare(PHP_VERSION, '5.3.3', '<')) {
-    die('This software require PHP 5.3.3 minimum');
-}
-
-// Short tags must be enabled for PHP < 5.4
-if (version_compare(PHP_VERSION, '5.4.0', '<')) {
-
-    if (! ini_get('short_open_tag')) {
-        die('This software require to have short tags enabled, check your php.ini => "short_open_tag = On"');
-    }
-}
-
 // Check if /cache is writeable
 if (! is_writable('cache')) {
     die('The directory "cache" must be writeable by your web server user');
 }
 
 // Check if /db is writeable
-if (! is_writable('db')) {
+if (! is_writable('db') && STORAGE === 'sqlite') {
     die('The directory "db" must be writeable by your web server user');
 }
 
index 481841ece69067d1e971caff7f52cd2dff5c5fc2..cce10b50215d85710d4b19a8c4f042980b00c9de 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -9,8 +9,9 @@
  */
 
 define ('POCHE', '1.7.1');
-require 'check_setup.php';
+require 'check_essentials.php';
 require_once 'inc/poche/global.inc.php';
+require 'check_setup.php';
 
 # Set error reporting level
 if (defined('ERROR_REPORTING')) {