]> git.nbdom.net Git - nb.git/commitdiff
Bed
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 24 Jun 2016 00:08:22 +0000 (01:08 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 24 Jun 2016 00:08:22 +0000 (01:08 +0100)
etc/dbs/rent.php

index 9d2c81e3dfb277a116aac97dda3e88e7984e1895..6c890e71d0cc71db601faed11ebbc63df6461d83 100644 (file)
@@ -4,7 +4,7 @@
 #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',
 
@@ -63,14 +63,21 @@ $CONF['rent'] = array (
   '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);
 }