[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: backup/inc class.bobackup.inc.php,1.18.2.4,1.18
From: |
Bettina Gille <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: backup/inc class.bobackup.inc.php,1.18.2.4,1.18.2.4.2.1 class.uibackup.inc.php,1.12.2.2,1.12.2.2.2.1 |
Date: |
Sat, 26 Apr 2003 16:53:23 -0400 |
Update of /cvsroot/phpgroupware/backup/inc
In directory subversions:/tmp/cvs-serv7051/inc
Modified Files:
Tag: Version-0_9_16-branch
class.bobackup.inc.php class.uibackup.inc.php
Log Message:
update
Index: class.bobackup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/backup/inc/class.bobackup.inc.php,v
retrieving revision 1.18.2.4
retrieving revision 1.18.2.4.2.1
diff -C2 -r1.18.2.4 -r1.18.2.4.2.1
*** class.bobackup.inc.php 27 Jan 2003 22:39:51 -0000 1.18.2.4
--- class.bobackup.inc.php 26 Apr 2003 20:53:21 -0000 1.18.2.4.2.1
***************
*** 71,75 ****
if ($values['b_create'])
{
! $doc_root =
$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT'] ?
$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT'] : $GLOBALS['DOCUMENT_ROOT'];
if ($values['script_path'])
--- 71,75 ----
if ($values['b_create'])
{
! $doc_root =
get_var('DOCUMENT_ROOT',Array('GLOBAL','SERVER'));
if ($values['script_path'])
***************
*** 97,101 ****
if (! $values['l_path'] && !
$values['l_websave'])
{
! $error[] = lang('Please enter
the path to the backup dir and/or enable showing archives in phpGroupWare !');
}
}
--- 97,101 ----
if (! $values['l_path'] && !
$values['l_websave'])
{
! $error[] = lang('Plase enter
the path to the backup dir and/or enable showing archives in phpGroupWare !');
}
}
***************
*** 172,180 ****
if ($values['b_email'])
{
- if (!isset($site_co['home']))
- {
- $error[] = lang('Please
specify the path to the user-homedirectories in *Site configuration* !');
- }
-
if (!isset($site_co['maildir']))
{
--- 172,175 ----
***************
*** 341,345 ****
$config =
$GLOBALS['phpgw']->template->set_file(array('script_ba_t' =>
'script_form.tpl'));
! // $config .=
$GLOBALS['phpgw']->template->set_block('script_ba_t','script_ba','ba');
$config .=
$GLOBALS['phpgw']->template->set_var('basedir',$co['basedir']);
--- 336,340 ----
$config =
$GLOBALS['phpgw']->template->set_file(array('script_ba_t' =>
'script_form.tpl'));
! $config .=
$GLOBALS['phpgw']->template->set_block('script_ba_t','script_ba','ba');
$config .=
$GLOBALS['phpgw']->template->set_var('basedir',$co['basedir']);
***************
*** 372,379 ****
{
$config .=
$GLOBALS['phpgw']->template->set_var('bemail','yes');
- $config .=
$GLOBALS['phpgw']->template->set_var('home_path',$co['home']);
$config .=
$GLOBALS['phpgw']->template->set_var('maildir',$co['maildir']);
! /* $allaccounts =
$GLOBALS['phpgw']->accounts->get_list('accounts');
while (list($null,$account) =
each($allaccounts))
--- 367,373 ----
{
$config .=
$GLOBALS['phpgw']->template->set_var('bemail','yes');
$config .=
$GLOBALS['phpgw']->template->set_var('maildir',$co['maildir']);
! $allaccounts =
$GLOBALS['phpgw']->accounts->get_list('accounts');
while (list($null,$account) =
each($allaccounts))
***************
*** 385,389 ****
));
$GLOBALS['phpgw']->template->fp('ba','script_ba',True);
! } */
}
--- 379,383 ----
));
$GLOBALS['phpgw']->template->fp('ba','script_ba',True);
! }
}
Index: class.uibackup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/backup/inc/class.uibackup.inc.php,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.2.2.1
diff -C2 -r1.12.2.2 -r1.12.2.2.2.1
*** class.uibackup.inc.php 1 Jul 2002 15:32:36 -0000 1.12.2.2
--- class.uibackup.inc.php 26 Apr 2003 20:53:21 -0000 1.12.2.2.2.1
***************
*** 7,11 ****
* Written by Bettina Gille address@hidden *
* ----------------------------------------------- *
! * Copyright (C) 2001 Bettina Gille *
* *
* This program is free software; you can redistribute it and/or *
--- 7,11 ----
* Written by Bettina Gille address@hidden *
* ----------------------------------------------- *
! * Copyright (C) 2001 - 2003 Bettina Gille *
* *
* This program is free software; you can redistribute it and/or *
***************
*** 35,39 ****
function uibackup()
{
- $this->t = $GLOBALS['phpgw']->template;
$this->bobackup = CreateObject('backup.bobackup');
}
--- 35,38 ----
***************
*** 41,110 ****
function set_app_langs()
{
!
$this->t->set_var('bg_color',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$this->t->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
!
$this->t->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
! $this->t->set_var('lang_b_create',lang('Create backups
of your data ?'));
! $this->t->set_var('lang_b_intval',lang('Interval'));
! $this->t->set_var('lang_select_b_intval',lang('Select
interval'));
! $this->t->set_var('lang_b_data',lang('Data'));
! $this->t->set_var('lang_b_sql',lang('SQL'));
! $this->t->set_var('lang_b_ldap',lang('LDAP'));
! $this->t->set_var('lang_b_email',lang('E-MAIL'));
! $this->t->set_var('lang_r_host',lang('Operating
system'));
! $this->t->set_var('lang_r_config',lang('Configuration
remote host'));
! $this->t->set_var('lang_r_save',lang('Save backup to a
remote host ?'));
! $this->t->set_var('lang_config_path',lang('Absolute
path of the directory to store the backup script'));
! $this->t->set_var('lang_path',lang('Absolute path of
the backup directory'));
! $this->t->set_var('lang_r_ip',lang('IP or hostname'));
! $this->t->set_var('lang_user',lang('User'));
! $this->t->set_var('lang_pwd',lang('Password'));
! $this->t->set_var('lang_l_config',lang('Configuration
localhost'));
! $this->t->set_var('lang_l_save',lang('Save backup
locally ?'));
! $this->t->set_var('lang_l_websave',lang('Show backup
archives in phpGroupWare ?'));
! $this->t->set_var('lang_b_config',lang('Configuration
backup'));
! $this->t->set_var('lang_b_type',lang('Archive type'));
! $this->t->set_var('lang_select_b_type',lang('Select
archive type'));
! $this->t->set_var('lang_app',lang('Transport
application'));
! $this->t->set_var('lang_select_app',lang('Select
transport application'));
! $this->t->set_var('lang_save',lang('Save'));
! $this->t->set_var('lang_versions',lang('Number of
stored backup versions'));
}
function backup_admin()
{
! global $values, $submit;
$link_data = array
(
! 'menuaction' =>
'backup.uibackup.backup_admin'
);
! if ($submit)
{
$error = $this->bobackup->check_values($values);
if (is_array($error))
{
!
$this->t->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
}
else
{
$this->bobackup->save_items($values);
! Header('Location: ' .
$GLOBALS['phpgw']->link('/admin/index.php'));
}
}
$GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
$this->set_app_langs();
! $this->t->set_file(array('admin_form' =>
'admin_form.tpl'));
!
$this->t->set_var('actionurl',$GLOBALS['phpgw']->link('/index.php',$link_data));
! $this->t->set_var('lang_action',lang('Backup
administration'));
$values = $this->bobackup->get_config();
! $this->t->set_var('b_create','<input type="checkbox"
name="values[b_create]" value="True"' . ($values['b_create'] == 'yes'?'
checked':'') . '>');
switch($values['b_intval'])
--- 40,122 ----
function set_app_langs()
{
!
$GLOBALS['phpgw']->template->set_var('bg_color',$GLOBALS['phpgw_info']['theme']['th_bg']);
!
$GLOBALS['phpgw']->template->set_var('row_on',$GLOBALS['phpgw_info']['theme']['row_on']);
!
$GLOBALS['phpgw']->template->set_var('row_off',$GLOBALS['phpgw_info']['theme']['row_off']);
!
$GLOBALS['phpgw']->template->set_var('lang_b_create',lang('Create backups of
your data ?'));
!
$GLOBALS['phpgw']->template->set_var('lang_b_intval',lang('Interval'));
!
$GLOBALS['phpgw']->template->set_var('lang_select_b_intval',lang('Select
interval'));
!
$GLOBALS['phpgw']->template->set_var('lang_b_data',lang('Data'));
!
$GLOBALS['phpgw']->template->set_var('lang_b_sql',lang('SQL'));
!
$GLOBALS['phpgw']->template->set_var('lang_b_ldap',lang('LDAP'));
!
$GLOBALS['phpgw']->template->set_var('lang_b_email',lang('E-MAIL'));
!
$GLOBALS['phpgw']->template->set_var('lang_r_host',lang('Operating system'));
!
$GLOBALS['phpgw']->template->set_var('lang_r_config',lang('Configuration remote
host'));
!
$GLOBALS['phpgw']->template->set_var('lang_r_save',lang('Save backup to a
remote host ?'));
!
$GLOBALS['phpgw']->template->set_var('lang_config_path',lang('Absolute path of
the directory to store the backup script'));
!
$GLOBALS['phpgw']->template->set_var('lang_path',lang('Absolute path of the
backup directory'));
!
$GLOBALS['phpgw']->template->set_var('lang_r_ip',lang('IP or hostname'));
!
$GLOBALS['phpgw']->template->set_var('lang_user',lang('User'));
!
$GLOBALS['phpgw']->template->set_var('lang_pwd',lang('Password'));
!
$GLOBALS['phpgw']->template->set_var('lang_l_config',lang('Configuration
localhost'));
!
$GLOBALS['phpgw']->template->set_var('lang_l_save',lang('Save backup locally
?'));
!
$GLOBALS['phpgw']->template->set_var('lang_l_websave',lang('Show backup
archives in phpGroupWare ?'));
!
$GLOBALS['phpgw']->template->set_var('lang_b_config',lang('Configuration
backup'));
!
$GLOBALS['phpgw']->template->set_var('lang_b_type',lang('Archive type'));
!
$GLOBALS['phpgw']->template->set_var('lang_select_b_type',lang('Select archive
type'));
!
$GLOBALS['phpgw']->template->set_var('lang_app',lang('Transport application'));
!
$GLOBALS['phpgw']->template->set_var('lang_select_app',lang('Select transport
application'));
!
$GLOBALS['phpgw']->template->set_var('lang_save',lang('Save'));
!
$GLOBALS['phpgw']->template->set_var('lang_cancel',lang('cancel'));
!
$GLOBALS['phpgw']->template->set_var('lang_done',lang('done'));
!
$GLOBALS['phpgw']->template->set_var('lang_versions',lang('Number of stored
backup versions'));
}
function backup_admin()
{
! $values = $_POST['values'];
$link_data = array
(
! 'menuaction' => 'backup.uibackup.backup_admin'
);
! if ($values['save'])
{
$error = $this->bobackup->check_values($values);
if (is_array($error))
{
!
$GLOBALS['phpgw']->template->set_var('message',$GLOBALS['phpgw']->common->error_list($error));
}
else
{
$this->bobackup->save_items($values);
!
$GLOBALS['phpgw']->template->set_var('message',lang('values have been saved'));
}
}
$GLOBALS['phpgw']->common->phpgw_header();
$this->set_app_langs();
!
$GLOBALS['phpgw']->template->set_file(array('admin_form' => 'admin_form.tpl'));
!
$GLOBALS['phpgw']->template->set_var('action_url',$GLOBALS['phpgw']->link('/index.php',$link_data));
!
!
$GLOBALS['phpgw']->template->set_var('done_url',$GLOBALS['phpgw']->link('/admin/index.php'));
!
! if ($values && !$error)
! {
!
$GLOBALS['phpgw']->template->set_var('lang_done_cancel',lang('done'));
! }
! else
! {
!
$GLOBALS['phpgw']->template->set_var('lang_done_cancel',lang('cancel'));
! }
!
! $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('backup') . ': ' . lang('administration');
$values = $this->bobackup->get_config();
! $GLOBALS['phpgw']->template->set_var('b_create','<input
type="checkbox" name="values[b_create]" value="True"' . ($values['b_create'] ==
'yes'?' checked':'') . '>');
switch($values['b_intval'])
***************
*** 119,123 ****
. '<option value="monthly"' .
$b_intval_sel[2] . '>' . lang('monthly') . '</option>' . "\n";
! $this->t->set_var('intval_list',$intval_list);
switch($values['b_type'])
--- 131,135 ----
. '<option value="monthly"' .
$b_intval_sel[2] . '>' . lang('monthly') . '</option>' . "\n";
!
$GLOBALS['phpgw']->template->set_var('intval_list',$intval_list);
switch($values['b_type'])
***************
*** 132,136 ****
. '<option value="zip"' .
$b_type_sel[2] . '>' . lang('zip') . '</option>' . "\n";
! $this->t->set_var('type_list',$type_list);
switch($values['r_app'])
--- 144,148 ----
. '<option value="zip"' .
$b_type_sel[2] . '>' . lang('zip') . '</option>' . "\n";
!
$GLOBALS['phpgw']->template->set_var('type_list',$type_list);
switch($values['r_app'])
***************
*** 145,149 ****
. '<option value="smbmount"' .
$r_type_sel[2] . '>' . lang('smbmount') . '</option>' . "\n";
! $this->t->set_var('r_app_list',$r_app_list);
if ($values['b_sql'] == 'mysql' || $values['b_sql'] ==
'pgsql')
--- 157,161 ----
. '<option value="smbmount"' .
$r_type_sel[2] . '>' . lang('smbmount') . '</option>' . "\n";
!
$GLOBALS['phpgw']->template->set_var('r_app_list',$r_app_list);
if ($values['b_sql'] == 'mysql' || $values['b_sql'] ==
'pgsql')
***************
*** 152,186 ****
}
! $this->t->set_var('b_sql','<input type="checkbox"
name="values[b_sql]" value="True"' . ($values['b_sql'] == 'yes'?' checked':'')
. '>');
! $this->t->set_var('b_ldap','<input type="checkbox"
name="values[b_ldap]" value="True"' . ($values['b_ldap'] == 'yes'?'
checked':'') . '>');
! $this->t->set_var('b_email','<input type="checkbox"
name="values[b_email]" value="True"' . ($values['b_email'] == 'yes'?'
checked':'') . '>');
!
! $this->t->set_var('l_save','<input type="checkbox"
name="values[l_save]" value="True"' . ($values['l_save'] == 'yes'?'
checked':'') . '>');
! $this->t->set_var('l_websave','<input type="checkbox"
name="values[l_websave]" value="True"' . ($values['l_websave'] == 'yes'?'
checked':'') . '>');
! $this->t->set_var('r_save','<input type="checkbox"
name="values[r_save]" value="True"' . ($values['r_save'] == 'yes'?'
checked':'') . '>');
$r_host = '<input type="radio" name="values[r_host]"
value="unix"' . ($values['r_host'] == 'unix'?' checked':'') . '>UNIX' . "\n";
$r_host .= '<input type="radio" name="values[r_host]"
value="win"' . ($values['r_host'] == 'win'?' checked':'') . '>WIN';
! $this->t->set_var('r_host',$r_host);
! $this->t->set_var('r_path',$values['r_path']);
! $this->t->set_var('r_ip',$values['r_ip']);
! $this->t->set_var('r_user',$values['r_user']);
! $this->t->set_var('r_pwd',$values['r_pwd']);
!
! $this->t->set_var('script_path',$values['script_path']);
! $this->t->set_var('l_path',$values['l_path']);
! $this->t->set_var('versions',$values['versions']);
! $this->t->pfp('out','admin_form');
}
function web_backup()
{
! global $delete, $archive;
!
! if ($delete && $archive)
{
! $this->bobackup->drop_archive($archive);
}
--- 164,196 ----
}
! $GLOBALS['phpgw']->template->set_var('b_sql','<input
type="checkbox" name="values[b_sql]" value="True"' . ($values['b_sql'] ==
'yes'?' checked':'') . '>');
! $GLOBALS['phpgw']->template->set_var('b_ldap','<input
type="checkbox" name="values[b_ldap]" value="True"' . ($values['b_ldap'] ==
'yes'?' checked':'') . '>');
! $GLOBALS['phpgw']->template->set_var('b_email','<input
type="checkbox" name="values[b_email]" value="True"' . ($values['b_email'] ==
'yes'?' checked':'') . '>');
!
! $GLOBALS['phpgw']->template->set_var('l_save','<input
type="checkbox" name="values[l_save]" value="True"' . ($values['l_save'] ==
'yes'?' checked':'') . '>');
!
$GLOBALS['phpgw']->template->set_var('l_websave','<input type="checkbox"
name="values[l_websave]" value="True"' . ($values['l_websave'] == 'yes'?'
checked':'') . '>');
! $GLOBALS['phpgw']->template->set_var('r_save','<input
type="checkbox" name="values[r_save]" value="True"' . ($values['r_save'] ==
'yes'?' checked':'') . '>');
$r_host = '<input type="radio" name="values[r_host]"
value="unix"' . ($values['r_host'] == 'unix'?' checked':'') . '>UNIX' . "\n";
$r_host .= '<input type="radio" name="values[r_host]"
value="win"' . ($values['r_host'] == 'win'?' checked':'') . '>WIN';
! $GLOBALS['phpgw']->template->set_var('r_host',$r_host);
!
$GLOBALS['phpgw']->template->set_var('r_path',$values['r_path']);
!
$GLOBALS['phpgw']->template->set_var('r_ip',$values['r_ip']);
!
$GLOBALS['phpgw']->template->set_var('r_user',$values['r_user']);
!
$GLOBALS['phpgw']->template->set_var('r_pwd',$values['r_pwd']);
!
!
$GLOBALS['phpgw']->template->set_var('script_path',$values['script_path']);
!
$GLOBALS['phpgw']->template->set_var('l_path',$values['l_path']);
!
$GLOBALS['phpgw']->template->set_var('versions',$values['versions']);
! $GLOBALS['phpgw']->template->pfp('out','admin_form');
}
function web_backup()
{
! if ($_POST['delete'] && $_POST['archive'])
{
!
$this->bobackup->drop_archive($_POST['archive']);
}
***************
*** 193,204 ****
$GLOBALS['phpgw']->common->phpgw_header();
- echo parse_navbar();
$this->set_app_langs();
! $this->t->set_file(array('archive_list_t' =>
'web_form.tpl'));
!
$this->t->set_block('archive_list_t','archive_list','list');
! $this->t->set_var('lang_action',lang('Backup'));
$config = $this->bobackup->get_config();
--- 203,213 ----
$GLOBALS['phpgw']->common->phpgw_header();
$this->set_app_langs();
!
$GLOBALS['phpgw']->template->set_file(array('archive_list_t' =>
'web_form.tpl'));
!
$GLOBALS['phpgw']->template->set_block('archive_list_t','archive_list','list');
! $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('backup') . ': ' . lang('list backup archives');
$config = $this->bobackup->get_config();
***************
*** 206,212 ****
if ($config['l_websave'] == 'yes')
{
- $this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
-
$archives = $this->bobackup->get_archives();
if ($archives)
--- 215,220 ----
if ($config['l_websave'] == 'yes')
{
$archives = $this->bobackup->get_archives();
+ $this->nextmatchs =
CreateObject('phpgwapi.nextmatchs');
if ($archives)
***************
*** 214,220 ****
for ($i=0;$i<count($archives);$i++)
{
!
$this->nextmatchs->template_alternate_row_color(&$this->t);
! $this->t->set_var(array
(
'archive' =>
'archives/' . $archives[$i],
--- 222,228 ----
for ($i=0;$i<count($archives);$i++)
{
!
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
!
$GLOBALS['phpgw']->template->set_var(array
(
'archive' =>
'archives/' . $archives[$i],
***************
*** 222,243 ****
));
!
$this->t->set_var('delete',$GLOBALS['phpgw']->link('/index.php','menuaction=backup.uibackup.web_backup&delete=True&archive='
. $archives[$i]));
!
$this->t->set_var('lang_delete',lang('Delete'));
!
$this->t->fp('list','archive_list',True);
}
}
else
{
! $this->t->set_var('noweb',lang('No
backup archives available !'));
}
}
else
{
! $this->t->set_var('noweb',lang('The backup
application is not configured for showing the archives in phpGroupWare yet !'));
}
! $this->t->pfp('out','archive_list_t',True);
}
}
--- 230,251 ----
));
!
$GLOBALS['phpgw']->template->set_var('delete',$GLOBALS['phpgw']->link('/index.php','menuaction=backup.uibackup.web_backup&delete=True&archive='
. $archives[$i]));
!
$GLOBALS['phpgw']->template->set_var('lang_delete',lang('Delete'));
!
$GLOBALS['phpgw']->template->fp('list','archive_list',True);
}
}
else
{
!
$GLOBALS['phpgw']->template->set_var('noweb',lang('No backup archives available
!'));
}
}
else
{
!
$GLOBALS['phpgw']->template->set_var('noweb',lang('The backup application is
not configured for showing the archives in phpGroupWare yet !'));
}
!
$GLOBALS['phpgw']->template->pfp('out','archive_list_t',True);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: backup/inc class.bobackup.inc.php,1.18.2.4,1.18.2.4.2.1 class.uibackup.inc.php,1.12.2.2,1.12.2.2.2.1,
Bettina Gille <address@hidden> <=