Upgraded to Symfony 2.1-beta2

This commit is contained in:
Polonkai Gergely
2012-07-15 14:56:31 +02:00
parent c1232c9792
commit bb7aee6fee
455 changed files with 21001 additions and 18480 deletions

View File

@@ -184,7 +184,19 @@ class ProxyFactory
$file = str_replace($placeholders, $replacements, $file);
file_put_contents($fileName, $file, LOCK_EX);
$parentDirectory = dirname($fileName);
if ( ! is_dir($parentDirectory)) {
if (false === @mkdir($parentDirectory, 0775, true)) {
throw ProxyException::proxyDirectoryNotWritable();
}
} else if ( ! is_writable($parentDirectory)) {
throw ProxyException::proxyDirectoryNotWritable();
}
$tmpFileName = $fileName . '.' . uniqid("", true);
file_put_contents($tmpFileName, $file);
rename($tmpFileName, $fileName);
}
/**