function _configDataObjectsCache()
{
// cli works under different users... it may cause problems..
+
$this->debug(__METHOD__);
+
+ if ($this->database === false) {
+ return;
+ }
+
if (function_exists('posix_getpwuid')) {
$uinfo = posix_getpwuid( posix_getuid () );
$user = $uinfo['name'];
$iniCache = ini_get('session.save_path') .'/' .
- 'dbcfg-' . $user . '/'. str_replace('/', '_', $this->project) ;
+ 'dbcfg-' . $user . '/'. str_replace('/', '_', $this->project);
if ($this->appNameShort) {
if ($this->version) {
$iniCache .= '.' . $this->version;
}
- if ($this->database === false) {
- return;
- }
+
$dburl = parse_url($this->database);
if (!empty($dburl['path'])) {
$this->dataObjectsOriginalIni = $this->DB_DataObject[$dbini];
///print_r($this->DB_DataObject);exit;
}
- //
-
-
-
+
+
$this->DB_DataObject[$dbini] = $iniCache;
// we now have the configuration file name..
$iniCache = $this->DB_DataObject[$dbini];
$this->debug('generateDataobjectsCache:' .dirname($iniCache).'/*.ini');
- if ($force && file_exists($iniCache)) {
-
+
+ $replace = array();
+
+ if (file_exists($iniCache)) {
$files = glob(dirname($iniCache).'/*.ini');
foreach($files as $f) {
- unlink($f);
+ $replace[$f] = md5(file_get_contents($f)); // hash it..
+
}
- clearstatcache();
}
$this->debug('generateDataobjectsCache: DONE ini delete');
$generator->start();
$this->debug('generateDataobjectsCache: done generator');
- HTML_FlexyFramework_Generator::writeCache($iniCacheTmp, $iniCache);
+ HTML_FlexyFramework_Generator::writeCache($iniCacheTmp, $iniCache, $replace);
// reset the cache to the correct lcoation.
$this->DB_DataObject[$dbini] = $iniCache;