Changeset 255 for branches/1.1/coverager
- Timestamp:
- 10/17/2006 06:30:41 PM (2 years ago)
- Location:
- branches/1.1
- Files:
-
- 5 modified
- 1 copied
-
. (modified) (1 prop)
-
coverager/common-zh-simplified-gb2312.lang.php (copied) (copied from trunk/coverager/common-zh-simplified-gb2312.lang.php)
-
coverager/common.php (modified) (1 diff)
-
coverager/config.php.example (modified) (1 diff)
-
coverager/coverager.php (modified) (2 diffs)
-
coverager/coverager.tpl.php (modified) (2 diffs)
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 3 3 function get_language_file_ex($name, $l, $s) 4 4 { 5 static $ map = array(5 static $lmap = array( 6 6 'zh' => 'zh-simplified', 7 7 'zh-hk' => 'zh-traditional', 8 8 'zh-tw' => 'zh-traditional', 9 9 ); 10 static $smap = array( 11 'gbk' => 'gb2312', 12 'gb18030' => 'gb2312', 13 ); 10 14 11 if (isset($ map[$l])) {12 $l = $ map[$l];15 if (isset($lmap[$l])) { 16 $l = $lmap[$l]; 13 17 } 14 18 if (file_exists($file = "$name-$l-$s.lang.php")) { 15 19 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 } 16 26 } 17 27 if (file_exists($file = "$name-$l.lang.php")) { -
branches/1.1/coverager/config.php.example
r124 r255 21 21 function ob_filter_path_nicer($o) 22 22 { 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 } 27 30 return $o; 28 31 } -
branches/1.1/coverager/coverager.php
r124 r255 62 62 $this->path = isset($_GET['path']) ? $_GET['path'] : ''; 63 63 $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); 65 67 if ($this->path == '/') { 66 68 $this->path = ''; … … 118 120 list($tplfile, $tpllines, $tplcov) = $this->loadTplCov($fileinfo['cov'], substr($this->outpath, $this->datadir_len)); 119 121 if ($tplfile) { 120 $tplcov = sprint_cov($tpl info['tplcov'], $tpllines);122 $tplcov = sprint_cov($tplcov, $tpllines); 121 123 unset($tpllines); 122 124 } -
branches/1.1/coverager/coverager.tpl.php
r145 r255 2 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 3 <head> 4 <meta http-equiv="Content-Language" content="en-us" />5 4 <?php 6 5 echo <<<HEAD … … 68 67 global $cycle; 69 68 if ($info['files'] || $info['todos']) { 69 $srcdir .= DIRECTORY_SEPARATOR; 70 70 $c = $cycle->next(); 71 71 $srcdir_html = htmlspecialchars($srcdir);

