Show
Ignore:
Timestamp:
10/11/2006 07:42:41 AM (7 years ago)
Author:
moo
Message:

trunk->1.0: merged coverager

  • [184] fix tplcov
  • [176] leaked by outfilename (efree by zend_mm tho)
  • [175] remove double Content-Language
  • [174] avoid double slash
  • [173] make dir ended with dir sep
  • [172] DIRECTORY_SEPARATOR for coverager config example
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.0/coverager/coverager.php

    r33 r240  
    5858        $this->path = isset($_GET['path']) ? $_GET['path'] : ''; 
    5959        $this->path = preg_replace('!\.{2,}!', '.', $this->path); 
    60         $this->path = preg_replace('![\\\\/]{2,}!', '/', $this->path); 
     60        $qsep = preg_quote(DIRECTORY_SEPARATOR, '!'); 
     61        $this->path = preg_replace("![\\\\$qsep]{2,}!", DIRECTORY_SEPARATOR, $this->path); 
     62        $this->path = preg_replace("!$qsep$!", '', $this->path); 
    6163        if ($this->path == '/') { 
    6264            $this->path = ''; 
     
    114116            list($tplfile, $tpllines, $tplcov) = $this->loadTplCov($fileinfo['cov'], substr($this->outpath, $this->datadir_len)); 
    115117            if ($tplfile) { 
    116                 $tplcov = sprint_cov($tplinfo['tplcov'], $tpllines); 
     118                $tplcov = sprint_cov($tplcov, $tpllines); 
    117119                unset($tpllines); 
    118120            }