summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 083949f)
raw | patch | inline | side by side (parent: 083949f)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 3 Jun 2005 13:09:08 +0000 (13:09 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 3 Jun 2005 13:09:08 +0000 (13:09 +0000) |
include/functions.inc | patch | blob | history |
diff --git a/include/functions.inc b/include/functions.inc
index 8aaf46b9b050dbac53d2cdc9649a79a0e2dc6e1f..4e8434a828ae7bfecef4796a0f214fb92f42d712 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
if(!compare_revision($revision_file, $svn_revision)){
// If revision differs, clean compile directory
foreach(scandir($directory) as $file) {
- if(!is_link($file) && is_writable($file)) {
- // delete file
- if(!unlink($file)) {
- // This should never be reached
- }
+ if( is_file($directory."/".$file) &&
+ is_writable($directory."/".$file)) {
+ // delete file
+ if(!unlink($directory."/".$file)) {
+ // This should never be reached
+ }
}
}
+ } else {
+ // Revision matches, nothing to do
}
}
+ } else {
+ // Smarty compile dir is not accessible
+ // (Smarty will warn about this)
}
-
-
- /* No, the revision has changed - and possibly the templates/translations.
- Drop the contents of $directory now... */
- //if (true){
-
- // foreach($files as $file) {
- // if(!is_link($file) && is_writable($file)) {
- // // Delete File
- // if(!unlink($file)){
- // // File could not be deleted
- // }
- // }
- // }
- # Recursively delete contents "$config->...['CONFIG']". and create
- # new revision file. NO folow symlinks!!!
- // ;
- //}
-
}
function create_revision($revision_file, $revision)