Skip to content

Commit

Permalink
Merge pull request #2 from timglabisch/objectClassResource_cleanup
Browse files Browse the repository at this point in the history
Object class resource cleanup

git-svn-id: http://www.pimcore.org/svn/pimcore/private/core/trunk@924 1f8fe7d8-47f0-464c-8d0a-336f4953ab05
  • Loading branch information
brusch committed Nov 6, 2011
2 parents 79c177a + d5420f4 commit 48d3147
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pimcore/models/Object/Class/Resource.php
Expand Up @@ -458,9 +458,15 @@ public function __destruct () {
if(defined("PIMCORE_DB_CHANGELOG_DIRECTORY")) {
$file = PIMCORE_DB_CHANGELOG_DIRECTORY."/".$filename;
}

file_put_contents($file, $log);

$logContent = '';

if(file_exists($filename) && is_readable($filename))
$logContent = file_get_contents($filename)."\n\n\n";

file_put_contents($logContent.$file, $log);
chmod($file, 0766);
$this->_sqlChangeLog = array();
}
}
}

0 comments on commit 48d3147

Please sign in to comment.