source: trunk/coverager/config.php.example @ 124

Last change on this file since 124 was 124, checked in by moo, 8 years ago

Chinese translation for coverager

File size: 1.1 KB
Line 
1<?php
2
3// this is an example only
4// write your own config and name it as config.php
5
6// detected by browser
7// $lang = 'en-us';
8
9$charset = "UTF-8";
10
11// developers only
12$show_todo_strings = false;
13
14// $include_paths = array("/www/my-php-project/");
15// $exclude_paths = array("/www/my-php-project/tmp/");
16$syntaxhiglight = true;
17$usecache = false;
18//// $datadir is default to ini_get("xcache.coveragedump_directory")
19// $datadir = '';
20
21function ob_filter_path_nicer($o)
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);
27    return $o;
28}
29
30// implement your auth here if needed
31// {{{ home made login example
32// this is an example only, it's won't work for you without your implemention.
33function check_admin_auth()
34{
35    require("/path/to/user-login-and-permission-lib.php");
36    session_start();
37
38    if (!user_logined()) {
39        if (!ask_the_user_to_login()) {
40            exit;
41        }
42    }
43
44    user_load_permissions();
45    if (!user_is_admin()) {
46        die("Permission denied");
47    }
48
49    return true;
50}
51
52// uncomment:
53// check_admin_auth()
54// }}}
55
56?>
Note: See TracBrowser for help on using the repository browser.