aboutsummaryrefslogtreecommitdiff
path: root/models/openid-php-openid-782224d/admin/adminutil.php
blob: 73898386696f5e24db095975d0729bd987b6c208 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

/**
 * Add a directory to the include path
 *
 * @param dir: The directory to add to the path
 * @param at_start: If true, place this directory at the beginning of
 * the include path. Otherwise, place it at the end.
 */
function includeAdd($dir, $at_start=false)
{
    $path = ini_get('include_path');
    if (strlen($path)) {
        $newpath = $at_start ? "$dir:$path" : "$path:$dir";
    } else {
        $newpath = $dir;
    }

    ini_set('include_path', $newpath);
}

/**
 * Return the parent directory of this module.
 */
function getParent()
{
    return dirname(dirname(realpath(__FILE__)));
}

?>