|
@@ -366,9 +366,11 @@ print $langs->trans("BackupDescY").'<br><br>';
|
|
|
id="filename_template"
|
|
|
value="<?php
|
|
|
$prefix='dump';
|
|
|
-if ($label == 'MySQL') $prefix='mysqldump';
|
|
|
-if ($label == 'PostgreSQL') $prefix='pg_dump';
|
|
|
-$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.sql';
|
|
|
+$ext='.sql';
|
|
|
+if ($label == 'MySQL') { $prefix='mysqldump'; $ext='sql'; }
|
|
|
+//if ($label == 'PostgreSQL') { $prefix='pg_dump'; $ext='dump'; }
|
|
|
+if ($label == 'PostgreSQL') { $prefix='pg_dump'; $ext='sql'; }
|
|
|
+$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.'.$ext;
|
|
|
echo $file;
|
|
|
?>" /> <br>
|
|
|
<br>
|
|
@@ -376,16 +378,19 @@ echo $file;
|
|
|
<?php
|
|
|
|
|
|
// Define compressions array
|
|
|
-$compression=array(
|
|
|
- 'none' => array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("None")),
|
|
|
- 'gz' => array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip")),
|
|
|
-);
|
|
|
+$compression=array();
|
|
|
if ($label == 'MySQL')
|
|
|
{
|
|
|
-// $compression['zip']= array('function' => 'dol_compress', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip")); // Not open source format. Must implement dol_compress function
|
|
|
+ $compression['none'] = array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("None"));
|
|
|
+ $compression['gz'] = array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip"));
|
|
|
+ // $compression['zip']= array('function' => 'dol_compress', 'id' => 'radio_compression_zip', 'label' => $langs->trans("FormatZip")); // Not open source format. Must implement dol_compress function
|
|
|
$compression['bz'] = array('function' => 'bzopen', 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2"));
|
|
|
}
|
|
|
-
|
|
|
+else
|
|
|
+{
|
|
|
+ $compression['none'] = array('function' => '', 'id' => 'radio_compression_none', 'label' => $langs->trans("Default"));
|
|
|
+ $compression['gz'] = array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip"));
|
|
|
+}
|
|
|
|
|
|
// Show compression choices
|
|
|
print '<div class="formelementrow">';
|