function demo_get_info in Demonstration site (Sandbox / Snapshot) 5
Same name and namespace in other branches
- 8 demo.module \demo_get_info()
- 6 demo.admin.inc \demo_get_info()
- 7 demo.admin.inc \demo_get_info()
3 calls to demo_get_info()
- demo_get_dumps in ./
demo.admin.inc - demo_reset in ./
demo.admin.inc - demo_set_info in ./
demo.admin.inc
File
- ./
demo.admin.inc, line 399 - Demonstration Site administrative pages
Code
function demo_get_info($filename, $field = NULL) {
$info = array();
if (file_exists($filename)) {
$info = parse_ini_file($filename);
if (isset($info['modules'])) {
$info['modules'] = explode(" ", $info['modules']);
}
else {
$info['modules'] = NULL;
}
if (!isset($info['version'])) {
$info['version'] = '1.0';
}
}
if (isset($field)) {
return isset($info[$field]) ? $info[$field] : NULL;
}
else {
return $info;
}
}