Development

Changeset 2988

You must first sign up to be able to contribute.

Changeset 2988

Show
Ignore:
Timestamp:
12/09/06 12:10:33 (2 years ago)
Author:
fabien
Message:

fastest Windows Detection (closes #1209)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/log/sfLogger/sfFileLogger.class.php

    r2923 r2988  
    3838  public function log($message, $priority, $priorityName) 
    3939  { 
    40     $line = sprintf("%s %s [%s] %s%s", strftime('%b %d %H:%M:%S'), 'symfony', $priorityName, $message, strstr(PHP_OS, 'WIN') ? "\r\n" : "\n"); 
     40    $line = sprintf("%s %s [%s] %s%s", strftime('%b %d %H:%M:%S'), 'symfony', $priorityName, $message, DIRECTORY_SEPARATOR == '\\' ? "\r\n" : "\n"); 
    4141 
    4242    flock($this->fp, LOCK_EX); 
  • trunk/lib/util/sfToolkit.class.php

    r2983 r2988  
    473473  { 
    474474    $path = getenv('PATH') ? getenv('PATH') : getenv('Path'); 
    475     $suffixes = substr(PHP_OS, 0, 3) == 'WIN' ? (getenv('PATHEXT') ? explode(PATH_SEPARATOR, getenv('PATHEXT')) : array('.exe', '.bat', '.cmd', '.com')) : array(''); 
     475    $suffixes = DIRECTORY_SEPARATOR == '\\' ? (getenv('PATHEXT') ? explode(PATH_SEPARATOR, getenv('PATHEXT')) : array('.exe', '.bat', '.cmd', '.com')) : array(''); 
    476476    foreach (array('php5', 'php') as $phpCli) 
    477477    { 
     
    507507  public static function getTmpDir() 
    508508  { 
    509     if (substr(PHP_OS, 0, 3) == 'WIN') 
     509    if (DIRECTORY_SEPARATOR == '\\') 
    510510    { 
    511511      if ($var = isset($_ENV['TEMP']) ? $_ENV['TEMP'] : getenv('TEMP'))