forked from extern/egroupware
Spell-check new db backup function
This commit is contained in:
parent
a5f83f44ed
commit
e69b1c0f96
@ -21,9 +21,9 @@
|
||||
'noapi' => True
|
||||
));
|
||||
include ('./inc/functions.inc.php');
|
||||
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
|
||||
// Check header and authentication
|
||||
if (!$GLOBALS['phpgw_setup']->auth('Config'))
|
||||
{
|
||||
@ -31,7 +31,7 @@
|
||||
exit;
|
||||
}
|
||||
// Does not return unless user is authorized
|
||||
|
||||
|
||||
$GLOBALS['phpgw_setup']->loaddb();
|
||||
|
||||
$tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
|
||||
@ -45,7 +45,7 @@
|
||||
{
|
||||
list($file) = each($_POST['download']);
|
||||
$file = $db_backup->backup_dir.'/'.basename($file); // basename to now allow to change the dir
|
||||
|
||||
|
||||
$browser = CreateObject('phpgwapi.browser');
|
||||
$browser->content_header(basename($file));
|
||||
fpassthru($f = fopen($file,'rb'));
|
||||
@ -58,11 +58,11 @@
|
||||
'T_footer' => 'footer.tpl',
|
||||
'T_db_backup' => 'db_backup.tpl',
|
||||
));
|
||||
$setup_tpl->set_block('T_db_backup','shedule_row','shedule_rows');
|
||||
$setup_tpl->set_block('T_db_backup','schedule_row','schedule_rows');
|
||||
$setup_tpl->set_block('T_db_backup','set_row','set_rows');
|
||||
|
||||
$setup_tpl->set_var('stage_title',$stage_title = lang('DB backup and restore'));
|
||||
$setup_tpl->set_var('stage_desc',lang('This program lets you backup your database, shedule a backup or restore it.'));
|
||||
$setup_tpl->set_var('stage_desc',lang('This program lets you backup your database, schedule a backup or restore it.'));
|
||||
$setup_tpl->set_var('error_msg','');
|
||||
|
||||
$bgcolor = array('#DDDDDD','#EEEEEE');
|
||||
@ -98,24 +98,24 @@
|
||||
$setup_tpl->set_var('upload','<input type="file" name="uploaded" /> '.
|
||||
'<input type="submit" name="upload" value="'.htmlspecialchars(lang('upload backup')).'" title="'.htmlspecialchars(lang("uploads a backup to the backup-dir, from where you can restore it")).'" />');
|
||||
|
||||
if ($_POST['upload'] && is_array($_FILES['uploaded']) && !$_FILES['uploaded']['error'] &&
|
||||
if ($_POST['upload'] && is_array($_FILES['uploaded']) && !$_FILES['uploaded']['error'] &&
|
||||
is_uploaded_file($_FILES['uploaded']['tmp_name']))
|
||||
{
|
||||
move_uploaded_file($_FILES['uploaded']['tmp_name'],$db_backup->backup_dir.'/'.$_FILES['uploaded']['name']);
|
||||
|
||||
|
||||
if (function_exists('md5_file')) // php4.2+
|
||||
{
|
||||
$md5 = ', md5='.md5_file($db_backup->backup_dir.'/'.$_FILES['uploaded']['name']);
|
||||
}
|
||||
$setup_tpl->set_var('error_msg',lang("succesfully uploaded file %1",$_FILES['uploaded']['name'].', '.
|
||||
sprintf('%3.1lf MB (%d)',$_FILES['uploaded']['size']/(1024*1024),$_FILES['uploaded']['size']).$md5));
|
||||
sprintf('%3.1lf MB (%d)',$_FILES['uploaded']['size']/(1024*1024),$_FILES['uploaded']['size']).$md5));
|
||||
}
|
||||
// delete a backup
|
||||
if ($_POST['delete'])
|
||||
{
|
||||
list($file) = each($_POST['delete']);
|
||||
$file = $db_backup->backup_dir.'/'.basename($file); // basename to not allow to change the dir
|
||||
|
||||
|
||||
if (unlink($file)) $setup_tpl->set_var('error_msg',lang("backup '%1' deleted",$file));
|
||||
}
|
||||
// rename a backup
|
||||
@ -136,7 +136,7 @@
|
||||
{
|
||||
list($file) = each($_POST['restore']);
|
||||
$file = $db_backup->backup_dir.'/'.basename($file); // basename to not allow to change the dir
|
||||
|
||||
|
||||
if (is_resource($f = $db_backup->fopen_backup($file,true)))
|
||||
{
|
||||
echo '<p align="center">'.lang('restore started, this might take a view minutes ...')."</p>\n".str_repeat(' ',4096);
|
||||
@ -149,18 +149,18 @@
|
||||
$setup_tpl->set_var('error_msg',$f);
|
||||
}
|
||||
}
|
||||
// create a new shedulted backup
|
||||
if ($_POST['shedule'])
|
||||
// create a new scheduled backup
|
||||
if ($_POST['schedule'])
|
||||
{
|
||||
$asyncservice->set_timer($_POST['times'],'db_backup-'.implode(':',$_POST['times']),'admin.admin_db_backup.do_backup','');
|
||||
}
|
||||
// cancel a shedulted backup
|
||||
// cancel a scheduled backup
|
||||
if (is_array($_POST['cancel']))
|
||||
{
|
||||
list($id) = each($_POST['cancel']);
|
||||
$asyncservice->cancel_timer($id);
|
||||
}
|
||||
// list sheduled backups
|
||||
// list scheduled backups
|
||||
if (($jobs = $asyncservice->read('db_backup-%')))
|
||||
{
|
||||
foreach($jobs as $job)
|
||||
@ -168,17 +168,17 @@
|
||||
$setup_tpl->set_var($job['times']);
|
||||
$setup_tpl->set_var('next_run',date('Y-m-d H:i',$job['next']));
|
||||
$setup_tpl->set_var('actions','<input type="submit" name="cancel['.$job['id'].']" value="'.htmlspecialchars(lang('delete')).'" />');
|
||||
$setup_tpl->parse('shedule_rows','shedule_row',true);
|
||||
$setup_tpl->parse('schedule_rows','schedule_row',true);
|
||||
}
|
||||
}
|
||||
// input-fields to create a new sheduled backup
|
||||
// input-fields to create a new scheduled backup
|
||||
foreach($times=array('year'=>'*','month'=>'*','day'=>'*','dow'=>'2-6','hour'=>3,'minute'=>0) as $name => $default)
|
||||
{
|
||||
$setup_tpl->set_var($name,'<input name="times['.$name.']" size="5" value="'.$default.'" />');
|
||||
}
|
||||
$setup_tpl->set_var('next_run',' ');
|
||||
$setup_tpl->set_var('actions','<input type="submit" name="shedule" value="'.htmlspecialchars(lang('shedule')).'" />');
|
||||
$setup_tpl->parse('shedule_rows','shedule_row',true);
|
||||
$setup_tpl->set_var('actions','<input type="submit" name="schedule" value="'.htmlspecialchars(lang('schedule')).'" />');
|
||||
$setup_tpl->parse('schedule_rows','schedule_row',true);
|
||||
|
||||
// listing the availible backup sets
|
||||
$setup_tpl->set_var('backup_dir',$db_backup->backup_dir);
|
||||
@ -193,7 +193,7 @@
|
||||
}
|
||||
}
|
||||
if ($handle) closedir($handle);
|
||||
|
||||
|
||||
krsort($files);
|
||||
foreach($files as $ctime => $file)
|
||||
{
|
||||
@ -213,7 +213,7 @@
|
||||
}
|
||||
|
||||
$setup_tpl->set_var(array(
|
||||
'lang_sheduled_backups' => lang('sheduled backups'),
|
||||
'lang_scheduled_backups'=> lang('scheduled backups'),
|
||||
'lang_year' => lang('year'),
|
||||
'lang_month' => lang('month'),
|
||||
'lang_day' => lang('day'),
|
||||
@ -230,7 +230,7 @@
|
||||
|
||||
$setup_tpl->set_var('self',$self);
|
||||
$setup_tpl->pparse('out','T_db_backup');
|
||||
|
||||
|
||||
if (is_object($GLOBALS['phpgw_setup']->html))
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->html->show_footer();
|
||||
|
@ -390,8 +390,8 @@ setup demo accounts in ldap setup de Demo-Benutzer in LDAP einrichten
|
||||
setup main menu setup de Setup-Hauptmenü
|
||||
setup the database setup de Datenbank einzurichten
|
||||
setup/config admin login setup de Setup-/Konfigurationsadmin-Login
|
||||
shedule setup de planen
|
||||
sheduled backups setup de Regelmäßige Datensicherungen
|
||||
schedule setup de planen
|
||||
scheduled backups setup de Regelmäßige Datensicherungen
|
||||
show 'powered by' logo on setup de Zeige "powered by" Logo
|
||||
size setup de Größe
|
||||
some or all of its tables are missing setup de Einige oder alle Tabellen fehlen
|
||||
@ -427,7 +427,7 @@ there was a problem trying to connect to your ldap server. <br> setup de Es gab
|
||||
there was a problem trying to connect to your ldap server. <br>please check your ldap server configuration setup de Es gab ein Problem eine Verbindung zu Ihrem LDAP-Server herzustellen.<br>Bitte überprüfen Sie die Konfiguration Ihres LDAP-Servers.
|
||||
this has to be outside the webservers document-root!!! setup de Muss außerhalb des Wurzelverzeichnisses (document root) des Webservers sein!!!
|
||||
this might take a while, please wait ... setup de Dieser Test braucht einige Zeit, bitte warten ...
|
||||
this program lets you backup your database, shedule a backup or restore it. setup de Mit diesem Programm können Sie Ihre Datenbank sichern, eine regelmäßige Datensicherung planen oder sie zurücksichern.
|
||||
this program lets you backup your database, schedule a backup or restore it. setup de Mit diesem Programm können Sie Ihre Datenbank sichern, eine regelmäßige Datensicherung planen oder sie zurücksichern.
|
||||
this program will convert your database to a new system-charset. setup de Dieses Programm wird Ihre Datenbank in einen neuen Systemzeichensatz konvertieren.
|
||||
this program will help you upgrade or install different languages for egroupware setup de Dieses Programm wird Ihnen bei der Aktualisierung oder Installation verschiedender Sprachen für eGroupWare behilflich sein
|
||||
this section will help you export users and groups from egroupware's account tables into your ldap tree setup de Dieser Abschnitt wird Ihnen beim Exportieren von Benutzern/Gruppen aus eGroupWare's Account-Tabellen in Ihren LDAP-Baum behilflich sein
|
||||
|
@ -387,8 +387,8 @@ setup demo accounts in ldap setup en Setup demo accounts in LDAP
|
||||
setup main menu setup en Setup Main Menu
|
||||
setup the database setup en Setup the database
|
||||
setup/config admin login setup en Setup/Config Admin Login
|
||||
shedule setup en shedule
|
||||
sheduled backups setup en sheduled backups
|
||||
schedule setup en schedule
|
||||
scheduled backups setup en scheduled backups
|
||||
show 'powered by' logo on setup en Show 'powered by' logo on
|
||||
size setup en size
|
||||
some or all of its tables are missing setup en Some or all of its tables are missing
|
||||
@ -423,7 +423,7 @@ there was a problem trying to connect to your ldap server. <br> setup en There w
|
||||
there was a problem trying to connect to your ldap server. <br>please check your ldap server configuration setup en There was a problem trying to connect to your LDAP server. <br>please check your LDAP server configuration
|
||||
this has to be outside the webservers document-root!!! setup en This has to be outside the webservers document-root!!!
|
||||
this might take a while, please wait ... setup en This might take a while, please wait ...
|
||||
this program lets you backup your database, shedule a backup or restore it. setup en This program lets you backup your database, shedule a backup or restore it.
|
||||
this program lets you backup your database, schedule a backup or restore it. setup en This program lets you backup your database, schedule a backup or restore it.
|
||||
this program will convert your database to a new system-charset. setup en This program will convert your database to a new system-charset.
|
||||
this program will help you upgrade or install different languages for egroupware setup en This program will help you upgrade or install different languages for eGroupWare
|
||||
this section will help you export users and groups from egroupware's account tables into your ldap tree setup en This section will help you export users and groups from eGroupWare's account tables into your LDAP tree
|
||||
|
@ -391,8 +391,8 @@ setup demo accounts in ldap setup es-es Instalar cuentas de demostraci
|
||||
setup main menu setup es-es Menú principal de la instalación
|
||||
setup the database setup es-es Instalar la base de datos
|
||||
setup/config admin login setup es-es Usuario administrador para Instalación/Configuración
|
||||
shedule setup es-es planificar
|
||||
sheduled backups setup es-es copias de seguridad planificadas
|
||||
schedule setup es-es planificar
|
||||
scheduled backups setup es-es copias de seguridad planificadas
|
||||
show 'powered by' logo on setup es-es Mostrar el logo en
|
||||
size setup es-es tamaño
|
||||
some or all of its tables are missing setup es-es Algunas o todas de sus tablas no se encuentran
|
||||
@ -430,7 +430,7 @@ there was a problem trying to connect to your ldap server. <br> setup es-es Hubo
|
||||
there was a problem trying to connect to your ldap server. <br>please check your ldap server configuration setup es-es Hubo un problema intentando conecar al servidor LDAP.<br>Por favor, compruebe la configuración del servidor LDAP
|
||||
this has to be outside the webservers document-root!!! setup es-es ¡Tiene que estar fuera de la raíz de documentos del servidor web!
|
||||
this might take a while, please wait ... setup es-es Esto puede tardar un poco. Por favor, espere...
|
||||
this program lets you backup your database, shedule a backup or restore it. setup es-es Este programa permite hacer copia de seguridad de la base de datos, planificar una copia o restaurarla.
|
||||
this program lets you backup your database, schedule a backup or restore it. setup es-es Este programa permite hacer copia de seguridad de la base de datos, planificar una copia o restaurarla.
|
||||
this program will convert your database to a new system-charset. setup es-es Este programa convertirá la base de datos a un nuevo juego de caracteres del sistema.
|
||||
this program will help you upgrade or install different languages for egroupware setup es-es Este programa le ayudará a actualizar o instalar los distintos idiomas para eGroupWare
|
||||
this section will help you export users and groups from egroupware's account tables into your ldap tree setup es-es Esta sección intentará exportar los usuarios y grupos de la cuenta de las tablas de eGroupWare en el árbol LDAP
|
||||
|
@ -17,7 +17,7 @@
|
||||
<!-- END setup_header -->
|
||||
<tr bgcolor="#e6e6e6">
|
||||
<td>
|
||||
<b>{lang_sheduled_backups}</b>
|
||||
<b>{lang_scheduled_backups}</b>
|
||||
</td>
|
||||
<td align="right">
|
||||
{backup_now_button}
|
||||
@ -36,7 +36,7 @@
|
||||
<td>{lang_next_run}</td>
|
||||
<td>{lang_actions}</td>
|
||||
</tr>
|
||||
<!-- BEGIN shedule_row -->
|
||||
<!-- BEGIN schedule_row -->
|
||||
<tr align="center">
|
||||
<td>{year}</td>
|
||||
<td>{month}</td>
|
||||
@ -47,7 +47,7 @@
|
||||
<td>{next_run}</td>
|
||||
<td>{actions}</td>
|
||||
</tr>
|
||||
<!-- END shedule_row -->
|
||||
<!-- END schedule_row -->
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user