[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-developers] my changes to backup/template/script_form.tpl
From: |
Aiko Mastboom |
Subject: |
[Phpgroupware-developers] my changes to backup/template/script_form.tpl |
Date: |
Tue, 15 Jan 2002 21:37:28 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.7) Gecko/20011221 |
Hi all,
I was toying around with the backup procedure of my installation (latest
cvs checkout) and noticed some oddities:
- when I set the interval to X the scripts removed all previous backups
(allways) instead of keeping X.
- when I tried backing up mail and sql and ldap, I got a wierd messages
about an extension allready existing.
the following are my fixes to these problems (since I am no registered
developer I can't put them in the cvs)
changes to backup/template/script_form.tpl
for some reason the math wasn't done so I removed te string quotations
in ger_rdate() resulting in:
function get_rdate($versions, $bintval)
{
switch($bintval)
{
case 'daily': $dd = $versions; break;
case 'weekly': $dd = 7 * $versions; break;
case 'monthly': $dm = $versions; break;
}
$rdate = mktime(0,0,0,date('m') - $dm,date('d') -
$dd,date('Y'));
return $rdate;
}
the extension thingy is fixed by changing $end in #end2 in the following
code found in the "if ($bsql)", "if($bldap == 'yes')" and "if($bemail ==
'yes')" parts of the script.
if ($bcomp == 'tar.bz2')
{
$end2 = '.bz2';
system("$bzip2 -z " . $out . ' 2>&1 > /dev/null');
$out = $out . $end2;
}
the script just wasn't written to allow multiple different backups to be
done and was overwriting the $end variable when it was still supposed to
be used in the folowing parts of the script...
hoping these changes will help some of you,
Aiko Mastboom
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-developers] my changes to backup/template/script_form.tpl,
Aiko Mastboom <=