Browse Source

Merge branch 'master' into pico-1.1

Conflicts:
	lib/Pico.php
Daniel Rudolf 8 năm trước cách đây
mục cha
commit
3e88c58ce0
2 tập tin đã thay đổi với 9 bổ sung2 xóa
  1. 1 1
      README.md
  2. 8 1
      lib/Pico.php

+ 1 - 1
README.md

@@ -3,7 +3,7 @@ Pico
 
 [![License](https://picocms.github.io/badges/pico-license.svg)](https://github.com/picocms/Pico/blob/master/LICENSE.md)
 [![Version](https://picocms.github.io/badges/pico-version.svg)](https://github.com/picocms/Pico/releases/latest)
-[![Build Status](https://api.travis-ci.org/picocms/Pico.svg)](https://travis-ci.org/picocms/Pico)
+[![Build Status](https://api.travis-ci.org/picocms/Pico.svg?branch=master)](https://travis-ci.org/picocms/Pico)
 [![Freenode IRC Webchat](https://picocms.github.io/badges/pico-chat.svg)](https://webchat.freenode.net/?channels=%23picocms)
 
 Pico is a stupidly simple, blazing fast, flat file CMS.

+ 8 - 1
lib/Pico.php

@@ -1830,7 +1830,14 @@ class Pico
             return $urlRewritingEnabled;
         }
 
-        $this->config['rewrite_url'] = (isset($_SERVER['PICO_URL_REWRITING']) && $_SERVER['PICO_URL_REWRITING']);
+        if (isset($_SERVER['PICO_URL_REWRITING'])) {
+            $this->config['rewrite_url'] = (bool) $_SERVER['PICO_URL_REWRITING'];
+        } elseif (isset($_SERVER['REDIRECT_PICO_URL_REWRITING'])) {
+            $this->config['rewrite_url'] = (bool) $_SERVER['REDIRECT_PICO_URL_REWRITING'];
+        } else {
+            $this->config['rewrite_url'] = false;
+        }
+
         return $this->config['rewrite_url'];
     }