diff options
Diffstat (limited to 'models/openid-php-openid-782224d/admin/adminutil.php')
-rw-r--r-- | models/openid-php-openid-782224d/admin/adminutil.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/models/openid-php-openid-782224d/admin/adminutil.php b/models/openid-php-openid-782224d/admin/adminutil.php new file mode 100644 index 000000000..738983866 --- /dev/null +++ b/models/openid-php-openid-782224d/admin/adminutil.php @@ -0,0 +1,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__))); +} + +?>
\ No newline at end of file |