source: branches/1.3/coverager/config.php.example @ 604

Last change on this file since 604 was 604, checked in by moo, 5 years ago

set svn:eol-style to native

  • Property svn:eol-style set to native
File size: 1.2 KB
RevLine 
[33]1<?php
2
[124]3// this is an example only
4// write your own config and name it as config.php
[33]5
[124]6// detected by browser
7// $lang = 'en-us';
8
[33]9$charset = "UTF-8";
[124]10
11// developers only
12$show_todo_strings = false;
13
[33]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{
[172]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    }
[33]30    return $o;
31}
32
[124]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
[33]59?>
Note: See TracBrowser for help on using the repository browser.