Changeset 255 for branches/1.1/coverager

Show
Ignore:
Timestamp:
10/17/2006 06:30:41 PM (2 years ago)
Author:
moo
Message:
  • fix build on rare arch
  • fix build on Mac OS X
  • merged from trunk: 159,161-162,167-180,182,184,186-187,194
    • [194] PHP_5_2: new element in zend_brk_cont_element
    • [186] [187] fix build on some rare arch
    • [184] fix tplcov
    • [178] fix type processor_t conflict with Mac OS X
Location:
branches/1.1
Files:
5 modified
1 copied

Legend:

Unmodified
Added
Removed
  • branches/1.1

    • Property svnmerge-integrated set to /trunk:1-157,159,161-162,167-180,182,184,186-187,194
  • branches/1.1/coverager/common.php

    r134 r255  
    33function get_language_file_ex($name, $l, $s) 
    44{ 
    5     static $map = array( 
     5    static $lmap = array( 
    66            'zh'    => 'zh-simplified', 
    77            'zh-hk' => 'zh-traditional', 
    88            'zh-tw' => 'zh-traditional', 
    99            ); 
     10    static $smap = array( 
     11            'gbk'     => 'gb2312', 
     12            'gb18030' => 'gb2312', 
     13            ); 
    1014 
    11     if (isset($map[$l])) { 
    12         $l = $map[$l]; 
     15    if (isset($lmap[$l])) { 
     16        $l = $lmap[$l]; 
    1317    } 
    1418    if (file_exists($file = "$name-$l-$s.lang.php")) { 
    1519        return $file; 
     20    } 
     21    if (isset($smap[$s])) { 
     22        $s = $smap[$s]; 
     23        if (file_exists($file = "$name-$l-$s.lang.php")) { 
     24            return $file; 
     25        } 
    1626    } 
    1727    if (file_exists($file = "$name-$l.lang.php")) { 
  • branches/1.1/coverager/config.php.example

    r124 r255  
    2121function ob_filter_path_nicer($o) 
    2222{ 
    23     $o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}/", $o); 
    24     $xcachedir = realpath(dirname(__FILE__) . "/../"); 
    25     $o = str_replace($xcachedir . "/", "{XCache}/", $o); 
    26     $o = str_replace("/home/", "{H}/", $o); 
     23    $sep = DIRECTORY_SEPARATOR; 
     24    $o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}$sep", $o); 
     25    $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep"); 
     26    $o = str_replace($xcachedir . $sep, "{XCache}$sep", $o); 
     27    if ($sep == '/') { 
     28        $o = str_replace("/home/", "{H}/", $o); 
     29    } 
    2730    return $o; 
    2831} 
  • branches/1.1/coverager/coverager.php

    r124 r255  
    6262        $this->path = isset($_GET['path']) ? $_GET['path'] : ''; 
    6363        $this->path = preg_replace('!\.{2,}!', '.', $this->path); 
    64         $this->path = preg_replace('![\\\\/]{2,}!', '/', $this->path); 
     64        $qsep = preg_quote(DIRECTORY_SEPARATOR, '!'); 
     65        $this->path = preg_replace("![\\\\$qsep]{2,}!", DIRECTORY_SEPARATOR, $this->path); 
     66        $this->path = preg_replace("!$qsep$!", '', $this->path); 
    6567        if ($this->path == '/') { 
    6668            $this->path = ''; 
     
    118120            list($tplfile, $tpllines, $tplcov) = $this->loadTplCov($fileinfo['cov'], substr($this->outpath, $this->datadir_len)); 
    119121            if ($tplfile) { 
    120                 $tplcov = sprint_cov($tplinfo['tplcov'], $tpllines); 
     122                $tplcov = sprint_cov($tplcov, $tpllines); 
    121123                unset($tpllines); 
    122124            } 
  • branches/1.1/coverager/coverager.tpl.php

    r145 r255  
    22<html xmlns="http://www.w3.org/1999/xhtml"> 
    33<head> 
    4     <meta http-equiv="Content-Language" content="en-us" /> 
    54<?php 
    65echo <<<HEAD 
     
    6867    global $cycle; 
    6968    if ($info['files'] || $info['todos']) { 
     69        $srcdir .= DIRECTORY_SEPARATOR; 
    7070        $c = $cycle->next(); 
    7171        $srcdir_html = htmlspecialchars($srcdir);