1
1
Fork 0

API is now working on my nginx server.

This commit is contained in:
Michael 2012-02-20 01:53:22 +01:00
commit 0fb22e1284
3 changed files with 24 additions and 12 deletions

View file

@ -309,8 +309,12 @@ class App {
. 'library/phpsec' . PATH_SEPARATOR
. '.' );
if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,2) === "q=")
if((x($_SERVER,'QUERY_STRING')) && substr($_SERVER['QUERY_STRING'],0,2) === "q=") {
$this->query_string = substr($_SERVER['QUERY_STRING'],2);
// removing trailing / - maybe a nginx problem
if (substr($this->query_string, 0, 1) == "/")
$this->query_string = substr($this->query_string, 1);
}
if(x($_GET,'q'))
$this->cmd = trim($_GET['q'],'/\\');