Dotclear

Changeset 662


Ignore:
Timestamp:
01/07/09 14:26:36 (15 years ago)
Author:
franck
Message:

Fix recursive backups observed on big blogs
Admin form reviewed

Location:
plugins/autoBackup
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/autoBackup/_admin.php

    r589 r662  
    1616          $core->auth->check('usage,contentadmin',$core->blog->id)); 
    1717 
    18  
    19  
    2018?> 
  • plugins/autoBackup/_define.php

    r590 r662  
    1515     /* Name */               "Auto Backup", 
    1616     /* Description*/         "Make backups automatically", 
    17      /* Author */             "k-net, brol, Oum", 
    18      /* Version */            '1.1.6', 
    19      /* Permissions */        'null' 
     17     /* Author */             "k-net, brol, Oum, Franck Paul", 
     18     /* Version */            '1.1.7', 
     19     /* Permissions */        'usage,contentadmin' 
    2020); 
    2121 
    22  
    2322class autoBackup { 
    2423      
     
    2726          global $core; 
    2827           
     28          // Get current config from database 
    2929          if ($core->blog->settings->autobackup_config) { 
    3030               $config = unserialize($core->blog->settings->autobackup_config); 
    3131          } 
     32          // If no config or badly formatted, set a fresh one 
    3233          if (!isset($config) || !is_array($config)) { 
    3334               $config = array(); 
    3435          } 
    35            
     36 
     37          // Set default options if undefined: 
     38 
     39          // Filepath of import-export needed class 
     40          // Franck Paul : Is there any solution to detect it automatically (in order to avoid to ask it to the final user)? 
    3641          if (!isset($config['importexportclasspath'])) $config['importexportclasspath'] = realpath($core->plugins->moduleRoot('importExport').'/inc/flat/class.db.export.php'); 
     42 
     43          // Backup on file group: 
    3744          if (!isset($config['backup_onfile'])) $config['backup_onfile'] = false; 
    38           if (!isset($config['backup_onemail'])) $config['backup_onemail'] = false; 
    3945          if (!isset($config['backup_onfile_repository'])) $config['backup_onfile_repository'] = $core->blog->public_path; 
    4046          if (!isset($config['backup_onfile_compress_gzip'])) $config['backup_onfile_compress_gzip'] = false; 
    4147          if (!isset($config['backup_onfile_deleteprev'])) $config['backup_onfile_deleteprev'] = false; 
     48 
     49          // Backup sent by mail group: 
     50          if (!isset($config['backup_onemail'])) $config['backup_onemail'] = false; 
    4251          if (!isset($config['backup_onemail_adress'])) $config['backup_onemail_adress'] = ''; 
    4352          if (!isset($config['backup_onemail_compress_gzip'])) $config['backup_onemail_compress_gzip'] = true; 
    4453          if (!isset($config['backup_onemail_header_from'])) $config['backup_onemail_header_from'] = $core->blog->name.' <your@email.com>'; 
     54 
     55          // Backup characteristics: 
    4556          if (!isset($config['backuptype'])) $config['backuptype'] = 'full'; 
    4657          if (!isset($config['backupblogid'])) $config['backupblogid'] = $core->blog->id; 
    4758          if (!isset($config['interval'])) $config['interval'] = 3600*24; 
     59 
     60          // Last backups done: 
    4861          if (!isset($config['backup_onfile_last'])) $config['backup_onfile_last'] = array('date' => 0, 'file' => ''); 
    4962          if (!isset($config['backup_onemail_last'])) $config['backup_onemail_last'] = array('date' => 0); 
    5063           
    51           #self::setConfig($config); 
     64          // Running backup flag: 
     65          if (!isset($config['backup_running'])) $config['backup_running'] = false; 
    5266           
    5367          return $config; 
     
    6680           
    6781          global $core; 
    68             
     82           
     83          // Get last or default config 
    6984          $config = self::getConfig(); 
    70            
    71           $time = time(); 
    72            
    73           $backup_onfile = $config['backup_onfile'] && $config['backup_onfile_last']['date'] + $config['interval'] <= $time; 
    74           $backup_onemail = $config['backup_onemail'] && $config['backup_onemail_last']['date'] + $config['interval'] <= $time; 
    75            
    76           if ($config['interval'] > 0 && ($backup_onfile || $backup_onemail)) { 
    77                 
    78                $backupname = ($config['backuptype'] != 'full' ? $config['backupblogid'] : 'blog').'-backup-'.date('Ymd-H\hi').'.txt'; 
    79                $backupname .= $config['backup_onfile_compress_gzip'] ? '.gz' : ''; 
    80                 
    81                if ($backup_onfile) { 
    82                     $file = $config['backup_onfile_repository'].'/'.$backupname; 
    83                } else { 
    84                     $file = dirname(__FILE__).'/tmp.txt'; 
    85                } 
    86                 
    87                if ($config['backuptype'] == 'full') { 
    88                     $backup_content = self::backup_full($file); 
    89                } elseif ($config['backupblogid'] == $core->blog->id) { 
    90                     $backup_content = self::backup_blog($file, $config['backupblogid']); 
    91                } 
    92                 
    93                if (!empty($backup_content)) { 
     85 
     86          if ($config['interval'] > 0) { 
     87                
     88               // Should we start new backup? 
     89               $time = time(); 
     90               $backup_onfile = $config['backup_onfile'] && (($config['backup_onfile_last']['date'] + $config['interval']) <= $time); 
     91               $backup_onemail = $config['backup_onemail'] && (($config['backup_onemail_last']['date'] + $config['interval']) <= $time); 
     92                
     93               if ($backup_onfile || $backup_onemail) { 
    9494                     
    95                     // Create backup file 
    96                     if ($backup_onfile) { 
    97                           
    98                          if (is_file($file)) { 
    99                               // Encode content with gzip if needed 
    100                               if ($config['backup_onfile_compress_gzip'] && is_writable($file)) { 
    101                                    file_put_contents($file, gzencode(file_get_contents($file), 9)); 
     95                    // Is there already backup running? 
     96                    // We assume that the running backup must not take more than half of the interval 
     97                    if ($config['backup_running']) { 
     98                         if ($backup_onfile && (($time - $config['backup_onfile_last']['date']) >= ($config['interval']/2))) { 
     99                              // Previous backup on file started more than half of interval ago, we cancelled it 
     100                              $config['backup_running'] = false; 
     101                         } 
     102                         if ($backup_onemail && (($time - $config['backup_onemail_last']['date']) >= ($config['interval']/2))) { 
     103                              // Previous backup by email started more than half of interval ago, we cancelled it 
     104                              $config['backup_running'] = false; 
     105                         } 
     106                    } 
     107 
     108                    if (!$config['backup_running']) { 
     109 
     110                         // We must do the backup, register that it is running from now 
     111                         self::setConfig($config); 
     112 
     113                         // Set the according filename 
     114                         $backupname = ($config['backuptype'] != 'full' ? $config['backupblogid'] : 'blog').'-backup-'.date('Ymd-H\hi').'.txt'; 
     115                         $backupname .= $config['backup_onfile_compress_gzip'] ? '.gz' : ''; 
     116 
     117                         if ($backup_onfile) { 
     118                              $file = $config['backup_onfile_repository'].'/'.$backupname; 
     119                         } else { 
     120                              $file = dirname(__FILE__).'/tmp.txt'; 
     121                         } 
     122 
     123                         if ($config['backuptype'] == 'full') { 
     124                              $backup_content = self::backup_full($file); 
     125                         } elseif ($config['backupblogid'] == $core->blog->id) { 
     126                              $backup_content = self::backup_blog($file, $config['backupblogid']); 
     127                         } 
     128 
     129                         if (!empty($backup_content)) { 
     130 
     131                              // Create backup file 
     132                              if ($backup_onfile) { 
     133 
     134                                   if (is_file($file)) { 
     135                                        // Encode content with gzip if needed 
     136                                        if ($config['backup_onfile_compress_gzip'] && is_writable($file)) { 
     137                                             file_put_contents($file, gzencode(file_get_contents($file), 9)); 
     138                                        } 
     139 
     140                                        if ($config['backup_onfile_deleteprev'] && is_file($config['backup_onfile_repository'].'/'.$config['backup_onfile_last']['file'])) { 
     141                                             @unlink($config['backup_onfile_repository'].'/'.$config['backup_onfile_last']['file']); 
     142                                        } 
     143                                        $config['backup_onfile_last']['date'] = $time; 
     144                                        $config['backup_onfile_last']['file'] = $file; 
     145                                   } 
    102146                              } 
     147 
     148                              // Send backup email 
     149                              if ($backup_onemail) { 
     150                                   $backup_content = file_get_contents($file); 
     151 
     152                                   if ($config['backup_onemail_compress_gzip']) { 
     153                                        $backup_content = gzencode($backup_content, 9); 
     154                                        // Add .gz if it ain't already done 
     155                                        $backupname .= $config['backup_onfile_compress_gzip'] ? '' : '.gz'; 
     156                                   } 
     157 
     158                                   require_once dirname(__FILE__).'/class.mime_mail.php'; 
     159                                   $email = new mime_mail( 
     160                                        $config['backup_onemail_adress'], 
     161                                        sprintf(__('Auto Backup : %s'),$core->blog->name), 
     162                                        sprintf(__('This is an automatically sent message from your blog %s.'), $core->blog->name)."\n". 
     163                                        sprintf(__('You will find attached the backup file created on %s.'), date('r', $time)), 
     164                                        $config['backup_onemail_header_from']); 
     165                                   $email->attach($backup_content, $backupname, 'application/octet-stream', $encoding='utf-8'); 
     166                                   if ($email->send()) { 
     167                                        $config['backup_onemail_last']['date'] = $time; 
     168                                   } 
     169                              } 
     170 
     171                              // Let's delete the temporary file 
     172                              if (!$backup_onfile) { 
     173                                   unlink($file); 
     174                              } 
     175 
     176                              // The backup is no more running 
     177                              $config['backup_running'] = false; 
    103178                               
    104                               if ($config['backup_onfile_deleteprev'] && is_file($config['backup_onfile_repository'].'/'.$config['backup_onfile_last']['file'])) { 
    105                                    @unlink($config['backup_onfile_repository'].'/'.$config['backup_onfile_last']['file']); 
    106                               } 
    107                               $config['backup_onfile_last']['date'] = $time; 
    108                               $config['backup_onfile_last']['file'] = $file; 
     179                              // Register the new config 
     180                              self::setConfig($config); 
    109181                         } 
    110182                    } 
    111                      
    112                     // Send backup email 
    113                     if ($backup_onemail) { 
    114                          $backup_content = file_get_contents($file); 
    115                           
    116                          if ($config['backup_onemail_compress_gzip']) { 
    117                               $backup_content = gzencode($backup_content, 9); 
    118                               // Add .gz if it ain't already done 
    119                               $backupname .= $config['backup_onfile_compress_gzip'] ? '' : '.gz'; 
    120                          } 
    121                           
    122                          require_once dirname(__FILE__).'/class.mime_mail.php'; 
    123                          $email = new mime_mail( 
    124                               $config['backup_onemail_adress'], 
    125                               sprintf(__('Auto Backup : %s'),$core->blog->name), 
    126                               sprintf(__('This is an automatically sent message from your blog %s.'), $core->blog->name)."\n". 
    127                               sprintf(__('You will find attached the backup file created on %s.'), date('r', $time)), 
    128                               $config['backup_onemail_header_from']); 
    129                          $email->attach($backup_content, $backupname, 'application/octet-stream', $encoding='utf-8'); 
    130                          if ($email->send()) { 
    131                               $config['backup_onemail_last']['date'] = $time; 
    132                          } 
    133                     } 
    134                      
    135                     // Let's delete the temporary file 
    136                     if (!$backup_onfile) { 
    137                          unlink($file); 
    138                     } 
    139                      
    140                     self::setConfig($config); 
    141183               } 
    142184          } 
  • plugins/autoBackup/index.php

    r590 r662  
    1414if (!defined('DC_CONTEXT_ADMIN')) { exit; } 
    1515 
    16  
    1716$config = autoBackup::getConfig(); 
    1817 
    19 if (isset($_POST['saveconfig'])) { 
     18// Saving new configuration 
     19if (!empty($_POST['saveconfig'])) { 
     20 
    2021     $config['importexportclasspath'] = $_POST['importexportclasspath']; 
    2122     $config['backup_onfile'] = isset($_POST['backup_onfile']); 
     
    2829     $config['backup_onemail_header_from'] = $_POST['backup_onemail_header_from']; 
    2930     $config['backuptype'] = $core->auth->isSuperAdmin() && $_POST['backuptype'] == 'full' ? 'full' : 'blog'; 
    30      $config['backupblogid'] = $core->blog->id;#$_POST['backupblogid']; 
     31     $config['backupblogid'] = $core->blog->id; 
    3132     $config['interval'] = (int) $_POST['interval']; 
    32      autoBackup::setConfig($config); 
     33     $config['backup_running'] = false; 
     34 
     35     try 
     36     { 
     37          autoBackup::setConfig($config); 
     38          $msg = __('Configuration successfully updated.'); 
     39     } 
     40     catch (Exception $e) 
     41     { 
     42          $core->error->add($e->getMessage()); 
     43     } 
    3344} 
    3445 
     
    3849<title><?php echo __('Auto Backup'); ?></title> 
    3950  <?php echo dcPage::jsPageTabs($part); ?> 
    40 <script type="text/javascript"> 
    41 //<![CDATA[ 
    42 function toogle_backuptype(id) { 
    43      if (id != undefined && id == 0) { 
    44           //document.getElementById('backupblogid').disabled = 'disabled'; 
    45           document.getElementById('backupblogid_label').style.color = '#999'; 
    46      } else { 
    47           //document.getElementById('backupblogid').disabled = ''; 
    48           document.getElementById('backupblogid_label').style.color = '#000'; 
    49      } 
    50 } 
    51 //]]> 
    52 </script> 
    5351</head> 
    5452 
    5553<body> 
    56 <?php 
    57 echo '<h2>'.__('Auto Backup').'</h2>'; 
     54<h2><?php echo html::escapeHTML($core->blog->name); ?> &gt; <?php echo __('Auto Backup'); ?></h2> 
    5855 
    59 /* 
    60 $blogs_list = array(); 
    61 foreach ($core->blogs as $k=>$v) { 
    62      if ($core->auth->check('admin',$k)) { 
    63           $blogs_list[html::escapeHTML($v['name']).' ('.$k.')'] = $k; 
    64      } 
    65 } 
    66 //*/ 
     56<?php  
     57// Display message if any 
     58if (!empty($msg)) echo '<p class="message">'.$msg.'</p>'; 
    6759 
     60// Set export type 
    6861$backuptypes = $core->auth->isSuperAdmin() ? array(__('All content export') => 'full', __('Blog export') => 'blog') : array(__('Blog export') => 'blog'); 
    6962 
     63// Set export interval list 
    7064$intervals = array( 
    7165     __('disable') =>     0, 
     
    7771     '14 '.__('days') =>  3600*24*14, 
    7872     ); 
     73// Add custom interval if any 
    7974if (!in_array($config['interval'], array(0, 3600*6, 3600*12, 3600*24, 3600*24*2, 3600*24*7, 3600*24*14))) { 
    8075     $intervals[$config['interval'].' '.__('seconds')] = $config['interval']; 
    8176} 
     77?> 
    8278 
    83 echo 
    84 '<div id="settings" title="'.__('Settings').'" class="multi-part">'. 
    85 '<p>'.__('Auto Backup allows you to create backups automatically and often.').'<br />'. 
    86 __('It uses the Import/Export plugin to work.').'</p>'. 
     79<div id="settings" title="<?php echo __('Settings'); ?>" class="multi-part"> 
    8780 
     81     <p><?php __('Auto Backup allows you to create backups automatically and often.') ?><br /> 
     82          <?php __('It uses the Import/Export plugin to work.') ?></p> 
    8883 
    89 '<form action="'.$p_url.'" method="post">'. 
     84     <form method="post" action="plugin.php"> 
     85     <fieldset> 
     86          <legend><?php echo __('Plugin configuration'); ?></legend> 
     87          <p class="field"> 
     88               <label class="classic" for="importexportclasspath"><?php echo __('Import/Export plugin class path:'); ?></label> 
     89               <?php echo form::field('importexportclasspath',40,255,$config['importexportclasspath']); ?> 
     90               <?php echo (is_file($config['importexportclasspath']) ? '' : '<span style="color:#C00"><strong>'.__('Warning: this file doesn\'t exist!').'</strong></span>'); ?> 
     91          </p> 
     92     </fieldset> 
    9093 
    91 '<fieldset>'. 
     94     <fieldset> 
     95          <legend><?php echo __('General options'); ?></legend> 
     96          <p class="field"> 
     97               <label class="classic" for="backuptype"><?php echo __('Backup type:'); ?></label> 
     98               <?php echo form::combo('backuptype',$backuptypes,$config['backuptype']); ?> 
     99          </p> 
     100          <p class="field"> 
     101               <label class="classic" for="interval"><?php echo __('Create a new backup every:'); ?></label> 
     102               <?php echo form::combo('interval',$intervals,$config['interval']); ?> 
     103          </p> 
     104     </fieldset> 
    92105 
    93 '<p><label>'.__('Import/Export plugin class path :').' '. 
    94 form::field('importexportclasspath',40,255,$config['importexportclasspath']).'</label>'. 
    95 (is_file($config['importexportclasspath']) ? '' : '<span style="color:#C00"><strong>'.__('Warning: this file doesn\'t exist!').'</strong></span>'). 
    96 '</p>'. 
     106     <fieldset> 
     107          <legend><?php echo __('File options'); ?></legend> 
     108          <p class="field"> 
     109               <?php echo form::checkbox('backup_onfile',1,$config['backup_onfile']) ?> 
     110               <label class="classic" for="backup_onfile"><strong><?php echo __('Backup on file'); ?></strong></label> 
     111          </p> 
     112          <p class="field"> 
     113               <label class="classic" for="backup_onfile_repository"><?php echo __('Repository path:'); ?></label> 
     114               <?php echo form::field('backup_onfile_repository',40,255,$config['backup_onfile_repository']); ?> 
     115          </p> 
     116          <p class="field"> 
     117               <?php echo form::checkbox('backup_onfile_compress_gzip',1,$config['backup_onfile_compress_gzip']); ?> 
     118               <label class="classic" for="backup_onfile_compress_gzip"><?php echo __('Compress data with gzip'); ?></label> 
     119          </p> 
     120          <p class="field"> 
     121               <?php echo form::checkbox('backup_onfile_deleteprev',1,$config['backup_onfile_deleteprev']); ?> 
     122               <label class="classic" for="backup_onfile_deleteprev"><?php echo __('After creating the backup file, delete the previous one.'); ?></label> 
     123          </p> 
     124     </fieldset> 
    97125 
    98 '<p><label class="classic">'.form::checkbox('backup_onfile',1,$config['backup_onfile']).' '. 
    99 '<strong>'.__('Backup on file').'</strong></label><br />'. 
    100 '<label class="classic">'.__('Repository path :').' '. 
    101 form::field('backup_onfile_repository',40,255,$config['backup_onfile_repository']).'</label><br />'. 
    102 '<label class="classic">'.form::checkbox('backup_onfile_compress_gzip',1,$config['backup_onfile_compress_gzip']).' '. 
    103 __('Compress data with gzip').'</label><br />'. 
    104 '<label class="classic">'.form::checkbox('backup_onfile_deleteprev',1,$config['backup_onfile_deleteprev']).' '. 
    105 __('After creating the backup file, delete the previous one.').'</label></p>'. 
     126     <fieldset> 
     127          <legend><?php echo __('Mail options'); ?></legend> 
     128          <p class="field"> 
     129               <?php echo form::checkbox('backup_onemail',1,$config['backup_onemail']); ?> 
     130               <label class="classic" for="backup_onemail"><strong><?php echo __('Backup by email'); ?></strong></label> 
     131          </p> 
     132          <p class="field"> 
     133               <label class="classic" for="backup_onemail_adress"><?php echo __('Email address:'); ?></label> 
     134               <?php echo form::field('backup_onemail_adress',30,255,$config['backup_onemail_adress']); ?> 
     135          </p> 
     136          <p class="field"> 
     137               <?php echo form::checkbox('backup_onemail_compress_gzip',1,$config['backup_onemail_compress_gzip']); ?> 
     138               <label class="classic" for="backup_onemail_compress_gzip"><?php echo __('Compress data with gzip'); ?></label> 
     139          </p> 
     140          <p class="field"> 
     141               <label class="classic" for="backup_onemail_header_from"><?php echo __('Email <em>From</em> header:'); ?></label> 
     142               <?php echo form::field('backup_onemail_header_from',30,255,$config['backup_onemail_header_from']); ?> 
     143          </p> 
     144     </fieldset> 
    106145 
    107 '<p><label class="classic">'.form::checkbox('backup_onemail',1,$config['backup_onemail']).' '. 
    108 '<strong>'.__('Backup by email').'</strong></label><br />'. 
    109 '<label class="classic">'.__('Email address :').' '. 
    110 form::field('backup_onemail_adress',15,255,$config['backup_onemail_adress']).'</label><br />'. 
    111 '<label class="classic">'.form::checkbox('backup_onemail_compress_gzip',1,$config['backup_onemail_compress_gzip']).' '. 
    112 __('Compress data with gzip').'</label><br />'. 
    113 '<label class="classic">'.__('Email <em>From</em> header :').' '. 
    114 form::field('backup_onemail_header_from',30,255,$config['backup_onemail_header_from']).'</label> 
    115 </p>'. 
     146     <p><input type="hidden" name="p" value="autoBackup" /> 
     147     <?php echo $core->formNonce(); ?> 
     148     <input type="submit" name="saveconfig" value="<?php echo __('Save configuration'); ?>" /> 
     149     </p> 
     150     </form> 
    116151 
    117 '<p><label class="classic">'.__('Backup type :').' '. 
    118 form::combo('backuptype',$backuptypes,$config['backuptype'],'','',false,' onchange="javascript:toogle_backuptype(this.options.selectedIndex)"').'</label>&nbsp; '. 
    119 '<label id="backupblogid_label" class="classic"'.($config['backuptype'] == 'full' && $core->auth->isSuperAdmin() ? ' style="color:#999"' : '').'>'.__('Blog :').' '. 
    120 #form::combo('backupblogid',$blogs_list,$config['backupblogid'],'','',$config['backuptype'] == 'full'). 
    121 '<strong>'.$core->blog->id.'</strong>'. 
    122 '</label></p>'. 
     152     <h3><?php echo __('Last backups'); ?></h3> 
    123153 
    124 '<p><label class="classic">'.__('Create a new backup every :').' '. 
    125 form::combo('interval',$intervals,$config['interval']).'</label></p>'. 
     154     <p><?php echo __('Last backup on file:'); ?>&nbsp; 
     155     <?php echo ($config['backup_onfile_last']['date'] > 0 ? date('r', $config['backup_onfile_last']['date']) : '<em>'.__('never').'</em>'); ?><br /> 
     156     <?php echo __('File name:'); ?>&nbsp;<abbr title="<?php echo html::escapeHTML($config['backup_onfile_last']['file']); ?>"> 
     157     <?php echo  html::escapeHTML(basename($config['backup_onfile_last']['file'])); ?></abbr></p> 
    126158 
     159     <p><?php echo __('Last backup by email:'); ?>&nbsp; 
     160     <?php echo ($config['backup_onemail_last']['date'] > 0 ? date('r', $config['backup_onemail_last']['date']) : '<em>'.__('never').'</em>'); ?></p> 
     161</div> 
    127162 
    128 '<p><input type="submit" name="saveconfig" value="'.__('Save').'" /></p>'. 
    129 '<p>'.$core->formNonce().'</p>'. 
    130 '</fieldset>'. 
    131 '</form>'. 
     163<div id="about" title="<?php echo __('About'); ?>" class="multi-part"> 
     164     <h2 style="background: url(index.php?pf=autoBackup/icon.png) no-repeat 0 0.25em; padding: 5px 0 5px 22px; margin-left: 20px;"><?php echo __('Auto Backup'); ?></h2> 
     165     <ul style="list-style: none; line-height: 30px; font-weight: bold;"> 
     166          <li><?php echo __('Created by'); ?> : <a href="http://www.k-netweb.net/">k-net</a></li> 
     167          <li><?php echo __('Help, support and sources'); ?> : <a href="http://lab.dotclear.org/wiki/plugin/autoBackup">http://lab.dotclear.org/wiki/plugin/autoBackup</a></li> 
     168     </ul> 
     169</div> 
    132170 
    133  
    134 '<p>&nbsp;</p>'. 
    135 '<h3>'.__('Last backups').'</h3>'. 
    136  
    137 '<p>'.__('Last backup on file :').'&nbsp; '.($config['backup_onfile_last']['date'] > 0 ? date('r', $config['backup_onfile_last']['date']) : '<em>'.__('never').'</em>').'<br />'. 
    138 __('File name :').'&nbsp; <abbr title="'.html::escapeHTML($config['backup_onfile_last']['file']).'">'.html::escapeHTML(basename($config['backup_onfile_last']['file'])).'</abbr>'.'</p>'. 
    139  
    140 '<p>'.__('Last backup by email :').'&nbsp; '.($config['backup_onemail_last']['date'] > 0 ? date('r', $config['backup_onemail_last']['date']) : '<em>'.__('never').'</em>').'</p>'. 
    141 '</div>'; 
    142  
    143 echo 
    144 '<div id="about" title="'.__('About').'" class="multi-part">'. 
    145 '<h2 style="background: url(index.php?pf=autoBackup/icon.png) no-repeat 0 0.25em; padding: 5px 0 5px 22px; margin-left: 20px;">'.__('Auto Backup').'</h2>'. 
    146 '<ul style="list-style: none; line-height: 30px; font-weight: bold;"><li>version 1.1.6</li>'. 
    147 '<li>'.__('Created by').' : <a href="http://www.k-netweb.net/">k-net</a></li>'. 
    148 '<li>'.__('Help and Support').' : -</li>'. 
    149 '<li>'.__('Sources').' : <a href="http://code.google.com/p/dcplugins/source/browse/autoBackup">http://code.google.com/p/dcplugins/source/browse/autoBackup</a></li></ul>'. 
    150 '</div>'; 
    151  
    152 ?> 
    153171</body> 
    154172</html> 
  • plugins/autoBackup/locales/fr/main.po

    r590 r662  
    11# -- BEGIN LICENSE BLOCK ---------------------------------- 
    22# This file is part of autoBackup, a plugin for Dotclear. 
    3 #  
     3# 
    44# Copyright (c) 2008 k-net 
    55# http://www.k-netweb.net/ 
    6 #  
     6# 
    77# Licensed under the GPL version 2.0 license. 
    88# A copy of this license is available in LICENSE file or at 
    99# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    1010# -- END LICENSE BLOCK ------------------------------------ 
     11msgid "" 
     12msgstr "" 
     13"Report-Msgid-Bugs-To: \n" 
     14"POT-Creation-Date: 2009-01-07 14:14+0100\n" 
     15"Content-Type: text/plain; charset=UTF-8\n" 
     16"Project-Id-Version: \n" 
     17"PO-Revision-Date: \n" 
     18"Last-Translator: Franck Paul <carnet.franck.paul@gmail.com>\n" 
     19"Language-Team: \n" 
     20"MIME-Version: 1.0\n" 
     21"Content-Transfer-Encoding: 8bit\n" 
    1122 
    12 msgid "" 
    13 msgstr "Content-Type: text/plain; charset=UTF-8\n" 
    14  
    15 #: plugins/autoBackup/_admin.php 
    1623msgid "Auto Backup" 
    1724msgstr "Auto Backup" 
    1825 
    19 #: plugins/autoBackup/_define.php 
    20 msgid "Make backups automatically" 
    21 msgstr "Faites de sauvegardes automatiques" 
     26#, php-format 
     27msgid "Auto Backup : %s" 
     28msgstr "Auto Backup : %s" 
    2229 
    23 msgid "Auto Backup : backup file from %s" 
    24 msgstr "Auto Backup : fichier de sauvegarde de %s" 
    25  
     30#, php-format 
    2631msgid "This is an automatically sent message from your blog %s." 
    2732msgstr "Ceci est un message envoyé automatiquement depuis votre blog %s." 
    2833 
     34#, php-format 
    2935msgid "You will find attached the backup file created on %s." 
    3036msgstr "Vous trouverez ci joint le fichier de sauvegarde datant de %s." 
    3137 
    32 #: plugins/autoBackup/index.php 
     38msgid "Configuration successfully updated." 
     39msgstr "La configuration a été correctement enregistrée." 
     40 
     41msgid "All content export" 
     42msgstr "Export de tout le contenu" 
     43 
     44msgid "Blog export" 
     45msgstr "Export du blog" 
     46 
    3347msgid "disable" 
    3448msgstr "désactiver" 
     
    3650msgid "hours" 
    3751msgstr "heures" 
    38  
    39 msgid "days" 
    40 msgstr "jours" 
    4152 
    4253msgid "seconds" 
     
    5263msgstr "Il utilise le plugin Import/Export pour fonctionner." 
    5364 
    54 msgid "Import/Export plugin class path :" 
     65msgid "Plugin configuration" 
     66msgstr "Configuration de l'extension" 
     67 
     68msgid "Import/Export plugin class path:" 
    5569msgstr "Chemin de la classe du plugin Import/Export :" 
    5670 
     
    5872msgstr "Attention : ce fichier n'existe pas !" 
    5973 
     74msgid "General options" 
     75msgstr "Options générales" 
     76 
     77msgid "Backup type:" 
     78msgstr "Type de sauvegarde :" 
     79 
     80msgid "Create a new backup every:" 
     81msgstr "Créer une nouvelle sauvegarde tous les :" 
     82 
     83msgid "File options" 
     84msgstr "Options fichier" 
     85 
    6086msgid "Backup on file" 
    6187msgstr "Sauvegarder sur fichier" 
    6288 
    63 msgid "Repository path :" 
     89msgid "Repository path:" 
    6490msgstr "Chemin vers le dépôt :" 
     91 
     92msgid "Compress data with gzip" 
     93msgstr "Compresser les données avec gzip" 
    6594 
    6695msgid "After creating the backup file, delete the previous one." 
    6796msgstr "Après la création du fichier de la sauvegarde, supprimer le précédent." 
    6897 
     98msgid "Mail options" 
     99msgstr "Option par email" 
     100 
    69101msgid "Backup by email" 
    70102msgstr "Sauvegarder par email" 
    71103 
    72 msgid "Email address :" 
     104msgid "Email address:" 
    73105msgstr "Adresse email :" 
    74106 
    75 msgid "Compress data with gzip" 
    76 msgstr "Compresser les données avec gzip" 
    77  
    78 msgid "Email <em>From</em> header :" 
     107msgid "Email <em>From</em> header:" 
    79108msgstr "En-tête <em>From</em> de l'email :" 
    80109 
    81 msgid "Backup type :" 
    82 msgstr "Type de sauvegarde :" 
    83  
    84 msgid "All content export" 
    85 msgstr "Export de tout le contenu" 
    86  
    87 msgid "Blog export" 
    88 msgstr "Export d'un blog" 
    89  
    90 msgid "Blog :" 
    91 msgstr "Blog :" 
    92  
    93 msgid "Create a new backup every :" 
    94 msgstr "Créer une nouvelle sauvegarde tous les :" 
    95  
    96 msgid "Save" 
    97 msgstr "Enregistrer" 
     110msgid "Save configuration" 
     111msgstr "Enregistrer la configuration" 
    98112 
    99113msgid "Last backups" 
    100114msgstr "Dernières sauvegardes" 
    101115 
    102 msgid "Last backup on file :" 
     116msgid "Last backup on file:" 
    103117msgstr "Dernière sauvegarde sur fichier :" 
    104118 
     
    106120msgstr "jamais" 
    107121 
    108 msgid "File name :" 
    109 msgstr "Nom du fichier :" 
     122msgid "Last backup by email:" 
     123msgstr "Dernière sauvegarde par email :" 
    110124 
    111 msgid "Last backup by email :" 
    112 msgstr "Dernière sauvegarde par email :" 
     125msgid "About" 
     126msgstr "À propos de" 
    113127 
    114128msgid "Created by" 
    115129msgstr "Créé par" 
    116130 
    117 msgid "Help and Support" 
    118 msgstr "Aide et Support" 
     131msgid "Help, support and sources" 
     132msgstr "Aide, support et sources" 
    119133 
    120 msgid "Sources" 
    121 msgstr "Sources" 
     134#~ msgid "File name :" 
     135#~ msgstr "Nom du fichier :" 
     136#~ msgid "Make backups automatically" 
     137#~ msgstr "Faites de sauvegardes automatiques" 
     138#~ msgid "Auto Backup : backup file from %s" 
     139#~ msgstr "Auto Backup : fichier de sauvegarde de %s" 
     140#~ msgid "days" 
     141#~ msgstr "jours" 
     142#~ msgid "Blog :" 
     143#~ msgstr "Blog :" 
     144#~ msgid "Save" 
     145#~ msgstr "Enregistrer" 
     146#~ msgid "Help and Support" 
     147#~ msgstr "Aide et Support" 
     148#~ msgid "Sources" 
     149#~ msgstr "Sources" 
     150 
Note: See TracChangeset for help on using the changeset viewer.

Sites map