#die(print_r(pathinfo('~/.gitconfig'),true));
#die(file_exists(realpath('~/.gitconfig')) ? 'yes' : 'no');
$CONF['_rent'] = array(
- 'Title' => 'Rent',
+ 'title' => 'Rent',
'notice' => 'Micro foncier 4BE',
'default_table' => 'rent',
'order' => 5,
'pdo' => 'sqlite:/opt/rent/rent.db',
'_import' => '_rent',
+ 'title' => 'DEV '.$CONF['_rent']['title']
);
+0 && bye([
+ fileowner(!empty($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : __FILE__),
+]);
return 1;
function untilde($path) {
if (!function_exists('posix_getuid')) return $path;
return preg_replace_callback('/^(~)(\w+)?/',function($m){
- if (!empty($m[2])) return str_replace($m[2],posix_getpwnam('nico')['dir'],$m[0]);
+
+ $uid = fileowner(!empty($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : __FILE__);
+ if (!empty($m[2])) return str_replace($m[2],posix_getpwnam($uid)['dir'],$m[0]);
+
return str_replace($m[1],posix_getpwuid(posix_getuid())['dir'],$m[0]);
},$path);
}