]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
fix #1078
authorThomas Citharel <tcit@tcit.fr>
Fri, 13 Feb 2015 16:13:11 +0000 (17:13 +0100)
committerThomas Citharel <tcit@tcit.fr>
Fri, 13 Feb 2015 16:13:11 +0000 (17:13 +0100)
install/index.php
install/install_functions.php

index 0d3977bb7255af4eeef941ed41ba38a16090f2ca..46638f8f02331c4391412c084d67dce25cf28ce3 100755 (executable)
@@ -522,8 +522,16 @@ border: 1px solid #000;
                             <tr class="<?php echo ($status['allow_url_fopen']) ? 'enabled' : 'disabled'; ?>">
                                 <td><a href="http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen">allow_url_fopen</a></td>
                                 <td>Enabled</td>
-                                <?php echo ($status['allow_url_fopen']) ? '<td class="good">Enabled' : '<td class="bad">Disabled'; ?></td>
-                                <td><?php echo ($status['allow_url_fopen']) ? '<strong>allow_url_fopen:</strong> You have allow_url_fopen enabled.' : '<strong>allow_url_fopen:</strong> Your PHP configuration has allow_url_fopen disabled.  <strong>' . $status['app_name'] . ' will not work here.</strong>' ?></td>
+                                <?php if ($status['allow_url_fopen']) { ?>
+                                <td class="good">Enabled</td>
+                                <td><strong>allow_url_fopen:</strong> You have allow_url_fopen enabled.
+                                <?php } elseif ($status['curl']) { ?>
+                                <td class="pass">Disabled</td>
+                                <td><strong>allow_url_fopen</strong> is disabled, but curl is supported, so it should be ok.</td>
+                                <?php } else { ?>
+                                <td class="bad">Disabled</td>
+                                <td><strong>allow_url_fopen:</strong> Your PHP configuration has allow_url_fopen disabled.
+                                <strong><?php echo $status['app_name']; ?>  will not work here.</strong><?php } ?></td>
                             </tr>
                             <tr class="<?php echo ($status['gettext']) ? 'enabled' : 'disabled'; ?>">
                                 <td><a href="http://php.net/manual/en/book.gettext.php">gettext</a></td>
index 4a18d7d868ea92b9d0fda685d579eda529eb7da8..a483056952392af012be926dabbb551b2604ed5e 100644 (file)
@@ -28,6 +28,7 @@ $gettext_ok = function_exists("gettext");
 $gd_ok = extension_loaded('gd');
 $pdo_drivers = pdoDrivers();
 $pdo_drivers_passing = $pdo_drivers['sqlite'] || $pdo_drivers['mysql'] || $pdo_drivers['postgres'];
+$urlfetching = $curl_ok || $allow_url_fopen_ok;
 
 
 
@@ -46,7 +47,7 @@ $status = array('app_name' => $app_name, 'php' => $php_ok, 'pdo' => $pdo_ok,
   'pdo_drivers_passing' => $pdo_drivers_passing, 'xml' => $xml_ok, 'pcre' => $pcre_ok,
   'zlib' => $zlib_ok, 'mbstring' => $mbstring_ok, 'dom' => $dom_ok, 'iconv' => $iconv_ok, 'tidy' => $tidy_ok, 'curl' => $curl_ok,
    'parse_ini' => $parse_ini_ok, 'parallel' => $parallel_ok, 'allow_url_fopen' => $allow_url_fopen_ok, 'filter' => $filter_ok,
-    'gettext' => $gettext_ok, 'gd' => $gd_ok);
+    'gettext' => $gettext_ok, 'gd' => $gd_ok, 'urlfetching' => $urlfetching);
 
 return $status;
 }
@@ -56,7 +57,7 @@ function isOkay() {
 
 function isPassing() {
        $status = status();
-       unset($status['curl'], $status['parallel'], $status['tidy'], $status['gd'], $status['filter']);
+       unset($status['curl'], $status['parallel'], $status['tidy'], $status['gd'], $status['filter'], $status['allow_url_fopen']);
        return !in_array(false, $status);
 }