From 624055af2898e06ef2ea3de3a138d0cd9abcddde Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 02 Oct 2012 09:35:40 -0400
Subject: [PATCH] Made backup function compatible with web folder protection feature.

---
 server/cron_daily.php |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/server/cron_daily.php b/server/cron_daily.php
index 04fc0d8..7c91a46 100644
--- a/server/cron_daily.php
+++ b/server/cron_daily.php
@@ -665,6 +665,9 @@
 				unset($dir_handle);
 
 				//* Remove backupdir symlink and create as directory instead
+				$app->uses('system');
+				$app->system->web_folder_protection($web_path,false);
+				
 				if(is_link($web_path.'/backup')) {
 					unlink($web_path.'/backup');
 				}
@@ -673,6 +676,8 @@
 					chown($web_path.'/backup', $rec['system_user']);
 					chgrp($web_path.'/backup', $rec['system_group']);
 				}
+				
+				$app->system->web_folder_protection($web_path,true);
 
 			}
 

--
Gitblit v1.9.1