GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( e65d67...dc9fa8 )
by Liuta
03:08
created
includes/class-xcloner-activator.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -35,22 +35,22 @@  discard block
 block discarded – undo
35 35
 	
36 36
 		global $wpdb;
37 37
 		
38
-		if(version_compare(phpversion(), Xcloner_Activator::xcloner_minimum_version, '<'))
38
+		if (version_compare(phpversion(), Xcloner_Activator::xcloner_minimum_version, '<'))
39 39
 		{
40
-			wp_die('<p>'.sprintf(__("XCloner requires minimum PHP version %s in order to run correctly. We have detected your version as %s"),Xcloner_Activator::xcloner_minimum_version, phpversion()).'</p>',  __("XCloner Activation Error"), array( 'response'=>500, 'back_link'=>TRUE ) );
40
+			wp_die('<p>'.sprintf(__("XCloner requires minimum PHP version %s in order to run correctly. We have detected your version as %s"), Xcloner_Activator::xcloner_minimum_version, phpversion()).'</p>', __("XCloner Activation Error"), array('response'=>500, 'back_link'=>TRUE));
41 41
 		}
42 42
 		
43 43
 		$charset_collate = $wpdb->get_charset_collate();	
44 44
 		
45
-		$installed_ver = get_option( "xcloner_db_version" );
45
+		$installed_ver = get_option("xcloner_db_version");
46 46
 		
47 47
 		$xcloner_db_version = Xcloner_Activator::xcloner_db_version;
48 48
 		
49
-		$xcloner_scheduler_table = $wpdb->prefix . "xcloner_scheduler";
49
+		$xcloner_scheduler_table = $wpdb->prefix."xcloner_scheduler";
50 50
 		
51
-		if($installed_ver != $xcloner_db_version)		
51
+		if ($installed_ver != $xcloner_db_version)		
52 52
 		{
53
-			$xcloner_schedule_sql="CREATE TABLE `".$xcloner_scheduler_table."` (
53
+			$xcloner_schedule_sql = "CREATE TABLE `".$xcloner_scheduler_table."` (
54 54
 				  `id` int(11) NOT NULL AUTO_INCREMENT,
55 55
 				  `name` varchar(255) NOT NULL,
56 56
 				  `recurrence` varchar(25) NOT NULL,
@@ -64,53 +64,53 @@  discard block
 block discarded – undo
64 64
 				) ".$charset_collate.";
65 65
 				";
66 66
 			
67
-			require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
68
-			dbDelta( $xcloner_schedule_sql );
67
+			require_once(ABSPATH.'wp-admin/includes/upgrade.php');
68
+			dbDelta($xcloner_schedule_sql);
69 69
 			
70
-			update_option( "xcloner_db_version", $xcloner_db_version );
70
+			update_option("xcloner_db_version", $xcloner_db_version);
71 71
 		}
72 72
 		
73
-		if(get_option('xcloner_backup_compression_level') === false)
73
+		if (get_option('xcloner_backup_compression_level') === false)
74 74
 			update_option('xcloner_backup_compression_level', 0);
75 75
 		
76
-		if(get_option('xcloner_enable_log') === false)
76
+		if (get_option('xcloner_enable_log') === false)
77 77
 			update_option('xcloner_enable_log', 1);
78 78
 			
79
-		if(get_option('xcloner_enable_mysql_backup') === false)
79
+		if (get_option('xcloner_enable_mysql_backup') === false)
80 80
 			update_option('xcloner_enable_mysql_backup', 1);
81 81
 		
82
-		if(get_option('xcloner_system_settings_page') === false)
82
+		if (get_option('xcloner_system_settings_page') === false)
83 83
 			update_option('xcloner_system_settings_page', 100);
84 84
 			
85
-		if(get_option('xcloner_files_to_process_per_request') === false)
85
+		if (get_option('xcloner_files_to_process_per_request') === false)
86 86
 			update_option('xcloner_files_to_process_per_request', 250);
87 87
 
88
-		if(get_option('xcloner_database_records_per_request') === false)
88
+		if (get_option('xcloner_database_records_per_request') === false)
89 89
 			update_option('xcloner_database_records_per_request', 10000);
90 90
 
91
-		if(get_option('xcloner_exclude_files_larger_than_mb') === false)
91
+		if (get_option('xcloner_exclude_files_larger_than_mb') === false)
92 92
 			update_option('xcloner_exclude_files_larger_than_mb', 0);
93 93
 		
94
-		if(get_option('xcloner_split_backup_limit') === false)
94
+		if (get_option('xcloner_split_backup_limit') === false)
95 95
 			update_option('xcloner_split_backup_limit', 2048);
96 96
 			
97
-		if(get_option('xcloner_size_limit_per_request') === false)
97
+		if (get_option('xcloner_size_limit_per_request') === false)
98 98
 			update_option('xcloner_size_limit_per_request', 50);
99 99
 			
100
-		if(get_option('xcloner_cleanup_retention_limit_days') === false)
100
+		if (get_option('xcloner_cleanup_retention_limit_days') === false)
101 101
 			update_option('xcloner_cleanup_retention_limit_days', 60);
102 102
 			
103
-		if(get_option('xcloner_cleanup_retention_limit_archives') === false)
103
+		if (get_option('xcloner_cleanup_retention_limit_archives') === false)
104 104
 			update_option('xcloner_cleanup_retention_limit_archives', 100);
105 105
 			
106
-		if(get_option('xcloner_directories_to_scan_per_request') === false)
106
+		if (get_option('xcloner_directories_to_scan_per_request') === false)
107 107
 			update_option('xcloner_directories_to_scan_per_request', 25);
108 108
 			
109 109
 		/*if(!get_option('xcloner_diff_backup_recreate_period'))
110 110
 			update_option('xcloner_diff_backup_recreate_period', 10);
111 111
 			* */
112 112
 			
113
-		if(!get_option('xcloner_regex_exclude'))
113
+		if (!get_option('xcloner_regex_exclude'))
114 114
 			update_option('xcloner_regex_exclude', "(wp-content\/updraft|wp-content\/uploads\/wp_all_backup)(.*)$".PHP_EOL."(.*)\.(svn|git)(.*)$".PHP_EOL."wp-content\/cache(.*)$".PHP_EOL."(.*)error_log$");
115 115
 
116 116
 	}
Please login to merge, or discard this patch.
Braces   +39 added lines, -26 removed lines patch added patch discarded remove patch
@@ -70,48 +70,61 @@
 block discarded – undo
70 70
 			update_option( "xcloner_db_version", $xcloner_db_version );
71 71
 		}
72 72
 		
73
-		if(get_option('xcloner_backup_compression_level') === false)
74
-			update_option('xcloner_backup_compression_level', 0);
73
+		if(get_option('xcloner_backup_compression_level') === false) {
74
+					update_option('xcloner_backup_compression_level', 0);
75
+		}
75 76
 		
76
-		if(get_option('xcloner_enable_log') === false)
77
-			update_option('xcloner_enable_log', 1);
77
+		if(get_option('xcloner_enable_log') === false) {
78
+					update_option('xcloner_enable_log', 1);
79
+		}
78 80
 			
79
-		if(get_option('xcloner_enable_mysql_backup') === false)
80
-			update_option('xcloner_enable_mysql_backup', 1);
81
+		if(get_option('xcloner_enable_mysql_backup') === false) {
82
+					update_option('xcloner_enable_mysql_backup', 1);
83
+		}
81 84
 		
82
-		if(get_option('xcloner_system_settings_page') === false)
83
-			update_option('xcloner_system_settings_page', 100);
85
+		if(get_option('xcloner_system_settings_page') === false) {
86
+					update_option('xcloner_system_settings_page', 100);
87
+		}
84 88
 			
85
-		if(get_option('xcloner_files_to_process_per_request') === false)
86
-			update_option('xcloner_files_to_process_per_request', 250);
89
+		if(get_option('xcloner_files_to_process_per_request') === false) {
90
+					update_option('xcloner_files_to_process_per_request', 250);
91
+		}
87 92
 
88
-		if(get_option('xcloner_database_records_per_request') === false)
89
-			update_option('xcloner_database_records_per_request', 10000);
93
+		if(get_option('xcloner_database_records_per_request') === false) {
94
+					update_option('xcloner_database_records_per_request', 10000);
95
+		}
90 96
 
91
-		if(get_option('xcloner_exclude_files_larger_than_mb') === false)
92
-			update_option('xcloner_exclude_files_larger_than_mb', 0);
97
+		if(get_option('xcloner_exclude_files_larger_than_mb') === false) {
98
+					update_option('xcloner_exclude_files_larger_than_mb', 0);
99
+		}
93 100
 		
94
-		if(get_option('xcloner_split_backup_limit') === false)
95
-			update_option('xcloner_split_backup_limit', 2048);
101
+		if(get_option('xcloner_split_backup_limit') === false) {
102
+					update_option('xcloner_split_backup_limit', 2048);
103
+		}
96 104
 			
97
-		if(get_option('xcloner_size_limit_per_request') === false)
98
-			update_option('xcloner_size_limit_per_request', 50);
105
+		if(get_option('xcloner_size_limit_per_request') === false) {
106
+					update_option('xcloner_size_limit_per_request', 50);
107
+		}
99 108
 			
100
-		if(get_option('xcloner_cleanup_retention_limit_days') === false)
101
-			update_option('xcloner_cleanup_retention_limit_days', 60);
109
+		if(get_option('xcloner_cleanup_retention_limit_days') === false) {
110
+					update_option('xcloner_cleanup_retention_limit_days', 60);
111
+		}
102 112
 			
103
-		if(get_option('xcloner_cleanup_retention_limit_archives') === false)
104
-			update_option('xcloner_cleanup_retention_limit_archives', 100);
113
+		if(get_option('xcloner_cleanup_retention_limit_archives') === false) {
114
+					update_option('xcloner_cleanup_retention_limit_archives', 100);
115
+		}
105 116
 			
106
-		if(get_option('xcloner_directories_to_scan_per_request') === false)
107
-			update_option('xcloner_directories_to_scan_per_request', 25);
117
+		if(get_option('xcloner_directories_to_scan_per_request') === false) {
118
+					update_option('xcloner_directories_to_scan_per_request', 25);
119
+		}
108 120
 			
109 121
 		/*if(!get_option('xcloner_diff_backup_recreate_period'))
110 122
 			update_option('xcloner_diff_backup_recreate_period', 10);
111 123
 			* */
112 124
 			
113
-		if(!get_option('xcloner_regex_exclude'))
114
-			update_option('xcloner_regex_exclude', "(wp-content\/updraft|wp-content\/uploads\/wp_all_backup)(.*)$".PHP_EOL."(.*)\.(svn|git)(.*)$".PHP_EOL."wp-content\/cache(.*)$".PHP_EOL."(.*)error_log$");
125
+		if(!get_option('xcloner_regex_exclude')) {
126
+					update_option('xcloner_regex_exclude', "(wp-content\/updraft|wp-content\/uploads\/wp_all_backup)(.*)$".PHP_EOL."(.*)\.(svn|git)(.*)$".PHP_EOL."wp-content\/cache(.*)$".PHP_EOL."(.*)error_log$");
127
+		}
115 128
 
116 129
 	}
117 130
 	
Please login to merge, or discard this patch.
includes/class-xcloner-scheduler.php 2 patches
Spacing   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-class Xcloner_Scheduler{
3
+class Xcloner_Scheduler {
4 4
 	
5 5
 	private $db;
6 6
 	private $scheduler_table = "xcloner_scheduler";
@@ -21,8 +21,8 @@  discard block
 block discarded – undo
21 21
 	{
22 22
 		global $wpdb;
23 23
 		
24
-		$this->db 					= $wpdb;
25
-		$wpdb->show_errors			= false;
24
+		$this->db = $wpdb;
25
+		$wpdb->show_errors = false;
26 26
 		
27 27
 		$this->xcloner_container	= $xcloner_container;
28 28
 		$this->xcloner_settings 	= $xcloner_container->get_xcloner_settings();
@@ -40,18 +40,18 @@  discard block
 block discarded – undo
40 40
 		$this->xcloner_container = $container;
41 41
 	}
42 42
 	
43
-	public function get_scheduler_list($return_only_enabled = 0 )
43
+	public function get_scheduler_list($return_only_enabled = 0)
44 44
 	{
45 45
 		$list = $this->db->get_results("SELECT * FROM ".$this->scheduler_table);
46 46
 		
47
-		if($return_only_enabled)
47
+		if ($return_only_enabled)
48 48
 		{
49
-			$new_list= array();
49
+			$new_list = array();
50 50
 			
51
-			foreach($list as $res)
52
-				if($res->status)
51
+			foreach ($list as $res)
52
+				if ($res->status)
53 53
 				{
54
-					$res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id))+(get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
54
+					$res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id)) + (get_option('gmt_offset') * HOUR_IN_SECONDS);
55 55
 					$new_list[] = $res;
56 56
 				}
57 57
 			$list = $new_list;	
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	{
78 78
 		$data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id, ARRAY_A);
79 79
 		
80
-		if(!$data)
80
+		if (!$data)
81 81
 			return false;
82 82
 		
83 83
 		$params = json_decode($data['params']);
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
 	
95 95
 	public function delete_schedule_by_id($id)
96 96
 	{
97
-		$hook =  'xcloner_scheduler_'.$id;
98
-		wp_clear_scheduled_hook( $hook, array($id) );
97
+		$hook = 'xcloner_scheduler_'.$id;
98
+		wp_clear_scheduled_hook($hook, array($id));
99 99
 		
100
-		$data = $this->db->delete( $this->scheduler_table , array( 'id' => $id ) );
100
+		$data = $this->db->delete($this->scheduler_table, array('id' => $id));
101 101
 		
102 102
 		return $data;
103 103
 	}
@@ -106,12 +106,12 @@  discard block
 block discarded – undo
106 106
 	{
107 107
 		$list = $this->get_scheduler_list();
108 108
 		
109
-		foreach($list as $schedule)
109
+		foreach ($list as $schedule)
110 110
 		{
111
-			$hook =  'xcloner_scheduler_'.$schedule->id;
111
+			$hook = 'xcloner_scheduler_'.$schedule->id;
112 112
 			
113
-			$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
114
-			wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
113
+			$timestamp = wp_next_scheduled($hook, array($schedule->id));
114
+			wp_unschedule_event($timestamp, $hook, array($schedule->id));
115 115
 		}
116 116
 	}
117 117
 	
@@ -119,26 +119,26 @@  discard block
 block discarded – undo
119 119
 	{
120 120
 		$list = $this->get_scheduler_list();
121 121
 		
122
-		foreach($list as $schedule)
122
+		foreach ($list as $schedule)
123 123
 		{
124
-			$hook =  'xcloner_scheduler_'.$schedule->id;
124
+			$hook = 'xcloner_scheduler_'.$schedule->id;
125 125
 			
126 126
 			//adding the xcloner_scheduler hook with xcloner_scheduler_callback callback
127
-			add_action( $hook, array($this, 'xcloner_scheduler_callback'), 10,  1 );
127
+			add_action($hook, array($this, 'xcloner_scheduler_callback'), 10, 1);
128 128
 			
129
-			if ( ! wp_next_scheduled( $hook, array($schedule->id) ) and $schedule->status) {
129
+			if (!wp_next_scheduled($hook, array($schedule->id)) and $schedule->status) {
130 130
 				
131
-				if($schedule->recurrence == "single")
131
+				if ($schedule->recurrence == "single")
132 132
 				{
133
-					wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
134
-				}else{	
135
-					wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
133
+					wp_schedule_single_event(strtotime($schedule->start_at), $hook, array($schedule->id));
134
+				} else {	
135
+					wp_schedule_event(strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id));
136 136
 				}
137 137
 					
138
-			}elseif(!$schedule->status)
138
+			}elseif (!$schedule->status)
139 139
 			{
140
-				$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
141
-				wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
140
+				$timestamp = wp_next_scheduled($hook, array($schedule->id));
141
+				wp_unschedule_event($timestamp, $hook, array($schedule->id));
142 142
 			}
143 143
 		}
144 144
 	
@@ -147,18 +147,18 @@  discard block
 block discarded – undo
147 147
 	public function update_cron_hook($id)
148 148
 	{
149 149
 		$schedule = $this->get_schedule_by_id_object($id);
150
-		$hook =  'xcloner_scheduler_'.$schedule->id;
150
+		$hook = 'xcloner_scheduler_'.$schedule->id;
151 151
 		
152
-		$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
153
-		wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
152
+		$timestamp = wp_next_scheduled($hook, array($schedule->id));
153
+		wp_unschedule_event($timestamp, $hook, array($schedule->id));
154 154
 		
155 155
 		if ($schedule->status) {
156 156
 			
157
-			if($schedule->recurrence == "single")
157
+			if ($schedule->recurrence == "single")
158 158
 			{
159
-				wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
160
-			}else{	
161
-				wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
159
+				wp_schedule_single_event(strtotime($schedule->start_at), $hook, array($schedule->id));
160
+			} else {	
161
+				wp_schedule_event(strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id));
162 162
 			}
163 163
 				
164 164
 		}
@@ -166,16 +166,16 @@  discard block
 block discarded – undo
166 166
 	
167 167
 	public function disable_single_cron($schedule_id)
168 168
 	{
169
-		$hook =  'xcloner_scheduler_'.$schedule_id;
170
-		$timestamp = wp_next_scheduled( $hook , array($schedule_id) );
171
-		wp_unschedule_event( $timestamp, $hook, array($schedule_id) );
169
+		$hook = 'xcloner_scheduler_'.$schedule_id;
170
+		$timestamp = wp_next_scheduled($hook, array($schedule_id));
171
+		wp_unschedule_event($timestamp, $hook, array($schedule_id));
172 172
 		
173 173
 		$schedule['status'] = 0;
174 174
 		
175 175
 		$update = $this->db->update( 
176 176
 				$this->scheduler_table, 
177 177
 				$schedule, 
178
-				array( 'id' => $schedule_id ), 
178
+				array('id' => $schedule_id), 
179 179
 				array( 
180 180
 					'%s', 
181 181
 					'%s' 
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 		$update = $this->db->update( 
192 192
 				$this->scheduler_table, 
193 193
 				$schedule, 
194
-				array( 'id' => $schedule_id ), 
194
+				array('id' => $schedule_id), 
195 195
 				array( 
196 196
 					'%s', 
197 197
 					'%s' 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 		$update = $this->db->update( 
208 208
 				$this->scheduler_table, 
209 209
 				$schedule, 
210
-				array( 'id' => $schedule_id ), 
210
+				array('id' => $schedule_id), 
211 211
 				array( 
212 212
 					'%s', 
213 213
 					'%s' 
@@ -224,25 +224,25 @@  discard block
 block discarded – undo
224 224
 		$xcloner->init();
225 225
 		$this->set_xcloner_container($xcloner);
226 226
 		
227
-		$this->xcloner_file_system 		= $this->get_xcloner_container()->get_xcloner_filesystem();
228
-		$this->xcloner_database 		= $this->get_xcloner_container()->get_xcloner_database();
229
-		$this->archive_system 			= $this->get_xcloner_container()->get_archive_system();
230
-		$this->logger 					= $this->get_xcloner_container()->get_xcloner_logger()->withName("xcloner_scheduler");
231
-		$this->xcloner_remote_storage 	= $this->get_xcloner_container()->get_xcloner_remote_storage();
227
+		$this->xcloner_file_system = $this->get_xcloner_container()->get_xcloner_filesystem();
228
+		$this->xcloner_database = $this->get_xcloner_container()->get_xcloner_database();
229
+		$this->archive_system = $this->get_xcloner_container()->get_archive_system();
230
+		$this->logger = $this->get_xcloner_container()->get_xcloner_logger()->withName("xcloner_scheduler");
231
+		$this->xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
232 232
 		
233 233
 		$this->logger->info(sprintf("New schedule hash is %s", $this->xcloner_settings->get_hash()));
234 234
 		
235
-		if($schedule['backup_params']->diff_start_date)
235
+		if ($schedule['backup_params']->diff_start_date)
236 236
 		{
237 237
 			$this->xcloner_file_system->set_diff_timestamp_start($schedule['backup_params']->diff_start_date);
238 238
 		}
239 239
 				
240
-		if($schedule['recurrence'] == "single")
240
+		if ($schedule['recurrence'] == "single")
241 241
 		{
242 242
 			$this->disable_single_cron($schedule['id']);
243 243
 		}
244 244
 		
245
-		if(!$schedule)
245
+		if (!$schedule)
246 246
 		{
247 247
 			$this->logger->info(sprintf("Could not load schedule with id'%s'", $id), array("CRON"));
248 248
 			return;
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 		$init = 1;
258 258
 		$continue = 1;
259 259
 
260
-		while($continue)
260
+		while ($continue)
261 261
 		{
262 262
 			$continue = $this->xcloner_file_system->start_file_recursion($init);
263 263
 			
@@ -271,9 +271,9 @@  discard block
 block discarded – undo
271 271
 		$init = 1;
272 272
 		$return['finished'] = 0;
273 273
 		
274
-		while(!$return['finished'])
274
+		while (!$return['finished'])
275 275
 		{
276
-			$return  = $this->xcloner_database->start_database_recursion((array)json_decode($schedule['table_params']), $return, $init);
276
+			$return = $this->xcloner_database->start_database_recursion((array)json_decode($schedule['table_params']), $return, $init);
277 277
 			$init = 0;
278 278
 		}
279 279
 		
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 		$return['finished'] = 0;
286 286
 		$return['extra'] = array();
287 287
 		
288
-		while(!$return['finished'])
288
+		while (!$return['finished'])
289 289
 		{
290 290
 			$return = $this->archive_system->start_incremental_backup((array)$schedule['backup_params'], $return['extra'], $init);
291 291
 			$init = 0;
@@ -294,31 +294,31 @@  discard block
 block discarded – undo
294 294
 		
295 295
 		//getting the last backup archive file
296 296
 		$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_with_extension();
297
-		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
297
+		if ($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
298 298
 				$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
299 299
 		
300 300
 		$this->update_last_backup($schedule['id'], $return['extra']['backup_parent']);
301 301
 		
302
-		if($schedule['remote_storage'] and array_key_exists($schedule['remote_storage'], $this->xcloner_remote_storage->get_available_storages()))
302
+		if ($schedule['remote_storage'] and array_key_exists($schedule['remote_storage'], $this->xcloner_remote_storage->get_available_storages()))
303 303
 		{
304 304
 			$backup_file = $return['extra']['backup_parent'];
305 305
 			
306 306
 			$this->logger->info(sprintf("Transferring backup to remote storage %s", strtoupper($schedule['remote_storage'])), array("CRON"));
307 307
 			
308
-			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
308
+			if (method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
309 309
 				call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
310 310
 		}
311 311
 		
312 312
 		
313
-		if(isset($schedule['backup_params']->email_notification) and $to=$schedule['backup_params']->email_notification)
313
+		if (isset($schedule['backup_params']->email_notification) and $to = $schedule['backup_params']->email_notification)
314 314
 		{	
315
-			try{
315
+			try {
316 316
 				$from = "XCloner Scheduler";
317 317
 				$additional['lines_total'] = $return['extra']['lines_total'];
318
-				$subject = sprintf(__("%s - new backup generated %s") , $schedule['name'], $return['extra']['backup_parent']);
318
+				$subject = sprintf(__("%s - new backup generated %s"), $schedule['name'], $return['extra']['backup_parent']);
319 319
 				
320 320
 				$this->archive_system->send_notification($to, $from, $subject, $return['extra']['backup_parent'], $schedule, "", $additional);
321
-			}catch(Exception $e)
321
+			}catch (Exception $e)
322 322
 			{
323 323
 				$this->logger->error($e->getMessage());
324 324
 			}
@@ -333,22 +333,22 @@  discard block
 block discarded – undo
333 333
 	{
334 334
 		$schedule = $this->get_schedule_by_id($id);
335 335
 		
336
-		try{
336
+		try {
337 337
 
338 338
 			$this->__xcloner_scheduler_callback($id, $schedule);
339 339
 			
340
-		}catch(Exception $e){
340
+		}catch (Exception $e) {
341 341
 			
342 342
 			//send email to site admin if email notification is not set in the scheduler
343
-			if(!isset($schedule['backup_params']->email_notification) || !$schedule['backup_params']->email_notification)
343
+			if (!isset($schedule['backup_params']->email_notification) || !$schedule['backup_params']->email_notification)
344 344
 			{
345 345
 				$schedule['backup_params']->email_notification = get_option('admin_email');
346 346
 			}
347 347
 				
348
-			if(isset($schedule['backup_params']->email_notification) && $to=$schedule['backup_params']->email_notification)
348
+			if (isset($schedule['backup_params']->email_notification) && $to = $schedule['backup_params']->email_notification)
349 349
 			{
350 350
 				$from = "XCloner Scheduler";
351
-				$this->archive_system->send_notification($to, $from, $schedule['name']." - backup error","", "", $e->getMessage());
351
+				$this->archive_system->send_notification($to, $from, $schedule['name']." - backup error", "", "", $e->getMessage());
352 352
 			}
353 353
 			
354 354
 		}
@@ -361,10 +361,10 @@  discard block
 block discarded – undo
361 361
 		$new_schedules = array();
362 362
 		
363 363
 		foreach ($schedules as $key => $row) {
364
-			if(in_array($key, $this->allowed_schedules))
364
+			if (in_array($key, $this->allowed_schedules))
365 365
 			{
366 366
 				$new_schedules[$key] = $row;
367
-				$intervals[$key]  = $row['interval'];
367
+				$intervals[$key] = $row['interval'];
368 368
 			}
369 369
 		}
370 370
 		
Please login to merge, or discard this patch.
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -48,10 +48,11 @@  discard block
 block discarded – undo
48 48
 		{
49 49
 			$new_list= array();
50 50
 			
51
-			foreach($list as $res)
52
-				if($res->status)
51
+			foreach($list as $res) {
52
+							if($res->status)
53 53
 				{
54 54
 					$res->next_run_time = wp_next_scheduled('xcloner_scheduler_'.$res->id, array($res->id))+(get_option( 'gmt_offset' ) * HOUR_IN_SECONDS);
55
+			}
55 56
 					$new_list[] = $res;
56 57
 				}
57 58
 			$list = $new_list;	
@@ -77,8 +78,9 @@  discard block
 block discarded – undo
77 78
 	{
78 79
 		$data = $this->db->get_row("SELECT * FROM ".$this->scheduler_table." WHERE id=".$id, ARRAY_A);
79 80
 		
80
-		if(!$data)
81
-			return false;
81
+		if(!$data) {
82
+					return false;
83
+		}
82 84
 		
83 85
 		$params = json_decode($data['params']);
84 86
 		
@@ -131,11 +133,11 @@  discard block
 block discarded – undo
131 133
 				if($schedule->recurrence == "single")
132 134
 				{
133 135
 					wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
134
-				}else{	
136
+				} else{	
135 137
 					wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
136 138
 				}
137 139
 					
138
-			}elseif(!$schedule->status)
140
+			} elseif(!$schedule->status)
139 141
 			{
140 142
 				$timestamp = wp_next_scheduled( $hook , array($schedule->id) );
141 143
 				wp_unschedule_event( $timestamp, $hook, array($schedule->id) );
@@ -157,7 +159,7 @@  discard block
 block discarded – undo
157 159
 			if($schedule->recurrence == "single")
158 160
 			{
159 161
 				wp_schedule_single_event( strtotime($schedule->start_at), $hook, array($schedule->id));
160
-			}else{	
162
+			} else{	
161 163
 				wp_schedule_event( strtotime($schedule->start_at), $schedule->recurrence, $hook, array($schedule->id) );
162 164
 			}
163 165
 				
@@ -294,8 +296,9 @@  discard block
 block discarded – undo
294 296
 		
295 297
 		//getting the last backup archive file
296 298
 		$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_with_extension();
297
-		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension()))
298
-				$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
299
+		if($this->xcloner_file_system->is_part($this->archive_system->get_archive_name_with_extension())) {
300
+						$return['extra']['backup_parent'] = $this->archive_system->get_archive_name_multipart();
301
+		}
299 302
 		
300 303
 		$this->update_last_backup($schedule['id'], $return['extra']['backup_parent']);
301 304
 		
@@ -305,8 +308,9 @@  discard block
 block discarded – undo
305 308
 			
306 309
 			$this->logger->info(sprintf("Transferring backup to remote storage %s", strtoupper($schedule['remote_storage'])), array("CRON"));
307 310
 			
308
-			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage"))
309
-				call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
311
+			if(method_exists($this->xcloner_remote_storage, "upload_backup_to_storage")) {
312
+							call_user_func_array(array($this->xcloner_remote_storage, "upload_backup_to_storage"), array($backup_file, $schedule['remote_storage']));
313
+			}
310 314
 		}
311 315
 		
312 316
 		
@@ -318,7 +322,7 @@  discard block
 block discarded – undo
318 322
 				$subject = sprintf(__("%s - new backup generated %s") , $schedule['name'], $return['extra']['backup_parent']);
319 323
 				
320 324
 				$this->archive_system->send_notification($to, $from, $subject, $return['extra']['backup_parent'], $schedule, "", $additional);
321
-			}catch(Exception $e)
325
+			} catch(Exception $e)
322 326
 			{
323 327
 				$this->logger->error($e->getMessage());
324 328
 			}
@@ -337,7 +341,7 @@  discard block
 block discarded – undo
337 341
 
338 342
 			$this->__xcloner_scheduler_callback($id, $schedule);
339 343
 			
340
-		}catch(Exception $e){
344
+		} catch(Exception $e){
341 345
 			
342 346
 			//send email to site admin if email notification is not set in the scheduler
343 347
 			if(!isset($schedule['backup_params']->email_notification) || !$schedule['backup_params']->email_notification)
Please login to merge, or discard this patch.
includes/class-xcloner-deactivator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 		
34 34
 		global $xcloner_plugin;
35 35
 		
36
-		if(is_a($xcloner_plugin, 'Xcloner'))
36
+		if (is_a($xcloner_plugin, 'Xcloner'))
37 37
 		{
38 38
 			$xcloner_plugin->get_xcloner_filesystem()->cleanup_tmp_directories();
39 39
 			
Please login to merge, or discard this patch.
xcloner.php 2 patches
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
  */
27 27
 
28 28
 // If this file is called directly, abort.
29
-if ( ! defined( 'WPINC' ) ) {
29
+if (!defined('WPINC')) {
30 30
 	die;
31 31
 }
32 32
 
33 33
 //i will not load the plugin outside admin or cron
34
-if(!is_admin() and !defined('DOING_CRON'))
34
+if (!is_admin() and !defined('DOING_CRON'))
35 35
 	return;
36 36
 
37
-if(!defined("DS"))
37
+if (!defined("DS"))
38 38
 {
39 39
 	define("DS", DIRECTORY_SEPARATOR);
40 40
 }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
  */
46 46
 function activate_xcloner() 
47 47
 {
48
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-xcloner-activator.php';
48
+	require_once plugin_dir_path(__FILE__).'includes/class-xcloner-activator.php';
49 49
 	Xcloner_Activator::activate();
50 50
 }
51 51
 
@@ -55,31 +55,31 @@  discard block
 block discarded – undo
55 55
  */
56 56
 function deactivate_xcloner() 
57 57
 {
58
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-xcloner-deactivator.php';
58
+	require_once plugin_dir_path(__FILE__).'includes/class-xcloner-deactivator.php';
59 59
 	Xcloner_Deactivator::deactivate();
60 60
 }
61 61
 
62
-register_activation_hook( __FILE__, 'activate_xcloner' );
63
-register_deactivation_hook( __FILE__, 'deactivate_xcloner' );
62
+register_activation_hook(__FILE__, 'activate_xcloner');
63
+register_deactivation_hook(__FILE__, 'deactivate_xcloner');
64 64
 
65
-require_once plugin_dir_path( __FILE__ ) . 'includes/class-xcloner-activator.php';	
65
+require_once plugin_dir_path(__FILE__).'includes/class-xcloner-activator.php';	
66 66
 
67
-if(version_compare(phpversion(), Xcloner_Activator::xcloner_minimum_version, '<'))
67
+if (version_compare(phpversion(), Xcloner_Activator::xcloner_minimum_version, '<'))
68 68
 {
69 69
 	?>
70 70
 	<div class="error notice">
71
-		<p><?php echo sprintf(__("XCloner requires minimum PHP version %s in order to run correctly. We have detected your version as %s. Plugin is now deactivated."),Xcloner_Activator::xcloner_minimum_version, phpversion())?></p>
71
+		<p><?php echo sprintf(__("XCloner requires minimum PHP version %s in order to run correctly. We have detected your version as %s. Plugin is now deactivated."), Xcloner_Activator::xcloner_minimum_version, phpversion())?></p>
72 72
 	</div>
73 73
 	<?php	
74
-	require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
75
-	deactivate_plugins( plugin_basename( __FILE__ ) );
74
+	require_once(ABSPATH.'wp-admin/includes/plugin.php');
75
+	deactivate_plugins(plugin_basename(__FILE__));
76 76
 	return;
77 77
 }		
78 78
 		
79
-$db_installed_ver = get_option( "xcloner_db_version" );
79
+$db_installed_ver = get_option("xcloner_db_version");
80 80
 $xcloner_db_version = Xcloner_Activator::xcloner_db_version;
81 81
 
82
-if($db_installed_ver != $xcloner_db_version)
82
+if ($db_installed_ver != $xcloner_db_version)
83 83
 {
84 84
 	Xcloner_Activator::activate();
85 85
 }
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
 	wp_deregister_script('heartbeat');
95 95
 }
96 96
 
97
-if(isset($_GET['page']) and stristr($_GET['page'] ,  "xcloner_"))
97
+if (isset($_GET['page']) and stristr($_GET['page'], "xcloner_"))
98 98
 {
99
-	add_action( 'init', 'xcloner_stop_heartbeat', 1 );
99
+	add_action('init', 'xcloner_stop_heartbeat', 1);
100 100
 }	
101 101
 
102 102
 /**
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
 
120 120
 }
121 121
 
122
-require_once(plugin_dir_path( __FILE__ )  . '/vendor/autoload.php');
123
-require plugin_dir_path( __FILE__ ) . 'includes/class-xcloner.php';
122
+require_once(plugin_dir_path(__FILE__).'/vendor/autoload.php');
123
+require plugin_dir_path(__FILE__).'includes/class-xcloner.php';
124 124
 
125
-try{
125
+try {
126 126
 	
127 127
 	$xcloner_plugin = run_xcloner();
128 128
 	
129
-}catch(Exception $e){
129
+}catch (Exception $e) {
130 130
 	
131 131
 	echo $e->getMessage();
132 132
 	
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 }
32 32
 
33 33
 //i will not load the plugin outside admin or cron
34
-if(!is_admin() and !defined('DOING_CRON'))
34
+if(!is_admin() and !defined('DOING_CRON')) {
35 35
 	return;
36
+}
36 37
 
37 38
 if(!defined("DS"))
38 39
 {
@@ -126,7 +127,7 @@  discard block
 block discarded – undo
126 127
 	
127 128
 	$xcloner_plugin = run_xcloner();
128 129
 	
129
-}catch(Exception $e){
130
+} catch(Exception $e){
130 131
 	
131 132
 	echo $e->getMessage();
132 133
 	
Please login to merge, or discard this patch.
admin/partials/xcloner_init_page.php 2 patches
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -12,20 +12,20 @@  discard block
 block discarded – undo
12 12
  * @subpackage Xcloner/admin/partials
13 13
  */
14 14
 
15
-$requirements	 		= $this->get_xcloner_container()->get_xcloner_requirements();
16
-$xcloner_settings 		= $this->get_xcloner_container()->get_xcloner_settings();
17
-$xcloner_file_system 	= $this->get_xcloner_container()->get_xcloner_filesystem();
18
-$logger					= $this->get_xcloner_container()->get_xcloner_logger();
19
-$xcloner_scheduler 		= $this->get_xcloner_container()->get_xcloner_scheduler();
15
+$requirements = $this->get_xcloner_container()->get_xcloner_requirements();
16
+$xcloner_settings = $this->get_xcloner_container()->get_xcloner_settings();
17
+$xcloner_file_system = $this->get_xcloner_container()->get_xcloner_filesystem();
18
+$logger = $this->get_xcloner_container()->get_xcloner_logger();
19
+$xcloner_scheduler = $this->get_xcloner_container()->get_xcloner_scheduler();
20 20
 
21 21
 $logger_content = $logger->getLastDebugLines();
22 22
 
23
-$date_format = get_option( 'date_format' );
24
-$time_format = get_option( 'time_format' );
23
+$date_format = get_option('date_format');
24
+$time_format = get_option('time_format');
25 25
 
26
-if($requirements->check_backup_ready_status())
26
+if ($requirements->check_backup_ready_status())
27 27
 {
28
-	$latest_backup =  $xcloner_file_system->get_latest_backup();
28
+	$latest_backup = $xcloner_file_system->get_latest_backup();
29 29
 	$xcloner_file_system->backup_storage_cleanup();
30 30
 }
31 31
 ?>
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	</div>
39 39
 </div>
40 40
 
41
-<?php if(isset($latest_backup['timestamp']) and $latest_backup['timestamp'] < strtotime("-1 day")): ?>
41
+<?php if (isset($latest_backup['timestamp']) and $latest_backup['timestamp'] < strtotime("-1 day")): ?>
42 42
 	<div id="setting-error-" class="error settings-error notice is-dismissible"> 
43 43
 		<p><strong>
44 44
 			<?php echo __('Your latest backup is older than 24 hours, please create a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?>
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	</div>
48 48
 <?php endif?>
49 49
 
50
-<?php if(!isset($latest_backup['timestamp']) ): ?>
50
+<?php if (!isset($latest_backup['timestamp'])): ?>
51 51
 	<div id="setting-error-" class="error settings-error notice is-dismissible"> 
52 52
 		<p><strong>
53 53
 			<?php echo __('You have no backup that I could find, please generate a new backup to keep your site protected.', 'xcloner-backup-and-restore') ?>
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	</div>
57 57
 <?php endif?>
58 58
 
59
-<?php if(!$requirements->check_backup_ready_status()):?>
59
+<?php if (!$requirements->check_backup_ready_status()):?>
60 60
 	<div id="setting-error-" class="error settings-error notice is-dismissible"> 
61 61
 		<p><strong>
62 62
 			<?php echo __('Backup system not ready, please check and fix the issues marked in red', 'xcloner-backup-and-restore') ?>
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 							<div class="row">
84 84
 								<h5><?php echo __("Latest Backup", 'xcloner-backup-and-restore')?></h5>
85 85
 								<blockquote>
86
-								<?php if($latest_backup):?>
86
+								<?php if ($latest_backup):?>
87 87
 									<div class="item">
88 88
 										<div class="title"><?php echo __("Backup Name", 'xcloner-backup-and-restore')?>:</div>
89 89
 										<?php echo $latest_backup['basename']?>
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 									<div class="item">
98 98
 										<div class="title"><?php echo __("Backup Date", 'xcloner-backup-and-restore')?>:</div>
99 99
 										<?php 
100
-										echo date($date_format." ".$time_format, $latest_backup['timestamp']+(get_option( 'gmt_offset' ) * HOUR_IN_SECONDS))
100
+										echo date($date_format." ".$time_format, $latest_backup['timestamp'] + (get_option('gmt_offset') * HOUR_IN_SECONDS))
101 101
 										?>
102 102
 									</div> 
103 103
 								<?php else:?>
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 								<blockquote>
112 112
 								<div class="item">
113 113
 									<div class="title"><?php echo __("Total Size", 'xcloner-backup-and-restore')?>:</div>
114
-									<?php echo size_format($xcloner_file_system->get_storage_usage());?>
114
+									<?php echo size_format($xcloner_file_system->get_storage_usage()); ?>
115 115
 								</div>
116 116
 								</blockquote>
117 117
 							<h5><?php echo __("Next Scheduled Backup", 'xcloner-backup-and-restore')?></h5>
@@ -120,25 +120,25 @@  discard block
 block discarded – undo
120 120
 									<?php
121 121
 									$list = ($xcloner_scheduler->get_next_run_schedule());
122 122
 										
123
-										if(is_array($list))
123
+										if (is_array($list))
124 124
 										{
125
-											$xcloner_file_system->sort_by($list, "next_run_time","asc");
125
+											$xcloner_file_system->sort_by($list, "next_run_time", "asc");
126 126
 										}
127 127
 										
128
-										if(isset($list[0]))
128
+										if (isset($list[0]))
129 129
 											$latest_schedule = $list[0];
130 130
 									?>
131
-									<?php if(isset($latest_schedule->name)):?>
131
+									<?php if (isset($latest_schedule->name)):?>
132 132
 									<div class="title"><?php echo __("Schedule Name", 'xcloner-backup-and-restore')?>:</div>
133
-										<?php	echo $latest_schedule->name;?>
134
-									<?php endif;?>	
133
+										<?php	echo $latest_schedule->name; ?>
134
+									<?php endif; ?>	
135 135
 								</div>
136 136
 								<div class="item">
137 137
 									<div class="title"><?php echo __("Next Call", 'xcloner-backup-and-restore')?>:</div>
138
-									<?php if(isset($latest_schedule->next_run_time))	
138
+									<?php if (isset($latest_schedule->next_run_time))	
139 139
 											echo date($date_format." ".$time_format, $latest_schedule->next_run_time);
140 140
 										  else
141
-											echo __("Unscheduled",'xcloner-backup-and-restore');
141
+											echo __("Unscheduled", 'xcloner-backup-and-restore');
142 142
 									?>
143 143
 								</div>
144 144
 								</blockquote>
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 					</div>
147 147
 				</li>
148 148
 				
149
-				<?php if($xcloner_settings->get_xcloner_option('xcloner_enable_log')) :?>
149
+				<?php if ($xcloner_settings->get_xcloner_option('xcloner_enable_log')) :?>
150 150
 				<li class="active">
151 151
 					<div class="collapsible-header active">
152 152
 						<i class="material-icons">bug_report</i><?php echo __('XCloner Debugger', 'xcloner-backup-and-restore')?>
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 						</div>
158 158
 					</div>
159 159
 					<div class="collapsible-body">
160
-						<div class="console" id="xcloner-console"><?php if($logger_content) echo implode("<br />\n", array_reverse($logger_content)); ?></div>
160
+						<div class="console" id="xcloner-console"><?php if ($logger_content) echo implode("<br />\n", array_reverse($logger_content)); ?></div>
161 161
 					</div>
162 162
 				</li>
163 163
 				<script>
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 					}, 2000);*/
170 170
 				})
171 171
 				</script>
172
-				<?php endif;?>
172
+				<?php endif; ?>
173 173
 			
174 174
 			</ul>
175 175
 			
@@ -181,59 +181,59 @@  discard block
 block discarded – undo
181 181
 	  
182 182
 	  <div class="card blue-grey darken-1 z-depth-4 backup-ready">
183 183
 		<div class="card-content white-text">
184
-		  <span class="card-title"><?php echo __("System Check",'xcloner-backup-and-restore')?></span>
184
+		  <span class="card-title"><?php echo __("System Check", 'xcloner-backup-and-restore')?></span>
185 185
 		  <ul>
186
-				<li class="card-panel <?php echo ($requirements->check_xcloner_start_path(1)?"teal":"red")?> lighten-2" >
187
-					<?php echo __('Backup Start Location','xcloner-backup-and-restore')?>: <span class="shorten_string "><?php echo $requirements->check_xcloner_start_path();?></span>
186
+				<li class="card-panel <?php echo ($requirements->check_xcloner_start_path(1) ? "teal" : "red")?> lighten-2" >
187
+					<?php echo __('Backup Start Location', 'xcloner-backup-and-restore')?>: <span class="shorten_string "><?php echo $requirements->check_xcloner_start_path(); ?></span>
188 188
 				</li>
189
-				<li class="card-panel <?php echo ($requirements->check_xcloner_store_path(1)?"teal":"red")?> lighten-2" >
190
-					<?php echo __('Backup Storage Location','xcloner-backup-and-restore')?>: <span class="shorten_string"><?php echo $requirements->check_xcloner_store_path();?></span>
189
+				<li class="card-panel <?php echo ($requirements->check_xcloner_store_path(1) ? "teal" : "red")?> lighten-2" >
190
+					<?php echo __('Backup Storage Location', 'xcloner-backup-and-restore')?>: <span class="shorten_string"><?php echo $requirements->check_xcloner_store_path(); ?></span>
191 191
 				</li>
192
-				<li class="card-panel <?php echo ($requirements->check_xcloner_tmp_path(1)?"teal":"red")?> lighten-2" >
193
-					<?php echo __('Temporary Location','xcloner-backup-and-restore')?>: <span class="shorten_string"><?php echo $requirements->check_xcloner_tmp_path();?></span>
192
+				<li class="card-panel <?php echo ($requirements->check_xcloner_tmp_path(1) ? "teal" : "red")?> lighten-2" >
193
+					<?php echo __('Temporary Location', 'xcloner-backup-and-restore')?>: <span class="shorten_string"><?php echo $requirements->check_xcloner_tmp_path(); ?></span>
194 194
 				</li>
195 195
 				
196
-				<li class="card-panel <?php echo ($requirements->check_min_php_version(1)?"teal":"red")?> lighten-2" >
197
-					<?php echo __('PHP Version Check','xcloner-backup-and-restore')?>: <?php echo $requirements->check_min_php_version();?>
196
+				<li class="card-panel <?php echo ($requirements->check_min_php_version(1) ? "teal" : "red")?> lighten-2" >
197
+					<?php echo __('PHP Version Check', 'xcloner-backup-and-restore')?>: <?php echo $requirements->check_min_php_version(); ?>
198 198
 					( >= <?php echo $requirements->get_constant('min_php_version')?>)
199 199
 				</li>
200
-				<li class="card-panel <?php echo ($requirements->check_safe_mode(1)?"teal":"orange")?> lighten-2" >
201
-					<?php echo __('PHP Safe Mode','xcloner-backup-and-restore')?>: <?php echo $requirements->check_safe_mode();?>
200
+				<li class="card-panel <?php echo ($requirements->check_safe_mode(1) ? "teal" : "orange")?> lighten-2" >
201
+					<?php echo __('PHP Safe Mode', 'xcloner-backup-and-restore')?>: <?php echo $requirements->check_safe_mode(); ?>
202 202
 					( <?php echo $requirements->get_constant('safe_mode')?>)
203 203
 				</li>
204
-				<li class="card-panel <?php echo ($requirements->check_backup_ready_status()?"teal":"red")?> lighten-2">
205
-					<?php echo ($requirements->check_backup_ready_status()?__('BACKUP READY','xcloner-backup-and-restore'):__('Backup not ready, please check above requirements','xcloner-backup-and-restore'))?>
206
-					<i class="material-icons right tiny"><?php echo ($requirements->check_backup_ready_status()?'thumb_up':'thumb_down')?></i>
204
+				<li class="card-panel <?php echo ($requirements->check_backup_ready_status() ? "teal" : "red")?> lighten-2">
205
+					<?php echo ($requirements->check_backup_ready_status() ? __('BACKUP READY', 'xcloner-backup-and-restore') : __('Backup not ready, please check above requirements', 'xcloner-backup-and-restore'))?>
206
+					<i class="material-icons right tiny"><?php echo ($requirements->check_backup_ready_status() ? 'thumb_up' : 'thumb_down')?></i>
207 207
 				</li>
208 208
 		  </ul>
209 209
 		  <ul class="additional_system_info">
210 210
 				<li class="card-panel grey darken-1" >
211
-					<?php echo __('PHP max_execution_time','xcloner-backup-and-restore')?>: <?php echo $requirements->get_max_execution_time();?>
211
+					<?php echo __('PHP max_execution_time', 'xcloner-backup-and-restore')?>: <?php echo $requirements->get_max_execution_time(); ?>
212 212
 				</li>
213 213
 				<li class="card-panel grey darken-1" >
214
-					<?php echo __('PHP memory_limit','xcloner-backup-and-restore')?>: <?php echo $requirements->get_memory_limit();?>
214
+					<?php echo __('PHP memory_limit', 'xcloner-backup-and-restore')?>: <?php echo $requirements->get_memory_limit(); ?>
215 215
 				</li>
216 216
 				<li class="card-panel grey darken-1" >
217
-					<?php echo __('PHP open_basedir','xcloner-backup-and-restore')?>: <?php echo $requirements->get_open_basedir();?>
217
+					<?php echo __('PHP open_basedir', 'xcloner-backup-and-restore')?>: <?php echo $requirements->get_open_basedir(); ?>
218 218
 				</li>
219 219
 				<?php 
220 220
 				$data = array();
221
-				if($requirements->check_backup_ready_status())
221
+				if ($requirements->check_backup_ready_status())
222 222
 					$data = $xcloner_file_system->estimate_read_write_time();
223 223
 				?>
224 224
 				<li class="card-panel grey darken-1" >
225
-					<?php echo __('Reading Time 1MB Block','xcloner-backup-and-restore')?>: <?php echo (isset($data['reading_time'])?$data['reading_time']:__("unknown"));?>
225
+					<?php echo __('Reading Time 1MB Block', 'xcloner-backup-and-restore')?>: <?php echo (isset($data['reading_time']) ? $data['reading_time'] : __("unknown")); ?>
226 226
 				</li>
227 227
 				<li class="card-panel grey darken-1" >
228
-					<?php echo __('Writing Time 1MB Block','xcloner-backup-and-restore')?>: <?php echo (isset($data['writing_time'])?$data['writing_time']:__("unknown"));?>
228
+					<?php echo __('Writing Time 1MB Block', 'xcloner-backup-and-restore')?>: <?php echo (isset($data['writing_time']) ? $data['writing_time'] : __("unknown")); ?>
229 229
 				</li>
230 230
 				<li class="card-panel grey darken-1" >
231
-					<?php echo __('Free Disk Space','xcloner-backup-and-restore')?>: <?php echo $requirements->get_free_disk_space();;?>
231
+					<?php echo __('Free Disk Space', 'xcloner-backup-and-restore')?>: <?php echo $requirements->get_free_disk_space(); ;?>
232 232
 				</li>
233 233
 		  </ul>
234 234
 		</div>
235 235
 		<div class="card-action">
236
-		  <a class="waves-effect waves-light btn system_info_toggle blue darken-1"><i class="material-icons left">list</i><?php echo __('Toggle Additional System Info','xcloner-backup-and-restore')?></a>
236
+		  <a class="waves-effect waves-light btn system_info_toggle blue darken-1"><i class="material-icons left">list</i><?php echo __('Toggle Additional System Info', 'xcloner-backup-and-restore')?></a>
237 237
 		</div>
238 238
 	  </div>
239 239
 
Please login to merge, or discard this patch.
Braces   +19 added lines, -10 removed lines patch added patch discarded remove patch
@@ -100,7 +100,8 @@  discard block
 block discarded – undo
100 100
 										echo date($date_format." ".$time_format, $latest_backup['timestamp']+(get_option( 'gmt_offset' ) * HOUR_IN_SECONDS))
101 101
 										?>
102 102
 									</div> 
103
-								<?php else:?>
103
+								<?php else {
104
+	:?>
104 105
 									<div class="item">
105 106
 										<div class="title"><?php echo __("No Backup Yet", 'xcloner-backup-and-restore')?></div>
106 107
 									</div> 
@@ -111,7 +112,9 @@  discard block
 block discarded – undo
111 112
 								<blockquote>
112 113
 								<div class="item">
113 114
 									<div class="title"><?php echo __("Total Size", 'xcloner-backup-and-restore')?>:</div>
114
-									<?php echo size_format($xcloner_file_system->get_storage_usage());?>
115
+									<?php echo size_format($xcloner_file_system->get_storage_usage());
116
+}
117
+?>
115 118
 								</div>
116 119
 								</blockquote>
117 120
 							<h5><?php echo __("Next Scheduled Backup", 'xcloner-backup-and-restore')?></h5>
@@ -125,8 +128,9 @@  discard block
 block discarded – undo
125 128
 											$xcloner_file_system->sort_by($list, "next_run_time","asc");
126 129
 										}
127 130
 										
128
-										if(isset($list[0]))
129
-											$latest_schedule = $list[0];
131
+										if(isset($list[0])) {
132
+																					$latest_schedule = $list[0];
133
+										}
130 134
 									?>
131 135
 									<?php if(isset($latest_schedule->name)):?>
132 136
 									<div class="title"><?php echo __("Schedule Name", 'xcloner-backup-and-restore')?>:</div>
@@ -135,10 +139,11 @@  discard block
 block discarded – undo
135 139
 								</div>
136 140
 								<div class="item">
137 141
 									<div class="title"><?php echo __("Next Call", 'xcloner-backup-and-restore')?>:</div>
138
-									<?php if(isset($latest_schedule->next_run_time))	
142
+									<?php if(isset($latest_schedule->next_run_time)) {
139 143
 											echo date($date_format." ".$time_format, $latest_schedule->next_run_time);
140
-										  else
141
-											echo __("Unscheduled",'xcloner-backup-and-restore');
144
+} else {
145
+										  											echo __("Unscheduled",'xcloner-backup-and-restore');
146
+										  }
142 147
 									?>
143 148
 								</div>
144 149
 								</blockquote>
@@ -157,7 +162,10 @@  discard block
 block discarded – undo
157 162
 						</div>
158 163
 					</div>
159 164
 					<div class="collapsible-body">
160
-						<div class="console" id="xcloner-console"><?php if($logger_content) echo implode("<br />\n", array_reverse($logger_content)); ?></div>
165
+						<div class="console" id="xcloner-console"><?php if($logger_content) {
166
+	echo implode("<br />\n", array_reverse($logger_content));
167
+}
168
+?></div>
161 169
 					</div>
162 170
 				</li>
163 171
 				<script>
@@ -218,8 +226,9 @@  discard block
 block discarded – undo
218 226
 				</li>
219 227
 				<?php 
220 228
 				$data = array();
221
-				if($requirements->check_backup_ready_status())
222
-					$data = $xcloner_file_system->estimate_read_write_time();
229
+				if($requirements->check_backup_ready_status()) {
230
+									$data = $xcloner_file_system->estimate_read_write_time();
231
+				}
223 232
 				?>
224 233
 				<li class="card-panel grey darken-1" >
225 234
 					<?php echo __('Reading Time 1MB Block','xcloner-backup-and-restore')?>: <?php echo (isset($data['reading_time'])?$data['reading_time']:__("unknown"));?>
Please login to merge, or discard this patch.
admin/partials/xcloner_generate_backups_page.php 1 patch
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@  discard block
 block discarded – undo
11 11
 <h1><?= esc_html(get_admin_page_title()); ?></h1>
12 12
          
13 13
 <ul class="nav-tab-wrapper content row">
14
-	<li><a href="#backup_options" class="nav-tab col s12 m3 l2 nav-tab-active"><?php echo $tab.". ".__('Backup Options','xcloner-backup-and-restore')?></a></li>
15
-	<?php if($xcloner_settings->get_enable_mysql_backup()):?>
16
-		<li><a href="#database_options" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Database Options','xcloner-backup-and-restore')?></a></li>
14
+	<li><a href="#backup_options" class="nav-tab col s12 m3 l2 nav-tab-active"><?php echo $tab.". ".__('Backup Options', 'xcloner-backup-and-restore')?></a></li>
15
+	<?php if ($xcloner_settings->get_enable_mysql_backup()):?>
16
+		<li><a href="#database_options" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Database Options', 'xcloner-backup-and-restore')?></a></li>
17 17
 	<?php endif?>
18
-	<li><a href="#files_options" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Files Options','xcloner-backup-and-restore')?></a></li>
19
-	<li><a href="#generate_backup" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Generate Backup','xcloner-backup-and-restore')?></a></li>
20
-	<li><a href="#schedule_backup" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Schedule Backup','xcloner-backup-and-restore')?></a></li>
18
+	<li><a href="#files_options" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Files Options', 'xcloner-backup-and-restore')?></a></li>
19
+	<li><a href="#generate_backup" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Generate Backup', 'xcloner-backup-and-restore')?></a></li>
20
+	<li><a href="#schedule_backup" class="nav-tab col s12 m3 l2 "><?php echo ++$tab.". ".__('Schedule Backup', 'xcloner-backup-and-restore')?></a></li>
21 21
 </ul>
22 22
 
23 23
 <form action="" method="POST" id="generate_backup_form">
@@ -28,21 +28,21 @@  discard block
 block discarded – undo
28 28
 		        <div class="input-field inline col s12 m10 l6">
29 29
 					<i class="material-icons prefix">input</i>
30 30
 					<input name="backup_name" id="backup_name" type="text" value=<?php echo $xcloner_settings->get_default_backup_name() ?> >
31
-					<label for="backup_name"><?php echo __('Backup Name','xcloner-backup-and-restore')?></label>
31
+					<label for="backup_name"><?php echo __('Backup Name', 'xcloner-backup-and-restore')?></label>
32 32
 				</div>
33 33
 				<div class="hide-on-small-only m2">
34
-					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('The default backup name, supported tags [time], [hostname], [domain]','xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
34
+					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('The default backup name, supported tags [time], [hostname], [domain]', 'xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
35 35
 				</div>
36 36
 		     </div>
37 37
 		     
38 38
 		     <div class="row">
39 39
 		        <div class="input-field inline col s12 m10 l6">
40 40
 					<i class="material-icons prefix">email</i>
41
-					<input name="email_notification" id="email_notification" type="text" value="<?php echo get_option('admin_email');?>" >
42
-					<label for="email_notification"><?php echo __('Send Email Notification To','xcloner-backup-and-restore')?></label>
41
+					<input name="email_notification" id="email_notification" type="text" value="<?php echo get_option('admin_email'); ?>" >
42
+					<label for="email_notification"><?php echo __('Send Email Notification To', 'xcloner-backup-and-restore')?></label>
43 43
 				</div>
44 44
 				<div class="hide-on-small-only m2">
45
-					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('If left blank, no notification will be sent','xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
45
+					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('If left blank, no notification will be sent', 'xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
46 46
 				</div>
47 47
 		     </div>
48 48
 		     
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 				<div class="input-field inline col s10 m10 l6">
51 51
 					<i class="material-icons prefix">access_time</i>
52 52
 					<input type="datetime-local" id="diff_start_date" class="datepicker_max_today" name="diff_start_date" >
53
-					<label for="diff_start_date"><?php echo __('Backup Only Files Modified/Created After','xcloner-backup-and-restore')?></label>
53
+					<label for="diff_start_date"><?php echo __('Backup Only Files Modified/Created After', 'xcloner-backup-and-restore')?></label>
54 54
 				</div>
55 55
 				<div class="hide-on-small-only m2">	
56 56
 					<a class="btn-floating tooltipped btn-small" data-html="true" data-position="center" data-delay="50" data-tooltip="<?php echo __("This option allows you to create a differential backup that will include only <br> changed files since the set date, leave blank to include all files", "xcloner-backup-and-restore")?>"><i class="material-icons">help_outline</i></a>
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 				<div class="input-field col s12 m10 l6">
62 62
 					<i class="material-icons prefix">input</i>
63 63
 					<textarea name="backup_comments" id="backup_comments" class="materialize-textarea"></textarea>
64
-					<label for="backup_comments"><?php echo __('Backup Comments','xcloner-backup-and-restore')?></label>
64
+					<label for="backup_comments"><?php echo __('Backup Comments', 'xcloner-backup-and-restore')?></label>
65 65
 				</div>
66 66
 				<div class="hide-on-small-only m2">
67
-					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('Some default backup comments that will be stored inside the backup archive','xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
67
+					<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('Some default backup comments that will be stored inside the backup archive', 'xcloner-backup-and-restore')?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
68 68
 				</div>
69 69
 		     </div>
70 70
 		     
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
 			 </div>
76 76
 		</div>
77 77
 		
78
-		<?php if($xcloner_settings->get_enable_mysql_backup()):?>
78
+		<?php if ($xcloner_settings->get_enable_mysql_backup()):?>
79 79
 		<div id="database_options" class="tab-content">
80 80
 			<h2><?php echo __('Select database data to include in the backup', 'xcloner-backup-and-restore')?>:
81
-				<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('Enable the \'Backup only WP tables\' setting if you don\'t want to show all other databases and tables not related to this Wordpress install','xcloner-backup-and-restore');?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
81
+				<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-tooltip="<?php echo __('Enable the \'Backup only WP tables\' setting if you don\'t want to show all other databases and tables not related to this Wordpress install', 'xcloner-backup-and-restore'); ?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
82 82
 			</h2>
83 83
 			
84 84
 			<!-- database/tables tree -->
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		<?php endif ?>
99 99
 		
100 100
 		<div id="files_options" class="tab-content">
101
-			<h2><?php echo __('Select from below the files/folders you want to exclude from your Backup Archive','xcloner-backup-and-restore')?>:
102
-				<a class="btn-floating tooltipped btn-small" data-position="bottom" data-delay="50" data-html="true" data-tooltip="<?php echo __('You can navigate below through all your site structure(Backup Start Location) to exclude any file/folder you need by clicking the checkbox near it. <br />If the checkobx is disabled, then it matches a Regex Exclude File option and it can\'t be unchecked','xcloner-backup-and-restore');?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
101
+			<h2><?php echo __('Select from below the files/folders you want to exclude from your Backup Archive', 'xcloner-backup-and-restore')?>:
102
+				<a class="btn-floating tooltipped btn-small" data-position="bottom" data-delay="50" data-html="true" data-tooltip="<?php echo __('You can navigate below through all your site structure(Backup Start Location) to exclude any file/folder you need by clicking the checkbox near it. <br />If the checkobx is disabled, then it matches a Regex Exclude File option and it can\'t be unchecked', 'xcloner-backup-and-restore'); ?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
103 103
 			</h2>
104 104
 			
105 105
 			<!-- Files System Container -->
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 					<ul class="backup-status collapsible" data-collapsible="accordion">
128 128
 					    <li class="file-system">
129 129
 						      <div class="collapsible-header">
130
-									<i class="material-icons">folder</i><?php echo __('Scanning The File System...','xcloner-backup-and-restore')?>
130
+									<i class="material-icons">folder</i><?php echo __('Scanning The File System...', 'xcloner-backup-and-restore')?>
131 131
 									
132 132
 									<p class="right"><?php echo sprintf(__('Found %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span  class="file-size-total">0</span>MB')?></p>
133 133
 
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 								</div>	
142 142
 						      <div class="collapsible-body status-body"></div>
143 143
 					    </li>
144
-					    <?php if($xcloner_settings->get_enable_mysql_backup()):?>
144
+					    <?php if ($xcloner_settings->get_enable_mysql_backup()):?>
145 145
 					    <li class="database-backup">
146 146
 						      <div class="collapsible-header">
147
-									<i class="material-icons">storage</i><?php echo __('Generating the Mysql Backup...','xcloner-backup-and-restore')?>
147
+									<i class="material-icons">storage</i><?php echo __('Generating the Mysql Backup...', 'xcloner-backup-and-restore')?>
148 148
 									
149
-									<p class="right"><?php echo sprintf(__('Found %s tables in %s databases (%s)', 'xcloner-backup-and-restore'), '<span class="table-counter">0</span>', '<span class="database-counter">0</span>', '<span data-processed="0" class="total-records">0</span> records','xcloner-backup-and-restore')?></p>
149
+									<p class="right"><?php echo sprintf(__('Found %s tables in %s databases (%s)', 'xcloner-backup-and-restore'), '<span class="table-counter">0</span>', '<span class="database-counter">0</span>', '<span data-processed="0" class="total-records">0</span> records', 'xcloner-backup-and-restore')?></p>
150 150
 									
151 151
 									<div>
152 152
 										<p class="right"><span class="last-logged-table"></span></p>
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
 					    <?php endif?>
171 171
 					    <li class="files-backup">
172 172
 						      <div class="collapsible-header">
173
-									<i class="material-icons">archive</i><?php echo __('Adding Files to Archive...','xcloner-backup-and-restore')?>
173
+									<i class="material-icons">archive</i><?php echo __('Adding Files to Archive...', 'xcloner-backup-and-restore')?>
174 174
 									
175
-									<p class="right"><?php echo sprintf(__('Adding %s files (%s)','xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span  data-processed="0" class="file-size-total">0</span>MB')?></p>
175
+									<p class="right"><?php echo sprintf(__('Adding %s files (%s)', 'xcloner-backup-and-restore'), '<span class="file-counter">0</span>', '<span  data-processed="0" class="file-size-total">0</span>MB')?></p>
176 176
 
177 177
 									<div>
178 178
 										<p class="right"><span class="last-logged-file"></span></p>
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 						      <div class="collapsible-body status-body">
186 186
 									<div class="row">
187 187
 										<div class="col l3 s12">
188
-											<h2><?php echo __("Backup Parts",'xcloner-backup-and-restore')?>: </h2>
188
+											<h2><?php echo __("Backup Parts", 'xcloner-backup-and-restore')?>: </h2>
189 189
 										</div>	
190 190
 										<div class="col l9 s12">
191 191
 											<ul class="backup-name"></ul>
@@ -195,14 +195,14 @@  discard block
 block discarded – undo
195 195
 					    </li>
196 196
 					    <li class="backup-done">
197 197
 						      <div class="collapsible-header">
198
-									<i class="material-icons">done</i><?php echo __('Backup Done','xcloner-backup-and-restore')?>
198
+									<i class="material-icons">done</i><?php echo __('Backup Done', 'xcloner-backup-and-restore')?>
199 199
 									
200 200
 									<p class="right">
201
-										 <?php if(sizeof($available_storages)):?>
202
-											<a href="#" class="cloud-upload" title="<?php echo __("Send Backup To Remote Storage",'xcloner-backup-and-restore')?>"><i class="material-icons">cloud_upload</i></a>
201
+										 <?php if (sizeof($available_storages)):?>
202
+											<a href="#" class="cloud-upload" title="<?php echo __("Send Backup To Remote Storage", 'xcloner-backup-and-restore')?>"><i class="material-icons">cloud_upload</i></a>
203 203
 										 <?php endif?>
204
-										 <a href="#" class="download" title="<?php echo __("Download Backup",'xcloner-backup-and-restore')?>"><i class="material-icons">file_download</i></a>
205
-										 <a href="#" class="list-backup-content" title="<?php echo __("List Backup Content",'xcloner-backup-and-restore')?>"><i class="material-icons">folder_open</i></a>
204
+										 <a href="#" class="download" title="<?php echo __("Download Backup", 'xcloner-backup-and-restore')?>"><i class="material-icons">file_download</i></a>
205
+										 <a href="#" class="list-backup-content" title="<?php echo __("List Backup Content", 'xcloner-backup-and-restore')?>"><i class="material-icons">folder_open</i></a>
206 206
 									</p>
207 207
 									
208 208
 									<div class="progress">
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
 								</div>	
213 213
 						      <div class="collapsible-body center-align">
214 214
 									<div class="row">
215
-										<h5><?php echo __("Thank you for using XCloner.",'xcloner-backup-and-restore')?></h5>
216
-										<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'),'<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore/reviews/" target="_blank">Wordpress XCloner Reviews Section</a>') ?></h6>
215
+										<h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore')?></h5>
216
+										<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore/reviews/" target="_blank">Wordpress XCloner Reviews Section</a>') ?></h6>
217 217
 										<a class="twitter-follow-button" href="https://twitter.com/thinkovi" data-show-count="false">Follow @thinkovi</a>
218 218
 										<script src="//platform.twitter.com/widgets.js" async="" charset="utf-8"></script>
219 219
 									</div>
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 			<div class="row">
231 231
 				<div id="schedule_backup_success" class="col s12 l6 updated settings-error notice is-dismissible"> 
232 232
 					<p><strong><?php echo __('Schedule Saved', 'xcloner-backup-and-restore')?></strong></p>
233
-					<button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php echo __('(Dismiss this notice.','xcloner-backup-and-restore')?></span></button>
233
+					<button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php echo __('(Dismiss this notice.', 'xcloner-backup-and-restore')?></span></button>
234 234
 				</div>
235 235
 			</div>
236 236
 			
@@ -244,11 +244,11 @@  discard block
 block discarded – undo
244 244
 			<div class="row">
245 245
 				 <div class="input-field inline col s12 m8 l4">
246 246
 					  <input type="datetime-local" id="datepicker" class="datepicker" name="schedule_start_date" >
247
-					  <label for="datepicker"><?php echo __('Schedule Backup To Start On:','xcloner-backup-and-restore')?></label>
247
+					  <label for="datepicker"><?php echo __('Schedule Backup To Start On:', 'xcloner-backup-and-restore')?></label>
248 248
 				</div>
249 249
 				 <div class="input-field inline col s12 m4 l3">
250 250
 					  <input id="timepicker_ampm_dark" class="timepicker" type="time" name="schedule_start_time">
251
-					  <label for="timepicker_ampm_dark"><?php echo __('At:','xcloner-backup-and-restore')?></label>
251
+					  <label for="timepicker_ampm_dark"><?php echo __('At:', 'xcloner-backup-and-restore')?></label>
252 252
 				</div>
253 253
 			</div>
254 254
 			
@@ -256,17 +256,17 @@  discard block
 block discarded – undo
256 256
 			<div class="row">
257 257
 				<div class="input-field inline col s10 m11 l7">
258 258
 					<select id="backup_type" class="" name="backup_type">
259
-						<option value=""><?php echo __("Full Backup","xcloner-backup-and-restore");?></option>
260
-						<option value="diff"><?php echo __("Differential Backups","xcloner-backup-and-restore");?></option>
261
-						<option value="full_diff"><?php echo __("Full Backup + Differential Backups","xcloner-backup-and-restore");?></option>
259
+						<option value=""><?php echo __("Full Backup", "xcloner-backup-and-restore"); ?></option>
260
+						<option value="diff"><?php echo __("Differential Backups", "xcloner-backup-and-restore"); ?></option>
261
+						<option value="full_diff"><?php echo __("Full Backup + Differential Backups", "xcloner-backup-and-restore"); ?></option>
262 262
 					</select>
263
-					<label for="backup_type"><?php echo __('Scheduled Backup Type','xcloner-backup-and-restore')?></label>
263
+					<label for="backup_type"><?php echo __('Scheduled Backup Type', 'xcloner-backup-and-restore')?></label>
264 264
 				</div>
265 265
 				<div class="col s2 m1">	
266 266
 					<a class="btn-floating tooltipped btn-small" data-html="true" data-position="center" data-delay="50" data-tooltip="<ul style='max-width:760px; text-align:left;'>
267
-						<li><?php echo __("Full Backup = it will generate a full backup of all included files each time schedule runs","xcloner-backup-and-restore");?></li>
268
-						<li><?php echo __("Differentials Backups = backups will include only changed files since the schedule started to run","xcloner-backup-and-restore");?></li>
269
-						<li><?php echo __("Full Backup +  Differential Backups = the first time schedule runs, it will create a full backup and all next scheduled backups will include only files created/modified since that last full backup; a full backup is recreated when the number of changed files is bigger than the 'Differetial Backups Max Days' XCloner option.","xcloner-backup-and-restore");?></li>
267
+						<li><?php echo __("Full Backup = it will generate a full backup of all included files each time schedule runs", "xcloner-backup-and-restore"); ?></li>
268
+						<li><?php echo __("Differentials Backups = backups will include only changed files since the schedule started to run", "xcloner-backup-and-restore"); ?></li>
269
+						<li><?php echo __("Full Backup +  Differential Backups = the first time schedule runs, it will create a full backup and all next scheduled backups will include only files created/modified since that last full backup; a full backup is recreated when the number of changed files is bigger than the 'Differetial Backups Max Days' XCloner option.", "xcloner-backup-and-restore"); ?></li>
270 270
 					</ul>"><i class="material-icons">help_outline</i></a>
271 271
 				</div>
272 272
 			</div>	
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 						<?php
279 279
 						$schedules = $xcloner_scheduler->get_available_intervals();
280 280
 						
281
-						foreach($schedules as $key=>$schedule)
281
+						foreach ($schedules as $key=>$schedule)
282 282
 						{
283 283
 						?>
284 284
 							<option value="<?php echo $key?>"><?php echo $schedule['display']?></option>
@@ -290,12 +290,12 @@  discard block
 block discarded – undo
290 290
 				</div>
291 291
 			</div>	
292 292
 			
293
-			<?php if(sizeof($available_storages)):?>
293
+			<?php if (sizeof($available_storages)):?>
294 294
 			<div class="row">
295 295
 				<div class="input-field col s12 m12 l7">
296 296
 					<select name="schedule_storage" id="schedule_storage" class="validate">
297 297
 						<option value="" selected><?php echo __('none', 'xcloner-backup-and-restore') ?></option>
298
-						<?php foreach($available_storages as $storage=>$text):?>
298
+						<?php foreach ($available_storages as $storage=>$text):?>
299 299
 							<option value="<?php echo $storage?>"><?php echo $text?></option>
300 300
 						<?php endforeach?>
301 301
 						</select>
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 			<?php endif?>
306 306
 			<div class="row">
307 307
 				<div class="col s12 l7">
308
-					<button class="right btn waves-effect waves-light submit_schedule" type="submit" name="action"><?php echo __("Submit" ,'xcloner-backup-and-restore')?>
308
+					<button class="right btn waves-effect waves-light submit_schedule" type="submit" name="action"><?php echo __("Submit", 'xcloner-backup-and-restore')?>
309 309
 						<i class="material-icons right">send</i>
310 310
 					</button>
311 311
 				</div>
@@ -324,14 +324,14 @@  discard block
 block discarded – undo
324 324
 		<textarea  class="body" rows="5"></textarea>
325 325
 	</div>
326 326
 	<div class="modal-footer">
327
-		<a class=" modal-action modal-close waves-effect waves-green btn-flat  red darken-2"><?php echo __('Close','xcloner-backup-and-restore')?></a>
327
+		<a class=" modal-action modal-close waves-effect waves-green btn-flat  red darken-2"><?php echo __('Close', 'xcloner-backup-and-restore')?></a>
328 328
 	</div>
329 329
 </div>
330 330
 
331 331
 <!-- List Backup Content Modal-->
332 332
 <div id="backup_cotent_modal" class="modal">
333 333
 	<div class="modal-content">
334
-		<h4><?php echo sprintf(__("Listing Backup Content ",'xcloner-backup-and-restore'), "")?></h4>
334
+		<h4><?php echo sprintf(__("Listing Backup Content ", 'xcloner-backup-and-restore'), "")?></h4>
335 335
 		<h5 class="backup-name"></h5>
336 336
 		
337 337
 		<div class="progress">
@@ -346,9 +346,9 @@  discard block
 block discarded – undo
346 346
 	<form method="POST" class="remote-storage-form">
347 347
 	<input type="hidden" name="file" class="backup_name">	  
348 348
 	<div class="modal-content">
349
-	  <h4><?php echo __("Remote Storage Transfer",'xcloner-backup-and-restore')?></h4>
349
+	  <h4><?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore')?></h4>
350 350
 	  <p>
351
-	  <?php if(sizeof($available_storages)):?>
351
+	  <?php if (sizeof($available_storages)):?>
352 352
 			<div class="row">
353 353
 				<div class="col s12 label">
354 354
 					<label><?php echo __(sprintf('Send %s to remote storage', "<span class='backup_name'></span>"), 'xcloner-backup-and-restore') ?></label>
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 				<div class="input-field col s8 m10">
357 357
 					<select name="transfer_storage" id="transfer_storage" class="validate" required >
358 358
 						<option value="" selected><?php echo __('please select...', 'xcloner-backup-and-restore') ?></option>
359
-						<?php foreach($available_storages as $storage=>$text):?>
359
+						<?php foreach ($available_storages as $storage=>$text):?>
360 360
 							<option value="<?php echo $storage?>"><?php echo $text?></option>
361 361
 						<?php endforeach?>
362 362
 						</select>
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
 				</div>
368 368
 			</div>
369 369
 			<div class="row status">
370
-				<?php echo __("Uploading backup to the selected remote storage...",'xcloner-backup-and-restore')?> <span class="status-text"></span>
370
+				<?php echo __("Uploading backup to the selected remote storage...", 'xcloner-backup-and-restore')?> <span class="status-text"></span>
371 371
 				<div class="progress">
372 372
 					<div class="indeterminate"></div>
373 373
 				</div>
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
 		}
451 451
 	});
452 452
 	
453
-	<?php if($xcloner_settings->get_enable_mysql_backup()):?>
453
+	<?php if ($xcloner_settings->get_enable_mysql_backup()):?>
454 454
 	jQuery('#jstree_database_container').jstree({
455 455
 			'core' : {
456 456
 				'check_callback' : true,
Please login to merge, or discard this patch.
admin/partials/xcloner_restore_page.php 1 patch
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$xcloner_settings 		= $this->get_xcloner_container()->get_xcloner_settings();
4
-$logger					= $this->get_xcloner_container()->get_xcloner_logger();
5
-$xcloner_file_system 	= $this->get_xcloner_container()->get_xcloner_filesystem();
6
-$xcloner_file_transfer 	= $this->get_xcloner_container()->get_xcloner_file_transfer();
3
+$xcloner_settings = $this->get_xcloner_container()->get_xcloner_settings();
4
+$logger = $this->get_xcloner_container()->get_xcloner_logger();
5
+$xcloner_file_system = $this->get_xcloner_container()->get_xcloner_filesystem();
6
+$xcloner_file_transfer = $this->get_xcloner_container()->get_xcloner_file_transfer();
7 7
 
8
-$start = 0 ;
8
+$start = 0;
9 9
 
10 10
 $backup_list = $xcloner_file_system->get_latest_backups();
11 11
 
@@ -21,24 +21,24 @@  discard block
 block discarded – undo
21 21
 	<div class="col s12">
22 22
 		<ul class="collapsible xcloner-restore " data-collapsible="accordion">
23 23
 			<li data-step="1" class="restore-script-upload-step steps active show">
24
-				<div class="collapsible-header active"><i class="material-icons">settings_remote</i><?php echo __("Restore Script Upload",'xcloner-backup-and-restore')?></div>
24
+				<div class="collapsible-header active"><i class="material-icons">settings_remote</i><?php echo __("Restore Script Upload", 'xcloner-backup-and-restore')?></div>
25 25
 				<div class="collapsible-body row">
26 26
 						
27 27
 						<ul class="text-steps">
28
-							<li><?php echo __("If you want to do a local target system restore, leave Url field below empty and click 'Check Connection'",'xcloner-backup-and-restore')?> 
28
+							<li><?php echo __("If you want to do a local target system restore, leave Url field below empty and click 'Check Connection'", 'xcloner-backup-and-restore')?> 
29 29
 							</li>	
30
-							<li><?php echo __("If you want to do a remote target system restore, please download the restore script from",'xcloner-backup-and-restore')?> <a href='#' onclick="window.location=ajaxurl+'?action=download_restore_script&phar=true'"><strong><?php echo __("here",'xcloner-backup-and-restore')?></strong></a>
30
+							<li><?php echo __("If you want to do a remote target system restore, please download the restore script from", 'xcloner-backup-and-restore')?> <a href='#' onclick="window.location=ajaxurl+'?action=download_restore_script&phar=true'"><strong><?php echo __("here", 'xcloner-backup-and-restore')?></strong></a>
31 31
 							</li>	
32 32
 							<li>
33
-							<?php echo __("Extract the files on your new host",'xcloner-backup-and-restore')?>
33
+							<?php echo __("Extract the files on your new host", 'xcloner-backup-and-restore')?>
34 34
 							</li>
35 35
 							<li>
36
-							<?php echo __("Provide url below to the <u>xcloner_restore.php</u> restore script, like http://my_restore_site.com/xcloner_restore.php",'xcloner-backup-and-restore')?>
36
+							<?php echo __("Provide url below to the <u>xcloner_restore.php</u> restore script, like http://my_restore_site.com/xcloner_restore.php", 'xcloner-backup-and-restore')?>
37 37
 							</li>
38 38
 							<li>
39
-							<?php echo __("If your server is not web accessible, like a localhost computer, you can use a DynDNS service or install a blank copy of Wordpress with XCloner in the same environment and start the restore from there.",'xcloner-backup-and-restore')?>
39
+							<?php echo __("If your server is not web accessible, like a localhost computer, you can use a DynDNS service or install a blank copy of Wordpress with XCloner in the same environment and start the restore from there.", 'xcloner-backup-and-restore')?>
40 40
 							</li>
41
-							<?php if(is_ssl()):?>
41
+							<?php if (is_ssl()):?>
42 42
 							<li>
43 43
 								<?php echo __("We have detected your connection to the site as being secure, so your restore script address must start with https://.")?>
44 44
 							</li>
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
 						</ul>	
48 48
 						
49 49
 						<div class="input-field col l9 s12">
50
-							<input value="<?php echo (is_ssl())?"https://":""?>" id="restore_script_url" type="text" class="validate" placeholder="Url to XCloner Restore Script, example http://myddns.com/xcloner/xcloner_restore.php" >
50
+							<input value="<?php echo (is_ssl()) ? "https://" : ""?>" id="restore_script_url" type="text" class="validate" placeholder="Url to XCloner Restore Script, example http://myddns.com/xcloner/xcloner_restore.php" >
51 51
 							<label for="restore_script_url"></label>
52 52
 							<div id="url_validation_status" class="status"></div>
53 53
 				        </div>
54 54
 				        <div class="col l3 s12 right-align">
55
-							<button class="btn waves-effect waves-light" type="submit" id="validate_url" name="action"><?php echo __("Check Connection",'xcloner-backup-and-restore')?>
55
+							<button class="btn waves-effect waves-light" type="submit" id="validate_url" name="action"><?php echo __("Check Connection", 'xcloner-backup-and-restore')?>
56 56
 							    <i class="material-icons right">send</i>
57 57
 							</button>
58 58
 				        </div>
@@ -60,15 +60,15 @@  discard block
 block discarded – undo
60 60
 			</li>
61 61
 			
62 62
 			<li data-step="2" class="backup-upload-step steps">
63
-				<div class="collapsible-header active"><i class="material-icons">file_upload</i><?php echo __("Upload Local Backup Archive To Target Host",'xcloner-backup-and-restore')?>
63
+				<div class="collapsible-header active"><i class="material-icons">file_upload</i><?php echo __("Upload Local Backup Archive To Target Host", 'xcloner-backup-and-restore')?>
64 64
 				</div>
65 65
 				<div class="collapsible-body row">
66
-					<p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.",'xcloner-backup-and-restore')?></p>
66
+					<p><?php echo __("You can skip this step if you want to transfer the archive in some other way, make sure you upload it in the same directory as the restore script from the previous step.", 'xcloner-backup-and-restore')?></p>
67 67
 					<div class="input-field col s12 l7">
68 68
 						<select id="backup_file" name="backup_file" class="browser-default">
69
-					      <option value="" disabled selected><?php echo __("Please select a local backup archive to upload to target host",'xcloner-backup-and-restore')?></option>
70
-					      <?php if(is_array($backup_list)):?>
71
-							<?php foreach($backup_list as $file):?>
69
+					      <option value="" disabled selected><?php echo __("Please select a local backup archive to upload to target host", 'xcloner-backup-and-restore')?></option>
70
+					      <?php if (is_array($backup_list)):?>
71
+							<?php foreach ($backup_list as $file):?>
72 72
 								<option value="<?php echo $file['basename']?>">
73 73
 								<?php echo $file['basename']?> (<?php echo size_format($file['size'])?>)
74 74
 								</option>
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
 					</div>
85 85
 					<div class="col s12 l5 right-align">
86 86
 						<div class="toggler">
87
-							<button class="btn waves-effect waves-light upload-backup normal" type="submit" id="" name="action"><?php echo __("Upload",'xcloner-backup-and-restore')?>
87
+							<button class="btn waves-effect waves-light upload-backup normal" type="submit" id="" name="action"><?php echo __("Upload", 'xcloner-backup-and-restore')?>
88 88
 							    <i class="material-icons right">send</i>
89 89
 							</button>
90
-							<button class="btn waves-effect waves-light red upload-backup cancel" type="submit" id="" name="action"><?php echo __("Cancel",'xcloner-backup-and-restore')?>
90
+							<button class="btn waves-effect waves-light red upload-backup cancel" type="submit" id="" name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore')?>
91 91
 							    <i class="material-icons right">close</i>
92 92
 							</button>
93 93
 						</div>
94
-						<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next",'xcloner-backup-and-restore')?>" id="skip_upload_backup" name="action"><?php echo __("Next",'xcloner-backup-and-restore')?>
94
+						<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next", 'xcloner-backup-and-restore')?>" id="skip_upload_backup" name="action"><?php echo __("Next", 'xcloner-backup-and-restore')?>
95 95
 						    <i class="material-icons right">navigate_next</i>
96 96
 						</button>
97 97
 					</div>
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 			</li>	
100 100
 			
101 101
 			<li data-step="3" class="restore-remote-backup-step steps active">
102
-				<div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Restore Files Backup Available On Target Location",'xcloner-backup-and-restore')?>
102
+				<div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Restore Files Backup Available On Target Location", 'xcloner-backup-and-restore')?>
103 103
 						<i class="material-icons right" title="Refresh Target Backup Files List" id="refresh_remote_backup_file">cached</i>
104 104
 
105 105
 						<div class="switch right">
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 										data-tooltip="<?php echo __("This is the directory where you would like to restore the backup archive files.<br /> 
121 121
 										Please use this with caution when restoring to a live site.",'xcloner-backup-and-restore')?>"><i class="material-icons">help_outline</i>
122 122
 									</a>	
123
-									<h5><?php echo __("Restore Target Path:",'xcloner-backup-and-restore')?></h5>
123
+									<h5><?php echo __("Restore Target Path:", 'xcloner-backup-and-restore')?></h5>
124 124
 									<input type="text" name="remote_restore_path" id="remote_restore_path" class="validate" placeholder="Restore Target Path">
125 125
 									<label></label>
126 126
 								</div>
@@ -133,28 +133,28 @@  discard block
 block discarded – undo
133 133
 									class="list-backup-content btn-floating tooltipped btn-small right" data-tooltip="<?php echo __('Click To List The Selected Backup Content', 'xcloner-backup-and-restore') ?>">
134 134
 										<i class="material-icons">folder_open</i>
135 135
 									</a>
136
-									<h5><?php echo __("Restore Backup Archive:",'xcloner-backup-and-restore')?></h5>
136
+									<h5><?php echo __("Restore Backup Archive:", 'xcloner-backup-and-restore')?></h5>
137 137
 									<select id="remote_backup_file" name="remote_backup_file" class="browser-default">
138
-										<option value="" disabled selected><?php echo __("Please select the target backup file to restore",'xcloner-backup-and-restore')?></option>
138
+										<option value="" disabled selected><?php echo __("Please select the target backup file to restore", 'xcloner-backup-and-restore')?></option>
139 139
 								    </select>
140 140
 								    <label></label>
141 141
 							    </div>
142 142
 							
143 143
 								<div class="col s12">
144 144
 									<input class="with-gap" name="filter_files" type="radio" id="filter_files_all" checked value="" />
145
-									<label for="filter_files_all"><?php echo __("Restore All Files","xcloner-backup-and-restore")?></label>
145
+									<label for="filter_files_all"><?php echo __("Restore All Files", "xcloner-backup-and-restore")?></label>
146 146
 									
147 147
 									<input class="with-gap" name="filter_files" type="radio" id="filter_files_plugins"  value="/^wp-content\/plugins(.*)/" />
148
-									<label for="filter_files_plugins"><?php echo __("Only Plugins","xcloner-backup-and-restore")?></label>
148
+									<label for="filter_files_plugins"><?php echo __("Only Plugins", "xcloner-backup-and-restore")?></label>
149 149
 									
150 150
 									<input class="with-gap" name="filter_files" type="radio" id="filter_files_uploads"  value="/^wp-content\/uploads(.*)/" />
151
-									<label for="filter_files_uploads"><?php echo __("Only Uploads","xcloner-backup-and-restore")?></label>
151
+									<label for="filter_files_uploads"><?php echo __("Only Uploads", "xcloner-backup-and-restore")?></label>
152 152
 									
153 153
 									<input class="with-gap" name="filter_files" type="radio" id="filter_files_themes"  value="/^wp-content\/themes(.*)/" />
154
-									<label for="filter_files_themes"><?php echo __("Only Themes","xcloner-backup-and-restore")?></label>
154
+									<label for="filter_files_themes"><?php echo __("Only Themes", "xcloner-backup-and-restore")?></label>
155 155
 									
156 156
 									<input class="with-gap" name="filter_files" type="radio" id="filter_files_database"  value="/^xcloner-(.*)\/(.*)\.sql/"/>
157
-									<label for="filter_files_database"><?php echo __("Only Database Backup","xcloner-backup-and-restore")?></label>
157
+									<label for="filter_files_database"><?php echo __("Only Database Backup", "xcloner-backup-and-restore")?></label>
158 158
 								</div>
159 159
 							</div>
160 160
 							
@@ -168,14 +168,14 @@  discard block
 block discarded – undo
168 168
 				       
169 169
 				        <div class="col s12 l4 right-align">
170 170
 							<div class="toggler">
171
-								<button class="btn waves-effect waves-light restore_remote_backup normal " type="submit" id="" name="action"><?php echo __("Restore",'xcloner-backup-and-restore')?>
171
+								<button class="btn waves-effect waves-light restore_remote_backup normal " type="submit" id="" name="action"><?php echo __("Restore", 'xcloner-backup-and-restore')?>
172 172
 								    <i class="material-icons right">send</i>
173 173
 								</button>
174
-								<button class="btn waves-effect waves-light red restore_remote_backup cancel" type="submit" id="" name="action"><?php echo __("Cancel",'xcloner-backup-and-restore')?>
174
+								<button class="btn waves-effect waves-light red restore_remote_backup cancel" type="submit" id="" name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore')?>
175 175
 								    <i class="material-icons right">close</i>
176 176
 								</button>
177 177
 							</div>
178
-							<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next",'xcloner-backup-and-restore')?>" id="skip_remote_backup_step" name="action"><?php echo __("Next",'xcloner-backup-and-restore')?>
178
+							<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next", 'xcloner-backup-and-restore')?>" id="skip_remote_backup_step" name="action"><?php echo __("Next", 'xcloner-backup-and-restore')?>
179 179
 								<i class="material-icons right">navigate_next</i>
180 180
 							</button>
181 181
 				        </div>
@@ -183,66 +183,66 @@  discard block
 block discarded – undo
183 183
 			</li>
184 184
 			
185 185
 			<li data-step="4" class="restore-remote-database-step steps active">
186
-				<div class="collapsible-header"><i class="material-icons">list</i><?php echo __("Restore Target Database - Search and Replace",'xcloner-backup-and-restore')?>
186
+				<div class="collapsible-header"><i class="material-icons">list</i><?php echo __("Restore Target Database - Search and Replace", 'xcloner-backup-and-restore')?>
187 187
 					<i class="material-icons right" title="Refresh Database Backup Files List" id="refresh_database_file">cached</i>
188 188
 				</div>
189 189
 				<div class="collapsible-body row">
190 190
 						
191 191
 						<div id="remote-restore-options">
192 192
 						<div class="col s12">
193
-							<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('Please provide below the mysql connection details for the target host database.<br />For live sites we recommend using a new separate database.','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
194
-							<h5><?php echo __('Target Mysql Details','xcloner-backup-and-restore')?></h5>
193
+							<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('Please provide below the mysql connection details for the target host database.<br />For live sites we recommend using a new separate database.', 'xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
194
+							<h5><?php echo __('Target Mysql Details', 'xcloner-backup-and-restore')?></h5>
195 195
 						</div>						
196 196
 						<div class=" col s12">
197 197
 							<div class="input-field col s12 m6">
198 198
 								<input type="text" name="remote_mysql_host" id="remote_mysql_host" class="validate" placeholder="Target Mysql Hostname">
199
-								<label><?php echo __("Target Mysql Hostname",'xcloner-backup-and-restore')?></label>
199
+								<label><?php echo __("Target Mysql Hostname", 'xcloner-backup-and-restore')?></label>
200 200
 							</div>
201 201
 							
202 202
 							<div class="input-field  col s12 m6">
203 203
 								<input type="text" name="remote_mysql_db" id="remote_mysql_db" class="validate" placeholder="Target Mysql Database">
204
-								<label><?php echo __("Target Mysql Database",'xcloner-backup-and-restore')?></label>
204
+								<label><?php echo __("Target Mysql Database", 'xcloner-backup-and-restore')?></label>
205 205
 							</div>
206 206
 							
207 207
 							<div class="input-field  col s12 m6">
208 208
 								<input type="text" name="remote_mysql_user" id="remote_mysql_user" class="validate" placeholder="Target Mysql Username">
209
-								<label><?php echo __("Target Mysql Username",'xcloner-backup-and-restore')?></label>
209
+								<label><?php echo __("Target Mysql Username", 'xcloner-backup-and-restore')?></label>
210 210
 							</div>
211 211
 							
212 212
 							
213 213
 							<div class="input-field  col s12 m6">
214 214
 								<input type="text" name="remote_mysql_pass" id="remote_mysql_pass" class="validate" placeholder="Target Mysql Password">
215
-								<label><?php echo __("Target Mysql Password",'xcloner-backup-and-restore')?></label>
215
+								<label><?php echo __("Target Mysql Password", 'xcloner-backup-and-restore')?></label>
216 216
 							</div>
217 217
 							
218 218
 						</div>	
219 219
 						<div class="col s12">
220
-						<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
221
-							<h5><?php echo __('Target Mysql Search and Replace','xcloner-backup-and-restore')?></h5>
220
+						<a class="btn-floating tooltipped btn-small right" data-position="left" data-delay="50" data-html="true" data-tooltip="<?php echo __('I will attempt to replace all mysql backup records matching the provided Source Url with the provided Target Url. <br />Leave blank the Target Url if you would like to skip this option. <br />As a bonus, I will also replace all matching serialized data and fix it\'s parsing.', 'xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
221
+							<h5><?php echo __('Target Mysql Search and Replace', 'xcloner-backup-and-restore')?></h5>
222 222
 						</div>
223 223
 						<div class="col s12">  
224 224
 							<div class="input-field col s12 m6 ">
225
-									<input type="text" name="wp_home_url" id="wp_home_url" class="validate" placeholder="WP Home Url" value="<?php echo home_url();?>">
226
-									<label><?php echo __("Source Home Url",'xcloner-backup-and-restore')?></label>
225
+									<input type="text" name="wp_home_url" id="wp_home_url" class="validate" placeholder="WP Home Url" value="<?php echo home_url(); ?>">
226
+									<label><?php echo __("Source Home Url", 'xcloner-backup-and-restore')?></label>
227 227
 							</div>	
228 228
 							
229 229
 							<div class="input-field col s12 m6 ">
230 230
 									<input type="text" name="remote_restore_url" id="remote_restore_url" class="validate" placeholder="Restore Target Url">
231
-									<label><?php echo __("With Target Home Url",'xcloner-backup-and-restore')?></label>
231
+									<label><?php echo __("With Target Home Url", 'xcloner-backup-and-restore')?></label>
232 232
 							</div>
233 233
 						
234
-						<?php if( site_url() != home_url()) : ?>
234
+						<?php if (site_url() != home_url()) : ?>
235 235
 							<div class="input-field col s12 m6 ">
236
-									<input type="text" name="wp_site_url" id="wp_site_url" class="validate" placeholder="WP Site Url" value="<?php echo site_url();?>">
237
-									<label><?php echo __("Source Site Url",'xcloner-backup-and-restore')?></label>
236
+									<input type="text" name="wp_site_url" id="wp_site_url" class="validate" placeholder="WP Site Url" value="<?php echo site_url(); ?>">
237
+									<label><?php echo __("Source Site Url", 'xcloner-backup-and-restore')?></label>
238 238
 							</div>	
239 239
 							
240 240
 							<div class="input-field col s12 m6 ">
241 241
 									<input type="text" name="remote_restore_site_url" id="remote_restore_site_url" class="validate" placeholder="Restore Target Url">
242
-									<label><?php echo __("With Target Site Url",'xcloner-backup-and-restore')?></label>
242
+									<label><?php echo __("With Target Site Url", 'xcloner-backup-and-restore')?></label>
243 243
 							</div>
244 244
 						
245
-						<?php endif;?>
245
+						<?php endif; ?>
246 246
 						</div>
247 247
 						
248 248
 						</div>
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 						<div class=" col s12 l7">
251 251
 							<div class="input-field row">
252 252
 								<select id="remote_database_file" name="remote_database_file" class="browser-default">
253
-									<option value="" disabled selected><?php echo __("Please select the target database backup file to restore",'xcloner-backup-and-restore')?></option>
253
+									<option value="" disabled selected><?php echo __("Please select the target database backup file to restore", 'xcloner-backup-and-restore')?></option>
254 254
 							    </select>
255 255
 							    
256 256
 							    <label></label>
@@ -269,15 +269,15 @@  discard block
 block discarded – undo
269 269
 				      
270 270
 				        <div class="col s12 l5 right-align">
271 271
 							<div class="toggler">
272
-								<button class="btn waves-effect waves-light restore_remote_mysqldump normal " type="submit" id="" name="action"><?php echo __("Restore",'xcloner-backup-and-restore')?>
272
+								<button class="btn waves-effect waves-light restore_remote_mysqldump normal " type="submit" id="" name="action"><?php echo __("Restore", 'xcloner-backup-and-restore')?>
273 273
 								    <i class="material-icons right">send</i>
274 274
 								</button>
275
-								<button class="btn waves-effect waves-light red restore_remote_mysqldump cancel" type="submit" id="" name="action"><?php echo __("Cancel",'xcloner-backup-and-restore')?>
275
+								<button class="btn waves-effect waves-light red restore_remote_mysqldump cancel" type="submit" id="" name="action"><?php echo __("Cancel", 'xcloner-backup-and-restore')?>
276 276
 								    <i class="material-icons right">close</i>
277 277
 								</button>
278 278
 							</div>
279 279
 							
280
-							<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next",'xcloner-backup-and-restore')?>" id="skip_restore_remote_database_step" name="action"><?php echo __("Next",'xcloner-backup-and-restore')?>
280
+							<button class="btn waves-effect waves-light grey" type="submit" title="<?php echo __("Skip Next", 'xcloner-backup-and-restore')?>" id="skip_restore_remote_database_step" name="action"><?php echo __("Next", 'xcloner-backup-and-restore')?>
281 281
 								<i class="material-icons right">navigate_next</i>
282 282
 							</button>
283 283
 							
@@ -287,13 +287,13 @@  discard block
 block discarded – undo
287 287
 			</li>
288 288
 			
289 289
 			<li data-step="5" class="restore-finish-step steps active">
290
-				<div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Finishing up...",'xcloner-backup-and-restore')?>
290
+				<div class="collapsible-header"><i class="material-icons">folder_open</i><?php echo __("Finishing up...", 'xcloner-backup-and-restore')?>
291 291
 				</div>
292 292
 				<div class="collapsible-body row">
293 293
 						
294 294
 						<div class="row">
295 295
 							<div class="col s4">
296
-								<label><?php echo __("Update wp-config.php mysql details and update the Target Site Url",'xcloner-backup-and-restore')?></label>
296
+								<label><?php echo __("Update wp-config.php mysql details and update the Target Site Url", 'xcloner-backup-and-restore')?></label>
297 297
 							</div>
298 298
 							
299 299
 							<div class="col s8">
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 						
311 311
 						<div class="row">
312 312
 							<div class="col s4">
313
-								<label><?php echo __("Delete Restored Backup Temporary Folder",'xcloner-backup-and-restore')?></label>
313
+								<label><?php echo __("Delete Restored Backup Temporary Folder", 'xcloner-backup-and-restore')?></label>
314 314
 							</div>
315 315
 							<div class="col s8">
316 316
 								<div class="switch">
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 						
327 327
 						<div class="row">
328 328
 							<div class="col s4">
329
-								<label><?php echo __("Delete Restore Script",'xcloner-backup-and-restore')?></label>
329
+								<label><?php echo __("Delete Restore Script", 'xcloner-backup-and-restore')?></label>
330 330
 							</div>
331 331
 							<div class="col s8">
332 332
 								<div class="switch">
@@ -345,8 +345,8 @@  discard block
 block discarded – undo
345 345
 				        </div>
346 346
 				        
347 347
 						<div class=" row col s12 center-align" id="xcloner_restore_finish">
348
-							<h5><?php echo __("Thank you for using XCloner.",'xcloner-backup-and-restore')?></h5>
349
-							<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'),'<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank">Wordpress XCloner forums</a>') ?></h6>
348
+							<h5><?php echo __("Thank you for using XCloner.", 'xcloner-backup-and-restore')?></h5>
349
+							<h6><?php echo sprintf(__("We would love to hear about your experience in the %s.", 'xcloner-backup-and-restore'), '<a href="https://wordpress.org/support/plugin/xcloner-backup-and-restore" target="_blank">Wordpress XCloner forums</a>') ?></h6>
350 350
 							<a class="twitter-follow-button" href="https://twitter.com/thinkovi" data-show-count="false">Follow @thinkovi</a>
351 351
 							<script src="//platform.twitter.com/widgets.js" async="" charset="utf-8"></script>
352 352
 				        </div>
@@ -354,13 +354,13 @@  discard block
 block discarded – undo
354 354
 				        <div class="col s12 center-align">
355 355
 							<div class="row">
356 356
 								<div class="col s6 right-align">
357
-								<button class="btn waves-effect waves-light teal" type="submit" id="restore_finish" name="action"><?php echo __("Finish",'xcloner-backup-and-restore')?>
357
+								<button class="btn waves-effect waves-light teal" type="submit" id="restore_finish" name="action"><?php echo __("Finish", 'xcloner-backup-and-restore')?>
358 358
 									<i class="material-icons right">navigate_next</i>
359 359
 								</button>
360 360
 								</div>
361 361
 									
362 362
 								<div id="open_target_site" class="col s6 left-align">
363
-									<a disabled="disabled" href="#" class="btn waves-effect waves-light teal" type="button" target="_blank"><?php echo __("Open Target Site",'xcloner-backup-and-restore')?>
363
+									<a disabled="disabled" href="#" class="btn waves-effect waves-light teal" type="button" target="_blank"><?php echo __("Open Target Site", 'xcloner-backup-and-restore')?>
364 364
 										<i class="material-icons right">navigate_next</i>
365 365
 									</a>
366 366
 								</div>
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 <!-- List Backup Content Modal-->
379 379
 <div id="backup_cotent_modal" class="modal">
380 380
 	<div class="modal-content">
381
-		<h4><?php echo sprintf(__("Listing Backup Content ",'xcloner-backup-and-restore'), "")?></h4>
381
+		<h4><?php echo sprintf(__("Listing Backup Content ", 'xcloner-backup-and-restore'), "")?></h4>
382 382
 		<h5 class="backup-name"></h5>
383 383
 		
384 384
 		<div class="progress">
Please login to merge, or discard this patch.
admin/partials/xcloner_scheduled_backups_page.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 $xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
5 5
 $available_storages = $xcloner_remote_storage->get_available_storages();
6 6
 ?>
7
-<?php if(!defined("DISABLE_WP_CRON") || !DISABLE_WP_CRON): ?>
7
+<?php if (!defined("DISABLE_WP_CRON") || !DISABLE_WP_CRON): ?>
8 8
 	<div id="setting-error-" class="error settings-error notice is-dismissible"> 
9 9
 		<p><strong>
10 10
 			<?php echo sprintf(__('We have noticed that DISABLE_WP_CRON is disabled, we recommend enabling that and setting up wp-cron.php to run manually through your hosting account scheduler as explained <a href="%s" target="_blank">here</a>', 'xcloner-backup-and-restore'), "http://www.inmotionhosting.com/support/website/wordpress/disabling-the-wp-cronphp-in-wordpress") ?>
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 <div class="row">
50 50
 	<div class="col s12 m6 offset-m6 teal lighten-1" id="server_time">
51
-		<h2><?php echo __('Current Server Time', 'xcloner-backup-and-restore')?>: <span class="right"><?php echo current_time('mysql');?></span></h2>
51
+		<h2><?php echo __('Current Server Time', 'xcloner-backup-and-restore')?>: <span class="right"><?php echo current_time('mysql'); ?></span></h2>
52 52
 	</div>
53 53
 </div>
54 54
 
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
 					</div>
95 95
 					<!--<div class="input-field inline col s12 l6">
96 96
 						<select id="backup_type" class="" name="backup_type" id="backup_type">
97
-							<option value=""><?php echo __("Full Backup","xcloner-backup-and-restore");?></option>
98
-							<option value="diff"><?php echo __("Differential Backups","xcloner-backup-and-restore");?></option>
99
-							<option value="full_diff"><?php echo __("Full Backup + Differential Backups","xcloner-backup-and-restore");?></option>
97
+							<option value=""><?php echo __("Full Backup", "xcloner-backup-and-restore"); ?></option>
98
+							<option value="diff"><?php echo __("Differential Backups", "xcloner-backup-and-restore"); ?></option>
99
+							<option value="full_diff"><?php echo __("Full Backup + Differential Backups", "xcloner-backup-and-restore"); ?></option>
100 100
 						</select>
101
-						<label for="backup_type"><?php echo __('Scheduled Backup Type','xcloner-backup-and-restore')?></label>
101
+						<label for="backup_type"><?php echo __('Scheduled Backup Type', 'xcloner-backup-and-restore')?></label>
102 102
 					</div>-->
103 103
 				</div>
104 104
 				
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 							<?php
115 115
 							$schedules = $xcloner_scheduler->get_available_intervals();
116 116
 							
117
-							foreach($schedules as $key=>$schedule)
117
+							foreach ($schedules as $key=>$schedule)
118 118
 							{
119 119
 							?>
120 120
 								<option value="<?php echo $key?>"><?php echo $schedule['display']?></option>
@@ -125,12 +125,12 @@  discard block
 block discarded – undo
125 125
 					</div>
126 126
 				</div>
127 127
 				
128
-				<?php if(sizeof($available_storages)):?>
128
+				<?php if (sizeof($available_storages)):?>
129 129
 				<div class="row">
130 130
 					<div class="input-field col s12 l12">
131 131
 						<select name="schedule_storage" id="schedule_storage" class="validate" >
132 132
 							<option value="" selected><?php echo __('none', 'xcloner-backup-and-restore') ?></option>
133
-							<?php foreach($available_storages as $storage=>$text):?>
133
+							<?php foreach ($available_storages as $storage=>$text):?>
134 134
 								<option value="<?php echo $storage?>"><?php echo $text?></option>
135 135
 							<?php endforeach?>
136 136
 						</select>
Please login to merge, or discard this patch.