Changeset 926

Show
Ignore:
Timestamp:
06/25/2012 10:55:03 AM (11 months ago)
Author:
moo
Message:

improve path nicer to handle win32 DOCUMENT_ROOT

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/admin/common.php

    r902 r926  
    100100    $sep = DIRECTORY_SEPARATOR; 
    101101    $docRoot = $_SERVER['DOCUMENT_ROOT']; 
     102    if ($sep != '/') { 
     103        $docRoot = str_replace('/', $sep, $docRoot); 
     104    } 
    102105    $list_html = str_replace($docRoot,  "{DOCROOT}" . (substr($docRoot, -1) == $sep ? $sep : ""), $list_html); 
    103106    $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep");