Skip to content

Commit

Permalink
Fix slashes in paths and URIs
Browse files Browse the repository at this point in the history
  • Loading branch information
drAlberT committed Oct 20, 2016
1 parent a1b95e0 commit b6f9385
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ini_set('log_errors', 1);

define('BASE_DIR', __DIR__.'/httpdocs');
define('BASE_URI', dirname($_SERVER['PHP_SELF']));
define('BASE_URI', rtrim(dirname($_SERVER['PHP_SELF']), '/'));

define('TOOLS_DIR', BASE_DIR.'/tools');
define('TOOLS_URI', BASE_URI.'/tools');
Expand Down
2 changes: 1 addition & 1 deletion httpdocs/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

$tools = array_map(
function ($item) {
return substr($item, strlen(BASE_DIR) + 1 /* trailing slash */);
return substr($item, strlen(BASE_DIR));
},
array_merge(glob(TOOLS_DIR.'/*', GLOB_ONLYDIR), glob(TOOLS_DIR.'/*.php'))
);
Expand Down

0 comments on commit b6f9385

Please sign in to comment.