Skip to content

Commit

Permalink
Makes AJAP work with cli (dirty way).
Browse files Browse the repository at this point in the history
  • Loading branch information
jaubourg committed Apr 20, 2012
1 parent fb2822a commit 6cfff09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/AJAP/AjapFileHelper.php
Expand Up @@ -45,8 +45,10 @@ public static function safe_dirname($path) {

public static function PHP_SELF_dirname() {
global $_SERVER;
return ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://')
.$_SERVER['HTTP_HOST'].AjapFileHelper::safe_dirname($_SERVER['PHP_SELF']);
return
( isset( $_SERVER[ "HTTPS" ] ) ? ( $_SERVER[ "HTTPS" ] == "on" ? "https://" : "http://" ) : "" )
.( isset( $_SERVER[ "HTTP_HOST" ] ) ? $_SERVER[ "HTTP_HOST" ] : "" )
.AjapFileHelper::safe_dirname( $_SERVER[ "PHP_SELF" ] );
}

private static function &getDirectories(&$path) {
Expand Down

0 comments on commit 6cfff09

Please sign in to comment.