コード例 #1
0
ファイル: exchangeunfu.php プロジェクト: NaszvadiG/ImageCMS
 /**
  * Use this function to make backup before import starts
  */
 protected function makeDBBackup()
 {
     if (is_really_writable('./application/backups')) {
         \libraries\Backup::create()->createBackup("zip", "exchange");
     } else {
         $this->error_log(lang('Can not create a database snapshot, check the folder', 'exchange') . ' /application/backups ' . lang('on writing possibility', 'exchange'));
     }
 }
コード例 #2
0
ファイル: backup.php プロジェクト: NaszvadiG/ImageCMS
 public function force_download($file_type)
 {
     $this->load->helper('download');
     $fileName = \libraries\Backup::create()->createBackup($file_type, "sql");
     $fileContents = file_get_contents($fileName);
     force_download(pathinfo($fileName, PATHINFO_BASENAME), $fileContents);
 }
コード例 #3
0
 /**
  * database backup
  */
 public function db_backup()
 {
     if (is_really_writable(BACKUPFOLDER)) {
         $this->ci->load->dbutil();
         $filePath = \libraries\Backup::create()->createBackup("sql", "backup", TRUE);
         return pathinfo($filePath, PATHINFO_BASENAME);
     } else {
         showMessage(langf('Can not create a database snapshot, Check the folder {0} on the ability to record', 'admin', array(BACKUPFOLDER)));
     }
     return $name;
 }
コード例 #4
0
 public function db_backup()
 {
     if (!is_dir(BACKUPFOLDER)) {
         mkdir(BACKUPFOLDER);
         chmod(BACKUPFOLDER, 0777);
     }
     if (is_really_writable(BACKUPFOLDER)) {
         \CI::$APP->load->dbutil();
         $filePath = \libraries\Backup::create()->createBackup("sql", "backup_template_manager", TRUE);
         chmod(BACKUPFOLDER . 'backup_template_manager.sql', 0777);
         return pathinfo($filePath, PATHINFO_BASENAME);
     }
     return FALSE;
 }