source: branches/1.1/coverager/config.php.example @ 255

Last change on this file since 255 was 255, checked in by moo, 8 years ago
  • 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
File size: 1.2 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    $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    }
30    return $o;
31}
32
33// implement your auth here if needed
34// {{{ home made login example
35// this is an example only, it's won't work for you without your implemention.
36function check_admin_auth()
37{
38    require("/path/to/user-login-and-permission-lib.php");
39    session_start();
40
41    if (!user_logined()) {
42        if (!ask_the_user_to_login()) {
43            exit;
44        }
45    }
46
47    user_load_permissions();
48    if (!user_is_admin()) {
49        die("Permission denied");
50    }
51
52    return true;
53}
54
55// uncomment:
56// check_admin_auth()
57// }}}
58
59?>
Note: See TracBrowser for help on using the repository browser.