[Fusionforge-commits] r12127 - branches/Branch_5_1/src/cronjobs
Alain Peyrat
aljeux at libremir.placard.fr.eu.org
Tue Feb 1 15:48:12 CET 2011
Author: aljeux
Date: 2011-02-01 15:48:12 +0100 (Tue, 01 Feb 2011)
New Revision: 12127
Modified:
branches/Branch_5_1/src/cronjobs/backup_site.php
Log:
Fix wrong var $file and now obsolete $cvsdir_prefix.
Modified: branches/Branch_5_1/src/cronjobs/backup_site.php
===================================================================
--- branches/Branch_5_1/src/cronjobs/backup_site.php 2011-02-01 09:02:38 UTC (rev 12126)
+++ branches/Branch_5_1/src/cronjobs/backup_site.php 2011-02-01 14:48:12 UTC (rev 12127)
@@ -69,10 +69,10 @@
$output = "";
$err = "";
$dump_cmd = 'pg_dump -U ' . $username;
-if ($host != '') {
+if ($host) {
$dump_cmd .= ' -h ' . $host;
}
-if ($file != '') {
+if ($port) {
$dump_cmd .= ' -p ' . $port;
}
@@ -126,13 +126,13 @@
* Backup CVS repositories
**************************************/
$output="";
-if (file_exists($cvsdir_prefix)) {
- @exec('tar -hjcvf '.$sys_path_to_backup.'cvsroot-tmp-'.$datetime.'.tar.bz2 '.$cvsdir_prefix.'/ 2>&1' ,$output,$retval); //proceed cvsroot dir tar file creation
+if (file_exists(forge_get_config('repos_path', 'scmcvs'))) {
+ @exec('tar -hjcvf '.$sys_path_to_backup.'cvsroot-tmp-'.$datetime.'.tar.bz2 '.forge_get_config('repos_path', 'scmcvs').'/ 2>&1' ,$output,$retval); //proceed cvsroot dir tar file creation
if($retval!=0){
$err.= implode("\n", $output);
}
} else {
- $err.= 'Unable to find CVSROOT dir. Configured value is:'.$cvsdir_prefix;
+ $err.= 'Unable to find CVSROOT dir. Configured value is:'.forge_get_config('repos_path', 'scmcvs');
}
/**************************************
More information about the Fusionforge-commits
mailing list