Migration, Backup, Staging – WPvivid - Version 0.9.27

Version Description

  • Fixed a fatal error that could be triggered by some firewall or security plugins.
  • Refined and simplified the plugin menu in admin menu and top admin bar.
  • Optimized the plugin code.
  • Added Polish language translation.
Download this release

Release Info

Developer wpvivid
Plugin Icon 128x128 Migration, Backup, Staging – WPvivid
Version 0.9.27
Comparing to
See all releases

Code changes from version 0.9.26 to 0.9.27

admin/class-wpvivid-admin.php CHANGED
@@ -60,6 +60,13 @@ class WPvivid_Admin {
60
  add_filter('wpvivid_get_screen_ids',array($this,'get_screen_ids'),10);
61
  add_filter('wpvivid_get_toolbar_menus',array($this,'get_toolbar_menus'),10);
62
  add_filter('wpvivid_get_admin_menus',array($this,'get_admin_menus'),10);
 
 
 
 
 
 
 
63
  $this->plugin_name = $plugin_name;
64
  $this->version = $version;
65
  }
@@ -94,156 +101,29 @@ class WPvivid_Admin {
94
  $menu['index']=1;
95
  $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
96
 
97
- $menu['id']='wpvivid_admin_menu_schedule';
98
- $menu['parent']='wpvivid_admin_menu';
99
- $menu['title']='Schedule';
100
- $menu['tab']='admin.php?page=WPvivid&tab-schedule';
101
- $menu['href']=$admin_url . 'admin.php?page=WPvivid&tab-schedule';
102
- $menu['index']=2;
103
- $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
104
-
105
- $menu['id']='wpvivid_admin_menu_transfer';
106
- $menu['parent']='wpvivid_admin_menu';
107
- $menu['title']='Auto-Migration';
108
- $menu['tab']='admin.php?page=WPvivid&tab-transfer';
109
- $menu['href']=$admin_url . 'admin.php?page=WPvivid&tab-transfer';
110
- $menu['index']=3;
111
- $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
112
-
113
- $menu['id']='wpvivid_admin_menu_remote';
114
- $menu['parent']='wpvivid_admin_menu';
115
- $menu['title']='Remote Storage';
116
- $menu['tab']='admin.php?page=WPvivid&tab-remote-storage';
117
- $menu['href']=$admin_url . 'admin.php?page=WPvivid&tab-remote-storage';
118
- $menu['index']=4;
119
- $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
120
-
121
- $menu['id']='wpvivid_admin_menu_settings';
122
- $menu['parent']='wpvivid_admin_menu';
123
- $menu['title']='Settings';
124
- $menu['tab']= 'admin.php?page=WPvivid&tab-settings';
125
- $menu['href']=$admin_url . 'admin.php?page=WPvivid&tab-settings';
126
- $menu['index']=5;
127
- $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
128
-
129
- $menu['id']='wpvivid_admin_menu_debug';
130
- $menu['parent']='wpvivid_admin_menu';
131
- $menu['title']='Debug';
132
- $menu['tab']= 'admin.php?page=WPvivid&tab-website-info';
133
- $menu['href']=$admin_url . 'admin.php?page=WPvivid&tab-website-info';
134
- $menu['index']=6;
135
- $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
136
-
137
- $menu['id']='wpvivid_admin_menu_logs';
138
- $menu['parent']='wpvivid_admin_menu';
139
- $menu['title']='Logs';
140
- $menu['tab']='admin.php?page=WPvivid&tab-logs';
141
- $menu['href']=$admin_url . 'admin.php?page=WPvivid&tab-logs';
142
- $menu['index']=7;
143
- $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
144
-
145
- $menu['id']='wpvivid_admin_menu_key';
146
- $menu['parent']='wpvivid_admin_menu';
147
- $menu['title']='Key';
148
- $menu['tab']= 'admin.php?page=WPvivid&tab-key';
149
- $menu['href']=$admin_url . 'admin.php?page=WPvivid&tab-key';
150
- $menu['index']=8;
151
- $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
152
-
153
- $menu['id']='wpvivid_admin_menu_mwp';
154
- $menu['parent']='wpvivid_admin_menu';
155
- $menu['title']='MainWP';
156
- $menu['tab']= 'admin.php?page=WPvivid&tab-mainwp';
157
- $menu['href']=$admin_url . 'admin.php?page=WPvivid&tab-mainwp';
158
- $menu['index']=30;
159
- $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
160
-
161
  return $toolbar_menus;
162
  }
163
 
164
  public function get_admin_menus($submenus)
165
  {
166
  $submenu['parent_slug']=$this->plugin_name;
167
- $submenu['page_title']= __('WPvivid Backup');
168
  $submenu['menu_title']=__('Backup & Restore', 'wpvivid');
169
  $submenu['capability']='administrator';
170
  $submenu['menu_slug']=$this->plugin_name;
171
- $submenu['function']=array($this, 'display_plugin_backup_page');
172
  $submenu['index']=1;
173
  $submenus[$submenu['menu_slug']]=$submenu;
174
 
175
  $submenu['parent_slug']=$this->plugin_name;
176
- $submenu['page_title']= __('WPvivid Backup');
177
- $submenu['menu_title']=__('Schedule', 'wpvivid');
178
- $submenu['capability']='administrator';
179
- $submenu['menu_slug']='wpvivid-schedule';
180
- $submenu['function']=array($this, 'display_plugin_schedule_page');
181
- $submenu['index']=2;
182
- $submenus[$submenu['menu_slug']]=$submenu;
183
-
184
- $submenu['parent_slug']=$this->plugin_name;
185
- $submenu['page_title']= __('WPvivid Backup');
186
- $submenu['menu_title']=__('Auto-Migration', 'wpvivid');
187
- $submenu['capability']='administrator';
188
- $submenu['menu_slug']='wpvivid-transfer';
189
- $submenu['function']=array($this, 'display_plugin_transfer_page');
190
- $submenu['index']=3;
191
- $submenus[$submenu['menu_slug']]=$submenu;
192
-
193
- $submenu['parent_slug']=$this->plugin_name;
194
- $submenu['page_title']= __('WPvivid Backup');
195
- $submenu['menu_title']=__('Remote Storage', 'wpvivid');
196
- $submenu['capability']='administrator';
197
- $submenu['menu_slug']='wpvivid-remote';
198
- $submenu['function']=array($this, 'display_plugin_remote_page');
199
- $submenu['index']=4;
200
- $submenus[$submenu['menu_slug']]=$submenu;
201
-
202
- $submenu['parent_slug']=$this->plugin_name;
203
- $submenu['page_title']= __('WPvivid Backup');
204
  $submenu['menu_title']=__('Settings', 'wpvivid');
205
  $submenu['capability']='administrator';
206
  $submenu['menu_slug']='wpvivid-setting';
207
- $submenu['function']=array($this, 'display_plugin_setting_page');
208
  $submenu['index']=5;
209
  $submenus[$submenu['menu_slug']]=$submenu;
210
 
211
- $submenu['parent_slug']=$this->plugin_name;
212
- $submenu['page_title']= __('WPvivid Backup');
213
- $submenu['menu_title']=__('Debug', 'wpvivid');
214
- $submenu['capability']='administrator';
215
- $submenu['menu_slug']='wpvivid-website';
216
- $submenu['function']=array($this, 'display_plugin_website_page');
217
- $submenu['index']=6;
218
- $submenus[$submenu['menu_slug']]=$submenu;
219
-
220
- $submenu['parent_slug']=$this->plugin_name;
221
- $submenu['page_title']= __('WPvivid Backup');
222
- $submenu['menu_title']=__('Logs', 'wpvivid');
223
- $submenu['capability']='administrator';
224
- $submenu['menu_slug']='wpvivid-log';
225
- $submenu['function']=array($this, 'display_plugin_log_page');
226
- $submenu['index']=7;
227
- $submenus[$submenu['menu_slug']]=$submenu;
228
-
229
- $submenu['parent_slug']=$this->plugin_name;
230
- $submenu['page_title']= __('WPvivid Backup');
231
- $submenu['menu_title']=__('Key', 'wpvivid');
232
- $submenu['capability']='administrator';
233
- $submenu['menu_slug']='wpvivid-key';
234
- $submenu['function']=array($this, 'display_plugin_key_page');
235
- $submenu['index']=8;
236
- $submenus[$submenu['menu_slug']]=$submenu;
237
-
238
- $submenu['parent_slug']=$this->plugin_name;
239
- $submenu['page_title']= __('WPvivid Backup');
240
- $submenu['menu_title']=__('MainWP', 'wpvivid');
241
- $submenu['capability']='administrator';
242
- $submenu['menu_slug']='wpvivid-mainwp';
243
- $submenu['function']=array($this, 'display_plugin_mainwp_page');
244
- $submenu['index']=30;
245
- $submenus[$submenu['menu_slug']]=$submenu;
246
-
247
  return $submenus;
248
  }
249
 
@@ -259,6 +139,7 @@ class WPvivid_Admin {
259
  if(in_array(get_current_screen()->id,$this->screen_ids))
260
  {
261
  wp_enqueue_style($this->plugin_name, WPVIVID_PLUGIN_DIR_URL . 'css/wpvivid-admin.css', array(), $this->version, 'all');
 
262
  }
263
  }
264
 
@@ -277,6 +158,7 @@ class WPvivid_Admin {
277
  wp_localize_script($this->plugin_name, 'ajax_object', array('ajax_url' => admin_url('admin-ajax.php')));
278
 
279
  wp_enqueue_script('plupload-all');
 
280
  }
281
  }
282
 
@@ -295,50 +177,36 @@ class WPvivid_Admin {
295
  * Administration Menus: http://codex.wordpress.org/Administration_Menus
296
  *
297
  */
298
- add_menu_page(__('WPvivid Backup'), __('WPvivid Backup'), 'administrator', $this->plugin_name, array($this, 'display_plugin_backup_page'), 'dashicons-cloud', 100);
299
- $general_setting=WPvivid_Setting::get_setting(true, "");
300
- if(!isset($general_setting['options']['wpvivid_common_setting']['show_tab_menu'])){
301
- $wpvivid_show_tab_menu=true;
302
- }
303
- else {
304
- if ($general_setting['options']['wpvivid_common_setting']['show_tab_menu']) {
305
- $wpvivid_show_tab_menu=true;
306
- } else {
307
- $wpvivid_show_tab_menu=false;
308
- }
309
- }
310
- if($wpvivid_show_tab_menu)
311
- {
312
- $this->submenus = apply_filters('wpvivid_get_admin_menus', $this->submenus);
313
-
314
- usort($this->submenus, function ($a, $b)
315
- {
316
- if($a['index']==$b['index'])
317
- return 0;
318
-
319
- if($a['index']>$b['index'])
320
- return 1;
321
- else
322
- return -1;
323
- });
324
-
325
- foreach ($this->submenus as $submenu)
326
- {
327
- add_submenu_page(
328
- $submenu['parent_slug'],
329
- $submenu['page_title'],
330
- $submenu['menu_title'],
331
- $submenu['capability'],
332
- $submenu['menu_slug'],
333
- $submenu['function'], false, 100);
334
- }
335
  }
336
  }
337
 
338
  function add_toolbar_items($wp_admin_bar)
339
  {
340
  global $wpvivid_plugin;
341
- if(is_admin() && current_user_can('administrator')) {
 
342
  $show_admin_bar = $wpvivid_plugin->get_admin_bar_setting();
343
  if ($show_admin_bar === true)
344
  {
@@ -375,7 +243,8 @@ class WPvivid_Admin {
375
  }
376
  }
377
 
378
- public function add_action_links( $links ) {
 
379
  $settings_link = array(
380
  '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_name ) . '">' . __('Settings', $this->plugin_name) . '</a>',
381
  );
@@ -396,57 +265,29 @@ class WPvivid_Admin {
396
  */
397
  public function display_plugin_setup_page()
398
  {
399
- if(isset($_REQUEST['tab-backup']))
400
- {
401
- self::wpvivid_set_page_request('backup');
402
- }
403
- else if(isset($_REQUEST['tab-transfer'])){
404
- self::wpvivid_set_page_request('transfer');
405
- }
406
- else if(isset($_REQUEST['tab-settings'])){
407
- self::wpvivid_set_page_request('settings');
408
- }
409
- else if(isset($_REQUEST['tab-schedule'])){
410
- self::wpvivid_set_page_request('schedule');
411
- }
412
- else if(isset($_REQUEST['tab-remote-storage'])){
413
- self::wpvivid_set_page_request('remote');
414
- }
415
- else if(isset($_REQUEST['tab-website-info'])){
416
- self::wpvivid_set_page_request('website');
417
- }
418
- else if(isset($_REQUEST['tab-logs'])){
419
- self::wpvivid_set_page_request('log');
420
- }
421
- else if(isset($_REQUEST['tab-key'])){
422
- self::wpvivid_set_page_request('key');
423
- }
424
- else if(isset($_REQUEST['tab-mainwp'])){
425
- self::wpvivid_set_page_request('mainwp');
426
- }
427
- else
428
- {
429
- global $request_page;
430
- $request_page=apply_filters('wpvivid_set_page_request',$request_page);
431
- }
432
 
433
- global $wpvivid_plugin;
434
- $wpvivid_plugin->clean_cache();
 
 
435
 
436
- //
 
437
  $migrate_notice=false;
438
  $migrate_status=WPvivid_Setting::get_option('wpvivid_migrate_status');
439
- if(!empty($migrate_status) && $migrate_status == 'completed'){
 
440
  $migrate_notice=true;
441
  _e('<div class="notice notice-warning is-dismissible"><p>Migration is complete and htaccess file is replaced. In order to successfully complete the migration, you\'d better reinstall 301 redirect plugin, firewall and security plugin, and caching plugin if they exist.</p></div>');
442
  WPvivid_Setting::delete_option('wpvivid_migrate_status');
443
  }
444
-
445
-
446
  $restore = new WPvivid_restore_data();
447
- if ($restore->has_restore()) {
 
448
  $restore_status = $restore->get_restore_status();
449
- if ($restore_status === WPVIVID_RESTORE_COMPLETED) {
 
450
  $restore->clean_restore_data();
451
  $need_review=WPvivid_Setting::get_option('wpvivid_need_review');
452
  if($need_review=='not')
@@ -456,150 +297,89 @@ class WPvivid_Admin {
456
  WPvivid_Setting::update_option('wpvivid_review_msg',$msg);
457
  }
458
  else{
459
- if(!$migrate_notice) {
 
460
  _e('<div class="notice notice-success is-dismissible"><p>Restore completed successfully.</p></div>');
461
  }
462
  }
463
  }
464
  }
465
-
466
- $this->wpvivid_show_add_my_review();
467
- $this->wpvivid_check_extensions();
468
- $this->wpvivid_check_amazons3();
469
-
470
- $loglist=$wpvivid_plugin->get_log_list_ex();
471
- $remoteslist=WPvivid_Setting::get_all_remote_options();
472
- $default_remote_storage='';
473
- foreach ($remoteslist['remote_selected'] as $value) {
474
- $default_remote_storage=$value;
475
- }
476
- ?>
477
- <script>
478
- var wpvivid_siteurl = '<?php
479
- $wpvivid_siteurl = array();
480
- $wpvivid_siteurl=WPvivid_Admin::wpvivid_get_siteurl();
481
- echo esc_url($wpvivid_siteurl['home_url']);
482
- ?>';
483
- var wpvivid_plugurl = '<?php
484
- echo WPVIVID_PLUGIN_URL;
485
- ?>';
486
- var wpvivid_log_count = '<?php
487
- _e(sizeof($loglist['log_list']['file']), 'wpvivid');
488
- ?>';
489
- var wpvivid_log_array = '<?php
490
- _e(json_encode($loglist), 'wpvivid');
491
- ?>';
492
- var wpvivid_page_request = '<?php
493
- $page_request = WPvivid_Admin::wpvivid_get_page_request();
494
- _e($page_request, 'wpvivid');
495
- ?>';
496
- var wpvivid_default_remote_storage = '<?php
497
- _e($default_remote_storage, 'wpvivid');
498
- ?>';
499
- </script>
500
- <?php
501
-
502
- do_action('wpvivid_before_setup_page');
503
- include_once('partials/wpvivid-admin-display.php');
504
- }
505
-
506
- public function display_plugin_backup_page(){
507
- self::wpvivid_set_page_request('backup');
508
- $this->display_plugin_setup_page();
509
- }
510
-
511
- public function display_plugin_transfer_page(){
512
- self::wpvivid_set_page_request('transfer');
513
- $this->display_plugin_setup_page();
514
  }
515
 
516
- public function display_plugin_setting_page(){
517
- self::wpvivid_set_page_request('settings');
518
- $this->display_plugin_setup_page();
519
- }
520
-
521
- public function display_plugin_schedule_page(){
522
- self::wpvivid_set_page_request('schedule');
523
- $this->display_plugin_setup_page();
524
- }
525
-
526
- public function display_plugin_remote_page(){
527
- self::wpvivid_set_page_request('remote');
528
- $this->display_plugin_setup_page();
529
- }
530
-
531
- public function display_plugin_website_page(){
532
- self::wpvivid_set_page_request('website');
533
- $this->display_plugin_setup_page();
534
- }
535
-
536
- public function display_plugin_log_page(){
537
- self::wpvivid_set_page_request('log');
538
- $this->display_plugin_setup_page();
539
- }
540
-
541
- public function display_plugin_key_page(){
542
- self::wpvivid_set_page_request('key');
543
- $this->display_plugin_setup_page();
544
  }
545
 
546
- public function display_plugin_mainwp_page(){
547
- self::wpvivid_set_page_request('mainwp');
548
- $this->display_plugin_setup_page();
549
- }
550
 
551
- public function wpvivid_set_page_request($page){
552
- global $request_page;
553
- switch($page)
554
  {
555
- case "backup":
556
- $request_page='wpvivid_tab_general';
557
- break;
558
- case "transfer":
559
- $request_page='wpvivid_tab_migrate';
560
- break;
561
- case "settings":
562
- $request_page='wpvivid_tab_setting';
563
- break;
564
- case "schedule":
565
- $request_page='wpvivid_tab_schedule';
566
- break;
567
- case "remote":
568
- $request_page='wpvivid_tab_remote_storage';
569
- break;
570
- case "website":
571
- $request_page='wpvivid_tab_debug';
572
- break;
573
- case "log":
574
- $request_page='wpvivid_tab_log';
575
- break;
576
- case "key":
577
- $request_page='wpvivid_tab_key';
578
- break;
579
- case "mainwp":
580
- $request_page='wpvivid_tab_mainwp';
581
- break;
582
- default:
583
- $request_page='wpvivid_tab_general';
584
- break;
 
 
 
 
 
 
 
 
 
 
 
585
  }
586
- }
587
 
588
- public static function wpvivid_get_page_request(){
589
- global $request_page;
590
  return $request_page;
591
  }
592
 
593
- public static function wpvivid_show_add_my_review()
594
  {
595
  $review = WPvivid_Setting::get_option('wpvivid_need_review');
596
  $review_msg = WPvivid_Setting::get_option('wpvivid_review_msg');
597
- if (empty($review)) {
 
598
  WPvivid_Setting::update_option('wpvivid_need_review', 'not');
599
  } else {
600
- if ($review == 'not') {
601
- } else if ($review == 'show') {
602
- if(!empty($review_msg)) {
 
 
 
 
603
  _e('<div class="notice notice-info is-dismissible" id="wpvivid_notice_rate">
604
  <p>' . $review_msg . '</p>
605
  <div style="padding-bottom: 10px;">
@@ -609,10 +389,14 @@ class WPvivid_Admin {
609
  </div>
610
  </div>');
611
  }
612
- } else if ($review == 'do_not_ask') {
613
- } else {
614
- if (time() > $review) {
615
- if(!empty($review_msg)) {
 
 
 
 
616
  _e('<div class="notice notice-info is-dismissible" id="wpvivid_notice_rate">
617
  <p>' . $review_msg . '</p>
618
  <div style="padding-bottom: 10px;">
@@ -627,25 +411,33 @@ class WPvivid_Admin {
627
  }
628
  }
629
 
630
- public function wpvivid_check_amazons3(){
 
631
  $remoteslist=WPvivid_Setting::get_all_remote_options();
632
  $need_amazons3_notice = false;
633
- if(isset($remoteslist) && !empty($remoteslist)){
634
- foreach ($remoteslist as $remote_id => $value){
635
- if($remote_id === 'remote_selected') {
 
 
 
636
  continue;
637
  }
638
- if($value['type'] == 'amazons3' && isset($value['s3Path'])){
 
639
  $need_amazons3_notice = true;
640
  }
641
- if($value['type'] == 's3compat' && isset($value['s3directory'])){
 
642
  $need_amazons3_notice = true;
643
  }
644
  }
645
  }
646
- if($need_amazons3_notice){
 
647
  $amazons3_notice = WPvivid_Setting::get_option('wpvivid_amazons3_notice', 'not init');
648
- if($amazons3_notice === 'not init') {
 
649
  $notice_message = 'As Amazon S3 and DigitalOcean Space have upgraded their connection methods, please delete the previous connections and re-add your Amazon S3/DigitalOcean Space accounts to make sure the connections work.';
650
  _e('<div class="notice notice-warning" id="wpvivid_amazons3_notice">
651
  <p>' . $notice_message . '</p>
@@ -657,7 +449,8 @@ class WPvivid_Admin {
657
  }
658
  }
659
 
660
- public static function wpvivid_check_extensions(){
 
661
  $need_php_extensions = array();
662
  $need_extensions_count = 0;
663
  $extensions=get_loaded_extensions();
@@ -707,11 +500,50 @@ class WPvivid_Admin {
707
  _e('<div class="notice notice-error"><p>Class PclZip is not detected. Please update or reinstall your WordPress.</p></div>');
708
  }
709
 
710
- if(defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON){
711
- _e('<div class="notice notice-error is-dismissible"><p>In order to execute the scheduled backups properly, please set the DISABLE_WP_CRON constant to false.</p></div>');
 
712
  }
713
  }
714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
715
  public function wpvivid_add_default_tab_page($page_array){
716
  $page_array['backup_restore'] = array('index' => '1', 'tab_func' => array($this, 'wpvivid_add_tab_backup_restore'), 'page_func' => array($this, 'wpvivid_add_page_backup'));
717
  $page_array['schedule'] = array('index' => '2', 'tab_func' => array($this, 'wpvivid_add_tab_schedule'), 'page_func' => array($this, 'wpvivid_add_page_schedule'));
@@ -720,7 +552,10 @@ class WPvivid_Admin {
720
  $page_array['website_info'] = array('index' => '6', 'tab_func' => array($this, 'wpvivid_add_tab_website_info'), 'page_func' => array($this, 'wpvivid_add_page_website_info'));
721
  $page_array['log'] = array('index' => '7', 'tab_func' => array($this, 'wpvivid_add_tab_log'), 'page_func' => array($this, 'wpvivid_add_page_log'));
722
  $page_array['read_log'] = array('index' => '9', 'tab_func' => array($this, 'wpvivid_add_tab_read_log'), 'page_func' => array($this, 'wpvivid_add_page_read_log'));
723
- $page_array['mwp'] = array('index' => '30', 'tab_func' => array($this, 'wpvivid_add_tab_mwp'), 'page_func' => array($this, 'wpvivid_add_page_mwp'));
 
 
 
724
  return $page_array;
725
  }
726
 
@@ -773,14 +608,17 @@ class WPvivid_Admin {
773
 
774
  public function wpvivid_add_tab_mwp(){
775
  ?>
776
- <a href="#" id="wpvivid_tab_mainwp" class="nav-tab wrap-nav-tab" onclick="switchTabs(event, 'mwp-page')"><?php _e('MainWP', 'wpvivid'); ?></a>
 
 
 
 
 
777
  <?php
778
  }
779
 
780
- public function wpvivid_add_page_backup(){
781
- $html_progress = '';
782
- $html_backup = '';
783
- $html_schedule = '';
784
  ?>
785
  <div id="general-page" class="wrap-tab-content wpvivid_tab_general" name="tab-backup" style="width:100%;">
786
  <div class="meta-box-sortables ui-sortable">
@@ -807,7 +645,8 @@ class WPvivid_Admin {
807
  <?php
808
  }
809
 
810
- public function wpvivid_add_page_schedule(){
 
811
  ?>
812
  <div id="schedule-page" class="wrap-tab-content wpvivid_tab_schedule" name="tab-schedule" style="display: none;">
813
  <div>
@@ -864,7 +703,8 @@ class WPvivid_Admin {
864
  <?php
865
  }
866
 
867
- public function wpvivid_add_page_remote_storage(){
 
868
  ?>
869
  <div id="storage-page" class="wrap-tab-content wpvivid_tab_remote_storage" name="tab-storage" style="display:none;">
870
  <div>
@@ -885,7 +725,8 @@ class WPvivid_Admin {
885
  <?php
886
  }
887
 
888
- public function wpvivid_add_page_setting(){
 
889
  ?>
890
  <div id="settings-page" class="wrap-tab-content wpvivid_tab_setting" name="tab-setting" style="display:none;">
891
  <div>
@@ -901,7 +742,7 @@ class WPvivid_Admin {
901
  ?>
902
  </h2>
903
  <?php do_action('wpvivid_settingpage_add_page'); ?>
904
- <div><input class="button-primary" id="wpvivid_setting_general_save" type="submit" value="<?php esc_attr_e( 'Save Changes', 'wpvivid' ); ?>" style="float: right;" /></div>
905
  </div>
906
  </div>
907
  <script>
@@ -944,7 +785,8 @@ class WPvivid_Admin {
944
  <?php
945
  }
946
 
947
- public function wpvivid_add_page_website_info(){
 
948
  ?>
949
  <div id="debug-page" class="wrap-tab-content wpvivid_tab_debug" name="tab-debug" style="display:none;">
950
  <table class="widefat">
@@ -1052,7 +894,8 @@ class WPvivid_Admin {
1052
  <?php
1053
  }
1054
 
1055
- public function wpvivid_add_page_log(){
 
1056
  global $wpvivid_plugin;
1057
  $display_log_count=array(0=>"10",1=>"20",2=>"30",3=>"40",4=>"50");
1058
  $max_log_diaplay=20;
@@ -1151,7 +994,8 @@ class WPvivid_Admin {
1151
  });
1152
  }
1153
 
1154
- function wpvivid_retrieve_log_list(){
 
1155
  var ajax_data = {
1156
  'action': 'wpvivid_get_log_list'
1157
  };
@@ -1178,7 +1022,8 @@ class WPvivid_Admin {
1178
  <?php
1179
  }
1180
 
1181
- public function wpvivid_add_page_read_log(){
 
1182
  ?>
1183
  <div id="log-read-page" class="wrap-tab-content wpvivid_tab_read_log" style="display:none;">
1184
  <div class="postbox restore_log" id="wpvivid_read_log_content">
@@ -1188,7 +1033,8 @@ class WPvivid_Admin {
1188
  <?php
1189
  }
1190
 
1191
- public function wpvivid_add_page_mwp(){
 
1192
  ?>
1193
  <div id="mwp-page" class="wrap-tab-content wpvivid_tab_mainwp" name="tab-mwp" style="display:none;">
1194
  <div style="padding: 10px; background-color: #fff;">
60
  add_filter('wpvivid_get_screen_ids',array($this,'get_screen_ids'),10);
61
  add_filter('wpvivid_get_toolbar_menus',array($this,'get_toolbar_menus'),10);
62
  add_filter('wpvivid_get_admin_menus',array($this,'get_admin_menus'),10);
63
+
64
+ add_action('wpvivid_before_setup_page',array($this,'migrate_notice'));
65
+ add_action('wpvivid_before_setup_page',array($this,'show_add_my_review'));
66
+ add_action('wpvivid_before_setup_page',array($this,'check_extensions'));
67
+ add_action('wpvivid_before_setup_page',array($this,'check_amazons3'));
68
+ add_action('wpvivid_before_setup_page',array($this,'init_js_var'));
69
+
70
  $this->plugin_name = $plugin_name;
71
  $this->version = $version;
72
  }
101
  $menu['index']=1;
102
  $toolbar_menus[$menu['parent']]['child'][$menu['id']]=$menu;
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  return $toolbar_menus;
105
  }
106
 
107
  public function get_admin_menus($submenus)
108
  {
109
  $submenu['parent_slug']=$this->plugin_name;
110
+ $submenu['page_title']=__('WPvivid Backup');
111
  $submenu['menu_title']=__('Backup & Restore', 'wpvivid');
112
  $submenu['capability']='administrator';
113
  $submenu['menu_slug']=$this->plugin_name;
114
+ $submenu['function']=array($this, 'display_plugin_setup_page');
115
  $submenu['index']=1;
116
  $submenus[$submenu['menu_slug']]=$submenu;
117
 
118
  $submenu['parent_slug']=$this->plugin_name;
119
+ $submenu['page_title']=__('WPvivid Backup');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  $submenu['menu_title']=__('Settings', 'wpvivid');
121
  $submenu['capability']='administrator';
122
  $submenu['menu_slug']='wpvivid-setting';
123
+ $submenu['function']=array($this, 'display_plugin_setup_page');
124
  $submenu['index']=5;
125
  $submenus[$submenu['menu_slug']]=$submenu;
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
  return $submenus;
128
  }
129
 
139
  if(in_array(get_current_screen()->id,$this->screen_ids))
140
  {
141
  wp_enqueue_style($this->plugin_name, WPVIVID_PLUGIN_DIR_URL . 'css/wpvivid-admin.css', array(), $this->version, 'all');
142
+ do_action('wpvivid_do_enqueue_styles');
143
  }
144
  }
145
 
158
  wp_localize_script($this->plugin_name, 'ajax_object', array('ajax_url' => admin_url('admin-ajax.php')));
159
 
160
  wp_enqueue_script('plupload-all');
161
+ do_action('wpvivid_do_enqueue_scripts');
162
  }
163
  }
164
 
177
  * Administration Menus: http://codex.wordpress.org/Administration_Menus
178
  *
179
  */
180
+ add_menu_page(__('WPvivid Backup'), __('WPvivid Backup'), 'administrator', $this->plugin_name, array($this, 'display_plugin_setup_page'), 'dashicons-cloud', 100);
181
+
182
+ $this->submenus = apply_filters('wpvivid_get_admin_menus', $this->submenus);
183
+
184
+ usort($this->submenus, function ($a, $b) {
185
+ if ($a['index'] == $b['index'])
186
+ return 0;
187
+
188
+ if ($a['index'] > $b['index'])
189
+ return 1;
190
+ else
191
+ return -1;
192
+ });
193
+
194
+ foreach ($this->submenus as $submenu) {
195
+ add_submenu_page(
196
+ $submenu['parent_slug'],
197
+ $submenu['page_title'],
198
+ $submenu['menu_title'],
199
+ $submenu['capability'],
200
+ $submenu['menu_slug'],
201
+ $submenu['function'], false, 100);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  }
203
  }
204
 
205
  function add_toolbar_items($wp_admin_bar)
206
  {
207
  global $wpvivid_plugin;
208
+ if(is_admin() && current_user_can('administrator'))
209
+ {
210
  $show_admin_bar = $wpvivid_plugin->get_admin_bar_setting();
211
  if ($show_admin_bar === true)
212
  {
243
  }
244
  }
245
 
246
+ public function add_action_links( $links )
247
+ {
248
  $settings_link = array(
249
  '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_name ) . '">' . __('Settings', $this->plugin_name) . '</a>',
250
  );
265
  */
266
  public function display_plugin_setup_page()
267
  {
268
+ do_action('wpvivid_before_setup_page');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
 
270
+ add_action('wpvivid_display_page',array($this,'display'));
271
+
272
+ do_action('wpvivid_display_page');
273
+ }
274
 
275
+ public function migrate_notice()
276
+ {
277
  $migrate_notice=false;
278
  $migrate_status=WPvivid_Setting::get_option('wpvivid_migrate_status');
279
+ if(!empty($migrate_status) && $migrate_status == 'completed')
280
+ {
281
  $migrate_notice=true;
282
  _e('<div class="notice notice-warning is-dismissible"><p>Migration is complete and htaccess file is replaced. In order to successfully complete the migration, you\'d better reinstall 301 redirect plugin, firewall and security plugin, and caching plugin if they exist.</p></div>');
283
  WPvivid_Setting::delete_option('wpvivid_migrate_status');
284
  }
 
 
285
  $restore = new WPvivid_restore_data();
286
+ if ($restore->has_restore())
287
+ {
288
  $restore_status = $restore->get_restore_status();
289
+ if ($restore_status === WPVIVID_RESTORE_COMPLETED)
290
+ {
291
  $restore->clean_restore_data();
292
  $need_review=WPvivid_Setting::get_option('wpvivid_need_review');
293
  if($need_review=='not')
297
  WPvivid_Setting::update_option('wpvivid_review_msg',$msg);
298
  }
299
  else{
300
+ if(!$migrate_notice)
301
+ {
302
  _e('<div class="notice notice-success is-dismissible"><p>Restore completed successfully.</p></div>');
303
  }
304
  }
305
  }
306
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  }
308
 
309
+ public function display()
310
+ {
311
+ include_once('partials/wpvivid-admin-display.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  }
313
 
314
+ public static function wpvivid_get_page_request()
315
+ {
316
+ $request_page='wpvivid_tab_general';
 
317
 
318
+ if(isset($_REQUEST['tab-backup']))
 
 
319
  {
320
+ $request_page='wpvivid_tab_general';
321
+ }
322
+ else if(isset($_REQUEST['tab-schedule']))
323
+ {
324
+ $request_page='wpvivid_tab_schedule';
325
+ }
326
+ else if(isset($_REQUEST['tab-transfer']))
327
+ {
328
+ $request_page='wpvivid_tab_migrate';
329
+ }
330
+ else if(isset($_REQUEST['tab-remote-storage']))
331
+ {
332
+ $request_page='wpvivid_tab_remote_storage';
333
+ }
334
+ else if(isset($_REQUEST['tab-settings']))
335
+ {
336
+ $request_page='wpvivid_tab_setting';
337
+ }
338
+ else if(isset($_REQUEST['tab-website-info']))
339
+ {
340
+ $request_page='wpvivid_tab_debug';
341
+ }
342
+ else if(isset($_REQUEST['tab-logs']))
343
+ {
344
+ $request_page='wpvivid_tab_log';
345
+ }
346
+ else if(isset($_REQUEST['tab-key']))
347
+ {
348
+ $request_page='wpvivid_tab_key';
349
+ }
350
+ else if(isset($_REQUEST['tab-mainwp']))
351
+ {
352
+ $request_page='wpvivid_tab_mainwp';
353
+ }
354
+ else if(isset($_REQUEST['page'])&&$_REQUEST['page']=='wpvivid-pro')
355
+ {
356
+ $request_page='wpvivid_tab_pro';
357
+ }
358
+ else if(isset($_REQUEST['page'])&&$_REQUEST['page']=='wpvivid-setting')
359
+ {
360
+ $request_page='wpvivid_tab_setting';
361
  }
 
362
 
363
+ $request_page=apply_filters('wpvivid_set_page_request',$request_page);
364
+
365
  return $request_page;
366
  }
367
 
368
+ public static function show_add_my_review()
369
  {
370
  $review = WPvivid_Setting::get_option('wpvivid_need_review');
371
  $review_msg = WPvivid_Setting::get_option('wpvivid_review_msg');
372
+ if (empty($review))
373
+ {
374
  WPvivid_Setting::update_option('wpvivid_need_review', 'not');
375
  } else {
376
+ if ($review == 'not')
377
+ {
378
+ }
379
+ else if ($review == 'show')
380
+ {
381
+ if(!empty($review_msg))
382
+ {
383
  _e('<div class="notice notice-info is-dismissible" id="wpvivid_notice_rate">
384
  <p>' . $review_msg . '</p>
385
  <div style="padding-bottom: 10px;">
389
  </div>
390
  </div>');
391
  }
392
+ } else if ($review == 'do_not_ask')
393
+ {
394
+ } else
395
+ {
396
+ if (time() > $review)
397
+ {
398
+ if(!empty($review_msg))
399
+ {
400
  _e('<div class="notice notice-info is-dismissible" id="wpvivid_notice_rate">
401
  <p>' . $review_msg . '</p>
402
  <div style="padding-bottom: 10px;">
411
  }
412
  }
413
 
414
+ public function check_amazons3()
415
+ {
416
  $remoteslist=WPvivid_Setting::get_all_remote_options();
417
  $need_amazons3_notice = false;
418
+ if(isset($remoteslist) && !empty($remoteslist))
419
+ {
420
+ foreach ($remoteslist as $remote_id => $value)
421
+ {
422
+ if($remote_id === 'remote_selected')
423
+ {
424
  continue;
425
  }
426
+ if($value['type'] == 'amazons3' && isset($value['s3Path']))
427
+ {
428
  $need_amazons3_notice = true;
429
  }
430
+ if($value['type'] == 's3compat' && isset($value['s3directory']))
431
+ {
432
  $need_amazons3_notice = true;
433
  }
434
  }
435
  }
436
+ if($need_amazons3_notice)
437
+ {
438
  $amazons3_notice = WPvivid_Setting::get_option('wpvivid_amazons3_notice', 'not init');
439
+ if($amazons3_notice === 'not init')
440
+ {
441
  $notice_message = 'As Amazon S3 and DigitalOcean Space have upgraded their connection methods, please delete the previous connections and re-add your Amazon S3/DigitalOcean Space accounts to make sure the connections work.';
442
  _e('<div class="notice notice-warning" id="wpvivid_amazons3_notice">
443
  <p>' . $notice_message . '</p>
449
  }
450
  }
451
 
452
+ public function check_extensions()
453
+ {
454
  $need_php_extensions = array();
455
  $need_extensions_count = 0;
456
  $extensions=get_loaded_extensions();
500
  _e('<div class="notice notice-error"><p>Class PclZip is not detected. Please update or reinstall your WordPress.</p></div>');
501
  }
502
 
503
+ $hide_notice = get_option('wpvivid_hide_wp_cron_notice', false);
504
+ if(defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON && $hide_notice === false){
505
+ _e('<div class="notice notice-error notice-wp-cron is-dismissible"><p>In order to execute the scheduled backups properly, please set the DISABLE_WP_CRON constant to false.</p></div>');
506
  }
507
  }
508
 
509
+ public function init_js_var()
510
+ {
511
+ global $wpvivid_plugin;
512
+
513
+ $loglist=$wpvivid_plugin->get_log_list_ex();
514
+ $remoteslist=WPvivid_Setting::get_all_remote_options();
515
+ $default_remote_storage='';
516
+ foreach ($remoteslist['remote_selected'] as $value)
517
+ {
518
+ $default_remote_storage=$value;
519
+ }
520
+ ?>
521
+ <script>
522
+ var wpvivid_siteurl = '<?php
523
+ $wpvivid_siteurl = array();
524
+ $wpvivid_siteurl=WPvivid_Admin::wpvivid_get_siteurl();
525
+ echo esc_url($wpvivid_siteurl['home_url']);
526
+ ?>';
527
+ var wpvivid_plugurl = '<?php
528
+ echo WPVIVID_PLUGIN_URL;
529
+ ?>';
530
+ var wpvivid_log_count = '<?php
531
+ _e(sizeof($loglist['log_list']['file']), 'wpvivid');
532
+ ?>';
533
+ var wpvivid_log_array = '<?php
534
+ _e(json_encode($loglist), 'wpvivid');
535
+ ?>';
536
+ var wpvivid_page_request = '<?php
537
+ $page_request = WPvivid_Admin::wpvivid_get_page_request();
538
+ _e($page_request, 'wpvivid');
539
+ ?>';
540
+ var wpvivid_default_remote_storage = '<?php
541
+ _e($default_remote_storage, 'wpvivid');
542
+ ?>';
543
+ </script>
544
+ <?php
545
+ }
546
+
547
  public function wpvivid_add_default_tab_page($page_array){
548
  $page_array['backup_restore'] = array('index' => '1', 'tab_func' => array($this, 'wpvivid_add_tab_backup_restore'), 'page_func' => array($this, 'wpvivid_add_page_backup'));
549
  $page_array['schedule'] = array('index' => '2', 'tab_func' => array($this, 'wpvivid_add_tab_schedule'), 'page_func' => array($this, 'wpvivid_add_page_schedule'));
552
  $page_array['website_info'] = array('index' => '6', 'tab_func' => array($this, 'wpvivid_add_tab_website_info'), 'page_func' => array($this, 'wpvivid_add_page_website_info'));
553
  $page_array['log'] = array('index' => '7', 'tab_func' => array($this, 'wpvivid_add_tab_log'), 'page_func' => array($this, 'wpvivid_add_page_log'));
554
  $page_array['read_log'] = array('index' => '9', 'tab_func' => array($this, 'wpvivid_add_tab_read_log'), 'page_func' => array($this, 'wpvivid_add_page_read_log'));
555
+ $hide_mwp_tab_page = get_option('wpvivid_hide_mwp_tab_page', false);
556
+ if($hide_mwp_tab_page === false) {
557
+ $page_array['mwp'] = array('index' => '30', 'tab_func' => array($this, 'wpvivid_add_tab_mwp'), 'page_func' => array($this, 'wpvivid_add_page_mwp'));
558
+ }
559
  return $page_array;
560
  }
561
 
608
 
609
  public function wpvivid_add_tab_mwp(){
610
  ?>
611
+ <a href="#" id="wpvivid_tab_mainwp" class="nav-tab wrap-nav-tab delete" onclick="switchTabs(event, 'mwp-page')">
612
+ <div style="margin-right: 15px;"><?php _e('MainWP', 'wpvivid'); ?></div>
613
+ <div class="nav-tab-delete-img">
614
+ <img src="<?php echo esc_url(WPVIVID_PLUGIN_URL.'/admin/partials/images/delete-tab.png'); ?>" style="vertical-align:middle; cursor:pointer;" onclick="wpvivid_close_tab(event, 'wpvivid_tab_mainwp', 'wrap', 'wpvivid_tab_general');" />
615
+ </div>
616
+ </a>
617
  <?php
618
  }
619
 
620
+ public function wpvivid_add_page_backup()
621
+ {
 
 
622
  ?>
623
  <div id="general-page" class="wrap-tab-content wpvivid_tab_general" name="tab-backup" style="width:100%;">
624
  <div class="meta-box-sortables ui-sortable">
645
  <?php
646
  }
647
 
648
+ public function wpvivid_add_page_schedule()
649
+ {
650
  ?>
651
  <div id="schedule-page" class="wrap-tab-content wpvivid_tab_schedule" name="tab-schedule" style="display: none;">
652
  <div>
703
  <?php
704
  }
705
 
706
+ public function wpvivid_add_page_remote_storage()
707
+ {
708
  ?>
709
  <div id="storage-page" class="wrap-tab-content wpvivid_tab_remote_storage" name="tab-storage" style="display:none;">
710
  <div>
725
  <?php
726
  }
727
 
728
+ public function wpvivid_add_page_setting()
729
+ {
730
  ?>
731
  <div id="settings-page" class="wrap-tab-content wpvivid_tab_setting" name="tab-setting" style="display:none;">
732
  <div>
742
  ?>
743
  </h2>
744
  <?php do_action('wpvivid_settingpage_add_page'); ?>
745
+ <div><input class="button-primary" id="wpvivid_setting_general_save" type="submit" value="<?php esc_attr_e( 'Save Changes', 'wpvivid' ); ?>" /></div>
746
  </div>
747
  </div>
748
  <script>
785
  <?php
786
  }
787
 
788
+ public function wpvivid_add_page_website_info()
789
+ {
790
  ?>
791
  <div id="debug-page" class="wrap-tab-content wpvivid_tab_debug" name="tab-debug" style="display:none;">
792
  <table class="widefat">
894
  <?php
895
  }
896
 
897
+ public function wpvivid_add_page_log()
898
+ {
899
  global $wpvivid_plugin;
900
  $display_log_count=array(0=>"10",1=>"20",2=>"30",3=>"40",4=>"50");
901
  $max_log_diaplay=20;
994
  });
995
  }
996
 
997
+ function wpvivid_retrieve_log_list()
998
+ {
999
  var ajax_data = {
1000
  'action': 'wpvivid_get_log_list'
1001
  };
1022
  <?php
1023
  }
1024
 
1025
+ public function wpvivid_add_page_read_log()
1026
+ {
1027
  ?>
1028
  <div id="log-read-page" class="wrap-tab-content wpvivid_tab_read_log" style="display:none;">
1029
  <div class="postbox restore_log" id="wpvivid_read_log_content">
1033
  <?php
1034
  }
1035
 
1036
+ public function wpvivid_add_page_mwp()
1037
+ {
1038
  ?>
1039
  <div id="mwp-page" class="wrap-tab-content wpvivid_tab_mainwp" name="tab-mwp" style="display:none;">
1040
  <div style="padding: 10px; background-color: #fff;">
admin/css/wpvivid-admin.css CHANGED
@@ -71,13 +71,13 @@
71
  }
72
  @media only screen and (max-width: 1350px){
73
  #poststuff #post-body.columns-2 {
74
- margin:0;
75
  }
76
  #wpbody-content #post-body.columns-2 #postbox-container-1 {
77
  margin-right: 0;
78
  width: 100%;
79
  }
80
-
81
  }
82
 
83
  @media screen and (max-width:1315px) {
71
  }
72
  @media only screen and (max-width: 1350px){
73
  #poststuff #post-body.columns-2 {
74
+ margin:0;
75
  }
76
  #wpbody-content #post-body.columns-2 #postbox-container-1 {
77
  margin-right: 0;
78
  width: 100%;
79
  }
80
+
81
  }
82
 
83
  @media screen and (max-width:1315px) {
admin/js/wpvivid-admin.js CHANGED
@@ -63,6 +63,15 @@ var wpvivid_resotre_is_migrate=0;
63
  var name = jQuery(this).prop('name');
64
  wpvivid_add_review_info(name);
65
  });
 
 
 
 
 
 
 
 
 
66
  });
67
 
68
  })(jQuery);
@@ -589,9 +598,21 @@ function wpvivid_click_switch_page(tab, type, scroll){
589
  function wpvivid_close_tab(event, hide_tab, type, show_tab){
590
  event.stopPropagation();
591
  jQuery('#'+hide_tab).hide();
 
 
 
592
  wpvivid_click_switch_page(type, show_tab, true);
593
  }
594
 
 
 
 
 
 
 
 
 
 
595
  /**
596
  * Output ajax error in a standard format.
597
  *
63
  var name = jQuery(this).prop('name');
64
  wpvivid_add_review_info(name);
65
  });
66
+
67
+ $(document).on('click', '.notice-wp-cron .notice-dismiss', function(){
68
+ var ajax_data = {
69
+ 'action': 'wpvivid_hide_wp_cron_notice'
70
+ };
71
+ wpvivid_post_request(ajax_data, function(res){
72
+ }, function(XMLHttpRequest, textStatus, errorThrown) {
73
+ });
74
+ });
75
  });
76
 
77
  })(jQuery);
598
  function wpvivid_close_tab(event, hide_tab, type, show_tab){
599
  event.stopPropagation();
600
  jQuery('#'+hide_tab).hide();
601
+ if(hide_tab === 'wpvivid_tab_mainwp'){
602
+ wpvivid_hide_mainwp_tab_page();
603
+ }
604
  wpvivid_click_switch_page(type, show_tab, true);
605
  }
606
 
607
+ function wpvivid_hide_mainwp_tab_page(){
608
+ var ajax_data = {
609
+ 'action': 'wpvivid_hide_mainwp_tab_page'
610
+ };
611
+ wpvivid_post_request(ajax_data, function(res){
612
+ }, function(XMLHttpRequest, textStatus, errorThrown) {
613
+ });
614
+ }
615
+
616
  /**
617
  * Output ajax error in a standard format.
618
  *
admin/partials/wpvivid-admin-display.php CHANGED
@@ -25,34 +25,10 @@ if (!defined('WPVIVID_PLUGIN_DIR'))
25
  }
26
 
27
  global $wpvivid_plugin;
28
- $select=WPvivid_Setting::get_user_history('remote_selected');
29
  $schedule=WPvivid_Schedule::get_schedule();
30
- $backupdir=WPvivid_Setting::get_backupdir();
31
- $general_setting=WPvivid_Setting::get_setting(true, "");
32
- $last_msg=WPvivid_Setting::get_last_backup_message('wpvivid_last_msg');
33
- $out_of_date=$wpvivid_plugin->_get_out_of_date_info();
34
- $junk_file=$wpvivid_plugin->_junk_files_info();
35
- $website_info=$wpvivid_plugin->get_website_info();
36
- $wpvivid_version=WPVIVID_PLUGIN_VERSION;
37
 
38
  do_action('show_notice');
39
 
40
- function wpvivid_schedule_module($html){
41
- $html = '';
42
- return $html;
43
- }
44
-
45
- function wpvivid_join_pro_testing($html){
46
- $html = '';
47
- $html = '<div class="postbox">
48
- <h2><a href="https://wpvivid.com/pro-version-beta-testing?utm_source=client_beta_testing&utm_medium=inner_link&utm_campaign=access" style="text-decoration: none;">WPvivid Backup Pro Beta Testing</a></h2>
49
- </div>';
50
- return $html;
51
- }
52
-
53
- add_filter('wpvivid_schedule_module', 'wpvivid_schedule_module', 10);
54
- add_filter('wpvivid_join_pro_testing', 'wpvivid_join_pro_testing', 10);
55
-
56
  ?>
57
 
58
  <?php
@@ -64,6 +40,55 @@ foreach ($page_array as $page_name){
64
  add_action('wpvivid_backuprestore_add_page', $page_name['page_func'], $page_name['index']);
65
  }
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  ?>
68
 
69
  <div class="wrap">
@@ -77,6 +102,12 @@ foreach ($page_array as $page_name){
77
  if($schedule['enable'] == true) {
78
  if($schedule['backup']['remote'] === 1)
79
  {
 
 
 
 
 
 
80
  if($default_remote_storage == ''){
81
  _e('<div class="notice notice-warning is-dismissible"><p>Warning: There is no default remote storage available for the scheduled backups, please set up it first.</p></div>');
82
  }
@@ -101,55 +132,14 @@ foreach ($page_array as $page_name){
101
  do_action('wpvivid_backuprestore_add_page');
102
  ?>
103
  </div>
104
-
105
  </div>
106
 
107
  <div id="postbox-container-1" class="postbox-container">
108
  <div class="meta-box-sortables">
109
- <div class="postbox">
110
- <h2><span>Current Version: <?php
111
- $wpvivid_version = apply_filters('wpvivid_display_pro_version', $wpvivid_version);
112
- _e($wpvivid_version, 'wpvivid');
113
- ?></span></h2>
114
- </div>
115
- <div id="wpvivid_backup_schedule_part">
116
- <?php
117
- $schedule_html = '';
118
- echo apply_filters('wpvivid_schedule_module', $schedule_html);
119
- ?>
120
- </div>
121
  <?php
122
- $join_pro_testing = '';
123
- echo apply_filters('wpvivid_join_pro_testing', $join_pro_testing);
124
  ?>
125
- <div class="postbox">
126
- <h2><span>Troubleshooting</span></h2>
127
- <div class="inside">
128
- <table class="widefat" cellpadding="0">
129
- <tbody>
130
- <tr class="alternate">
131
- <td class="row-title">Read <a href="https://wpvivid.com/troubleshooting-issues-wpvivid-backup-plugin" target="_blank">Troubleshooting page</a> for faster solutions.</td>
132
- </tr>
133
- <tr>
134
- <td class="row-title">Adjust <a href="https://wpvivid.com/wpvivid-backup-plugin-advanced-settings.html" target="_blank">Advanced Settings</a> for higher task success rate.</td>
135
- </tr>
136
- </tbody>
137
- </table>
138
- </div>
139
- </div>
140
- <div class="postbox">
141
- <h2><span>How-to</span></h2>
142
- <div class="inside">
143
- <table class="widefat" cellpadding="0">
144
- <tbody>
145
- <tr class="alternate"><td class="row-title"><a href="https://wpvivid.com/get-started-settings.html" target="_blank">WPvivid Backup Settings</a></td></tr>
146
- <tr><td class="row-title"><a href="https://wpvivid.com/get-started-create-a-manual-backup.html" target="_blank">Create a Manual Backup</a></td></tr>
147
- <tr class="alternate"><td class="row-title"><a href="https://wpvivid.com/get-started-restore-site.html" target="_blank">Restore Your Site from a Backup</a></td></tr>
148
- <tr><td class="row-title"><a href="https://wpvivid.com/get-started-transfer-site.html" target="_blank">Migrate WordPress</a></td></tr>
149
- </tbody>
150
- </table>
151
- </div>
152
- </div>
153
  </div>
154
  </div>
155
  </div>
25
  }
26
 
27
  global $wpvivid_plugin;
 
28
  $schedule=WPvivid_Schedule::get_schedule();
 
 
 
 
 
 
 
29
 
30
  do_action('show_notice');
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ?>
33
 
34
  <?php
40
  add_action('wpvivid_backuprestore_add_page', $page_name['page_func'], $page_name['index']);
41
  }
42
 
43
+ function wpvivid_add_side_bar($html){
44
+ $wpvivid_version = WPVIVID_PLUGIN_VERSION;
45
+ $wpvivid_version = apply_filters('wpvivid_display_pro_version', $wpvivid_version);
46
+ $join_pro_testing = '<div class="postbox">
47
+ <h2><a href="https://wpvivid.com/pro-version-beta-testing?utm_source=client_beta_testing&utm_medium=inner_link&utm_campaign=access" style="text-decoration: none;">WPvivid Backup Pro Beta Testing</a></h2>
48
+ </div>';
49
+ $join_pro_testing = apply_filters('wpvivid_join_pro_testing', $join_pro_testing);
50
+
51
+ $schedule_html = '';
52
+ $schedule_html = apply_filters('wpvivid_schedule_module', $schedule_html);
53
+
54
+ $html = '<div class="postbox">
55
+ <h2><span>Current Version: '.$wpvivid_version.'</span></h2>
56
+ </div>
57
+ <div id="wpvivid_backup_schedule_part"></div>
58
+ '.$join_pro_testing.$schedule_html.'
59
+ <div class="postbox">
60
+ <h2><span>Troubleshooting</span></h2>
61
+ <div class="inside">
62
+ <table class="widefat" cellpadding="0">
63
+ <tbody>
64
+ <tr class="alternate">
65
+ <td class="row-title">Read <a href="https://wpvivid.com/troubleshooting-issues-wpvivid-backup-plugin" target="_blank">Troubleshooting page</a> for faster solutions.</td>
66
+ </tr>
67
+ <tr>
68
+ <td class="row-title">Adjust <a href="https://wpvivid.com/wpvivid-backup-plugin-advanced-settings.html" target="_blank">Advanced Settings</a> for higher task success rate.</td>
69
+ </tr>
70
+ </tbody>
71
+ </table>
72
+ </div>
73
+ </div>
74
+ <div class="postbox">
75
+ <h2><span>How-to</span></h2>
76
+ <div class="inside">
77
+ <table class="widefat" cellpadding="0">
78
+ <tbody>
79
+ <tr class="alternate"><td class="row-title"><a href="https://wpvivid.com/get-started-settings.html" target="_blank">WPvivid Backup Settings</a></td></tr>
80
+ <tr><td class="row-title"><a href="https://wpvivid.com/get-started-create-a-manual-backup.html" target="_blank">Create a Manual Backup</a></td></tr>
81
+ <tr class="alternate"><td class="row-title"><a href="https://wpvivid.com/get-started-restore-site.html" target="_blank">Restore Your Site from a Backup</a></td></tr>
82
+ <tr><td class="row-title"><a href="https://wpvivid.com/get-started-transfer-site.html" target="_blank">Migrate WordPress</a></td></tr>
83
+ </tbody>
84
+ </table>
85
+ </div>
86
+ </div>';
87
+ return $html;
88
+ }
89
+
90
+ add_filter('wpvivid_add_side_bar', 'wpvivid_add_side_bar', 10);
91
+
92
  ?>
93
 
94
  <div class="wrap">
102
  if($schedule['enable'] == true) {
103
  if($schedule['backup']['remote'] === 1)
104
  {
105
+ $remoteslist=WPvivid_Setting::get_all_remote_options();
106
+ $default_remote_storage='';
107
+ foreach ($remoteslist['remote_selected'] as $value)
108
+ {
109
+ $default_remote_storage=$value;
110
+ }
111
  if($default_remote_storage == ''){
112
  _e('<div class="notice notice-warning is-dismissible"><p>Warning: There is no default remote storage available for the scheduled backups, please set up it first.</p></div>');
113
  }
132
  do_action('wpvivid_backuprestore_add_page');
133
  ?>
134
  </div>
 
135
  </div>
136
 
137
  <div id="postbox-container-1" class="postbox-container">
138
  <div class="meta-box-sortables">
 
 
 
 
 
 
 
 
 
 
 
 
139
  <?php
140
+ $html = '';
141
+ echo apply_filters('wpvivid_add_side_bar' ,$html);
142
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  </div>
144
  </div>
145
  </div>
admin/partials/wpvivid-backup-restore-page-display.php CHANGED
@@ -557,13 +557,7 @@ function wpvivid_backuppage_add_page_backup(){
557
  jQuery('#wpvivid_clean_'+restore_method+'part').hide();
558
  jQuery('#wpvivid_rollback_'+restore_method+'part').hide();
559
  jQuery('#wpvivid_download_'+restore_method+'part').hide();
560
- /*if(wpvivid_restore_backup_type == 'Migration' || wpvivid_restore_backup_type == 'Upload') {
561
- jQuery('#wpvivid_restore_is_migrate').show();
562
- jQuery('#wpvivid_restore_is_migrate').css({'pointer-events': 'none', 'opacity': '0.4'});
563
- }
564
- else{
565
- jQuery('#wpvivid_restore_is_migrate').hide();
566
- }*/
567
  jQuery('#wpvivid_init_restore_data').addClass('is-active');
568
  var ajax_data = {
569
  'action':'wpvivid_init_restore_page',
@@ -616,7 +610,7 @@ function wpvivid_backuppage_add_page_backup(){
616
  if(jsonarray.max_allow_packet_warning != false){
617
  output += "<p>" + jsonarray.max_allow_packet_warning + "</p>";
618
  }
619
- if(jsonarray.memory_limit != false){
620
  output += "<p>" + jsonarray.memory_limit_warning + "</p>";
621
  }
622
  var div = "<div class='notice notice-warning is-dismissible inline'>" +
557
  jQuery('#wpvivid_clean_'+restore_method+'part').hide();
558
  jQuery('#wpvivid_rollback_'+restore_method+'part').hide();
559
  jQuery('#wpvivid_download_'+restore_method+'part').hide();
560
+
 
 
 
 
 
 
561
  jQuery('#wpvivid_init_restore_data').addClass('is-active');
562
  var ajax_data = {
563
  'action':'wpvivid_init_restore_page',
610
  if(jsonarray.max_allow_packet_warning != false){
611
  output += "<p>" + jsonarray.max_allow_packet_warning + "</p>";
612
  }
613
+ if(jsonarray.memory_limit_warning != false){
614
  output += "<p>" + jsonarray.memory_limit_warning + "</p>";
615
  }
616
  var div = "<div class='notice notice-warning is-dismissible inline'>" +
admin/partials/wpvivid-remote-storage-page-display.php CHANGED
@@ -266,17 +266,6 @@ function wpvivid_add_page_storage_list()
266
  jQuery('input:text[option=edit-'+jsonarray.type+']').each(function(){
267
  var key = jQuery(this).prop('name');
268
  jQuery(this).val(jsonarray[key]);
269
- /*var key = jQuery(this).prop('name');
270
- if(key == 's3Path' && jsonarray.type == 'amazons3'){
271
- var iLength = jsonarray[key].lastIndexOf('/wpvivid_backup');
272
- if(iLength != -1) {
273
- jsonarray[key] = jsonarray[key].substring(0, iLength);
274
- }
275
- jQuery(this).val(jsonarray[key]);
276
- }
277
- else {
278
- jQuery(this).val(jsonarray[key]);
279
- }*/
280
  });
281
  jQuery('input:password[option=edit-'+jsonarray.type+']').each(function(){
282
  var key = jQuery(this).prop('name');
@@ -293,22 +282,6 @@ function wpvivid_add_page_storage_list()
293
  }
294
  jQuery(this).prop('checked', value);
295
  });
296
- /*if(jsonarray.type == 'amazons3'){
297
- var amazons3_edit_value = jQuery('input:text[option=edit-'+jsonarray.type+'][name=s3Path]').val();
298
- if(amazons3_edit_value == ''){
299
- amazons3_edit_value = '*';
300
- }
301
- amazons3_edit_value = amazons3_edit_value + '/wpvivid_backup';
302
- jQuery('#wpvivid_edit_amazons3_root_path').html(amazons3_edit_value);
303
- }
304
- if(jsonarray.type == 's3compat'){
305
- var dos_edit_value = jQuery('input:text[option=edit-'+jsonarray.type+'][name=s3directory]').val();
306
- if(dos_edit_value == ''){
307
- dos_edit_value = '*';
308
- }
309
- dos_edit_value = dos_edit_value + '/wpvivid_backup';
310
- jQuery('#wpvivid_edit_dos_root_path').html(dos_edit_value);
311
- }*/
312
  }
313
  else
314
  {
266
  jQuery('input:text[option=edit-'+jsonarray.type+']').each(function(){
267
  var key = jQuery(this).prop('name');
268
  jQuery(this).val(jsonarray[key]);
 
 
 
 
 
 
 
 
 
 
 
269
  });
270
  jQuery('input:password[option=edit-'+jsonarray.type+']').each(function(){
271
  var key = jQuery(this).prop('name');
282
  }
283
  jQuery(this).prop('checked', value);
284
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
285
  }
286
  else
287
  {
admin/partials/wpvivid-settings-page-display.php CHANGED
@@ -5,6 +5,9 @@ function wpvivid_general_settings()
5
  $general_setting=WPvivid_Setting::get_setting(true, "");
6
  $display_backup_count = $general_setting['options']['wpvivid_common_setting']['max_backup_count'];
7
  $display_backup_count=intval($display_backup_count);
 
 
 
8
  if($general_setting['options']['wpvivid_common_setting']['estimate_backup']){
9
  $wpvivid_setting_estimate_backup='checked';
10
  }
@@ -131,7 +134,7 @@ function wpvivid_general_settings()
131
  </div>
132
  <div class="setting-tab-block" style="padding: 10px 10px 0 0;">
133
  <input class="button-primary" id="wpvivid_delete_out_of_backup" style="margin-right:10px;" type="submit" name="delete-out-of-backup" value="<?php esc_attr_e( 'Remove', 'wpvivid' ); ?>" />
134
- <p><?php _e('The action is irreversible! It will remove all backups which is(are) out-of-date (including local web server and remote storage) if they exist.', 'wpvivid'); ?> </p>
135
  </div>
136
  </div>
137
  <script>
5
  $general_setting=WPvivid_Setting::get_setting(true, "");
6
  $display_backup_count = $general_setting['options']['wpvivid_common_setting']['max_backup_count'];
7
  $display_backup_count=intval($display_backup_count);
8
+ if($display_backup_count > 7){
9
+ $display_backup_count = 7;
10
+ }
11
  if($general_setting['options']['wpvivid_common_setting']['estimate_backup']){
12
  $wpvivid_setting_estimate_backup='checked';
13
  }
134
  </div>
135
  <div class="setting-tab-block" style="padding: 10px 10px 0 0;">
136
  <input class="button-primary" id="wpvivid_delete_out_of_backup" style="margin-right:10px;" type="submit" name="delete-out-of-backup" value="<?php esc_attr_e( 'Remove', 'wpvivid' ); ?>" />
137
+ <p><?php _e('The action is irreversible! It will remove all backups are out-of-date (including local web server and remote storage) if they exist.', 'wpvivid'); ?> </p>
138
  </div>
139
  </div>
140
  <script>
includes/class-wpvivid-additional-db-method.php ADDED
@@ -0,0 +1,255 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WPvivid_Additional_DB_Method
4
+ {
5
+ private $dbuser;
6
+ private $dbpass;
7
+ private $dbhost;
8
+ private $use_mysqli = false;
9
+ private $dbh;
10
+ private $has_connected = false;
11
+ public $charset;
12
+ public $collate;
13
+
14
+ public function __construct($dbuser, $dbpass, $dbhost){
15
+ $this->dbuser = $dbuser;
16
+ $this->dbpass = $dbpass;
17
+ $this->dbhost = $dbhost;
18
+
19
+ if ( function_exists( 'mysqli_connect' ) ) {
20
+ $this->use_mysqli = true;
21
+
22
+ if ( defined( 'WP_USE_EXT_MYSQL' ) ) {
23
+ $this->use_mysqli = ! WP_USE_EXT_MYSQL;
24
+ }
25
+ }
26
+ }
27
+
28
+ public function wpvivid_parse_db_host( $host ) {
29
+ $port = null;
30
+ $socket = null;
31
+ $is_ipv6 = false;
32
+
33
+ // First peel off the socket parameter from the right, if it exists.
34
+ $socket_pos = strpos( $host, ':/' );
35
+ if ( $socket_pos !== false ) {
36
+ $socket = substr( $host, $socket_pos + 1 );
37
+ $host = substr( $host, 0, $socket_pos );
38
+ }
39
+
40
+ // We need to check for an IPv6 address first.
41
+ // An IPv6 address will always contain at least two colons.
42
+ if ( substr_count( $host, ':' ) > 1 ) {
43
+ $pattern = '#^(?:\[)?(?P<host>[0-9a-fA-F:]+)(?:\]:(?P<port>[\d]+))?#';
44
+ $is_ipv6 = true;
45
+ } else {
46
+ // We seem to be dealing with an IPv4 address.
47
+ $pattern = '#^(?P<host>[^:/]*)(?::(?P<port>[\d]+))?#';
48
+ }
49
+
50
+ $matches = array();
51
+ $result = preg_match( $pattern, $host, $matches );
52
+
53
+ if ( 1 !== $result ) {
54
+ // Couldn't parse the address, bail.
55
+ return false;
56
+ }
57
+
58
+ $host = '';
59
+ foreach ( array( 'host', 'port' ) as $component ) {
60
+ if ( ! empty( $matches[ $component ] ) ) {
61
+ $$component = $matches[ $component ];
62
+ }
63
+ }
64
+
65
+ return array( $host, $port, $socket, $is_ipv6 );
66
+ }
67
+
68
+ public function db_version() {
69
+ if ( $this->use_mysqli ) {
70
+ $server_info = mysqli_get_server_info( $this->dbh );
71
+ } else {
72
+ $server_info = mysql_get_server_info( $this->dbh );
73
+ }
74
+ return preg_replace( '/[^0-9.].*/', '', $server_info );
75
+ }
76
+
77
+ public function has_cap( $db_cap ) {
78
+ $version = $this->db_version();
79
+
80
+ switch ( strtolower( $db_cap ) ) {
81
+ case 'collation': // @since 2.5.0
82
+ case 'group_concat': // @since 2.7.0
83
+ case 'subqueries': // @since 2.7.0
84
+ return version_compare( $version, '4.1', '>=' );
85
+ case 'set_charset':
86
+ return version_compare( $version, '5.0.7', '>=' );
87
+ case 'utf8mb4': // @since 4.1.0
88
+ if ( version_compare( $version, '5.5.3', '<' ) ) {
89
+ return false;
90
+ }
91
+ if ( $this->use_mysqli ) {
92
+ $client_version = mysqli_get_client_info();
93
+ } else {
94
+ $client_version = mysql_get_client_info();
95
+ }
96
+
97
+ /*
98
+ * libmysql has supported utf8mb4 since 5.5.3, same as the MySQL server.
99
+ * mysqlnd has supported utf8mb4 since 5.0.9.
100
+ */
101
+ if ( false !== strpos( $client_version, 'mysqlnd' ) ) {
102
+ $client_version = preg_replace( '/^\D+([\d.]+).*/', '$1', $client_version );
103
+ return version_compare( $client_version, '5.0.9', '>=' );
104
+ } else {
105
+ return version_compare( $client_version, '5.5.3', '>=' );
106
+ }
107
+ case 'utf8mb4_520': // @since 4.6.0
108
+ return version_compare( $version, '5.6', '>=' );
109
+ }
110
+
111
+ return false;
112
+ }
113
+
114
+ public function determine_charset( $charset, $collate ) {
115
+ if ( ( $this->use_mysqli && ! ( $this->dbh instanceof mysqli ) ) || empty( $this->dbh ) ) {
116
+ return compact( 'charset', 'collate' );
117
+ }
118
+
119
+ if ( 'utf8' === $charset && $this->has_cap( 'utf8mb4' ) ) {
120
+ $charset = 'utf8mb4';
121
+ }
122
+
123
+ if ( 'utf8mb4' === $charset && ! $this->has_cap( 'utf8mb4' ) ) {
124
+ $charset = 'utf8';
125
+ $collate = str_replace( 'utf8mb4_', 'utf8_', $collate );
126
+ }
127
+
128
+ if ( 'utf8mb4' === $charset ) {
129
+ // _general_ is outdated, so we can upgrade it to _unicode_, instead.
130
+ if ( ! $collate || 'utf8_general_ci' === $collate ) {
131
+ $collate = 'utf8mb4_unicode_ci';
132
+ } else {
133
+ $collate = str_replace( 'utf8_', 'utf8mb4_', $collate );
134
+ }
135
+ }
136
+
137
+ // _unicode_520_ is a better collation, we should use that when it's available.
138
+ if ( $this->has_cap( 'utf8mb4_520' ) && 'utf8mb4_unicode_ci' === $collate ) {
139
+ $collate = 'utf8mb4_unicode_520_ci';
140
+ }
141
+
142
+ return compact( 'charset', 'collate' );
143
+ }
144
+
145
+ public function init_charset() {
146
+ $charset = '';
147
+ $collate = '';
148
+
149
+ if ( function_exists( 'is_multisite' ) && is_multisite() ) {
150
+ $charset = 'utf8';
151
+ if ( defined( 'DB_COLLATE' ) && DB_COLLATE ) {
152
+ $collate = DB_COLLATE;
153
+ } else {
154
+ $collate = 'utf8_general_ci';
155
+ }
156
+ } elseif ( defined( 'DB_COLLATE' ) ) {
157
+ $collate = DB_COLLATE;
158
+ }
159
+
160
+ if ( defined( 'DB_CHARSET' ) ) {
161
+ $charset = DB_CHARSET;
162
+ }
163
+
164
+ $charset_collate = $this->determine_charset( $charset, $collate );
165
+
166
+ $this->charset = $charset_collate['charset'];
167
+ $this->collate = $charset_collate['collate'];
168
+ }
169
+
170
+ public function wpvivid_do_connect($allow_bail = true){
171
+ $new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : true;
172
+ $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
173
+
174
+ $error_code = '';
175
+ $error = 'Unknown Error.';
176
+
177
+ if ( $this->use_mysqli ) {
178
+ $this->dbh = mysqli_init();
179
+
180
+ $host = $this->dbhost;
181
+ $port = null;
182
+ $socket = null;
183
+ $is_ipv6 = false;
184
+
185
+ if ( $host_data = $this->wpvivid_parse_db_host( $this->dbhost ) ) {
186
+ list( $host, $port, $socket, $is_ipv6 ) = $host_data;
187
+ }
188
+
189
+ if ( $is_ipv6 && extension_loaded( 'mysqlnd' ) ) {
190
+ $host = "[$host]";
191
+ }
192
+
193
+ @mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpass, null, $port, $socket, $client_flags );
194
+
195
+ if ( $this->dbh->connect_errno ) {
196
+ $error_code = $this->dbh->connect_errno;
197
+ $error = $this->dbh->connect_error;
198
+ $this->dbh = null;
199
+ $attempt_fallback = true;
200
+
201
+ if ( $this->has_connected ) {
202
+ $attempt_fallback = false;
203
+ } elseif ( defined( 'WP_USE_EXT_MYSQL' ) && ! WP_USE_EXT_MYSQL ) {
204
+ $attempt_fallback = false;
205
+ } elseif ( ! function_exists( 'mysql_connect' ) ) {
206
+ $attempt_fallback = false;
207
+ }
208
+
209
+ if ( $attempt_fallback ) {
210
+ $this->use_mysqli = false;
211
+ return $this->wpvivid_do_connect( $allow_bail );
212
+ }
213
+ }
214
+ }
215
+ else{
216
+ $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpass, $new_link, $client_flags );
217
+ }
218
+
219
+ if($this->dbh){
220
+ $this->has_connected = true;
221
+ $ret['result'] = WPVIVID_SUCCESS;
222
+ }
223
+ else{
224
+ $ret['result'] = WPVIVID_FAILED;
225
+ $ret['error'] = $error_code.': '.$error;
226
+ }
227
+
228
+ return $ret;
229
+ }
230
+
231
+ public function wpvivid_show_additional_databases(){
232
+ $query = 'SHOW DATABASES;';
233
+ $result = '';
234
+ if ( ! empty( $this->dbh ) && $this->use_mysqli ) {
235
+ $result = mysqli_query( $this->dbh, $query );
236
+ } elseif ( ! empty( $this->dbh ) ) {
237
+ $result = mysql_query( $query, $this->dbh );
238
+ }
239
+ if ( $this->use_mysqli && $result instanceof mysqli_result ) {
240
+ while ( $row = mysqli_fetch_object( $result ) ) {
241
+ $database_array[] = $row;
242
+ }
243
+ } elseif ( is_resource( $result ) ) {
244
+ while ( $row = mysql_fetch_object( $result ) ) {
245
+ $database_array[] = $row;
246
+ }
247
+ }
248
+ if(!empty($database_array)){
249
+ foreach ($database_array as $key => $value){
250
+ $last_result[] = $value->Database;
251
+ }
252
+ }
253
+ return $last_result;
254
+ }
255
+ }
includes/class-wpvivid-backup-database.php CHANGED
@@ -13,6 +13,18 @@ class WPvivid_Backup_Database
13
  {
14
  }
15
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  public function backup_database($data,$task_id = '')
17
  {
18
  global $wpvivid_plugin;
@@ -22,7 +34,7 @@ class WPvivid_Backup_Database
22
  {
23
  $this->task_id=$task_id;
24
 
25
- $backup_file =$data['sql_file_name'];
26
 
27
  require_once 'class-wpvivid-mysqldump-method.php';
28
  require_once 'class-wpvivid-mysqldump.php';
@@ -44,14 +56,27 @@ class WPvivid_Backup_Database
44
  $exclude=array();
45
  $exclude = apply_filters('wpvivid_exclude_db_table',$exclude, $data);
46
 
47
- //$dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME;
48
- $dump = new WPvivid_Mysqldump(DB_HOST,DB_NAME, DB_USER, DB_PASSWORD , array('exclude-tables'=>$exclude,'add-drop-table' => true,'extended-insert'=>false));
 
49
 
50
- if(file_exists($backup_file))
51
- @unlink($backup_file);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
- $dump->task_id=$task_id;
54
- $dump->start($backup_file);
55
  unset($pdo);
56
  }
57
  catch (Exception $e)
@@ -70,7 +95,7 @@ class WPvivid_Backup_Database
70
  }
71
 
72
  $files = array();
73
- $files[] = $backup_file;
74
  return array('result'=>WPVIVID_SUCCESS,'files'=>$files);
75
  }
76
 
13
  {
14
  }
15
 
16
+ public function wpvivid_archieve_database_info($databases, $data){
17
+ if(isset($data['dump_db'])){
18
+ $sql_info['file_name'] =$data['sql_file_name'];
19
+ $sql_info['database'] = DB_NAME;
20
+ $sql_info['host'] = DB_HOST;
21
+ $sql_info['user'] = DB_USER;
22
+ $sql_info['pass'] = DB_PASSWORD;
23
+ $databases[] = $sql_info;
24
+ }
25
+ return $databases;
26
+ }
27
+
28
  public function backup_database($data,$task_id = '')
29
  {
30
  global $wpvivid_plugin;
34
  {
35
  $this->task_id=$task_id;
36
 
37
+ //$backup_file =$data['sql_file_name'];
38
 
39
  require_once 'class-wpvivid-mysqldump-method.php';
40
  require_once 'class-wpvivid-mysqldump.php';
56
  $exclude=array();
57
  $exclude = apply_filters('wpvivid_exclude_db_table',$exclude, $data);
58
 
59
+ add_filter('wpvivid_archieve_database_info', array($this, 'wpvivid_archieve_database_info'), 10, 2);
60
+ $databases=array();
61
+ $databases = apply_filters('wpvivid_archieve_database_info', $databases, $data);
62
 
63
+ $backup_files = array();
64
+ foreach ($databases as $sql_info) {
65
+ $database_name = $sql_info['database'];
66
+ $backup_file = $sql_info['file_name'];
67
+ $backup_files[] = $backup_file;
68
+ $host = $sql_info['host'];
69
+ $user = $sql_info['user'];
70
+ $pass = $sql_info['pass'];
71
+ $dump = new WPvivid_Mysqldump($host, $database_name, $user, $pass, array('exclude-tables'=>$exclude,'add-drop-table' => true,'extended-insert'=>false));
72
+
73
+ if (file_exists($backup_file))
74
+ @unlink($backup_file);
75
+
76
+ $dump->task_id=$task_id;
77
+ $dump->start($backup_file);
78
+ }
79
 
 
 
80
  unset($pdo);
81
  }
82
  catch (Exception $e)
95
  }
96
 
97
  $files = array();
98
+ $files = $backup_files;
99
  return array('result'=>WPVIVID_SUCCESS,'files'=>$files);
100
  }
101
 
includes/class-wpvivid-backup.php CHANGED
@@ -275,7 +275,6 @@ class WPvivid_Backup_Task
275
  $backup_data['json_info']['dump_db']=1;
276
  $backup_data['json_info']['file_type']='databases';
277
  $backup_data['prefix']=$this->get_prefix().'_backup_db';
278
- $this->task['options']['backup_options']['backup'][$backup_data['key']]=$backup_data;
279
  }
280
  else if($backup==WPVIVID_BACKUP_TYPE_THEMES)
281
  {
@@ -1065,7 +1064,7 @@ class WPvivid_Backup_Task
1065
  }
1066
  }
1067
  else{
1068
- $descript = 'Strat uploading.';
1069
  $speed = '0kb/s';
1070
  $list_tasks['task_info']['total'] = 'N/A';
1071
  $list_tasks['task_info']['upload'] = 'N/A';
@@ -1729,6 +1728,7 @@ class WPvivid_Backup_Item
1729
 
1730
  $file_added=array();
1731
  $child_packages=array();
 
1732
  foreach ($packages as $key=>$package)
1733
  {
1734
  $files=array();
@@ -1880,6 +1880,7 @@ class WPvivid_Backup_Item
1880
  $files = array();
1881
 
1882
  $ret=$zip->get_json_data($path);
 
1883
  if($ret['result'] === WPVIVID_SUCCESS) {
1884
  $json=$ret['json_data'];
1885
  $json = json_decode($json, 1);
@@ -1887,7 +1888,6 @@ class WPvivid_Backup_Item
1887
  $files = $zip->list_file($path);
1888
  }
1889
  }
1890
-
1891
  return $files;
1892
  }
1893
 
@@ -2190,8 +2190,10 @@ class WPvivid_Backup
2190
  global $wpvivid_plugin;
2191
  $result['result']=WPVIVID_FAILED;
2192
  $result['error']='test error';
2193
- if(isset($data['dump_db']))
2194
- {
 
 
2195
  include_once WPVIVID_PLUGIN_DIR .'/includes/class-wpvivid-backup-database.php';
2196
  $wpvivid_plugin->wpvivid_log->WriteLog('Start exporting database.','notice');
2197
  $backup_database = new WPvivid_Backup_Database();
@@ -2245,7 +2247,6 @@ class WPvivid_Backup
2245
 
2246
  $result['result']=WPVIVID_SUCCESS;
2247
  $result['files']=array();
2248
-
2249
  foreach ($packages as $package)
2250
  {
2251
  $wpvivid_plugin->set_time_limit($this->task->get_id());
@@ -2276,10 +2277,16 @@ class WPvivid_Backup
2276
  }
2277
  else
2278
  {
2279
- $result =$zip->compress($data);
 
 
 
 
 
 
 
2280
 
2281
- if(isset($data['dump_db']))
2282
- {
2283
  foreach ($data['files'] as $sql_file)
2284
  {
2285
  @unlink($sql_file);
275
  $backup_data['json_info']['dump_db']=1;
276
  $backup_data['json_info']['file_type']='databases';
277
  $backup_data['prefix']=$this->get_prefix().'_backup_db';
 
278
  }
279
  else if($backup==WPVIVID_BACKUP_TYPE_THEMES)
280
  {
1064
  }
1065
  }
1066
  else{
1067
+ $descript = 'Start uploading.';
1068
  $speed = '0kb/s';
1069
  $list_tasks['task_info']['total'] = 'N/A';
1070
  $list_tasks['task_info']['upload'] = 'N/A';
1728
 
1729
  $file_added=array();
1730
  $child_packages=array();
1731
+
1732
  foreach ($packages as $key=>$package)
1733
  {
1734
  $files=array();
1880
  $files = array();
1881
 
1882
  $ret=$zip->get_json_data($path);
1883
+
1884
  if($ret['result'] === WPVIVID_SUCCESS) {
1885
  $json=$ret['json_data'];
1886
  $json = json_decode($json, 1);
1888
  $files = $zip->list_file($path);
1889
  }
1890
  }
 
1891
  return $files;
1892
  }
1893
 
2190
  global $wpvivid_plugin;
2191
  $result['result']=WPVIVID_FAILED;
2192
  $result['error']='test error';
2193
+
2194
+ $is_type_db = false;
2195
+ $is_type_db = apply_filters('wpvivid_check_type_database', $is_type_db, $data);
2196
+ if($is_type_db){
2197
  include_once WPVIVID_PLUGIN_DIR .'/includes/class-wpvivid-backup-database.php';
2198
  $wpvivid_plugin->wpvivid_log->WriteLog('Start exporting database.','notice');
2199
  $backup_database = new WPvivid_Backup_Database();
2247
 
2248
  $result['result']=WPVIVID_SUCCESS;
2249
  $result['files']=array();
 
2250
  foreach ($packages as $package)
2251
  {
2252
  $wpvivid_plugin->set_time_limit($this->task->get_id());
2277
  }
2278
  else
2279
  {
2280
+ $is_additional_db = false;
2281
+ $is_additional_db = apply_filters('wpvivid_check_additional_database', $is_additional_db, $data);
2282
+ if($is_additional_db){
2283
+ $result =$zip->compress_additional_database($data);
2284
+ }
2285
+ else{
2286
+ $result =$zip->compress($data);
2287
+ }
2288
 
2289
+ if($is_type_db){
 
2290
  foreach ($data['files'] as $sql_file)
2291
  {
2292
  @unlink($sql_file);
includes/class-wpvivid-db-method.php CHANGED
@@ -13,6 +13,16 @@ class WPvivid_DB_Method
13
 
14
  public function connect_db()
15
  {
 
 
 
 
 
 
 
 
 
 
16
  if(class_exists('PDO'))
17
  {
18
  $extensions=get_loaded_extensions();
@@ -21,15 +31,18 @@ class WPvivid_DB_Method
21
  $res = explode(':',DB_HOST);
22
  $db_host = $res[0];
23
  $db_port = empty($res[1])?'':$res[1];
 
24
  if(!empty($db_port)) {
25
  $dsn='mysql:host=' . $db_host . ';port=' . $db_port . ';dbname=' . DB_NAME;
26
  }
27
  else{
28
  $dsn='mysql:host=' . $db_host . ';dbname=' . DB_NAME;
29
  }
 
30
  $this->db_handle=new PDO($dsn, DB_USER, DB_PASSWORD);
 
31
  $this->type='pdo_mysql';
32
- return;
33
  }
34
  }
35
  global $wpdb;
13
 
14
  public function connect_db()
15
  {
16
+ $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
17
+ if($client_flags)
18
+ {
19
+ global $wpdb;
20
+ $this->db_handle=$wpdb;
21
+ $this->type='wpdb';
22
+
23
+ return array('result'=>WPVIVID_SUCCESS);
24
+ }
25
+
26
  if(class_exists('PDO'))
27
  {
28
  $extensions=get_loaded_extensions();
31
  $res = explode(':',DB_HOST);
32
  $db_host = $res[0];
33
  $db_port = empty($res[1])?'':$res[1];
34
+
35
  if(!empty($db_port)) {
36
  $dsn='mysql:host=' . $db_host . ';port=' . $db_port . ';dbname=' . DB_NAME;
37
  }
38
  else{
39
  $dsn='mysql:host=' . $db_host . ';dbname=' . DB_NAME;
40
  }
41
+
42
  $this->db_handle=new PDO($dsn, DB_USER, DB_PASSWORD);
43
+
44
  $this->type='pdo_mysql';
45
+ return array('result'=>WPVIVID_SUCCESS);
46
  }
47
  }
48
  global $wpdb;
includes/class-wpvivid-mysqldump-wpdb.php CHANGED
@@ -121,6 +121,11 @@ class WPvivid_Mysqldump_wpdb
121
  'disable-foreign-keys-check' => true
122
  );
123
 
 
 
 
 
 
124
  $this->dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dumpSettings);
125
 
126
  $this->dumpSettings['init_commands'][] = "SET NAMES " . $this->dumpSettings['default-character-set'];
121
  'disable-foreign-keys-check' => true
122
  );
123
 
124
+ if(defined('DB_CHARSET'))
125
+ {
126
+ $dumpSettingsDefault['default-character-set']=DB_CHARSET;
127
+ }
128
+
129
  $this->dumpSettings = self::array_replace_recursive($dumpSettingsDefault, $dumpSettings);
130
 
131
  $this->dumpSettings['init_commands'][] = "SET NAMES " . $this->dumpSettings['default-character-set'];
includes/class-wpvivid-mysqldump.php CHANGED
@@ -133,6 +133,11 @@ class WPvivid_Mysqldump
133
  'disable-foreign-keys-check' => true
134
  );
135
 
 
 
 
 
 
136
  $this->dbType=$this->get_db_type();
137
  $this->user = $user;
138
  $this->pass = $pass;
@@ -167,6 +172,12 @@ class WPvivid_Mysqldump
167
 
168
  public function get_db_type()
169
  {
 
 
 
 
 
 
170
  if(class_exists('PDO'))
171
  {
172
  $extensions=get_loaded_extensions();
133
  'disable-foreign-keys-check' => true
134
  );
135
 
136
+ if(defined('DB_CHARSET'))
137
+ {
138
+ $dumpSettingsDefault['default-character-set']=DB_CHARSET;
139
+ }
140
+
141
  $this->dbType=$this->get_db_type();
142
  $this->user = $user;
143
  $this->pass = $pass;
172
 
173
  public function get_db_type()
174
  {
175
+ $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
176
+ if($client_flags)
177
+ {
178
+ return 'wpdb';
179
+ }
180
+
181
  if(class_exists('PDO'))
182
  {
183
  $extensions=get_loaded_extensions();
includes/class-wpvivid-public-interface.php CHANGED
@@ -29,6 +29,12 @@ class WPvivid_Public_Interface
29
  case 'set_schedule_addon':
30
  $ret = apply_filters('wpvivid_sync_schedule_addon_mainwp', $data['schedule']);
31
  break;
 
 
 
 
 
 
32
  default:
33
  $ret['result'] = 'failed';
34
  $ret['error'] = 'Unknown action';
29
  case 'set_schedule_addon':
30
  $ret = apply_filters('wpvivid_sync_schedule_addon_mainwp', $data['schedule']);
31
  break;
32
+ case 'get_database_tables':
33
+ $ret = apply_filters('wpvivid_get_database_tables_mainwp', array());
34
+ break;
35
+ case 'get_themes_plugins':
36
+ $ret = apply_filters('wpvivid_get_themes_plugins_mainwp', array());
37
+ break;
38
  default:
39
  $ret['result'] = 'failed';
40
  $ret['error'] = 'Unknown action';
includes/class-wpvivid-restore-database.php CHANGED
@@ -49,9 +49,7 @@ class WPvivid_RestoreDB
49
  $this->db_method->set_skip_query(0);
50
 
51
  global $wpvivid_plugin;
52
-
53
- if(file_exists($path.$sql_file))
54
- {
55
  if(!isset($options['skip_backup_old_database']))
56
  {
57
  $wpvivid_plugin->restore_data->write_log('Backing up current site\'s database.','notice');
@@ -62,29 +60,62 @@ class WPvivid_RestoreDB
62
  if($result['result'] == WPVIVID_FAILED)
63
  {
64
  $wpvivid_plugin->restore_data->write_log('Backing up current site\'s database failed.error:'.$result['error'],'warning');
 
65
  }
66
  }
67
 
68
- $this->current_setting = WPvivid_Setting::export_setting_to_json();
69
- $ret=$this->db_method->connect_db();
70
- if($ret['result']==WPVIVID_FAILED)
71
- {
72
- return $ret;
73
  }
 
 
 
 
 
 
 
 
 
 
 
74
 
75
- $this->db_method->test_db();
76
- $this->db_method->check_max_allow_packet();
77
 
78
- $this->db_method->init_sql_mode();
79
- $result=$this->execute_sql_file($path.$sql_file,$options);
80
- $this->enable_plugins();
81
- unset($this->db_method);
82
  return $result;
83
- }else {
 
84
  return array('result'=>'failed','error'=>'Database\'s .sql file not found. Please try again.');
85
  }
86
  }
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  private function enable_plugins()
89
  {
90
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
49
  $this->db_method->set_skip_query(0);
50
 
51
  global $wpvivid_plugin;
52
+ if(file_exists($path.$sql_file)) {
 
 
53
  if(!isset($options['skip_backup_old_database']))
54
  {
55
  $wpvivid_plugin->restore_data->write_log('Backing up current site\'s database.','notice');
60
  if($result['result'] == WPVIVID_FAILED)
61
  {
62
  $wpvivid_plugin->restore_data->write_log('Backing up current site\'s database failed.error:'.$result['error'],'warning');
63
+ return $result;
64
  }
65
  }
66
 
67
+ $is_additional_db = false;
68
+ $is_additional_db = apply_filters('wpvivid_check_additional_database', $is_additional_db, $options);
69
+ if($is_additional_db){
70
+ $result = $this->execute_extra_sql_file($path . $sql_file, $options);
 
71
  }
72
+ else{
73
+ $this->current_setting = WPvivid_Setting::export_setting_to_json();
74
+ $ret=$this->db_method->connect_db();
75
+ if($ret['result']==WPVIVID_FAILED)
76
+ {
77
+ return $ret;
78
+ }
79
+
80
+ $this->db_method->test_db();
81
+ $this->db_method->check_max_allow_packet();
82
+ $this->db_method->init_sql_mode();
83
 
84
+ $result = $this->execute_sql_file($path . $sql_file, $options);
 
85
 
86
+ $this->enable_plugins();
87
+ unset($this->db_method);
88
+ do_action('wpvivid_restore_database_finish',$options);
89
+ }
90
  return $result;
91
+ }
92
+ else {
93
  return array('result'=>'failed','error'=>'Database\'s .sql file not found. Please try again.');
94
  }
95
  }
96
 
97
+ private function execute_extra_sql_file($file, $options){
98
+ global $wpvivid_plugin;
99
+ $wpvivid_plugin->restore_data->write_log('Start import additional sql file.','notice');
100
+ $dbhost = '';
101
+ $dbuser = '';
102
+ $dbpassword = '';
103
+ $dbname = '';
104
+ foreach ($options['additional_database'] as $db_name => $db_info){
105
+ if($options['database'] === $db_name){
106
+ $dbhost = $db_info['db_host'];
107
+ $dbuser = $db_info['db_user'];
108
+ $dbpassword = $db_info['db_pass'];
109
+ $dbname = $db_info['db_name'];
110
+ break;
111
+ }
112
+ }
113
+
114
+ $restore_extra_db=new WPvivid_Restore_DB_Extra($dbhost, $dbuser, $dbpassword, $dbname);
115
+ $ret = $restore_extra_db->execute_extra_sql_file($file, $options);
116
+ return $ret;
117
+ }
118
+
119
  private function enable_plugins()
120
  {
121
  include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
includes/class-wpvivid-restore-db-extra.php ADDED
@@ -0,0 +1,311 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WPvivid_Restore_DB_Extra
4
+ {
5
+ private $host;
6
+ private $username;
7
+ private $password;
8
+ private $database;
9
+ private $charset;
10
+
11
+ private $support_engines;
12
+ private $support_charsets;
13
+ private $support_collates;
14
+
15
+ private $default_engines;
16
+ private $default_charsets;
17
+ private $default_collates;
18
+
19
+ public function __construct($host = 'localhost', $username = 'root', $password = '', $database = 'test', $charset = 'utf8'){
20
+ $this->host = $host;
21
+ $this->username = $username;
22
+ $this->password = $password;
23
+ $this->database = $database;
24
+ $this->charset = $charset;
25
+ }
26
+
27
+ public function execute_extra_sql_file($file, $option){
28
+ global $wpvivid_plugin, $wpvivid_additional_db;
29
+ try {
30
+ $wpvivid_additional_db = new wpdb($this->username, $this->password, $this->database, $this->host);
31
+
32
+ $wpvivid_plugin->restore_data->write_log('Start import sql file.', 'notice');
33
+
34
+ $this->support_engines = array();
35
+ $this->support_charsets = array();
36
+ $this->support_collates = array();
37
+
38
+ $this->default_engines = array();
39
+ $this->default_charsets = array();
40
+ $this->default_collates = array();
41
+
42
+ $this->default_engines = isset($option['default_engine']) ? $option['default_engine'] : 'MyISAM';
43
+ $this->default_charsets = isset($option['default_charsets']) ? $option['default_charsets'] : DB_CHARSET;
44
+ $this->default_collates = isset($option['default_collations']) ? $option['default_collations'] : DB_COLLATE;
45
+
46
+ $result = $wpvivid_additional_db->get_results("SHOW ENGINES", OBJECT_K);
47
+ foreach ($result as $key => $value) {
48
+ $this->support_engines[] = $key;
49
+ }
50
+
51
+ $result = $wpvivid_additional_db->get_results("SHOW CHARACTER SET", OBJECT_K);
52
+ foreach ($result as $key => $value) {
53
+ $this->support_charsets[] = $key;
54
+ }
55
+
56
+ $result = $wpvivid_additional_db->get_results("SHOW COLLATION", OBJECT_K);
57
+ foreach ($result as $key => $value) {
58
+ $this->support_collates[$key] = $value;
59
+ }
60
+
61
+ $sql_handle = fopen($file, 'r');
62
+ if ($sql_handle === false) {
63
+ $ret['result'] = WPVIVID_FAILED;
64
+ $ret['error'] = 'file not found. file name:' . $file;
65
+ return $ret;
66
+ }
67
+
68
+ $line_num = 0;
69
+ $query = '';
70
+
71
+ while (!feof($sql_handle)) {
72
+ $line = fgets($sql_handle);
73
+ $line_num++;
74
+ $startWith = substr(trim($line), 0, 2);
75
+ $startWithEx = substr(trim($line), 0, 3);
76
+ $endWith = substr(trim($line), -1, 1);
77
+ $line = rtrim($line);
78
+
79
+ if (empty($line) || $startWith == '--' || ($startWith == '/*' && $startWithEx != '/*!') || $startWith == '//') {
80
+ continue;
81
+ }
82
+
83
+ $query = $query . $line;
84
+ if ($endWith == ';') {
85
+ if (preg_match('#^\\s*CREATE TABLE#', $query)) {
86
+ $this->create_table($query);
87
+ } else if (preg_match('#^\\s*LOCK TABLES#', $query)) {
88
+ $this->lock_table($query);
89
+ } else if (preg_match('#^\\s*INSERT INTO#', $query)) {
90
+ $this->insert($query);
91
+ } else if (preg_match('#^\\s*DROP TABLE #', $query)) {
92
+ $this->drop_table($query);
93
+ } else if (preg_match('#\/*!#', $query)) {
94
+ if ($this->execute_sql($query) === false) {
95
+ $wpvivid_plugin->restore_data->write_log('Restore ' . basename($file) . ' error at line ' . $line_num . ',' . PHP_EOL . 'errorinfo: [' . implode('][', $this->errorInfo()) . ']', 'Warning');
96
+ $query = '';
97
+ continue;
98
+ }
99
+ } else {
100
+ if ($this->execute_sql($query) === false) {
101
+ $wpvivid_plugin->restore_data->write_log('Restore ' . basename($file) . ' error at line ' . $line_num . ',' . PHP_EOL . 'errorinfo: [' . implode('][', $this->errorInfo()) . ']', 'Warning');
102
+ $query = '';
103
+ continue;
104
+ }
105
+ }
106
+ $query = '';
107
+ }
108
+ }
109
+ fclose($sql_handle);
110
+
111
+ $ret['result'] = WPVIVID_SUCCESS;
112
+ }
113
+ catch (Exception $error)
114
+ {
115
+ $ret['result']='failed';
116
+ $message = 'An exception has occurred. class:'.get_class($error).';msg:'.$error->getMessage().';code:'.$error->getCode().';line:'.$error->getLine().';in_file:'.$error->getFile().';';
117
+ $ret['error'] = $message;
118
+ }
119
+ catch (Error $error)
120
+ {
121
+ $ret['result']='failed';
122
+ $message = 'An exception has occurred. class:'.get_class($error).';msg:'.$error->getMessage().';code:'.$error->getCode().';line:'.$error->getLine().';in_file:'.$error->getFile().';';
123
+ $ret['error'] = $message;
124
+ }
125
+ return $ret;
126
+ }
127
+
128
+ private function create_table($query){
129
+ global $wpvivid_plugin;
130
+ $table_name='';
131
+ if (preg_match('/^\s*CREATE TABLE +\`?([^\`]*)\`?/i', $query, $matches)) {
132
+ $table_name = $matches[1];
133
+ }
134
+ $wpvivid_plugin->restore_data->write_log('Create table: '.$table_name, 'notice');
135
+
136
+ if (preg_match('/ENGINE=([^\s;]+)/', $query, $matches)) {
137
+ $engine = $matches[1];
138
+ $replace_engine=true;
139
+ foreach ($this->support_engines as $support_engine) {
140
+ if(strtolower($engine)==strtolower($support_engine)) {
141
+ $replace_engine=false;
142
+ break;
143
+ }
144
+ }
145
+
146
+ if($replace_engine!==false) {
147
+ if(!empty($this->default_engines))
148
+ $replace_engine=$this->default_engines[0];
149
+ }
150
+
151
+ if($replace_engine!==false) {
152
+ $wpvivid_plugin->restore_data->write_log('create table replace engine:'.$engine.' to :'.$replace_engine, 'notice');
153
+ $query=str_replace("ENGINE=$engine", "ENGINE=$replace_engine", $query);
154
+ }
155
+ }
156
+
157
+ if (preg_match('/CHARSET ([^\s;]+)/', $query, $matches)||preg_match('/CHARSET=([^\s;]+)/', $query, $matches)) {
158
+ $charset = $matches[1];
159
+ $replace_charset=true;
160
+ foreach ($this->support_charsets as $support_charset) {
161
+ if(strtolower($charset)==strtolower($support_charset)) {
162
+ $replace_charset=false;
163
+ break;
164
+ }
165
+ }
166
+
167
+ if($replace_charset) {
168
+ $replace_charset=$this->default_charsets[0];
169
+ }
170
+
171
+ if($replace_charset!==false) {
172
+ $wpvivid_plugin->restore_data->write_log('create table replace charset:'.$charset.' to :'.$replace_charset, 'notice');
173
+ $query=str_replace("CHARSET=$charset", "CHARSET=$replace_charset", $query);
174
+ $query=str_replace("CHARSET $charset", "CHARSET=$replace_charset", $query);
175
+ $charset=$replace_charset;
176
+ }
177
+
178
+ $collate='';
179
+
180
+ if (preg_match('/ COLLATE ([a-zA-Z0-9._-]+)/i', $query, $matches)) {
181
+ $collate = $matches[1];
182
+ }
183
+ else if(preg_match('/ COLLATE=([a-zA-Z0-9._-]+)/i', $query, $matches)) {
184
+ $collate = $matches[1];
185
+ }
186
+
187
+ if(!empty($collate)) {
188
+ $replace_collate=true;
189
+ foreach ($this->support_collates as $key=>$support_collate) {
190
+ if(strtolower($charset)==strtolower($support_collate->Charset)&&strtolower($collate)==strtolower($key)) {
191
+ $replace_collate=false;
192
+ break;
193
+ }
194
+ }
195
+
196
+ if($replace_collate) {
197
+ $replace_collate=false;
198
+ foreach ($this->support_collates as $key=>$support_collate) {
199
+ if(strtolower($charset)==strtolower($support_collate->Charset)) {
200
+ if($support_collate->Default=='Yes') {
201
+ $replace_collate=$key;
202
+ }
203
+ }
204
+ }
205
+
206
+ if($replace_collate==false) {
207
+ foreach ($this->support_collates as $key=>$support_collate) {
208
+ if(strtolower($charset)==strtolower($support_collate->Charset)) {
209
+ $replace_collate=$key;
210
+ break;
211
+ }
212
+ }
213
+ }
214
+ }
215
+
216
+ if($replace_collate!==false) {
217
+ $wpvivid_plugin->restore_data->write_log('create table replace collate:'.$collate.' to :'.$replace_collate, 'notice');
218
+ $query=str_replace("COLLATE $collate", "COLLATE $replace_collate", $query);
219
+ $query=str_replace("COLLATE=$collate", "COLLATE=$replace_collate", $query);
220
+ }
221
+ }
222
+ }
223
+ else
224
+ {
225
+ if (preg_match('/ COLLATE ([a-zA-Z0-9._-]+)/i', $query, $matches)) {
226
+ $collate = $matches[1];
227
+ }
228
+ else if(preg_match('/ COLLATE=([a-zA-Z0-9._-]+)/i', $query, $matches)) {
229
+ $collate = $matches[1];
230
+ }
231
+
232
+ if(!empty($collate)) {
233
+ $replace_collate=true;
234
+ foreach ($this->support_collates as $key=>$support_collate) {
235
+ if(strtolower($collate)==strtolower($key)) {
236
+ $replace_collate=false;
237
+ break;
238
+ }
239
+ }
240
+
241
+ if($replace_collate) {
242
+ $replace_collate=false;
243
+ foreach ($this->support_collates as $key=>$support_collate) {
244
+ if(strtolower($this->default_charsets[0])==strtolower($support_collate->Charset)) {
245
+ if($support_collate->Default=='Yes') {
246
+ $replace_collate=$key;
247
+ }
248
+ }
249
+ }
250
+
251
+ if($replace_collate==false) {
252
+ foreach ($this->support_collates as $key=>$support_collate) {
253
+ if(strtolower($this->default_charsets[0])==strtolower($support_collate->Charset)) {
254
+ $replace_collate=$key;
255
+ break;
256
+ }
257
+ }
258
+ }
259
+ }
260
+
261
+ if($replace_collate!==false) {
262
+ $wpvivid_plugin->restore_data->write_log('create table replace collate:'.$collate.' to :'.$replace_collate, 'notice');
263
+ $query=str_replace("COLLATE $collate", "COLLATE $replace_collate", $query);
264
+ $query=str_replace("COLLATE=$collate", "COLLATE=$replace_collate", $query);
265
+ }
266
+ }
267
+ }
268
+
269
+ $this->execute_sql($query);
270
+ return $table_name;
271
+ }
272
+
273
+ private function lock_table($query)
274
+ {
275
+ global $wpvivid_plugin;
276
+ if (preg_match('/^\s*LOCK TABLES +\`?([^\`]*)\`?/i', $query, $matches)) {
277
+ $table_name = $matches[1];
278
+ $wpvivid_plugin->restore_data->write_log('lock table: '.$table_name, 'notice');
279
+ }
280
+ $this->execute_sql($query);
281
+ }
282
+
283
+ private function insert($query)
284
+ {
285
+ $this->execute_sql($query);
286
+ }
287
+
288
+ private function drop_table($query){
289
+ global $wpvivid_plugin;
290
+ if (preg_match('/^\s*DROP TABLE IF EXISTS +\`?([^\`]*)\`?\s*;/i', $query, $matches)) {
291
+ $table_name = $matches[1];
292
+ $wpvivid_plugin->restore_data->write_log('Drop table if exist '.$table_name, 'notice');
293
+ }
294
+ $this->execute_sql($query);
295
+ }
296
+
297
+ private function execute_sql($query)
298
+ {
299
+ global $wpvivid_plugin, $wpvivid_additional_db;
300
+ if ($wpvivid_additional_db->get_results($query)===false) {
301
+ $error=$wpvivid_additional_db->last_error;
302
+ $wpvivid_plugin->restore_data->write_log($error, 'Warning');
303
+ }
304
+ }
305
+
306
+ public function errorInfo()
307
+ {
308
+ global $wpvivid_additional_db;
309
+ return $wpvivid_additional_db->last_error;
310
+ }
311
+ }
includes/class-wpvivid-restore-db-method.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: alienware`x
5
- * Date: 2019/6/11
6
- * Time: 13:26
7
- */
8
 
9
  include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-restore-db-pdo-mysql-method.php';
10
  include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-restore-db-wpdb-method.php';
@@ -17,6 +11,15 @@ class WPvivid_Restore_DB_Method
17
  public function __construct()
18
  {
19
  global $wpvivid_plugin;
 
 
 
 
 
 
 
 
 
20
  if(class_exists('PDO'))
21
  {
22
  $extensions=get_loaded_extensions();
1
  <?php
 
 
 
 
 
 
2
 
3
  include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-restore-db-pdo-mysql-method.php';
4
  include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-restore-db-wpdb-method.php';
11
  public function __construct()
12
  {
13
  global $wpvivid_plugin;
14
+ $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
15
+ if($client_flags)
16
+ {
17
+ $wpvivid_plugin->restore_data->write_log('wpdb', 'Warning');
18
+ $this->db =new WPvivid_Restore_DB_WPDB_Method();
19
+ $this->type='wpdb';
20
+ return;
21
+ }
22
+
23
  if(class_exists('PDO'))
24
  {
25
  $extensions=get_loaded_extensions();
includes/class-wpvivid-restore-db-pdo-mysql-method.php CHANGED
@@ -1,12 +1,4 @@
1
  <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: alienware`x
5
- * Date: 2019/6/12
6
- * Time: 15:46
7
- */
8
-
9
-
10
 
11
  class WPvivid_Restore_DB_PDO_Mysql_Method
12
  {
1
  <?php
 
 
 
 
 
 
 
 
2
 
3
  class WPvivid_Restore_DB_PDO_Mysql_Method
4
  {
includes/class-wpvivid-restore-db-wpdb-method.php CHANGED
@@ -1,10 +1,4 @@
1
  <?php
2
- /**
3
- * Created by PhpStorm.
4
- * User: alienware`x
5
- * Date: 2019/6/12
6
- * Time: 15:49
7
- */
8
 
9
  class WPvivid_Restore_DB_WPDB_Method
10
  {
@@ -158,6 +152,6 @@ class WPvivid_Restore_DB_WPDB_Method
158
  public function errorInfo()
159
  {
160
  global $wpdb;
161
- return $wpdb->last_error;;
162
  }
163
  }
1
  <?php
 
 
 
 
 
 
2
 
3
  class WPvivid_Restore_DB_WPDB_Method
4
  {
152
  public function errorInfo()
153
  {
154
  global $wpdb;
155
+ return $wpdb->last_error;
156
  }
157
  }
includes/class-wpvivid-restore-site.php CHANGED
@@ -12,7 +12,6 @@ class WPvivid_RestoreSite
12
  public function restore($option,$files)
13
  {
14
  global $wpvivid_plugin;
15
-
16
  if(isset($option['has_child']))
17
  {
18
  $root_path=WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir();
@@ -38,144 +37,116 @@ class WPvivid_RestoreSite
38
  return $zip -> extract($all_files,$root_path);
39
  }
40
  }
41
- else if(isset($option['dump_db']))
42
- {
43
- $path = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR.WPVIVID_DEFAULT_ROLLBACK_DIR.DIRECTORY_SEPARATOR.'wpvivid_old_database';
44
- if(file_exists($path))
45
- {
46
- @mkdir($path);
47
- }
48
-
49
- $zip = new WPvivid_ZipClass();
50
- $all_files = array();
51
- foreach ($files as $file)
52
- {
53
- $all_files[] = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR.$file;
54
- }
55
-
56
- $ret= $zip -> extract($all_files,$path);
57
-
58
- unset($zip);
59
-
60
- return $ret;
61
- }
62
  else
63
  {
64
- $root_path='';
65
- if(isset($option['root']))
66
- {
67
- $root_path=$this->transfer_path(get_home_path().$option['root']);
68
- }
69
- else if(isset($option['root_flag']))
70
- {
71
- if($option['root_flag']==WPVIVID_BACKUP_ROOT_WP_CONTENT)
72
  {
73
- $root_path=$this->transfer_path(WP_CONTENT_DIR);
74
  }
75
- else if($option['root_flag']==WPVIVID_BACKUP_ROOT_CUSTOM)
76
- {
77
- $root_path=$this->transfer_path(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir());
78
- }
79
- else if($option['root_flag']==WPVIVID_BACKUP_ROOT_WP_ROOT)
80
  {
81
- $root_path=$this->transfer_path(ABSPATH);
82
  }
 
 
 
 
83
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
- $root_path = rtrim($root_path, '/');
86
- $root_path = rtrim($root_path, DIRECTORY_SEPARATOR);
87
 
88
- $exclude_path[]=$this->transfer_path(WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir());
89
 
90
- if(isset($option['include_path']))
91
- {
92
- $include_path=$option['include_path'];
93
- }
94
- else
95
- {
96
- $include_path=array();
97
- }
98
 
99
- $zip = new WPvivid_ZipClass();
100
- $all_files = array();
101
- foreach ($files as $file)
102
- {
103
- $all_files[] = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR.$file;
104
- }
105
 
106
- $wpvivid_plugin->restore_data->write_log('restore from files:'.json_encode($all_files),'notice');
107
 
108
- $ret= $zip->extract($all_files,$root_path);
109
 
110
- if(isset($option['file_type']))
111
- {
112
- if($option['file_type']=='themes')
113
- {
114
- if(isset($option['remove_themes']))
115
- {
116
- foreach ($option['remove_themes'] as $slug=>$themes)
117
- {
118
- if(empty($slug))
119
- continue;
120
- $wpvivid_plugin->restore_data->write_log('remove '.get_theme_root().DIRECTORY_SEPARATOR.$slug,'notice');
121
- $this->delTree(get_theme_root().DIRECTORY_SEPARATOR.$slug);
122
  }
123
- }
124
-
125
- }
126
- else if($option['file_type']=='plugin')
127
- {
128
- if(isset($option['remove_plugin']))
129
- {
130
- foreach ($option['remove_plugin'] as $slug=>$plugin)
131
- {
132
- if(empty($slug))
133
- continue;
134
- $wpvivid_plugin->restore_data->write_log('remove '.WP_PLUGIN_DIR.DIRECTORY_SEPARATOR.$slug,'notice');
135
- $this->delTree(WP_PLUGIN_DIR.DIRECTORY_SEPARATOR.$slug);
136
  }
137
  }
138
  }
139
- }
140
 
141
 
142
- unset($zip);
143
 
144
- if(isset($option['wp_core'])&&isset($option['is_migrate']))
145
- {
146
- if($option['is_migrate'] == 1)
147
- {
148
- if (function_exists('save_mod_rewrite_rules'))
149
- {
150
- if(file_exists(get_home_path() . '.htaccess'))
151
- {
152
- $htaccess_data=file_get_contents(get_home_path() . '.htaccess');
153
- $line='';
154
- if(preg_match('#AddHandler application/x-httpd-php.*#',$htaccess_data,$matcher))
155
- {
156
- $line = PHP_EOL.$matcher[0];
157
 
158
- if(preg_match('#<IfModule mod_suphp.c>#',$htaccess_data,$matcher))
159
- {
160
- $line.= PHP_EOL.'<IfModule mod_suphp.c>';
161
- if(preg_match('#suPHP_ConfigPath .*#',$htaccess_data,$matcher))
162
- {
163
- $line.= PHP_EOL.$matcher[0];
164
  }
165
- $line.= PHP_EOL.'</IfModule>';
166
  }
167
- $wpvivid_plugin->restore_data->write_log('find php selector:'.$line,'notice');
 
 
 
168
  }
169
- @rename(get_home_path() . '.htaccess', get_home_path() . '.htaccess_old');
170
- save_mod_rewrite_rules();
171
- if(!empty($line))
172
- file_put_contents(get_home_path() . '.htaccess',$line,FILE_APPEND);
173
  }
 
174
  }
175
- WPvivid_Setting::update_option('wpvivid_migrate_status', 'completed');
176
  }
177
  }
178
-
179
  return $ret;
180
  }
181
  }
12
  public function restore($option,$files)
13
  {
14
  global $wpvivid_plugin;
 
15
  if(isset($option['has_child']))
16
  {
17
  $root_path=WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir();
37
  return $zip -> extract($all_files,$root_path);
38
  }
39
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  else
41
  {
42
+ $is_type_db = false;
43
+ $is_type_db = apply_filters('wpvivid_check_type_database', $is_type_db, $option);
44
+ if($is_type_db){
45
+ $path = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR.WPVIVID_DEFAULT_ROLLBACK_DIR.DIRECTORY_SEPARATOR.'wpvivid_old_database';
46
+ if(file_exists($path))
 
 
 
47
  {
48
+ @mkdir($path);
49
  }
50
+
51
+ $zip = new WPvivid_ZipClass();
52
+ $all_files = array();
53
+ foreach ($files as $file)
 
54
  {
55
+ $all_files[] = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR.$file;
56
  }
57
+
58
+ $ret= $zip -> extract($all_files,$path);
59
+
60
+ unset($zip);
61
  }
62
+ else {
63
+ $root_path = '';
64
+ if (isset($option['root'])) {
65
+ $root_path = $this->transfer_path(get_home_path() . $option['root']);
66
+ } else if (isset($option['root_flag'])) {
67
+ if ($option['root_flag'] == WPVIVID_BACKUP_ROOT_WP_CONTENT) {
68
+ $root_path = $this->transfer_path(WP_CONTENT_DIR);
69
+ } else if ($option['root_flag'] == WPVIVID_BACKUP_ROOT_CUSTOM) {
70
+ $root_path = $this->transfer_path(WP_CONTENT_DIR . DIRECTORY_SEPARATOR . WPvivid_Setting::get_backupdir());
71
+ } else if ($option['root_flag'] == WPVIVID_BACKUP_ROOT_WP_ROOT) {
72
+ $root_path = $this->transfer_path(ABSPATH);
73
+ }
74
+ }
75
 
76
+ $root_path = rtrim($root_path, '/');
77
+ $root_path = rtrim($root_path, DIRECTORY_SEPARATOR);
78
 
79
+ $exclude_path[] = $this->transfer_path(WP_CONTENT_DIR . DIRECTORY_SEPARATOR . WPvivid_Setting::get_backupdir());
80
 
81
+ if (isset($option['include_path'])) {
82
+ $include_path = $option['include_path'];
83
+ } else {
84
+ $include_path = array();
85
+ }
 
 
 
86
 
87
+ $zip = new WPvivid_ZipClass();
88
+ $all_files = array();
89
+ foreach ($files as $file) {
90
+ $all_files[] = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . WPvivid_Setting::get_backupdir() . DIRECTORY_SEPARATOR . $file;
91
+ }
 
92
 
93
+ $wpvivid_plugin->restore_data->write_log('restore from files:' . json_encode($all_files), 'notice');
94
 
95
+ $ret = $zip->extract($all_files, $root_path);
96
 
97
+ if (isset($option['file_type'])) {
98
+ if ($option['file_type'] == 'themes') {
99
+ if (isset($option['remove_themes'])) {
100
+ foreach ($option['remove_themes'] as $slug => $themes) {
101
+ if (empty($slug))
102
+ continue;
103
+ $wpvivid_plugin->restore_data->write_log('remove ' . get_theme_root() . DIRECTORY_SEPARATOR . $slug, 'notice');
104
+ $this->delTree(get_theme_root() . DIRECTORY_SEPARATOR . $slug);
105
+ }
 
 
 
106
  }
107
+ } else if ($option['file_type'] == 'plugin') {
108
+ if (isset($option['remove_plugin'])) {
109
+ foreach ($option['remove_plugin'] as $slug => $plugin) {
110
+ if (empty($slug))
111
+ continue;
112
+ $wpvivid_plugin->restore_data->write_log('remove ' . WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $slug, 'notice');
113
+ $this->delTree(WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $slug);
114
+ }
 
 
 
 
 
115
  }
116
  }
117
  }
 
118
 
119
 
120
+ unset($zip);
121
 
122
+ if (isset($option['wp_core']) && isset($option['is_migrate'])) {
123
+ if ($option['is_migrate'] == 1) {
124
+ if (function_exists('save_mod_rewrite_rules')) {
125
+ if (file_exists(get_home_path() . '.htaccess')) {
126
+ $htaccess_data = file_get_contents(get_home_path() . '.htaccess');
127
+ $line = '';
128
+ if (preg_match('#AddHandler application/x-httpd-php.*#', $htaccess_data, $matcher)) {
129
+ $line = PHP_EOL . $matcher[0];
 
 
 
 
 
130
 
131
+ if (preg_match('#<IfModule mod_suphp.c>#', $htaccess_data, $matcher)) {
132
+ $line .= PHP_EOL . '<IfModule mod_suphp.c>';
133
+ if (preg_match('#suPHP_ConfigPath .*#', $htaccess_data, $matcher)) {
134
+ $line .= PHP_EOL . $matcher[0];
135
+ }
136
+ $line .= PHP_EOL . '</IfModule>';
137
  }
138
+ $wpvivid_plugin->restore_data->write_log('find php selector:' . $line, 'notice');
139
  }
140
+ @rename(get_home_path() . '.htaccess', get_home_path() . '.htaccess_old');
141
+ save_mod_rewrite_rules();
142
+ if (!empty($line))
143
+ file_put_contents(get_home_path() . '.htaccess', $line, FILE_APPEND);
144
  }
 
 
 
 
145
  }
146
+ WPvivid_Setting::update_option('wpvivid_migrate_status', 'completed');
147
  }
 
148
  }
149
  }
 
150
  return $ret;
151
  }
152
  }
includes/class-wpvivid-restore.php CHANGED
@@ -62,25 +62,32 @@ class WPvivid_Restore
62
  $option=$json;
63
  }
64
  $option=array_merge($option,$restore_task['option']);
65
-
66
- if(isset($option['dump_db']))
67
- {
68
  $restore_site = new WPvivid_RestoreSite();
69
  $wpvivid_plugin->restore_data->write_log('Start restoring '.$restore_task['files'][0],'notice');
70
  $ret= $restore_site -> restore($option,$restore_task['files']);
71
- if($ret['result']==WPVIVID_SUCCESS)
72
- {
73
  $path = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR.WPVIVID_DEFAULT_ROLLBACK_DIR.DIRECTORY_SEPARATOR.'wpvivid_old_database'.DIRECTORY_SEPARATOR;
74
  $sql_file = $backup_item->get_sql_file($restore_task['files'][0]);
75
  $wpvivid_plugin->restore_data->write_log('sql file: '.$sql_file,'notice');
76
  $restore_db=new WPvivid_RestoreDB();
77
- $restore_db->restore($path,$sql_file,$option);
78
- $wpvivid_plugin->restore_data->write_log('Finished restoring '.$restore_task['files'][0],'notice');
79
- $wpvivid_plugin->restore_data->update_need_unzip_file($restore_task['index'],$restore_task['files']);
80
- return array('result'=>WPVIVID_SUCCESS);
 
 
 
 
 
 
 
 
 
81
  }
82
- else
83
- {
84
  return $ret;
85
  }
86
  }
62
  $option=$json;
63
  }
64
  $option=array_merge($option,$restore_task['option']);
65
+ $is_type_db = false;
66
+ $is_type_db = apply_filters('wpvivid_check_type_database', $is_type_db, $option);
67
+ if($is_type_db){
68
  $restore_site = new WPvivid_RestoreSite();
69
  $wpvivid_plugin->restore_data->write_log('Start restoring '.$restore_task['files'][0],'notice');
70
  $ret= $restore_site -> restore($option,$restore_task['files']);
71
+ if($ret['result']==WPVIVID_SUCCESS){
 
72
  $path = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.WPvivid_Setting::get_backupdir().DIRECTORY_SEPARATOR.WPVIVID_DEFAULT_ROLLBACK_DIR.DIRECTORY_SEPARATOR.'wpvivid_old_database'.DIRECTORY_SEPARATOR;
73
  $sql_file = $backup_item->get_sql_file($restore_task['files'][0]);
74
  $wpvivid_plugin->restore_data->write_log('sql file: '.$sql_file,'notice');
75
  $restore_db=new WPvivid_RestoreDB();
76
+ $check_is_remove = false;
77
+ $check_is_remove = apply_filters('wpvivid_check_remove_restore_database', $check_is_remove, $option);
78
+ if(!$check_is_remove) {
79
+ $ret = $restore_db->restore($path, $sql_file, $option);
80
+ $wpvivid_plugin->restore_data->write_log('Finished restoring '.$restore_task['files'][0],'notice');
81
+ $wpvivid_plugin->restore_data->update_need_unzip_file($restore_task['index'],$restore_task['files']);
82
+ }
83
+ else{
84
+ $wpvivid_plugin->restore_data->write_log('Remove file: '.$path.$sql_file, 'notice');
85
+ $wpvivid_plugin->restore_data->update_need_unzip_file($restore_task['index'],$restore_task['files']);
86
+ $ret['result']=WPVIVID_SUCCESS;
87
+ }
88
+ return $ret;
89
  }
90
+ else{
 
91
  return $ret;
92
  }
93
  }
includes/class-wpvivid-setting.php CHANGED
@@ -345,7 +345,7 @@ class WPvivid_Setting
345
  }
346
 
347
  $options=array();
348
- $upload_options=self::get_option('wpvivid_upload_setting');
349
  foreach ($remote_ids as $id)
350
  {
351
  if(array_key_exists($id,$upload_options))
@@ -451,7 +451,7 @@ class WPvivid_Setting
451
  return $ret;
452
  }
453
 
454
- public static function export_setting_to_json($setting=true,$history=true,$review=true)
455
  {
456
  global $wpvivid_plugin;
457
  $json['plugin']=$wpvivid_plugin->get_plugin_name();
@@ -501,12 +501,15 @@ class WPvivid_Setting
501
 
502
  if($history)
503
  {
504
- $json['data']['wpvivid_backup_list']=self::get_option('wpvivid_backup_list');
505
  $json['data']['wpvivid_task_list']=self::get_option('wpvivid_task_list');
506
  $json['data']['wpvivid_last_msg']=self::get_option('wpvivid_last_msg');
507
  $json['data']['wpvivid_user_history']=self::get_option('wpvivid_user_history');
508
  }
509
 
 
 
 
 
510
  if($review)
511
  {
512
  $json['data']['wpvivid_need_review']=self::get_option('wpvivid_need_review');
345
  }
346
 
347
  $options=array();
348
+ $upload_options=WPvivid_Setting::get_option('wpvivid_upload_setting');
349
  foreach ($remote_ids as $id)
350
  {
351
  if(array_key_exists($id,$upload_options))
451
  return $ret;
452
  }
453
 
454
+ public static function export_setting_to_json($setting=true,$history=true,$review=true,$backup_list=true)
455
  {
456
  global $wpvivid_plugin;
457
  $json['plugin']=$wpvivid_plugin->get_plugin_name();
501
 
502
  if($history)
503
  {
 
504
  $json['data']['wpvivid_task_list']=self::get_option('wpvivid_task_list');
505
  $json['data']['wpvivid_last_msg']=self::get_option('wpvivid_last_msg');
506
  $json['data']['wpvivid_user_history']=self::get_option('wpvivid_user_history');
507
  }
508
 
509
+ if($backup_list){
510
+ $json['data']['wpvivid_backup_list']=self::get_option('wpvivid_backup_list');
511
+ }
512
+
513
  if($review)
514
  {
515
  $json['data']['wpvivid_need_review']=self::get_option('wpvivid_need_review');
includes/class-wpvivid-zipclass.php CHANGED
@@ -218,6 +218,56 @@ class WPvivid_ZipClass extends Wpvivid_Compress_Default
218
  return $ret;
219
  }
220
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  public function compress($data,$write_child_files_json=false)
222
  {
223
  if(!function_exists('get_home_path'))
218
  return $ret;
219
  }
220
 
221
+ public function compress_additional_database($data){
222
+ if(!function_exists('get_home_path'))
223
+ require_once(ABSPATH . 'wp-admin/includes/file.php');
224
+ global $wpvivid_plugin;
225
+ $wpvivid_plugin->wpvivid_log->WriteLog('Start compressing '.$data['key'],'notice');
226
+ $files = $data['files'];
227
+ $temp_dir = $data['path'].'temp-'.$data['prefix'].DIRECTORY_SEPARATOR;
228
+ if(!file_exists($temp_dir))
229
+ @mkdir($temp_dir);
230
+
231
+ $package_file = array();
232
+
233
+ $ret['result']=WPVIVID_SUCCESS;
234
+ $ret['files']=array();
235
+
236
+ foreach ($files as $file){
237
+ $file_name = $file;
238
+ $file_name = str_replace($data['path'], '', $file_name);
239
+ $file_name = str_replace('.sql', '', $file_name);
240
+ $path = $data['path'].$file_name.'.zip';
241
+ if(isset($data['json_info']))
242
+ {
243
+ $package_file['json']=$data['json_info'];
244
+ foreach ($data['sql_file_name'] as $sql_info){
245
+ if($file === $sql_info['file_name']){
246
+ $package_file['json']['database'] = $sql_info['database'];
247
+ }
248
+ }
249
+ }
250
+ $package_file['json']['root_flag'] = $data['root_flag'];
251
+ $package_file['json']['file']=basename($path);
252
+ $package_file['path'] = $path;
253
+ $package_file['files'] = $file;
254
+ $wpvivid_plugin->set_time_limit($wpvivid_plugin->current_task['id']);
255
+ $zip_ret=$this -> _zip($package_file['path'],$package_file['files'], $data, $package_file['json']);
256
+ if($zip_ret['result']==WPVIVID_SUCCESS)
257
+ {
258
+ $ret['files'][] = $zip_ret['file_data'];
259
+ }
260
+ else
261
+ {
262
+ $ret=$zip_ret;
263
+ break;
264
+ }
265
+ }
266
+
267
+ $wpvivid_plugin->wpvivid_log->WriteLog('Compressing '.$data['key'].' completed','notice');
268
+ return $ret;
269
+ }
270
+
271
  public function compress($data,$write_child_files_json=false)
272
  {
273
  if(!function_exists('get_home_path'))
includes/class-wpvivid.php CHANGED
@@ -122,6 +122,8 @@ class WPvivid {
122
  add_action('init', array($this, 'init_pclzip_tmp_folder'));
123
  add_action('plugins_loaded', array($this, 'load_remote_storage'),10);
124
 
 
 
125
  //Initialisation schedule hook
126
  $this->init_cron();
127
  //Initialisation log object
@@ -173,6 +175,9 @@ class WPvivid {
173
 
174
  include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-public-interface.php';
175
 
 
 
 
176
  $this->function_realize=new WPvivid_Function_Realize();
177
  $this->migrate=new WPvivid_Migrate();
178
  $this->backup_uploader=new Wpvivid_BackupUploader();
@@ -353,6 +358,9 @@ class WPvivid {
353
  add_action('wp_ajax_wpvivid_check_remote_alias_exist', array($this, 'check_remote_alias_exist'));
354
  add_action('wp_ajax_wpvivid_task_monitor', array($this, 'task_monitor_ex'));
355
  add_action('wp_ajax_wpvivid_amazons3_notice', array($this, 'amazons3_notice'));
 
 
 
356
  //wpvivid_task_monitor
357
  }
358
 
@@ -3223,7 +3231,8 @@ class WPvivid {
3223
 
3224
  public function download_restore_progress()
3225
  {
3226
- try {
 
3227
  if (!isset($_POST['file_name'])) {
3228
  die();
3229
  }
@@ -3233,7 +3242,8 @@ class WPvivid {
3233
 
3234
  $task = WPvivid_taskmanager::get_download_task_v2($_POST['file_name']);
3235
 
3236
- if ($task === false) {
 
3237
  $check_status = false;
3238
  $backupdir=WPvivid_Setting::get_backupdir();
3239
  $local_storage_dir = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.$backupdir;
@@ -4748,7 +4758,9 @@ class WPvivid {
4748
  $review = false;
4749
  }
4750
 
4751
- $json = WPvivid_Setting::export_setting_to_json($setting, $history, $review);
 
 
4752
  if (!headers_sent()) {
4753
  header('Content-Disposition: attachment; filename=wpvivid_setting.json');
4754
  //header('Content-type: application/json');
@@ -5713,4 +5725,25 @@ class WPvivid {
5713
  }
5714
  die();
5715
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5716
  }
122
  add_action('init', array($this, 'init_pclzip_tmp_folder'));
123
  add_action('plugins_loaded', array($this, 'load_remote_storage'),10);
124
 
125
+ add_action('wpvivid_before_setup_page',array($this,'clean_cache'));
126
+ add_filter('wpvivid_check_type_database', array($this, 'wpvivid_check_type_database'), 10, 2);
127
  //Initialisation schedule hook
128
  $this->init_cron();
129
  //Initialisation log object
175
 
176
  include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-public-interface.php';
177
 
178
+ include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-additional-db-method.php';
179
+ include_once WPVIVID_PLUGIN_DIR . '/includes/class-wpvivid-restore-db-extra.php';
180
+
181
  $this->function_realize=new WPvivid_Function_Realize();
182
  $this->migrate=new WPvivid_Migrate();
183
  $this->backup_uploader=new Wpvivid_BackupUploader();
358
  add_action('wp_ajax_wpvivid_check_remote_alias_exist', array($this, 'check_remote_alias_exist'));
359
  add_action('wp_ajax_wpvivid_task_monitor', array($this, 'task_monitor_ex'));
360
  add_action('wp_ajax_wpvivid_amazons3_notice', array($this, 'amazons3_notice'));
361
+
362
+ add_action('wp_ajax_wpvivid_hide_mainwp_tab_page', array($this, 'hide_mainwp_tab_page'));
363
+ add_action('wp_ajax_wpvivid_hide_wp_cron_notice', array($this, 'hide_wp_cron_notice'));
364
  //wpvivid_task_monitor
365
  }
366
 
3231
 
3232
  public function download_restore_progress()
3233
  {
3234
+ try
3235
+ {
3236
  if (!isset($_POST['file_name'])) {
3237
  die();
3238
  }
3242
 
3243
  $task = WPvivid_taskmanager::get_download_task_v2($_POST['file_name']);
3244
 
3245
+ if ($task === false)
3246
+ {
3247
  $check_status = false;
3248
  $backupdir=WPvivid_Setting::get_backupdir();
3249
  $local_storage_dir = WP_CONTENT_DIR.DIRECTORY_SEPARATOR.$backupdir;
4758
  $review = false;
4759
  }
4760
 
4761
+ $backup_list = false;
4762
+
4763
+ $json = WPvivid_Setting::export_setting_to_json($setting, $history, $review, $backup_list);
4764
  if (!headers_sent()) {
4765
  header('Content-Disposition: attachment; filename=wpvivid_setting.json');
4766
  //header('Content-type: application/json');
5725
  }
5726
  die();
5727
  }
5728
+
5729
+ public function wpvivid_check_type_database($is_type_db, $data){
5730
+ if(isset($data['dump_db'])){
5731
+ $is_type_db = true;
5732
+ }
5733
+ return $is_type_db;
5734
+ }
5735
+
5736
+ public function hide_mainwp_tab_page(){
5737
+ update_option('wpvivid_hide_mwp_tab_page', true);
5738
+ $ret['result']=WPVIVID_SUCCESS;
5739
+ echo json_encode($ret);
5740
+ die();
5741
+ }
5742
+
5743
+ public function hide_wp_cron_notice(){
5744
+ update_option('wpvivid_hide_wp_cron_notice', true);
5745
+ $ret['result']=WPVIVID_SUCCESS;
5746
+ echo json_encode($ret);
5747
+ die();
5748
+ }
5749
  }
languages/wpvivid-pl_PL.mo ADDED
Binary file
languages/wpvivid-pl_PL.po ADDED
@@ -0,0 +1,1240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WPvivid Backup Pro\n"
4
+ "POT-Creation-Date: 2019-10-01 10:14+0100\n"
5
+ "PO-Revision-Date: 2019-10-06 14:47+0100\n"
6
+ "Last-Translator: Andrew Galas <andrew.g@agalas.pl>\n"
7
+ "Language-Team: Andrew Galas <andrew.g@agalas.pl>\n"
8
+ "Language: pl_PL\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 2.2.4\n"
13
+ "X-Poedit-Basepath: ..\n"
14
+ "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 "
15
+ "|| n%100>14) ? 1 : 2);\n"
16
+ "X-Poedit-Flags-xgettext: --add-comments=translators:\n"
17
+ "X-Poedit-WPHeader: wpvivid-backup-pro.php\n"
18
+ "X-Poedit-SourceCharset: UTF-8\n"
19
+ "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
20
+ "esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
21
+ "_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
22
+ "X-Poedit-SearchPath-0: .\n"
23
+ "X-Poedit-SearchPathExcluded-0: *.min.js\n"
24
+
25
+ #: addons/class-multi-remote-addon.php:140
26
+ msgid ""
27
+ "Fail to delete the remote storage, can not retrieve the storage infomation. "
28
+ "Please try again."
29
+ msgstr ""
30
+ "Nie można usunąć magazynu zdalnego, nie można pobrać informacji o magazynie. "
31
+ "Proszę spróbuj ponownie."
32
+
33
+ #: addons/class-multi-remote-addon.php:163
34
+ #: addons/class-wpvivid-backuplist-addon.php:956
35
+ msgid "Remote Storage"
36
+ msgstr "Magazyn zdalny"
37
+
38
+ #: addons/class-multi-remote-addon.php:203
39
+ #: addons/class-multi-remote-addon.php:222
40
+ msgid "Storages"
41
+ msgstr "Magazyny"
42
+
43
+ #: addons/class-multi-remote-addon.php:211
44
+ #: addons/class-multi-remote-addon.php:224
45
+ msgid "Storage Edit"
46
+ msgstr "Edycja magazynu"
47
+
48
+ #: addons/class-multi-remote-addon.php:231
49
+ msgid "Please choose one storage to save your backups (remote storage)"
50
+ msgstr ""
51
+ "Proszę wybrać jeden magazyn, aby zapisać kopie zapasowe (Magazyn zdalny)"
52
+
53
+ #: addons/class-multi-remote-addon.php:239
54
+ #: addons/class-multi-remote-addon.php:429
55
+ msgid "Storage Provider"
56
+ msgstr "Dostawca magazynu"
57
+
58
+ #: addons/class-multi-remote-addon.php:240
59
+ #: addons/class-multi-remote-addon.php:430
60
+ msgid "Remote Storage Alias"
61
+ msgstr "Alias magazynu zdalnego"
62
+
63
+ #: addons/class-multi-remote-addon.php:241
64
+ #: addons/class-multi-remote-addon.php:431
65
+ msgid "Actions"
66
+ msgstr "Akcje"
67
+
68
+ #: addons/class-multi-remote-addon.php:249
69
+ #: addons/class-multi-remote-addon.php:443
70
+ #: addons/class-wpvivid-mail-addon.php:737
71
+ #: addons/class-wpvivid-setting-addon.php:168
72
+ msgid "Save Changes"
73
+ msgstr "Zapisz zmiany"
74
+
75
+ #: addons/class-multi-remote-addon.php:420
76
+ msgid ""
77
+ " Please choose storage to save your backups (support multi remote storage)"
78
+ msgstr ""
79
+ " Wybierz magazyn, aby zapisać kopie zapasowe (Obsługa wielu zdalnych "
80
+ "magazynów)"
81
+
82
+ #: addons/class-wpvivid-amazons3-plus-addon.php:63
83
+ msgid "Amazon S3"
84
+ msgstr "Amazon S3"
85
+
86
+ #: addons/class-wpvivid-backup-restore-page-addon.php:158
87
+ #: addons/class-wpvivid-backup-restore-page-addon.php:176
88
+ msgid "Backup & Migration"
89
+ msgstr "Kopia zapasowa & migracja"
90
+
91
+ #: addons/class-wpvivid-backup-restore-page-addon.php:200
92
+ #: addons/class-wpvivid-backup-restore-page-addon.php:216
93
+ msgid "The last backup message not found."
94
+ msgstr "Nie odnaleziono wiadomości o ostatniej kopii zapasowej."
95
+
96
+ #: addons/class-wpvivid-backup-restore-page-addon.php:219
97
+ msgid "Last Backup: "
98
+ msgstr "Ostatnia kopia zapasowa: "
99
+
100
+ #: addons/class-wpvivid-backup-restore-page-addon.php:248
101
+ msgid "Backup Schedule"
102
+ msgstr "Harmonogram tworzenia kopii zapasowych"
103
+
104
+ #: addons/class-wpvivid-backup-restore-page-addon.php:250
105
+ msgid "Schedule Status: "
106
+ msgstr "Status harmonogramu: "
107
+
108
+ #: addons/class-wpvivid-backup-restore-page-addon.php:252
109
+ msgid "Server Time: "
110
+ msgstr "Czas serwera: "
111
+
112
+ #: addons/class-wpvivid-backup-restore-page-addon.php:254
113
+ msgid "Next Backup: "
114
+ msgstr "Następna kopia zapasowa: "
115
+
116
+ #: addons/class-wpvivid-backup-restore-page-addon.php:270
117
+ #: addons/class-wpvivid-backup-restore-page-addon.php:4501
118
+ msgid "Database Size:"
119
+ msgstr "Rozmiar bazy danych:"
120
+
121
+ #: addons/class-wpvivid-backup-restore-page-addon.php:271
122
+ #: addons/class-wpvivid-backup-restore-page-addon.php:4502
123
+ msgid "File Size:"
124
+ msgstr "Rozmiar pliku:"
125
+
126
+ #: addons/class-wpvivid-backup-restore-page-addon.php:274
127
+ #: addons/class-wpvivid-backup-restore-page-addon.php:4505
128
+ #: addons/class-wpvivid-setting-addon.php:923
129
+ msgid "Total Size:"
130
+ msgstr "Całkowity rozmiar:"
131
+
132
+ #: addons/class-wpvivid-backup-restore-page-addon.php:275
133
+ #: addons/class-wpvivid-backup-restore-page-addon.php:4506
134
+ msgid "Uploaded:"
135
+ msgstr "Przesłano:"
136
+
137
+ #: addons/class-wpvivid-backup-restore-page-addon.php:276
138
+ #: addons/class-wpvivid-backup-restore-page-addon.php:4507
139
+ msgid "Speed:"
140
+ msgstr "Prędkość:"
141
+
142
+ #: addons/class-wpvivid-backup-restore-page-addon.php:279
143
+ #: addons/class-wpvivid-backup-restore-page-addon.php:4510
144
+ msgid "Network Connection:"
145
+ msgstr "Połączenie sieciowe:"
146
+
147
+ #: addons/class-wpvivid-backup-restore-page-addon.php:285
148
+ msgid "Cancel"
149
+ msgstr "Anuluj"
150
+
151
+ #: addons/class-wpvivid-backup-restore-page-addon.php:418
152
+ msgid "Local Storage Directory: "
153
+ msgstr "Lokalny katalog magazynów: "
154
+
155
+ #: addons/class-wpvivid-backup-restore-page-addon.php:420
156
+ msgid " rename directory"
157
+ msgstr " zmień nazwę katalogu"
158
+
159
+ #: addons/class-wpvivid-backup-restore-page-addon.php:870
160
+ msgid "Tips: "
161
+ msgstr "Porady: "
162
+
163
+ #: addons/class-wpvivid-backup-restore-page-addon.php:870
164
+ msgid ""
165
+ "The settings are only for manual backup, it won't affect schedule settings."
166
+ msgstr ""
167
+ "Ustawienia są przeznaczone tylko do ręcznej archiwizacji, która nie wpłynie "
168
+ "na ustawienia harmonogramu."
169
+
170
+ #: addons/class-wpvivid-backup-restore-page-addon.php:2522
171
+ msgid ""
172
+ "The feature can help you transfer a Wordpress site to a new domain(site). It "
173
+ "would be a convenient way to migrate your WP site from dev environment to "
174
+ "live server or from old server to the new."
175
+ msgstr ""
176
+ "Funkcja ta może pomóc w przeniesieniu witryny WordPress do nowej domeny "
177
+ "(witryny). Byłoby to wygodny sposób na migrację witryny WP z środowiska "
178
+ "deweloperskiego do serwera na żywo lub ze starego serwera do nowego."
179
+
180
+ #: addons/class-wpvivid-backup-restore-page-addon.php:2531
181
+ msgid "Please paste the key below."
182
+ msgstr "Proszę wkleić poniższy klucz."
183
+
184
+ #: addons/class-wpvivid-backup-restore-page-addon.php:2701
185
+ msgid "A backup type is required."
186
+ msgstr "Wymagany jest typ kopii zapasowej."
187
+
188
+ #: addons/class-wpvivid-backup-restore-page-addon.php:2707
189
+ #: addons/class-wpvivid-backup-restore-page-addon.php:2716
190
+ msgid "Choose at least one storage location for backups."
191
+ msgstr "Wybierz co najmniej jedną lokalizację przechowywania kopii zapasowych."
192
+
193
+ #: addons/class-wpvivid-backup-restore-page-addon.php:2734
194
+ #: addons/class-wpvivid-schedule-addon.php:2059
195
+ #: addons/class-wpvivid-schedule-addon.php:2158
196
+ msgid "There is no default remote storage configured. Please set it up first."
197
+ msgstr ""
198
+ "Nie skonfigurowano domyślnego magazynu zdalnego. Najpierw należy je "
199
+ "skonfigurować."
200
+
201
+ #: addons/class-wpvivid-backup-restore-page-addon.php:3959
202
+ #: addons/class-wpvivid-backup-restore-page-addon.php:3963
203
+ #: addons/class-wpvivid-backup-restore-page-addon.php:3969
204
+ #: addons/class-wpvivid-backup-restore-page-addon.php:3973
205
+ #, fuzzy
206
+ msgid "<div class=\"notice notice-error inline\"><p>"
207
+ msgstr "<div class=\"notice notice-error inline\"><p>"
208
+
209
+ #: addons/class-wpvivid-backup-restore-page-addon.php:4527
210
+ #: addons/class-wpvivid-schedule-addon.php:161
211
+ #, fuzzy
212
+ msgid "<div class=\"notice notice-success is-dismissible inline\"><p>"
213
+ msgstr "<div class=\"notice notice-success is-dismissible inline\"><p>"
214
+
215
+ #: addons/class-wpvivid-backup-uploader-addon.php:486
216
+ msgid "Drop files here"
217
+ msgstr "Przeciągnij pliki tutaj"
218
+
219
+ #: addons/class-wpvivid-backup-uploader-addon.php:487
220
+ msgctxt "Uploader: Drop files here - or - Select Files"
221
+ msgid "or"
222
+ msgstr "lub"
223
+
224
+ #: addons/class-wpvivid-backup-uploader-addon.php:488
225
+ msgid "Select Files"
226
+ msgstr "Wybierz pliki"
227
+
228
+ #: addons/class-wpvivid-backuplist-addon.php:83
229
+ #: addons/class-wpvivid-mail-addon.php:55
230
+ #: addons/class-wpvivid-schedule-addon.php:2673
231
+ #: includes/class-wpvivid-backup-pro.php:139
232
+ msgid "WPvivid Backup"
233
+ msgstr "Kopia zapasowa WPvivid"
234
+
235
+ #: addons/class-wpvivid-backuplist-addon.php:84
236
+ #: addons/class-wpvivid-backuplist-addon.php:130
237
+ msgid "Backups & Restore"
238
+ msgstr "Kopia i przywracanie"
239
+
240
+ #: addons/class-wpvivid-backuplist-addon.php:176
241
+ #: addons/class-wpvivid-backuplist-addon.php:1596
242
+ #: addons/class-wpvivid-backuplist-addon.php:3713
243
+ #: addons/class-wpvivid-backuplist-addon.php:3839
244
+ msgid "Log"
245
+ msgstr "Log"
246
+
247
+ #: addons/class-wpvivid-backuplist-addon.php:187
248
+ #: addons/class-wpvivid-backuplist-addon.php:230
249
+ #: addons/class-wpvivid-backuplist-addon.php:1617
250
+ #: addons/class-wpvivid-backuplist-addon.php:3734
251
+ #: addons/class-wpvivid-backuplist-addon.php:3860
252
+ msgid "Restore"
253
+ msgstr "Przywróć"
254
+
255
+ #: addons/class-wpvivid-backuplist-addon.php:209
256
+ msgid "Restore backup from:"
257
+ msgstr "Przywróć kopię zapasową z:"
258
+
259
+ #: addons/class-wpvivid-backuplist-addon.php:210
260
+ msgid ""
261
+ "Please do not close the page or switch to other pages when a restore task is "
262
+ "running, as it could trigger some unexpected errors."
263
+ msgstr ""
264
+ "Proszę nie zamykać strony lub przełączyć się na inne strony, gdy zadanie "
265
+ "przywracania jest uruchomione, ponieważ może to spowodować nieoczekiwane "
266
+ "błędy."
267
+
268
+ #: addons/class-wpvivid-backuplist-addon.php:211
269
+ msgid ""
270
+ "Restore function will replace the current site's themes, plugins, uploads, "
271
+ "database and/or other content directories with the existing equivalents in "
272
+ "the selected backup."
273
+ msgstr ""
274
+ "Funkcja przywracania zastąpi motywy bieżącej witryny, wtyczki, przesłane "
275
+ "pliki, bazę danych i/lub inne katalogi zawartości z istniejącymi "
276
+ "odpowiednikami w wybranej kopii zapasowej."
277
+
278
+ #: addons/class-wpvivid-backuplist-addon.php:220
279
+ msgid "Restore and keep the original domain(URL) unchanged"
280
+ msgstr "Przywróć i Zachowaj oryginalną domenę (adres URL) bez zmian"
281
+
282
+ #: addons/class-wpvivid-backuplist-addon.php:231
283
+ msgid "Terminate"
284
+ msgstr "Zakończ"
285
+
286
+ #: addons/class-wpvivid-backuplist-addon.php:232
287
+ msgid "Rollback"
288
+ msgstr "Cofnij"
289
+
290
+ #: addons/class-wpvivid-backuplist-addon.php:234
291
+ msgid "Retrieve the backup to localhost"
292
+ msgstr "Pobierz kopię zapasową na localhost"
293
+
294
+ #: addons/class-wpvivid-backuplist-addon.php:1233
295
+ #: addons/class-wpvivid-backuplist-addon.php:1788
296
+ msgid "Delete the selected backups"
297
+ msgstr "Usuwanie wybranych kopii zapasowych"
298
+
299
+ #: addons/class-wpvivid-backuplist-addon.php:1246
300
+ #: addons/class-wpvivid-backuplist-addon.php:1808
301
+ #: addons/class-wpvivid-log-addon.php:70
302
+ msgid " < Pre page "
303
+ msgstr " < Poprzednia Strona "
304
+
305
+ #: addons/class-wpvivid-backuplist-addon.php:1253
306
+ #: addons/class-wpvivid-backuplist-addon.php:1815
307
+ #: addons/class-wpvivid-log-addon.php:77
308
+ msgid " / "
309
+ msgstr " / "
310
+
311
+ #: addons/class-wpvivid-backuplist-addon.php:1257
312
+ #: addons/class-wpvivid-backuplist-addon.php:1819
313
+ #: addons/class-wpvivid-log-addon.php:81
314
+ msgid " Next page > "
315
+ msgstr " Następna strona > "
316
+
317
+ #: addons/class-wpvivid-backuplist-addon.php:1263
318
+ #: addons/class-wpvivid-backuplist-addon.php:1825
319
+ #: addons/class-wpvivid-log-addon.php:87
320
+ #: addons/class-wpvivid-setting-addon.php:604
321
+ #: addons/class-wpvivid-setting-addon.php:623
322
+ #: addons/class-wpvivid-setting-addon.php:1240
323
+ #, fuzzy
324
+ msgid "<option selected=\"selected\" value=\""
325
+ msgstr "<option selected=\"selected\" value=\""
326
+
327
+ #: addons/class-wpvivid-backuplist-addon.php:1266
328
+ #: addons/class-wpvivid-backuplist-addon.php:1828
329
+ #: addons/class-wpvivid-log-addon.php:90
330
+ #: addons/class-wpvivid-setting-addon.php:607
331
+ #: addons/class-wpvivid-setting-addon.php:626
332
+ #: addons/class-wpvivid-setting-addon.php:1243
333
+ #, fuzzy
334
+ msgid "<option value=\""
335
+ msgstr "<option value=\""
336
+
337
+ #: addons/class-wpvivid-backuplist-addon.php:1595
338
+ #: addons/class-wpvivid-backuplist-addon.php:3712
339
+ #: addons/class-wpvivid-backuplist-addon.php:3838
340
+ msgid "Type:"
341
+ msgstr "Typ:"
342
+
343
+ #: addons/class-wpvivid-backuplist-addon.php:1596
344
+ #: addons/class-wpvivid-backuplist-addon.php:3713
345
+ #: addons/class-wpvivid-backuplist-addon.php:3839
346
+ #, fuzzy
347
+ msgid "wpvivid_view_backup_log"
348
+ msgstr "wpvivid_view_backup_log"
349
+
350
+ #: addons/class-wpvivid-backuplist-addon.php:1609
351
+ #: addons/class-wpvivid-backuplist-addon.php:3726
352
+ #: addons/class-wpvivid-backuplist-addon.php:3852
353
+ #: addons/class-wpvivid-debug-addon.php:195
354
+ msgid "Download"
355
+ msgstr "Pobierz"
356
+
357
+ #: addons/class-wpvivid-backuplist-addon.php:1703
358
+ msgid "Localhost"
359
+ msgstr "Magazyn lokalny"
360
+
361
+ #: addons/class-wpvivid-backuplist-addon.php:2455
362
+ msgid ""
363
+ "This backup is locked, are you sure to remove it? This backup will be "
364
+ "deleted permanently from your hosting (localhost) and remote storages."
365
+ msgstr ""
366
+ "Ta kopia zapasowa jest zablokowana, czy na pewno go usunąć? Ta kopia "
367
+ "zapasowa zostanie trwale usunięta z hostingu (localhost) i zdalnych "
368
+ "magazynów."
369
+
370
+ #: addons/class-wpvivid-backuplist-addon.php:2459
371
+ msgid ""
372
+ "Are you sure to remove this backup? This backup will be deleted permanently "
373
+ "from your hosting (localhost) and remote storages."
374
+ msgstr ""
375
+ "Czy na pewno usunąć tę kopię zapasową? Ta kopia zapasowa zostanie trwale "
376
+ "usunięta z hostingu (localhost) i zdalnych magazynów."
377
+
378
+ #: addons/class-wpvivid-backuplist-addon.php:2464
379
+ msgid ""
380
+ "This request will delete the backup being downloaded, are you sure you want "
381
+ "to continue?"
382
+ msgstr ""
383
+ "To żądanie spowoduje usunięcie pobranej kopii zapasowej, czy na pewno chcesz "
384
+ "kontynuować?"
385
+
386
+ #: addons/class-wpvivid-backuplist-addon.php:2518
387
+ msgid "Please select at least one item."
388
+ msgstr "Proszę wybrać co najmniej jeden element."
389
+
390
+ #: addons/class-wpvivid-backuplist-addon.php:2523
391
+ msgid ""
392
+ "This request might delete the backup being downloaded, are you sure you want "
393
+ "to continue?"
394
+ msgstr ""
395
+ "To żądanie może usunąć pobraną kopię zapasową, czy na pewno chcesz "
396
+ "kontynuować?"
397
+
398
+ #: addons/class-wpvivid-backuplist-addon.php:2526
399
+ msgid ""
400
+ "Are you sure to remove the selected backups? These backups will be deleted "
401
+ "permanently from your hosting (localhost)."
402
+ msgstr ""
403
+ "Czy na pewno usunąć wybrane kopie zapasowe? Te kopie zapasowe zostaną trwale "
404
+ "usunięte z hostingu (localhost)."
405
+
406
+ #: addons/class-wpvivid-backuplist-addon.php:3321
407
+ msgid "Restore failed, error unknown"
408
+ msgstr "Przywracanie nie powiodło się, nieznany błąd"
409
+
410
+ #: addons/class-wpvivid-debug-addon.php:27
411
+ msgid "User's email address is required."
412
+ msgstr "Wymagany jest adres e-mail użytkownika."
413
+
414
+ #: addons/class-wpvivid-debug-addon.php:32
415
+ msgid "Please enter a valid email address."
416
+ msgstr "Proszę podać poprawny adres e-mail."
417
+
418
+ #: addons/class-wpvivid-debug-addon.php:73
419
+ #: addons/class-wpvivid-debug-addon.php:90
420
+ msgid " <a href=\""
421
+ msgstr " <a href=\""
422
+
423
+ #: addons/class-wpvivid-debug-addon.php:100
424
+ #: addons/class-wpvivid-mail-addon.php:896
425
+ #: addons/class-wpvivid-setting-addon.php:290
426
+ msgid "Unable to send email. Please check the configuration of email server."
427
+ msgstr ""
428
+ "Nie można wysłać wiadomości e-mail. Proszę sprawdzić konfigurację serwera "
429
+ "pocztowego."
430
+
431
+ #: addons/class-wpvivid-debug-addon.php:120
432
+ msgid "Debug"
433
+ msgstr "Uruchamianie"
434
+
435
+ #: addons/class-wpvivid-debug-addon.php:160
436
+ msgid "Method 1."
437
+ msgstr "Metoda 1."
438
+
439
+ #: addons/class-wpvivid-debug-addon.php:160
440
+ msgid ""
441
+ "If you have configured SMTP on your site, enter your email address and click "
442
+ "the button below to send us the relevant information (website info and "
443
+ "errors logs) when you are encountering errors. This will help us figure out "
444
+ "what happened. Once the issue is resolved, we will inform you by your email "
445
+ "address."
446
+ msgstr ""
447
+ "Jeśli skonfigurowałeś SMTP w swojej witrynie, wprowadź swój adres e-mail i "
448
+ "kliknij przycisk poniżej, aby przesłać nam odpowiednie informacje (dane "
449
+ "witryny i dzienniki błędów), gdy wystąpią błędy. To pomoże nam dowiedzieć "
450
+ "się, co się stało. Po rozwiązaniu problemu, będziemy informować Cię przez "
451
+ "Twój adres e-mail."
452
+
453
+ #: addons/class-wpvivid-debug-addon.php:185
454
+ msgid "Send Debug Information to Us"
455
+ msgstr "Wyślij informacje o debugowaniu do nas"
456
+
457
+ #: addons/class-wpvivid-debug-addon.php:191
458
+ msgid "Method 2."
459
+ msgstr "Metoda 2."
460
+
461
+ #: addons/class-wpvivid-debug-addon.php:191
462
+ msgid ""
463
+ "If you didn’t configure SMTP on your site, click the button below to "
464
+ "download the relevant information (website info and error logs) to your PC "
465
+ "when you are encountering some errors. Sending the files to us will help us "
466
+ "diagnose what happened."
467
+ msgstr ""
468
+ "Jeśli nie skonfigurujesz SMTP w swojej witrynie, kliknij przycisk poniżej, "
469
+ "aby pobrać odpowiednie informacje (informacji o witrynie i dzienniki błędów) "
470
+ "do komputera, gdy napotykają pewne błędy. Wysłanie plików do nas pomoże nam "
471
+ "zdiagnozować, co się stało."
472
+
473
+ #: addons/class-wpvivid-debug-addon.php:201
474
+ msgid "Website Info Key"
475
+ msgstr "Klucz informacji o witrynie"
476
+
477
+ #: addons/class-wpvivid-debug-addon.php:202
478
+ msgid "Website Info Value"
479
+ msgstr "Informacje"
480
+
481
+ #: addons/class-wpvivid-dropbox-addon.php:302
482
+ #: addons/class-wpvivid-dropbox-addon.php:374
483
+ #: addons/class-wpvivid-google-drive-addon.php:91
484
+ #: addons/class-wpvivid-google-drive-addon.php:199
485
+ #: addons/class-wpvivid-one-drive-addon.php:95
486
+ #: addons/class-wpvivid-one-drive-addon.php:189
487
+ msgid ""
488
+ "<div class=\"notice notice-warning is-dismissible\"><p>Warning: An alias for "
489
+ "remote storage is required.</p></div>"
490
+ msgstr ""
491
+ "<div class=\"notice notice-warning is-dismissible\"><p>Ostrzeżenie: wymagany "
492
+ "jest alias dla magazynu zdalnego.</p></div>"
493
+
494
+ #: addons/class-wpvivid-dropbox-addon.php:307
495
+ #: addons/class-wpvivid-dropbox-addon.php:380
496
+ #: addons/class-wpvivid-google-drive-addon.php:97
497
+ #: addons/class-wpvivid-google-drive-addon.php:205
498
+ #: addons/class-wpvivid-one-drive-addon.php:101
499
+ #: addons/class-wpvivid-one-drive-addon.php:195
500
+ msgid ""
501
+ "<div class=\"notice notice-warning is-dismissible\"><p>Warning: An path for "
502
+ "remote storage is required.</p></div>"
503
+ msgstr ""
504
+
505
+ #: addons/class-wpvivid-dropbox-addon.php:317
506
+ #: addons/class-wpvivid-dropbox-addon.php:390
507
+ #: addons/class-wpvivid-google-drive-addon.php:110
508
+ #: addons/class-wpvivid-google-drive-addon.php:217
509
+ #: addons/class-wpvivid-one-drive-addon.php:111
510
+ #: addons/class-wpvivid-one-drive-addon.php:205
511
+ msgid ""
512
+ "<div class=\"notice notice-warning is-dismissible\"><p>Warning: The alias "
513
+ "already exists in storage list.</p></div>"
514
+ msgstr ""
515
+ "<div class=\"notice notice-warning is-dismissible\"><p>Ostrzeżenie: alias "
516
+ "już istnieje na liście magazynów.</p></div>"
517
+
518
+ #: addons/class-wpvivid-dropbox-addon.php:326
519
+ #: addons/class-wpvivid-dropbox-addon.php:352
520
+ #: addons/class-wpvivid-dropbox-addon.php:367
521
+ #: addons/class-wpvivid-dropbox-addon.php:399
522
+ #: addons/class-wpvivid-dropbox-addon.php:424
523
+ #: addons/class-wpvivid-dropbox-addon.php:439
524
+ #: addons/class-wpvivid-dropbox-addon.php:450
525
+ #: addons/class-wpvivid-dropbox-addon.php:458
526
+ #: addons/class-wpvivid-google-drive-addon.php:133
527
+ #: addons/class-wpvivid-google-drive-addon.php:137
528
+ #: addons/class-wpvivid-google-drive-addon.php:140
529
+ #: addons/class-wpvivid-google-drive-addon.php:177
530
+ #: addons/class-wpvivid-google-drive-addon.php:192
531
+ #: addons/class-wpvivid-google-drive-addon.php:236
532
+ #: addons/class-wpvivid-google-drive-addon.php:240
533
+ #: addons/class-wpvivid-google-drive-addon.php:243
534
+ #: addons/class-wpvivid-google-drive-addon.php:279
535
+ #: addons/class-wpvivid-google-drive-addon.php:294
536
+ #: addons/class-wpvivid-google-drive-addon.php:305
537
+ #: addons/class-wpvivid-google-drive-addon.php:313
538
+ #: addons/class-wpvivid-one-drive-addon.php:127
539
+ #: addons/class-wpvivid-one-drive-addon.php:167
540
+ #: addons/class-wpvivid-one-drive-addon.php:182
541
+ #: addons/class-wpvivid-one-drive-addon.php:221
542
+ #: addons/class-wpvivid-one-drive-addon.php:258
543
+ #: addons/class-wpvivid-one-drive-addon.php:273
544
+ #: addons/class-wpvivid-one-drive-addon.php:284
545
+ #: addons/class-wpvivid-one-drive-addon.php:292
546
+ #: addons/class-wpvivid-schedule-addon.php:169
547
+ msgid "<div class=\"notice notice-error\"><p>"
548
+ msgstr ""
549
+
550
+ #: addons/class-wpvivid-dropbox-addon.php:445
551
+ msgid ""
552
+ "<div class=\"notice notice-success is-dismissible\"><p>You have "
553
+ "authenticated the Dropbox account as your remote storage.</p></div>"
554
+ msgstr ""
555
+ "<div class=\"notice notice-success is-dismissible\"><p>Konto Dropbox zostało "
556
+ "uwierzytelnione jako Magazyn zdalny.</p></div>"
557
+
558
+ #: addons/class-wpvivid-dropbox-addon.php:453
559
+ #: addons/class-wpvivid-google-drive-addon.php:308
560
+ #: addons/class-wpvivid-one-drive-addon.php:287
561
+ msgid ""
562
+ "<div class=\"notice notice-success is-dismissible\"><p>You have successfully "
563
+ "updated the storage alias.</p></div>"
564
+ msgstr ""
565
+ "<div class=\"notice notice-success is-dismissible\"><p>Pomyślnie "
566
+ "Zaktualizowano alias magazynu.</p></div>"
567
+
568
+ #: addons/class-wpvivid-dropbox-addon.php:464
569
+ msgid "Dropbox"
570
+ msgstr "Dropbox"
571
+
572
+ #: addons/class-wpvivid-ftpclass-addon.php:52
573
+ msgid "FTP"
574
+ msgstr "FTP"
575
+
576
+ #: addons/class-wpvivid-ftpclass-addon.php:387
577
+ #: addons/class-wpvivid-ftpclass-addon.php:395
578
+ msgid "Warning: An alias for remote storage is required."
579
+ msgstr "Ostrzeżenie: wymagany jest alias dla magazynu zdalnego."
580
+
581
+ #: addons/class-wpvivid-google-drive-addon.php:116
582
+ #, fuzzy
583
+ msgid "<div class=\"notice notice-warning is-dismissible\"><p>"
584
+ msgstr "<div class=\"notice notice-warning is-dismissible\"><p>"
585
+
586
+ #: addons/class-wpvivid-google-drive-addon.php:300
587
+ msgid ""
588
+ "<div class=\"notice notice-success is-dismissible\"><p>You have "
589
+ "authenticated the Google Drive account as your remote storage.</p></div>"
590
+ msgstr ""
591
+ "<div class=\"notice notice-success is-dismissible\"><p>Konto dysku Google "
592
+ "zostało uwierzytelnione jako Magazyn zdalny.</p></div>"
593
+
594
+ #: addons/class-wpvivid-google-drive-addon.php:320
595
+ msgid "Google Drive"
596
+ msgstr "Dysk Google"
597
+
598
+ #: addons/class-wpvivid-log-addon.php:28
599
+ msgid "Logs"
600
+ msgstr "Logi"
601
+
602
+ #: addons/class-wpvivid-log-addon.php:54
603
+ msgid "Date"
604
+ msgstr "Data"
605
+
606
+ #: addons/class-wpvivid-log-addon.php:55
607
+ msgid "Log Type"
608
+ msgstr "Typ dziennika"
609
+
610
+ #: addons/class-wpvivid-log-addon.php:56
611
+ msgid "Log File Name"
612
+ msgstr "Nazwa pliku dziennika"
613
+
614
+ #: addons/class-wpvivid-log-addon.php:57
615
+ #: addons/class-wpvivid-mail-addon.php:609
616
+ #: addons/class-wpvivid-setting-addon.php:708
617
+ msgid "Action"
618
+ msgstr "Akcja"
619
+
620
+ #: addons/class-wpvivid-mail-addon.php:56
621
+ #: addons/class-wpvivid-mail-addon.php:88
622
+ msgid "Mail"
623
+ msgstr "Email"
624
+
625
+ #: addons/class-wpvivid-mail-addon.php:583
626
+ #: addons/class-wpvivid-setting-addon.php:688
627
+ msgid "In order to use this function, please install a "
628
+ msgstr "Aby korzystać z tej funkcji, należy zainstalować "
629
+
630
+ #: addons/class-wpvivid-mail-addon.php:584
631
+ #: addons/class-wpvivid-setting-addon.php:688
632
+ msgid "WordPress SMTP plugin"
633
+ msgstr "Wtyczka WordPress SMTP"
634
+
635
+ #: addons/class-wpvivid-mail-addon.php:584
636
+ #: addons/class-wpvivid-setting-addon.php:688
637
+ msgid ""
638
+ " of your preference and configure your SMTP server first. This is because "
639
+ "WordPress uses the PHP Mail function to send its emails by default, which is "
640
+ "not supported by many hosts and can cause issues if it is not set properly."
641
+ msgstr ""
642
+ " preferencji i najpierw skonfiguruj serwer SMTP. Wynika to z faktu, że "
643
+ "WordPress domyślnie używa funkcji PHP Mail do wysyłania wiadomości e-mail, "
644
+ "która nie jest obsługiwana przez wiele hostów i może powodować problemy, "
645
+ "jeśli nie zostanie poprawnie ustawiona."
646
+
647
+ #: addons/class-wpvivid-mail-addon.php:589
648
+ #: addons/class-wpvivid-setting-addon.php:695
649
+ msgid "Test Email"
650
+ msgstr "Test e-mail"
651
+
652
+ #: addons/class-wpvivid-mail-addon.php:594
653
+ #: addons/class-wpvivid-setting-addon.php:741
654
+ msgid "Always send an email notification when a backup is complete"
655
+ msgstr ""
656
+ "Zawsze wysyłaj powiadomienie e-mail po ukończeniu tworzenia kopii zapasowej"
657
+
658
+ #: addons/class-wpvivid-mail-addon.php:598
659
+ #: addons/class-wpvivid-setting-addon.php:747
660
+ msgid "Only send an email notification when a backup fails"
661
+ msgstr ""
662
+ "Wyślij powiadomienie e-mail tylko wtedy, gdy kopia zapasowa nie powiedzie się"
663
+
664
+ #: addons/class-wpvivid-mail-addon.php:608
665
+ #: addons/class-wpvivid-setting-addon.php:707
666
+ msgid "Email"
667
+ msgstr "Email"
668
+
669
+ #: addons/class-wpvivid-mail-addon.php:887
670
+ #: addons/class-wpvivid-setting-addon.php:281
671
+ msgid "Invalid email address"
672
+ msgstr "Nieprawidłowy adres email"
673
+
674
+ #: addons/class-wpvivid-one-drive-addon.php:279
675
+ msgid ""
676
+ "<div class=\"notice notice-success is-dismissible\"><p>You have "
677
+ "authenticated the Microsoft OneDrive account as your remote storage.</p></"
678
+ "div>"
679
+ msgstr ""
680
+ "<div class=\"notice notice-success is-dismissible\"><p>Konto usługi "
681
+ "Microsoft OneDrive zostało uwierzytelnione jako Magazyn zdalny.</p></div>"
682
+
683
+ #: addons/class-wpvivid-one-drive-addon.php:299
684
+ msgid "Microsoft OneDrive"
685
+ msgstr "Usługa Microsoft OneDrive"
686
+
687
+ #: addons/class-wpvivid-s3compat-addon.php:422
688
+ msgid "DigitalOcean Spaces"
689
+ msgstr "DigitalOcean Spaces"
690
+
691
+ #: addons/class-wpvivid-schedule-addon.php:75
692
+ msgid "Every hour"
693
+ msgstr "Co godzinę"
694
+
695
+ #: addons/class-wpvivid-schedule-addon.php:81
696
+ msgid "Every 2 hours"
697
+ msgstr "Co 2 godziny"
698
+
699
+ #: addons/class-wpvivid-schedule-addon.php:87
700
+ msgid "Every 4 hours"
701
+ msgstr "Co 4 godziny"
702
+
703
+ #: addons/class-wpvivid-schedule-addon.php:93
704
+ msgid "Every 8 hours"
705
+ msgstr "Co 8 godzin"
706
+
707
+ #: addons/class-wpvivid-schedule-addon.php:99
708
+ msgid "Every 12 hours"
709
+ msgstr "Co 12 godzin"
710
+
711
+ #: addons/class-wpvivid-schedule-addon.php:105
712
+ msgid "Daily"
713
+ msgstr "Dziennie"
714
+
715
+ #: addons/class-wpvivid-schedule-addon.php:111
716
+ msgid "Weekly"
717
+ msgstr "Tygodniowo"
718
+
719
+ #: addons/class-wpvivid-schedule-addon.php:117
720
+ msgid "Fortnightly"
721
+ msgstr "Co dwa tygodnie"
722
+
723
+ #: addons/class-wpvivid-schedule-addon.php:123
724
+ msgid "Monthly"
725
+ msgstr "Miesięcznie"
726
+
727
+ #: addons/class-wpvivid-schedule-addon.php:177
728
+ #: addons/class-wpvivid-schedule-addon.php:2674
729
+ msgid "Schedule"
730
+ msgstr "Harmonogram"
731
+
732
+ #: addons/class-wpvivid-schedule-addon.php:509
733
+ #: addons/class-wpvivid-schedule-addon.php:1194
734
+ #, fuzzy
735
+ msgid "options-general.php"
736
+ msgstr "options-general.php"
737
+
738
+ #: addons/class-wpvivid-schedule-addon.php:881
739
+ msgid "Schedules"
740
+ msgstr "Harmonogram"
741
+
742
+ #: addons/class-wpvivid-schedule-addon.php:884
743
+ msgid "Schedule Edit"
744
+ msgstr "Edytuj Harmonogram"
745
+
746
+ #: addons/class-wpvivid-schedule-addon.php:1537
747
+ msgid "Save backups on localhost (web server)"
748
+ msgstr "Zapisz kopie zapasowe na localhost (serwer www)"
749
+
750
+ #: addons/class-wpvivid-schedule-addon.php:1543
751
+ msgid ""
752
+ "Send backups to remote storage (Backups will be deleted from localhost after "
753
+ "they are completely uploaded to remote storage.)"
754
+ msgstr ""
755
+ "Wysyłaj kopie zapasowe do magazynu zdalnego (kopie zapasowe zostaną usunięte "
756
+ "z localhost po całkowitym przesłaniu do magazynu zdalnego)."
757
+
758
+ #: addons/class-wpvivid-schedule-addon.php:1610
759
+ msgid "Schedule Settings"
760
+ msgstr "Ustawienia harmonogramu"
761
+
762
+ #: addons/class-wpvivid-schedule-addon.php:1880
763
+ msgid "Failed to update the schedule. Please try again later."
764
+ msgstr "Nie można zaktualizować harmonogramu. Spróbuj ponownie później."
765
+
766
+ #: addons/class-wpvivid-schedule-addon.php:1936
767
+ msgid "Failed to save the schedule. Please try again later."
768
+ msgstr "Nie można zapisać harmonogramu. Spróbuj ponownie później."
769
+
770
+ #: addons/class-wpvivid-schedule-addon.php:1997
771
+ msgid "Update scheduled tasks failed. Please try again later."
772
+ msgstr ""
773
+ "Aktualizowanie zaplanowanych zadań nie powiodło się. Spróbuj ponownie "
774
+ "później."
775
+
776
+ #: addons/class-wpvivid-schedule-addon.php:2100
777
+ #: addons/class-wpvivid-schedule-addon.php:2199
778
+ msgid "Not found select backup type. Please set it up first."
779
+ msgstr ""
780
+ "Nie znaleziono wybranego typu kopii zapasowej. Najpierw należy to "
781
+ "skonfigurować."
782
+
783
+ #: addons/class-wpvivid-schedule-addon.php:2238
784
+ #: addons/class-wpvivid-schedule-addon.php:2430
785
+ msgid "Creating scheduled tasks failed. Please try again later."
786
+ msgstr ""
787
+ "Tworzenie zaplanowanych zadań nie powiodło się. Spróbuj ponownie później."
788
+
789
+ #: addons/class-wpvivid-schedule-addon.php:2259
790
+ #: addons/class-wpvivid-schedule-addon.php:2273
791
+ msgid "Failed to create a schedule. Please try again later."
792
+ msgstr "Nie można utworzyć harmonogramu. Spróbuj ponownie później."
793
+
794
+ #: addons/class-wpvivid-setting-addon.php:136
795
+ msgid "Settings"
796
+ msgstr "Ustawienia"
797
+
798
+ #: addons/class-wpvivid-setting-addon.php:243
799
+ msgid "General Settings"
800
+ msgstr "Ustawienia ogólne"
801
+
802
+ #: addons/class-wpvivid-setting-addon.php:249
803
+ msgid "Advanced Settings"
804
+ msgstr "Zaawansowane ustawienia"
805
+
806
+ #: addons/class-wpvivid-setting-addon.php:368
807
+ #: addons/class-wpvivid-setting-addon.php:376
808
+ msgid "The maximum zip file size is required."
809
+ msgstr "Wymagane jest podanie maksymalnego rozmiaru pliku zip."
810
+
811
+ #: addons/class-wpvivid-setting-addon.php:382
812
+ #: addons/class-wpvivid-setting-addon.php:389
813
+ msgid "The size for excluded files is required."
814
+ msgstr "Rozmiar wykluczonych plików jest wymagany."
815
+
816
+ #: addons/class-wpvivid-setting-addon.php:395
817
+ #: addons/class-wpvivid-setting-addon.php:402
818
+ msgid "The maximum execution time for PHP script is required."
819
+ msgstr "Wymagane jest podanie maksymalnego czasu wykonania skryptu PHP."
820
+
821
+ #: addons/class-wpvivid-setting-addon.php:408
822
+ #: addons/class-wpvivid-setting-addon.php:415
823
+ msgid "The local storage path is required."
824
+ msgstr "Wymagane jest podanie ścieżki magazynu lokalnego."
825
+
826
+ #: addons/class-wpvivid-setting-addon.php:422
827
+ msgid ""
828
+ "A prefix for backup files is required. Please enter a valid prefix or "
829
+ "uncheck the option."
830
+ msgstr ""
831
+ "Wymagany jest prefiks dla plików kopii zapasowej. Proszę wprowadzić "
832
+ "prawidłowy prefiks lub odznaczyć opcję."
833
+
834
+ #: addons/class-wpvivid-setting-addon.php:614
835
+ msgid "Backups retained (localhost)"
836
+ msgstr "Zachowane kopie zapasowe (localhost)"
837
+
838
+ #: addons/class-wpvivid-setting-addon.php:633
839
+ msgid "Backups retained for each remote storage"
840
+ msgstr "Kopie zapasowe zachowane dla każdego magazynu zdalnego"
841
+
842
+ #: addons/class-wpvivid-setting-addon.php:639
843
+ msgid "Calculate the size of files, folder and database before backing up "
844
+ msgstr ""
845
+ "Oblicz rozmiar plików, folderów i bazy danych przed utworzeniem kopii "
846
+ "zapasowej "
847
+
848
+ #: addons/class-wpvivid-setting-addon.php:645
849
+ msgid "Display the tab pages in admin navigation menu"
850
+ msgstr "Wyświetl strony kart w menu nawigacji administratora"
851
+
852
+ #: addons/class-wpvivid-setting-addon.php:651
853
+ msgid "Show WPvivid backup plugin on top admin bar"
854
+ msgstr "Pokaż WPvivid plugin kopii zapasowej na górnym pasku admin"
855
+
856
+ #: addons/class-wpvivid-setting-addon.php:657
857
+ msgid ""
858
+ "Merge all the backup files into single package when a backup completes. This "
859
+ "will save great disk spaces, though takes longer time. We recommended you "
860
+ "check the option especially on sites with insufficient server resources."
861
+ msgstr ""
862
+ "Scal wszystkie pliki kopii zapasowej w jeden pakiet po zakończeniu "
863
+ "wykonywania kopii zapasowej. Pozwoli to zaoszczędzić dużo przestrzeni na "
864
+ "dysku, choć trwa dłuższy czas. Zalecamy sprawdzenie tej opcji, szczególnie w "
865
+ "witrynach z niewystarczającymi zasobami serwera."
866
+
867
+ #: addons/class-wpvivid-setting-addon.php:665
868
+ msgid "Backup Folder"
869
+ msgstr "Folder kopii zapasowej"
870
+
871
+ #: addons/class-wpvivid-setting-addon.php:667
872
+ msgid ""
873
+ "Name your folder, this folder must be writable for creating backup files."
874
+ msgstr ""
875
+ "Nazwij swój folder, ten folder musi mieć możliwość zapisu w celu tworzenia "
876
+ "plików kopii zapasowych."
877
+
878
+ #: addons/class-wpvivid-setting-addon.php:669
879
+ msgid "Local storage directory:"
880
+ msgstr "Lokalny katalog magazynów:"
881
+
882
+ #: addons/class-wpvivid-setting-addon.php:675
883
+ msgid ""
884
+ "Display domain(url) of current site in backup name. (e.g. "
885
+ "domain_wpvivid-5ceb938b6dca9_2019-05-27-07-36_backup_all.zip)"
886
+ msgstr ""
887
+ "Wyświetl domenę (URL) bieżącej witryny w nazwie kopii zapasowej. (np. "
888
+ "domain_wpvivid-5ceb938b6dca9_2019-05-27-07-36_backup_all.zip)"
889
+
890
+ #: addons/class-wpvivid-setting-addon.php:676
891
+ msgid "Add a prefix to all backup files"
892
+ msgstr "Dodawanie prefiksu do wszystkich plików kopii zapasowej"
893
+
894
+ #: addons/class-wpvivid-setting-addon.php:687
895
+ msgid "Email Report"
896
+ msgstr "Raport e-mail"
897
+
898
+ #: addons/class-wpvivid-setting-addon.php:754
899
+ msgid "Remove out-of-date backups"
900
+ msgstr "Usuwanie nieaktualnych kopii zapasowych"
901
+
902
+ #: addons/class-wpvivid-setting-addon.php:755
903
+ msgid "Web Server Directory:"
904
+ msgstr "Katalog serwerów sieci Web:"
905
+
906
+ #: addons/class-wpvivid-setting-addon.php:756
907
+ msgid "Remote Storage Directory:"
908
+ msgstr "Zdalny katalog magazynów:"
909
+
910
+ #: addons/class-wpvivid-setting-addon.php:765
911
+ msgid "Remove"
912
+ msgstr "Usuń"
913
+
914
+ #: addons/class-wpvivid-setting-addon.php:767
915
+ msgid ""
916
+ "The action is irreversible! It will remove all backups which is(are) out-of-"
917
+ "date (including local web server and remote storage) if they exist."
918
+ msgstr ""
919
+ "Akcja jest nieodwracalna! Usunie wszystkie nieaktualne kopie zapasowe (w tym "
920
+ "na lokalnym serwerze i zdalnym magazynie), jeśli istnieją."
921
+
922
+ #: addons/class-wpvivid-setting-addon.php:921
923
+ msgid "Web-server disk space in use by WPvivid"
924
+ msgstr "Miejsce na dysku serwera sieci Web w użyciu przez WPvivid"
925
+
926
+ #: addons/class-wpvivid-setting-addon.php:925
927
+ msgid "Calculate Sizes"
928
+ msgstr "Oblicz rozmiary"
929
+
930
+ #: addons/class-wpvivid-setting-addon.php:931
931
+ msgid "logs"
932
+ msgstr "logi"
933
+
934
+ #: addons/class-wpvivid-setting-addon.php:934
935
+ #: addons/class-wpvivid-setting-addon.php:950
936
+ #: addons/class-wpvivid-setting-addon.php:960
937
+ msgid "Path:"
938
+ msgstr "Ścieżka:"
939
+
940
+ #: addons/class-wpvivid-setting-addon.php:941
941
+ msgid "Backup Cache"
942
+ msgstr "Pamięć podręczna kopii zapasowej"
943
+
944
+ #: addons/class-wpvivid-setting-addon.php:947
945
+ msgid "Junk"
946
+ msgstr "Śmieci"
947
+
948
+ #: addons/class-wpvivid-setting-addon.php:957
949
+ msgid "Temporary Files"
950
+ msgstr "Pliki tymczasowe"
951
+
952
+ #: addons/class-wpvivid-setting-addon.php:962
953
+ msgid "Temporary Files are created by wpvivid when restoring a website."
954
+ msgstr ""
955
+ "Pliki tymczasowe są tworzone przez wpvivid podczas przywracania strony "
956
+ "internetowej."
957
+
958
+ #: addons/class-wpvivid-setting-addon.php:964
959
+ msgid "Empty"
960
+ msgstr "Pusty"
961
+
962
+ #: addons/class-wpvivid-setting-addon.php:1065
963
+ msgid "Export"
964
+ msgstr "Eksport"
965
+
966
+ #: addons/class-wpvivid-setting-addon.php:1066
967
+ msgid "Click 'Export' button to save WPvivid settings on your local computer."
968
+ msgstr ""
969
+ "Kliknij przycisk \"Eksportuj\", aby zapisać ustawienia WPvivid na komputerze "
970
+ "lokalnym."
971
+
972
+ #: addons/class-wpvivid-setting-addon.php:1068
973
+ msgid "Import"
974
+ msgstr "Importuj"
975
+
976
+ #: addons/class-wpvivid-setting-addon.php:1069
977
+ msgid ""
978
+ "Importing the json file can help you set WPvivid's configuration on another "
979
+ "wordpress site quickly."
980
+ msgstr ""
981
+ "Importowanie pliku JSON może pomóc ustawić konfigurację WPvivid na innej "
982
+ "stronie WordPress szybko."
983
+
984
+ #: addons/class-wpvivid-setting-addon.php:1166
985
+ msgid "Enable the option when backup failed."
986
+ msgstr "Włącz tę opcję, gdy tworzenie kopii zapasowej się nie powiedzie."
987
+
988
+ #: addons/class-wpvivid-setting-addon.php:1166
989
+ msgid " Special optimization for web hosting/shared hosting"
990
+ msgstr " Specjalna optymalizacja dla hostingu/hostingu współdzielonego"
991
+
992
+ #: addons/class-wpvivid-setting-addon.php:1170
993
+ msgid "Enable optimization mode for web hosting/shared hosting"
994
+ msgstr ""
995
+ "Włącz tryb optymalizacji dla hostingu internetowego/współdzielonego hostingu"
996
+
997
+ #: addons/class-wpvivid-setting-addon.php:1173
998
+ msgid ""
999
+ "Enabling this option can improve the backup success rate, but it will take "
1000
+ "more time for backup."
1001
+ msgstr ""
1002
+ "Włączenie tej opcji może zwiększyć szybkość tworzenia kopii zapasowych, ale "
1003
+ "zajmie więcej czasu na tworzenie kopii zapasowych."
1004
+
1005
+ #: addons/class-wpvivid-setting-addon.php:1185
1006
+ msgid ""
1007
+ "It will cause a lower CPU Usage and is recommended in a web hosting/ shared "
1008
+ "hosting environment."
1009
+ msgstr ""
1010
+ "Spowoduje to mniejsze zużycie procesora CPU i jest zalecane w środowisku "
1011
+ "hostingu/ hostingu współdzielonego."
1012
+
1013
+ #: addons/class-wpvivid-setting-addon.php:1185
1014
+ msgid "Only Archive without compressing"
1015
+ msgstr "Tylko archiwum bez kompresji"
1016
+
1017
+ #: addons/class-wpvivid-setting-addon.php:1191
1018
+ msgid ""
1019
+ "It will cause a higher CPU Usage and is recommended in a VPS/ dedicated "
1020
+ "hosting environment."
1021
+ msgstr ""
1022
+ "Spowoduje to wyższe użycie procesora i jest zalecane w VPS/dedykowane "
1023
+ "środowisko hostingu."
1024
+
1025
+ #: addons/class-wpvivid-setting-addon.php:1191
1026
+ msgid "Compress and Archive"
1027
+ msgstr "Kompresuj i archiwizuj"
1028
+
1029
+ #: addons/class-wpvivid-setting-addon.php:1198
1030
+ msgid "Compress Files Every"
1031
+ msgstr "Kompresuj pliki co"
1032
+
1033
+ #: addons/class-wpvivid-setting-addon.php:1202
1034
+ msgid ""
1035
+ "Some web hosting providers limit large zip files (e.g. 200MB), and therefore "
1036
+ "splitting your backup into many parts is an ideal way to avoid hitting the "
1037
+ "limitation if you are running a big website. Please try to adjust the value "
1038
+ "if you are encountering backup errors. If you use a value of 0 MB, any "
1039
+ "backup files won't be split."
1040
+ msgstr ""
1041
+ "Niektórzy dostawcy hostingu ograniczają duże pliki zip (np. 200 MB), dlatego "
1042
+ "dzielenie kopii zapasowej na wiele części jest idealnym sposobem na "
1043
+ "uniknięcie ograniczenia, jeśli prowadzisz dużą witrynę internetową. Proszę "
1044
+ "spróbować dopasować wartość, jeśli wystąpią błędy kopii zapasowej. Jeśli "
1045
+ "użyjesz wartości 0 MB, żadne pliki kopii zapasowej nie zostaną podzielone."
1046
+
1047
+ #: addons/class-wpvivid-setting-addon.php:1204
1048
+ msgid "Exclude the files which are larger than"
1049
+ msgstr "Wyklucz pliki, które są większe niż"
1050
+
1051
+ #: addons/class-wpvivid-setting-addon.php:1208
1052
+ msgid ""
1053
+ "Using the option will ignore the file larger than the certain size in MB "
1054
+ "when backing up, '0' (zero) means unlimited."
1055
+ msgstr ""
1056
+ "Użycie tej opcji zignoruje plik większy niż określony rozmiar w MB podczas "
1057
+ "tworzenia kopii zapasowej, „0” (zero) oznacza nieograniczony."
1058
+
1059
+ #: addons/class-wpvivid-setting-addon.php:1210
1060
+ msgid "PHP script execution timeout"
1061
+ msgstr "Limit czasu wykonania skryptu PHP"
1062
+
1063
+ #: addons/class-wpvivid-setting-addon.php:1214
1064
+ msgid ""
1065
+ "The time-out is not your server PHP time-out. With the execution time "
1066
+ "exhausted, our plugin will shut the process of backup down. If the progress "
1067
+ "of backup encounters a time-out, that means you have a medium or large sized "
1068
+ "website, please try to scale the value bigger. "
1069
+ msgstr ""
1070
+ "Limit czasu nie jest limitem czasu serwera PHP. Po wyczerpaniu czasu "
1071
+ "wykonania, nasza wtyczka zamknie proces tworzenia kopii zapasowej. Jeśli "
1072
+ "czas tworzenia kopii zapasowej przekroczy limit czasu, oznacza to, że masz "
1073
+ "witrynę średnią lub dużą, spróbuj zwiększyć wartość. "
1074
+
1075
+ #: addons/class-wpvivid-setting-addon.php:1216
1076
+ msgid "PHP Memory Limit for backup"
1077
+ msgstr "Limit pamięci PHP dla kopii zapasowej"
1078
+
1079
+ #: addons/class-wpvivid-setting-addon.php:1220
1080
+ msgid ""
1081
+ "Adjust this value to apply for a temporary PHP memory limit for WPvivid "
1082
+ "backup plugin to run a backup. We set this value to 256M by default. "
1083
+ "Increase the value if you encounter a memory exhausted error. Note: some web "
1084
+ "hosting providers may not support this."
1085
+ msgstr ""
1086
+ "Dostosuj tę wartość, aby ubiegać się o tymczasowy limit pamięci PHP dla "
1087
+ "wtyczki WPvivid kopii zapasowej, aby uruchomić kopię zapasową. Domyślnie "
1088
+ "ustawiamy tę wartość na 256M. Zwiększ wartość, jeśli wystąpi błąd wyczerpany "
1089
+ "pamięci. Uwaga: Niektórzy dostawcy hostingu internetowego mogą nie "
1090
+ "obsługiwać tego."
1091
+
1092
+ #: addons/class-wpvivid-setting-addon.php:1222
1093
+ msgid "PHP Memory Limit for restoration"
1094
+ msgstr "Limit pamięci PHP dla przywrócenia"
1095
+
1096
+ #: addons/class-wpvivid-setting-addon.php:1226
1097
+ msgid ""
1098
+ "Adjust this value to apply for a temporary PHP memory limit for WPvivid "
1099
+ "backup plugin in restore process. We set this value to 256M by default. "
1100
+ "Increase the value if you encounter a memory exhausted error. Note: some web "
1101
+ "hosting providers may not support this."
1102
+ msgstr ""
1103
+ "Dostosuj tę wartość, aby zastosować tymczasowy limit pamięci PHP dla wtyczki "
1104
+ "kopii zapasowej WPvivid w procesie przywracania. Domyślnie ustawiamy tę "
1105
+ "wartość na 256M. Zwiększ wartość, jeśli wystąpi błąd wyczerpania pamięci. "
1106
+ "Uwaga: niektórzy dostawcy hostingu mogą tego nie obsługiwać."
1107
+
1108
+ #: addons/class-wpvivid-setting-addon.php:1228
1109
+ msgid "Chunk Size"
1110
+ msgstr "Rozmiar fragmentu"
1111
+
1112
+ #: addons/class-wpvivid-setting-addon.php:1232
1113
+ msgid ""
1114
+ "e.g.  if you choose a chunk size of 2MB, a 8MB file will use 4 chunks. "
1115
+ "Decreasing this value will break the ISP's transmission limit, for "
1116
+ "example:512KB"
1117
+ msgstr ""
1118
+ "np.  Jeśli wybierzesz rozmiar fragmentu 2MB, plik 8MB będzie używać 4 "
1119
+ "fragmentów. Zmniejszenie tej wartości spowoduje przerwanie limitu transmisji "
1120
+ "usługodawcy internetowego, na przykład: 512 KB"
1121
+
1122
+ #: addons/class-wpvivid-setting-addon.php:1247
1123
+ msgid " times when encountering a time-out error"
1124
+ msgstr " razy, gdy wystąpił błąd przekroczenia limitu czasu"
1125
+
1126
+ #: addons/class-wpvivid-sftpclass-addon.php:55
1127
+ msgid "SFTP"
1128
+ msgstr "SFTP"
1129
+
1130
+ #: addons/class-wpvivid-update-backup.php:358
1131
+ msgid "Update Now"
1132
+ msgstr "Aktualizuj"
1133
+
1134
+ #: addons/class-wpvivid-update-backup.php:404
1135
+ msgid "Update Plugins"
1136
+ msgstr "Aktualizacja wtyczek"
1137
+
1138
+ #: addons/class-wpvivid-update-backup.php:440
1139
+ msgid "Update Themes"
1140
+ msgstr "Zaktualizuj motyw"
1141
+
1142
+ #: addons/class-wpvivid-update-backup.php:549
1143
+ #: addons/class-wpvivid-update-backup.php:602
1144
+ #, php-format
1145
+ msgid "You have version %1$s installed. Update to %2$s."
1146
+ msgstr "Masz zainstalowaną wersję %1$s. Zaktualizuj do %2$s."
1147
+
1148
+ #: addons/class-wpvivid-update-backup.php:707
1149
+ msgid ""
1150
+ "Error occurred while parsing the request data. Please try to run backup "
1151
+ "again."
1152
+ msgstr ""
1153
+ "Wystąpił błąd podczas analizowania żądanych danych. Spróbuj ponownie "
1154
+ "uruchomić tworzenie kopii zapasowej."
1155
+
1156
+ #: addons/class-wpvivid-update-backup.php:776
1157
+ msgid "Update Plugin"
1158
+ msgstr "Zaktualizuj wtyczkę"
1159
+
1160
+ #: addons/class-wpvivid-update-backup.php:1076
1161
+ msgid "Create a restore point before updating"
1162
+ msgstr "Utwórz punkt przywracania przed aktualizacją"
1163
+
1164
+ #: addons/class-wpvivid-update-backup.php:1086
1165
+ msgid "Save the backup to localhost: "
1166
+ msgstr "Zapisz kopię zapasową na localhost: "
1167
+
1168
+ #: includes/class-wpvivid-backup-pro.php:140
1169
+ msgid "Pro"
1170
+ msgstr "Pro"
1171
+
1172
+ #: includes/class-wpvivid-backup-pro.php:243
1173
+ msgid "The key will expire in "
1174
+ msgstr "Klucz wygaśnie za "
1175
+
1176
+ #: includes/class-wpvivid-backup-pro.php:253
1177
+ msgid "Generate"
1178
+ msgstr "Generuj"
1179
+
1180
+ #: includes/class-wpvivid-backup-pro.php:545
1181
+ #, fuzzy
1182
+ msgid "<div class=\"notice notice-error is-dismissible\"><p>"
1183
+ msgstr "<div class=\"notice notice-error is-dismissible\"><p>"
1184
+
1185
+ #: includes/class-wpvivid-backup-pro.php:593
1186
+ msgid ""
1187
+ "<div class=\"notice notice-info\" id=\"wpvivid_notice_rate\">\r\n"
1188
+ " <p>Would you like to upgrade to Pro version to get "
1189
+ "regular updates and unlock premium support? Please activate the text link "
1190
+ "below.</p>\r\n"
1191
+ " <div style=\"padding-bottom: 10px;\">\r\n"
1192
+ " <span><input type=\"button\" class=\"button-"
1193
+ "primary\" option=\"wpvivid-active\" name=\"active-now\" value=\"Activate Now"
1194
+ "\" /></span>\r\n"
1195
+ " <span><input type=\"button\" class=\"button-"
1196
+ "secondary\" option=\"wpvivid-active\" name=\"active-later\" value=\"Activate "
1197
+ "Later\" /></span>\r\n"
1198
+ " </div>\r\n"
1199
+ " </div>"
1200
+ msgstr ""
1201
+ "<div class=\"notice notice-info\" id=\"wpvivid_notice_rate\">\n"
1202
+ "\n"
1203
+ " <p>Would you like to upgrade to Pro version to get "
1204
+ "regular updates and unlock premium support? Please activate the text link "
1205
+ "below.</p>\n"
1206
+ "\n"
1207
+ " <div style=\"padding-bottom: 10px;\">\n"
1208
+ "\n"
1209
+ " <span><input type=\"button\" class=\"button-"
1210
+ "primary\" option=\"wpvivid-active\" name=\"active-now\" value=\"Activate Now"
1211
+ "\" /></span>\n"
1212
+ "\n"
1213
+ " <span><input type=\"button\" class=\"button-"
1214
+ "secondary\" option=\"wpvivid-active\" name=\"active-later\" value=\"Activate "
1215
+ "Later\" /></span>\n"
1216
+ "\n"
1217
+ " </div>\n"
1218
+ "\n"
1219
+ " </div>"
1220
+
1221
+ #. Plugin Name of the plugin/theme
1222
+ msgid "WPvivid Backup Pro"
1223
+ msgstr "WPvivid Backup Pro"
1224
+
1225
+ #. Description of the plugin/theme
1226
+ msgid ""
1227
+ "WPvivid Backup Pro works on top of the free version. It offers more advanced "
1228
+ "features for customizing WordPress website backup and migration."
1229
+ msgstr ""
1230
+ "WPvivid Backup Pro jest najlepszą z bezpłatnych. Oferuje bardziej "
1231
+ "zaawansowane funkcje dostosowywania kopii zapasowej i migracji witryny "
1232
+ "WordPress."
1233
+
1234
+ #. Author of the plugin/theme
1235
+ msgid "wpvivid.com"
1236
+ msgstr "wpvivid.com"
1237
+
1238
+ #. Author URI of the plugin/theme
1239
+ msgid "https://wpvivid.com"
1240
+ msgstr "https://wpvivid.com"
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: move, clone, migrate, copy, backup, restore, auto backup, cloud backup
4
  Requires at least: 4.5
5
  Tested up to: 5.2
6
  Requires PHP: 5.3
7
- Stable tag: 0.9.26
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
 
@@ -160,7 +160,17 @@ Yes, we do. Here are the guides for [migrating your site to a new host](https://
160
  == Contact us ==
161
  Feel free to let us know how we can help using the [support forum](https://wordpress.org/support/plugin/wpvivid-backuprestore) for the plugin on WordPress.org or our [contact form](https://wpvivid.com/contact-us). You can also reach us with a direct message on [Twitter](https://twitter.com/WPvividcom).
162
 
 
 
 
 
 
163
  == Changelog ==
 
 
 
 
 
164
  = 0.9.26 =
165
  - Optimized the plugin's UI.
166
  - Added a new tab for downloading WPvivid Backup for MainWP.
4
  Requires at least: 4.5
5
  Tested up to: 5.2
6
  Requires PHP: 5.3
7
+ Stable tag: 0.9.27
8
  License: GPLv3 or later
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
10
 
160
  == Contact us ==
161
  Feel free to let us know how we can help using the [support forum](https://wordpress.org/support/plugin/wpvivid-backuprestore) for the plugin on WordPress.org or our [contact form](https://wpvivid.com/contact-us). You can also reach us with a direct message on [Twitter](https://twitter.com/WPvividcom).
162
 
163
+ == Languages and Translators ==
164
+ Thank you for translating WPvivid Backup Plugin to your languages!
165
+
166
+ * [Andrew Galas](https://profiles.wordpress.org/andrewgalas) (Polish)
167
+
168
  == Changelog ==
169
+ = 0.9.27 =
170
+ - Fixed a fatal error that could be triggered by some firewall or security plugins.
171
+ - Refined and simplified the plugin menu in admin menu and top admin bar.
172
+ - Optimized the plugin code.
173
+ - Added Polish language translation.
174
  = 0.9.26 =
175
  - Optimized the plugin's UI.
176
  - Added a new tab for downloading WPvivid Backup for MainWP.
wpvivid-backuprestore.php CHANGED
@@ -7,7 +7,7 @@
7
  * @wordpress-plugin
8
  * Plugin Name: WPvivid Backup Plugin
9
  * Description: Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
10
- * Version: 0.9.26
11
  * Author: WPvivid Team
12
  * Author URI: https://wpvivid.com
13
  * License: GPL-3.0+
@@ -21,7 +21,7 @@ if ( ! defined( 'WPINC' ) ) {
21
  die;
22
  }
23
 
24
- define( 'WPVIVID_PLUGIN_VERSION', '0.9.26' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');
7
  * @wordpress-plugin
8
  * Plugin Name: WPvivid Backup Plugin
9
  * Description: Clone or copy WP sites then move or migrate them to new host (new domain), schedule backups, transfer backups to leading remote storage. All in one.
10
+ * Version: 0.9.27
11
  * Author: WPvivid Team
12
  * Author URI: https://wpvivid.com
13
  * License: GPL-3.0+
21
  die;
22
  }
23
 
24
+ define( 'WPVIVID_PLUGIN_VERSION', '0.9.27' );
25
  //
26
  define('WPVIVID_RESTORE_INIT','init');
27
  define('WPVIVID_RESTORE_READY','ready');