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 ( 476136...1f2497 )
by Liuta
02:37
created
admin/partials/xcloner_console_page.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,10 @@
 block discarded – undo
33 33
 			<li class="active">
34 34
 				<div class="collapsible-header active"><i class="material-icons">bug_report</i>XCloner Debugger</div>
35 35
 				<div class="collapsible-body">
36
-					<div class="console" id="xcloner-console"><?php if(isset($logger_content)) echo implode("<br />\n", $logger_content); ?></div>
36
+					<div class="console" id="xcloner-console"><?php if(isset($logger_content)) {
37
+	echo implode("<br />\n", $logger_content);
38
+}
39
+?></div>
37 40
 				</div>
38 41
 			</li>
39 42
 		</ul>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  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
-$logger_content 	= $logger->getLastDebugLines();
3
+$xcloner_settings = $this->get_xcloner_container()->get_xcloner_settings();
4
+$logger = $this->get_xcloner_container()->get_xcloner_logger();
5
+$logger_content = $logger->getLastDebugLines();
6 6
 ?>
7 7
 <div class="col s12 ">
8 8
 	<div>
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
 				<?php echo __('XCloner Debugger Dashboard', 'xcloner-backup-and-restore') ?>
11 11
 		</h5>
12 12
 		
13
-		<?php if($xcloner_settings->get_xcloner_option('xcloner_enable_log')) :?>
13
+		<?php if ($xcloner_settings->get_xcloner_option('xcloner_enable_log')) :?>
14 14
 		<ul class="collapsible xcloner-debugger" data-collapsible="accordion">
15 15
 			<li class="active">
16 16
 				<div class="collapsible-header active"><i class="material-icons">bug_report</i>XCloner Debugger</div>
17 17
 				<div class="collapsible-body">
18
-					<div class="console" id="xcloner-console"><?php if(isset($logger_content)) echo implode("<br />\n", $logger_content); ?></div>
18
+					<div class="console" id="xcloner-console"><?php if (isset($logger_content)) echo implode("<br />\n", $logger_content); ?></div>
19 19
 				</div>
20 20
 			</li>
21 21
 		</ul>
@@ -28,6 +28,6 @@  discard block
 block discarded – undo
28 28
 				}, 2000);*/
29 29
 			})
30 30
 		</script>
31
-		<?php endif;?>
31
+		<?php endif; ?>
32 32
 	</div>
33 33
 </div>
Please login to merge, or discard this patch.
admin/class-xcloner-admin.php 4 patches
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,8 +61,9 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function enqueue_styles($hook) {
63 63
 		
64
-		if(!stristr($hook, "page_".$this->plugin_name) || (isset($_GET['option']) and $_GET['option']=="com_cloner"))
65
-			return;
64
+		if(!stristr($hook, "page_".$this->plugin_name) || (isset($_GET['option']) and $_GET['option']=="com_cloner")) {
65
+					return;
66
+		}
66 67
 
67 68
 		/**
68 69
 		 * This function is provided for demonstration purposes only.
@@ -93,8 +94,9 @@  discard block
 block discarded – undo
93 94
 	 */
94 95
 	public function enqueue_scripts($hook) {
95 96
 
96
-		if(!stristr($hook, "page_".$this->plugin_name))
97
-			return;
97
+		if(!stristr($hook, "page_".$this->plugin_name)) {
98
+					return;
99
+		}
98 100
 			
99 101
 		/**
100 102
 		 * This function is provided for demonstration purposes only.
@@ -234,15 +236,15 @@  discard block
 block discarded – undo
234 236
 					settings_fields('xcloner_general_settings_group');
235 237
 					do_settings_sections('xcloner_settings_page');
236 238
 					
237
-				}elseif( $active_tab == 'mysql_options' ) {
239
+				} elseif( $active_tab == 'mysql_options' ) {
238 240
 					
239 241
 					settings_fields('xcloner_mysql_settings_group');
240 242
 					do_settings_sections('xcloner_mysql_settings_page');
241
-				}elseif( $active_tab == 'system_options' ) {
243
+				} elseif( $active_tab == 'system_options' ) {
242 244
 					
243 245
 					settings_fields('xcloner_system_settings_group');
244 246
 					do_settings_sections('xcloner_system_settings_page');
245
-				}elseif( $active_tab == 'cleanup_options' ) {
247
+				} elseif( $active_tab == 'cleanup_options' ) {
246 248
 					
247 249
 					settings_fields('xcloner_cleanup_settings_group');
248 250
 					do_settings_sections('xcloner_cleanup_settings_page');
Please login to merge, or discard this patch.
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,6 @@
 block discarded – undo
45 45
 	 * Initialize the class and set its properties.
46 46
 	 *
47 47
 	 * @since    1.0.0
48
-	 * @param      string    $plugin_name       The name of this plugin.
49
-	 * @param      string    $version    The version of this plugin.
50 48
 	 */
51 49
 	public function __construct( Xcloner $xcloner_container) {
52 50
 
Please login to merge, or discard this patch.
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -221,28 +221,28 @@  discard block
 block discarded – undo
221 221
 		
222 222
 		// add error/update messages
223 223
  
224
-	    // check if the user have submitted the settings
225
-	    // wordpress will add the "settings-updated" $_GET parameter to the url
226
-	    if (isset($_GET['settings-updated'])) {
227
-	        // add settings saved message with the class of "updated"
228
-	        add_settings_error('wporg_messages', 'wporg_message', __('Settings Saved', 'wporg'), 'updated');
229
-	    }
224
+		// check if the user have submitted the settings
225
+		// wordpress will add the "settings-updated" $_GET parameter to the url
226
+		if (isset($_GET['settings-updated'])) {
227
+			// add settings saved message with the class of "updated"
228
+			add_settings_error('wporg_messages', 'wporg_message', __('Settings Saved', 'wporg'), 'updated');
229
+		}
230 230
 	 
231
-	    // show error/update messages
232
-	    settings_errors('wporg_messages');
233
-	    ?>
231
+		// show error/update messages
232
+		settings_errors('wporg_messages');
233
+		?>
234 234
 	   
235 235
 	    <?php
236 236
 			$xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
237 237
 			
238
-            if( isset( $_GET[ 'tab' ] ) ) {
239
-                $active_tab = $xcloner_sanitization->sanitize_input_as_string($_GET[ 'tab' ]);
240
-            } // end if
241
-            else{
238
+			if( isset( $_GET[ 'tab' ] ) ) {
239
+				$active_tab = $xcloner_sanitization->sanitize_input_as_string($_GET[ 'tab' ]);
240
+			} // end if
241
+			else{
242 242
 				$active_tab = "general_options";
243 243
 			}
244 244
             
245
-        ?>
245
+		?>
246 246
         <h1><?= esc_html(get_admin_page_title()); ?></h1>
247 247
          
248 248
         <ul class="nav-tab-wrapper row">
@@ -276,9 +276,9 @@  discard block
 block discarded – undo
276 276
 					do_settings_sections('xcloner_cleanup_settings_page');
277 277
 				}
278 278
 
279
-	            // output save settings button
280
-	            submit_button('Save Settings');
281
-	            ?>
279
+				// output save settings button
280
+				submit_button('Save Settings');
281
+				?>
282 282
 	        </form>
283 283
 
284 284
 	    </div>
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
 	 * @param      string    $plugin_name       The name of this plugin.
49 49
 	 * @param      string    $version    The version of this plugin.
50 50
 	 */
51
-	public function __construct( Xcloner $xcloner_container) {
51
+	public function __construct(Xcloner $xcloner_container) {
52 52
 
53
-		$this->plugin_name 			= $xcloner_container->get_plugin_name();
54
-		$this->version				= $xcloner_container->get_version();
55
-		$this->xcloner_container 	= $xcloner_container;
53
+		$this->plugin_name = $xcloner_container->get_plugin_name();
54
+		$this->version = $xcloner_container->get_version();
55
+		$this->xcloner_container = $xcloner_container;
56 56
 	}
57 57
 	
58 58
 	public function get_xcloner_container()
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	 */
68 68
 	public function enqueue_styles($hook) {
69 69
 		
70
-		if(!stristr($hook, "page_".$this->plugin_name) || (isset($_GET['option']) and $_GET['option']=="com_cloner"))
70
+		if (!stristr($hook, "page_".$this->plugin_name) || (isset($_GET['option']) and $_GET['option'] == "com_cloner"))
71 71
 			return;
72 72
 
73 73
 		/**
@@ -82,13 +82,13 @@  discard block
 block discarded – undo
82 82
 		 * class.
83 83
 		 */
84 84
 
85
-		wp_enqueue_style( $this->plugin_name."_materialize", plugin_dir_url( __FILE__ ) . 'css/materialize.min.css', array(), $this->version, 'all' );
86
-		wp_enqueue_style( $this->plugin_name."_materialize.clockpicker", plugin_dir_url( __FILE__ ) . 'css/materialize.clockpicker.css', array(), $this->version, 'all' );
87
-		wp_enqueue_style( $this->plugin_name."_materialize.icons", '//fonts.googleapis.com/icon?family=Material+Icons', array(), $this->version, 'all' );
88
-		wp_enqueue_style( $this->plugin_name."_jquery.datatables", plugin_dir_url( __FILE__ ) . 'css/jquery.dataTables.min.css', array(), $this->version, 'all' );
89
-		wp_enqueue_style( $this->plugin_name."_jquery.datatables.responsive", plugin_dir_url( __FILE__ ) . 'css/responsive.dataTables.css', array(), $this->version, 'all' );
90
-		wp_enqueue_style( $this->plugin_name."_jstree", dirname(plugin_dir_url( __FILE__ )) . '/vendor/vakata/jstree/dist/themes/default/style.min.css', array(), '3.3', 'all' );
91
-		wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/xcloner-admin.css', array(), $this->version, 'all' );
85
+		wp_enqueue_style($this->plugin_name."_materialize", plugin_dir_url(__FILE__).'css/materialize.min.css', array(), $this->version, 'all');
86
+		wp_enqueue_style($this->plugin_name."_materialize.clockpicker", plugin_dir_url(__FILE__).'css/materialize.clockpicker.css', array(), $this->version, 'all');
87
+		wp_enqueue_style($this->plugin_name."_materialize.icons", '//fonts.googleapis.com/icon?family=Material+Icons', array(), $this->version, 'all');
88
+		wp_enqueue_style($this->plugin_name."_jquery.datatables", plugin_dir_url(__FILE__).'css/jquery.dataTables.min.css', array(), $this->version, 'all');
89
+		wp_enqueue_style($this->plugin_name."_jquery.datatables.responsive", plugin_dir_url(__FILE__).'css/responsive.dataTables.css', array(), $this->version, 'all');
90
+		wp_enqueue_style($this->plugin_name."_jstree", dirname(plugin_dir_url(__FILE__)).'/vendor/vakata/jstree/dist/themes/default/style.min.css', array(), '3.3', 'all');
91
+		wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__).'css/xcloner-admin.css', array(), $this->version, 'all');
92 92
 
93 93
 	}
94 94
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function enqueue_scripts($hook) {
101 101
 
102
-		if(!stristr($hook, "page_".$this->plugin_name))
102
+		if (!stristr($hook, "page_".$this->plugin_name))
103 103
 			return;
104 104
 			
105 105
 		/**
@@ -117,17 +117,17 @@  discard block
 block discarded – undo
117 117
 		add_thickbox();
118 118
 		wp_enqueue_script('plugin-install');
119 119
 		wp_enqueue_script('updates');
120
-		wp_enqueue_script( $this->plugin_name."_materialize", plugin_dir_url( __FILE__ ) . 'js/materialize.min.js', array( 'jquery' ), $this->version, false );
121
-		wp_enqueue_script( $this->plugin_name."_materialize.clockpicker", plugin_dir_url( __FILE__ ) . 'js/materialize.clockpicker.js', array( 'jquery' ), $this->version, false );
122
-		wp_enqueue_script( $this->plugin_name."_jquery.datatables", plugin_dir_url( __FILE__ ) . 'js/jquery.dataTables.min.js', array( 'jquery' ), $this->version, false );
123
-		wp_enqueue_script( $this->plugin_name."_jquery.datatables.respnsive", plugin_dir_url( __FILE__ ) . 'js/dataTables.responsive.js', array( 'jquery' ), $this->version, false );
124
-		wp_enqueue_script( $this->plugin_name."_vakata", dirname(plugin_dir_url( __FILE__ )) . '/vendor/vakata/jstree/dist/jstree.min.js', array( 'jquery' ), '3.3', false );
125
-		wp_enqueue_script( $this->plugin_name."_xcloner-backup-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-backup-class.js', array( 'jquery' ), $this->version, false );
126
-		wp_enqueue_script( $this->plugin_name."_xcloner-scheduler-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-scheduler-class.js', array( 'jquery' ), $this->version, false );
127
-		wp_enqueue_script( $this->plugin_name."_xcloner-restore-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-restore-class.js', array( 'jquery' ), $this->version, false );
128
-		wp_enqueue_script( $this->plugin_name."_xcloner-manage-backups-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-manage-backups-class.js', array( 'jquery' ), $this->version, false );
129
-		wp_enqueue_script( $this->plugin_name."_xcloner-remote-storage-class", plugin_dir_url( __FILE__ ) . 'js/xcloner-remote-storage-class.js', array( 'jquery' ), $this->version, false );
130
-		wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/xcloner-admin.js', array( 'jquery' ), $this->version, false );
120
+		wp_enqueue_script($this->plugin_name."_materialize", plugin_dir_url(__FILE__).'js/materialize.min.js', array('jquery'), $this->version, false);
121
+		wp_enqueue_script($this->plugin_name."_materialize.clockpicker", plugin_dir_url(__FILE__).'js/materialize.clockpicker.js', array('jquery'), $this->version, false);
122
+		wp_enqueue_script($this->plugin_name."_jquery.datatables", plugin_dir_url(__FILE__).'js/jquery.dataTables.min.js', array('jquery'), $this->version, false);
123
+		wp_enqueue_script($this->plugin_name."_jquery.datatables.respnsive", plugin_dir_url(__FILE__).'js/dataTables.responsive.js', array('jquery'), $this->version, false);
124
+		wp_enqueue_script($this->plugin_name."_vakata", dirname(plugin_dir_url(__FILE__)).'/vendor/vakata/jstree/dist/jstree.min.js', array('jquery'), '3.3', false);
125
+		wp_enqueue_script($this->plugin_name."_xcloner-backup-class", plugin_dir_url(__FILE__).'js/xcloner-backup-class.js', array('jquery'), $this->version, false);
126
+		wp_enqueue_script($this->plugin_name."_xcloner-scheduler-class", plugin_dir_url(__FILE__).'js/xcloner-scheduler-class.js', array('jquery'), $this->version, false);
127
+		wp_enqueue_script($this->plugin_name."_xcloner-restore-class", plugin_dir_url(__FILE__).'js/xcloner-restore-class.js', array('jquery'), $this->version, false);
128
+		wp_enqueue_script($this->plugin_name."_xcloner-manage-backups-class", plugin_dir_url(__FILE__).'js/xcloner-manage-backups-class.js', array('jquery'), $this->version, false);
129
+		wp_enqueue_script($this->plugin_name."_xcloner-remote-storage-class", plugin_dir_url(__FILE__).'js/xcloner-remote-storage-class.js', array('jquery'), $this->version, false);
130
+		wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__).'js/xcloner-admin.js', array('jquery'), $this->version, false);
131 131
 		
132 132
 
133 133
 	}
@@ -145,19 +145,19 @@  discard block
 block discarded – undo
145 145
 		
146 146
 		$_POST['action'] = $xcloner_sanitization->sanitize_input_as_string($_POST['action']);
147 147
 		
148
-		if(isset($_POST['action']))
148
+		if (isset($_POST['action']))
149 149
 		{
150 150
 			$remote_storage->save($_POST['action']);
151 151
 		}
152 152
 		
153
-		if(isset($_POST['authentification_code']) && $_POST['authentification_code'] != "")
153
+		if (isset($_POST['authentification_code']) && $_POST['authentification_code'] != "")
154 154
 		{
155 155
 			$_POST['authentification_code'] = $xcloner_sanitization->sanitize_input_as_string($_POST['authentification_code']);
156 156
 			
157 157
 			$remote_storage->set_access_token($_POST['authentification_code']);
158 158
 		}
159 159
 			
160
-		if(isset($_POST['connection_check']) && $_POST['connection_check'])
160
+		if (isset($_POST['connection_check']) && $_POST['connection_check'])
161 161
 		{
162 162
 			$remote_storage->check($_POST['action']);
163 163
 		}
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	{
171 171
 		$requirements = $this->xcloner_container->get_xcloner_requirements();
172 172
 		
173
-		if(!$requirements->check_backup_ready_status())
173
+		if (!$requirements->check_backup_ready_status())
174 174
 		{
175 175
 			require_once("partials/xcloner_init_page.php");
176 176
 			return false;
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	{
203 203
 		$requirements = $this->xcloner_container->get_xcloner_requirements();
204 204
 		
205
-		if(!$requirements->check_backup_ready_status())
205
+		if (!$requirements->check_backup_ready_status())
206 206
 		{
207 207
 			require_once("partials/xcloner_init_page.php");
208 208
 			return false;
@@ -235,10 +235,10 @@  discard block
 block discarded – undo
235 235
 	    <?php
236 236
 			$xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
237 237
 			
238
-            if( isset( $_GET[ 'tab' ] ) ) {
239
-                $active_tab = $xcloner_sanitization->sanitize_input_as_string($_GET[ 'tab' ]);
238
+            if (isset($_GET['tab'])) {
239
+                $active_tab = $xcloner_sanitization->sanitize_input_as_string($_GET['tab']);
240 240
             } // end if
241
-            else{
241
+            else {
242 242
 				$active_tab = "general_options";
243 243
 			}
244 244
             
@@ -257,20 +257,20 @@  discard block
 block discarded – undo
257 257
 	        <form action="options.php" method="post">
258 258
 	            <?php
259 259
 				
260
-				if( $active_tab == 'general_options' ) {
260
+				if ($active_tab == 'general_options') {
261 261
 					
262 262
 					settings_fields('xcloner_general_settings_group');
263 263
 					do_settings_sections('xcloner_settings_page');
264 264
 					
265
-				}elseif( $active_tab == 'mysql_options' ) {
265
+				}elseif ($active_tab == 'mysql_options') {
266 266
 					
267 267
 					settings_fields('xcloner_mysql_settings_group');
268 268
 					do_settings_sections('xcloner_mysql_settings_page');
269
-				}elseif( $active_tab == 'system_options' ) {
269
+				}elseif ($active_tab == 'system_options') {
270 270
 					
271 271
 					settings_fields('xcloner_system_settings_group');
272 272
 					do_settings_sections('xcloner_system_settings_page');
273
-				}elseif( $active_tab == 'cleanup_options' ) {
273
+				}elseif ($active_tab == 'cleanup_options') {
274 274
 					
275 275
 					settings_fields('xcloner_cleanup_settings_group');
276 276
 					do_settings_sections('xcloner_cleanup_settings_page');
Please login to merge, or discard this patch.
includes/class-xcloner-settings.php 4 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -175,6 +175,9 @@
 block discarded – undo
175 175
 		return $wpdb->prefix;
176 176
 	}
177 177
 	
178
+	/**
179
+	 * @param string $option
180
+	 */
178 181
 	public function get_xcloner_option($option)
179 182
 	{
180 183
 		$data = get_option($option);
Please login to merge, or discard this patch.
Indentation   +250 added lines, -250 removed lines patch added patch discarded remove patch
@@ -202,348 +202,348 @@  discard block
 block discarded – undo
202 202
 	
203 203
 	public function settings_init()
204 204
 	{
205
-	    global $wpdb;
206
-	    $this->xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
205
+		global $wpdb;
206
+		$this->xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
207 207
 	    
208
-	    //ADDING MISSING OPTIONS
209
-	    if( false == get_option( 'xcloner_mysql_settings_page' ) ) {  
208
+		//ADDING MISSING OPTIONS
209
+		if( false == get_option( 'xcloner_mysql_settings_page' ) ) {  
210 210
 			add_option( 'xcloner_mysql_settings_page' );
211 211
 		} // end if
212 212
 		
213
-	    if( false == get_option( 'xcloner_cron_settings_page' ) ) {  
213
+		if( false == get_option( 'xcloner_cron_settings_page' ) ) {  
214 214
 			add_option( 'xcloner_cron_settings_page' );
215 215
 		} // end if
216 216
 	    
217
-	    if( false == get_option( 'xcloner_system_settings_page' ) ) {  
217
+		if( false == get_option( 'xcloner_system_settings_page' ) ) {  
218 218
 			add_option( 'xcloner_system_settings_page' );
219 219
 		} // end if
220 220
 		
221
-	    if( false == get_option( 'xcloner_cleanup_settings_page' ) ) {  
221
+		if( false == get_option( 'xcloner_cleanup_settings_page' ) ) {  
222 222
 			add_option( 'xcloner_cleanup_settings_page' );
223 223
 		} // end if
224 224
 	 
225 225
 	    
226
-	    //ADDING SETTING SECTIONS
227
-	    //GENERAL section
228
-	    add_settings_section(
229
-	        'xcloner_general_settings_group',
230
-	        __(' '),
231
-	        array($this, 'xcloner_settings_section_cb'),
232
-	        'xcloner_settings_page'
233
-	    );
234
-	    //MYSQL section
235
-	    add_settings_section(
236
-	        'xcloner_mysql_settings_group',
237
-	        __(' '),
238
-	        array($this, 'xcloner_settings_section_cb'),
239
-	        'xcloner_mysql_settings_page'
240
-	    );
226
+		//ADDING SETTING SECTIONS
227
+		//GENERAL section
228
+		add_settings_section(
229
+			'xcloner_general_settings_group',
230
+			__(' '),
231
+			array($this, 'xcloner_settings_section_cb'),
232
+			'xcloner_settings_page'
233
+		);
234
+		//MYSQL section
235
+		add_settings_section(
236
+			'xcloner_mysql_settings_group',
237
+			__(' '),
238
+			array($this, 'xcloner_settings_section_cb'),
239
+			'xcloner_mysql_settings_page'
240
+		);
241 241
 	    
242
-	    //SYSTEM section
243
-	    add_settings_section(
244
-	        'xcloner_system_settings_group',
245
-	        __('These are advanced options recommended for developers!','xcloner-backup-and-restore'),
246
-	        array($this, 'xcloner_settings_section_cb'),
247
-	        'xcloner_system_settings_page'
248
-	    );
242
+		//SYSTEM section
243
+		add_settings_section(
244
+			'xcloner_system_settings_group',
245
+			__('These are advanced options recommended for developers!','xcloner-backup-and-restore'),
246
+			array($this, 'xcloner_settings_section_cb'),
247
+			'xcloner_system_settings_page'
248
+		);
249 249
 	    
250
-	    //CLEANUP section
251
-	    add_settings_section(
252
-	        'xcloner_cleanup_settings_group',
253
-	        __(' '),
254
-	        array($this, 'xcloner_settings_section_cb'),
255
-	        'xcloner_cleanup_settings_page'
256
-	    );
250
+		//CLEANUP section
251
+		add_settings_section(
252
+			'xcloner_cleanup_settings_group',
253
+			__(' '),
254
+			array($this, 'xcloner_settings_section_cb'),
255
+			'xcloner_cleanup_settings_page'
256
+		);
257 257
 	    
258 258
 		
259 259
 		//CRON section
260
-	    add_settings_section(
261
-	        'xcloner_cron_settings_group',
262
-	        __(' '),
263
-	        array($this, 'xcloner_settings_section_cb'),
264
-	        'xcloner_cron_settings_page'
265
-	    );
260
+		add_settings_section(
261
+			'xcloner_cron_settings_group',
262
+			__(' '),
263
+			array($this, 'xcloner_settings_section_cb'),
264
+			'xcloner_cron_settings_page'
265
+		);
266 266
 	    
267 267
 	    
268 268
 	    
269 269
 		//REGISTERING THE 'GENERAL SECTION' FIELDS
270 270
 		register_setting('xcloner_general_settings_group', 'xcloner_backup_compression_level', array($this->xcloner_sanitization, "sanitize_input_as_int"));
271
-	    add_settings_field(
272
-	        'xcloner_backup_compression_level',
273
-	       __('Backup Compression Level','xcloner-backup-and-restore'),
274
-	        array($this, 'do_form_range_field'),
275
-	        'xcloner_settings_page',
276
-	        'xcloner_general_settings_group',
277
-	        array('xcloner_backup_compression_level',
278
-	         __('Options between [0-9]. Value 0 means no compression, while 9 is maximum compression affecting cpu load','xcloner-backup-and-restore'), 
279
-	         0,
280
-	         9
281
-	         )
282
-	    );
271
+		add_settings_field(
272
+			'xcloner_backup_compression_level',
273
+		   __('Backup Compression Level','xcloner-backup-and-restore'),
274
+			array($this, 'do_form_range_field'),
275
+			'xcloner_settings_page',
276
+			'xcloner_general_settings_group',
277
+			array('xcloner_backup_compression_level',
278
+			 __('Options between [0-9]. Value 0 means no compression, while 9 is maximum compression affecting cpu load','xcloner-backup-and-restore'), 
279
+			 0,
280
+			 9
281
+			 )
282
+		);
283 283
 	    
284
-	    register_setting('xcloner_general_settings_group', 'xcloner_start_path', array($this->xcloner_sanitization, "sanitize_input_as_absolute_path"));
285
-	    add_settings_field(
286
-	        'xcloner_start_path',
287
-	        __('Backup Start Location','xcloner-backup-and-restore'),
288
-	        array($this, 'do_form_text_field'),
289
-	        'xcloner_settings_page',
290
-	        'xcloner_general_settings_group',
291
-	        array('xcloner_start_path',
284
+		register_setting('xcloner_general_settings_group', 'xcloner_start_path', array($this->xcloner_sanitization, "sanitize_input_as_absolute_path"));
285
+		add_settings_field(
286
+			'xcloner_start_path',
287
+			__('Backup Start Location','xcloner-backup-and-restore'),
288
+			array($this, 'do_form_text_field'),
289
+			'xcloner_settings_page',
290
+			'xcloner_general_settings_group',
291
+			array('xcloner_start_path',
292 292
 				__('Base path location from where XCloner can start the Backup.','xcloner-backup-and-restore'),
293 293
 				$this->get_xcloner_start_path(),
294 294
 				//'disabled'
295 295
 				)
296
-	    );
296
+		);
297 297
 	    
298
-	    register_setting('xcloner_general_settings_group', 'xcloner_store_path', array($this->xcloner_sanitization, "sanitize_input_as_absolute_path"));
299
-	    add_settings_field(
300
-	        'xcloner_store_path',
301
-	        __('Backup Storage Location','xcloner-backup-and-restore'),
302
-	        array($this, 'do_form_text_field'),
303
-	        'xcloner_settings_page',
304
-	        'xcloner_general_settings_group',
305
-	        array('xcloner_store_path',
298
+		register_setting('xcloner_general_settings_group', 'xcloner_store_path', array($this->xcloner_sanitization, "sanitize_input_as_absolute_path"));
299
+		add_settings_field(
300
+			'xcloner_store_path',
301
+			__('Backup Storage Location','xcloner-backup-and-restore'),
302
+			array($this, 'do_form_text_field'),
303
+			'xcloner_settings_page',
304
+			'xcloner_general_settings_group',
305
+			array('xcloner_store_path',
306 306
 				__('Location where XCloner will store the Backup archives.','xcloner-backup-and-restore'),
307 307
 				$this->get_xcloner_store_path(), 
308 308
 				//'disabled'
309 309
 				)
310
-	    );
310
+		);
311 311
 	    
312
-	    register_setting('xcloner_general_settings_group', 'xcloner_enable_log', array($this->xcloner_sanitization, "sanitize_input_as_int"));
313
-	    add_settings_field(
314
-	        'xcloner_enable_log',
315
-	        __('Enable XCloner Backup Log','xcloner-backup-and-restore'),
316
-	        array($this, 'do_form_switch_field'),
317
-	        'xcloner_settings_page',
318
-	        'xcloner_general_settings_group',
319
-	        array('xcloner_enable_log',
312
+		register_setting('xcloner_general_settings_group', 'xcloner_enable_log', array($this->xcloner_sanitization, "sanitize_input_as_int"));
313
+		add_settings_field(
314
+			'xcloner_enable_log',
315
+			__('Enable XCloner Backup Log','xcloner-backup-and-restore'),
316
+			array($this, 'do_form_switch_field'),
317
+			'xcloner_settings_page',
318
+			'xcloner_general_settings_group',
319
+			array('xcloner_enable_log',
320 320
 				sprintf(__('Enable the XCloner Backup log. You will find it stored unde the Backup Storage Location, file %s','xcloner-backup-and-restore'), $this->get_logger_filename())
321 321
 				)
322 322
 		);	
323 323
 		
324 324
 		register_setting('xcloner_general_settings_group', 'xcloner_regex_exclude', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
325
-	    add_settings_field(
326
-	        'xcloner_regex_exclude',
327
-	        __('Regex Exclude Files','xcloner-backup-and-restore'),
328
-	        array($this, 'do_form_textarea_field'),
329
-	        'xcloner_settings_page',
330
-	        'xcloner_general_settings_group',
331
-	        array('xcloner_regex_exclude',
325
+		add_settings_field(
326
+			'xcloner_regex_exclude',
327
+			__('Regex Exclude Files','xcloner-backup-and-restore'),
328
+			array($this, 'do_form_textarea_field'),
329
+			'xcloner_settings_page',
330
+			'xcloner_general_settings_group',
331
+			array('xcloner_regex_exclude',
332 332
 				__('Regular expression match to exclude files and folders, example patterns provided below, one pattern per line','xcloner-backup-and-restore'),
333 333
 				//$this->get_xcloner_store_path(), 
334 334
 				//'disabled'
335 335
 				)
336
-	    );
336
+		);
337 337
 	 
338 338
 		//REGISTERING THE 'MYSQL SECTION' FIELDS
339 339
 		register_setting('xcloner_mysql_settings_group', 'xcloner_enable_mysql_backup', array($this->xcloner_sanitization, "sanitize_input_as_int"));
340
-	    add_settings_field(
341
-	        'xcloner_enable_mysql_backup',
342
-	        __('Enable Mysql Backup','xcloner-backup-and-restore'),
343
-	        array($this, 'do_form_switch_field'),
344
-	        'xcloner_mysql_settings_page',
345
-	        'xcloner_mysql_settings_group',
346
-	        array('xcloner_enable_mysql_backup',
340
+		add_settings_field(
341
+			'xcloner_enable_mysql_backup',
342
+			__('Enable Mysql Backup','xcloner-backup-and-restore'),
343
+			array($this, 'do_form_switch_field'),
344
+			'xcloner_mysql_settings_page',
345
+			'xcloner_mysql_settings_group',
346
+			array('xcloner_enable_mysql_backup',
347 347
 				__('Enable Mysql Backup Option. If you don\'t want to backup the database, you can disable this.','xcloner-backup-and-restore')
348 348
 				)
349
-	    );
349
+		);
350 350
 	    
351
-	    register_setting('xcloner_mysql_settings_group', 'xcloner_backup_only_wp_tables');
352
-	    add_settings_field(
353
-	        'xcloner_backup_only_wp_tables',
354
-	        __('Backup only WP tables','xcloner-backup-and-restore'),
355
-	        array($this, 'do_form_switch_field'),
356
-	        'xcloner_mysql_settings_page',
357
-	        'xcloner_mysql_settings_group',
358
-	        array('xcloner_backup_only_wp_tables',
351
+		register_setting('xcloner_mysql_settings_group', 'xcloner_backup_only_wp_tables');
352
+		add_settings_field(
353
+			'xcloner_backup_only_wp_tables',
354
+			__('Backup only WP tables','xcloner-backup-and-restore'),
355
+			array($this, 'do_form_switch_field'),
356
+			'xcloner_mysql_settings_page',
357
+			'xcloner_mysql_settings_group',
358
+			array('xcloner_backup_only_wp_tables',
359 359
 				sprintf(__('Enable this if you only want to Backup only tables starting with \'%s\' prefix','xcloner-backup-and-restore'), $this->get_table_prefix())
360 360
 				)
361
-	    );
361
+		);
362 362
 	    
363
-	    register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_hostname', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
364
-	    add_settings_field(
365
-	        'xcloner_mysql_hostname',
366
-	        __('Mysql Hostname','xcloner-backup-and-restore'),
367
-	        array($this, 'do_form_text_field'),
368
-	        'xcloner_mysql_settings_page',
369
-	        'xcloner_mysql_settings_group',
370
-	        array('xcloner_mysql_hostname',
363
+		register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_hostname', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
364
+		add_settings_field(
365
+			'xcloner_mysql_hostname',
366
+			__('Mysql Hostname','xcloner-backup-and-restore'),
367
+			array($this, 'do_form_text_field'),
368
+			'xcloner_mysql_settings_page',
369
+			'xcloner_mysql_settings_group',
370
+			array('xcloner_mysql_hostname',
371 371
 				__('Wordpress mysql hostname','xcloner-backup-and-restore'),
372 372
 				$this->get_db_hostname(),
373 373
 				'disabled'
374 374
 				)
375
-	    );
375
+		);
376 376
 
377
-	    register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_username', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
378
-	    add_settings_field(
379
-	        'xcloner_mysql_username',
380
-	        __('Mysql Username','xcloner-backup-and-restore'),
381
-	        array($this, 'do_form_text_field'),
382
-	        'xcloner_mysql_settings_page',
383
-	        'xcloner_mysql_settings_group',
384
-	        array('xcloner_mysql_username',
377
+		register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_username', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
378
+		add_settings_field(
379
+			'xcloner_mysql_username',
380
+			__('Mysql Username','xcloner-backup-and-restore'),
381
+			array($this, 'do_form_text_field'),
382
+			'xcloner_mysql_settings_page',
383
+			'xcloner_mysql_settings_group',
384
+			array('xcloner_mysql_username',
385 385
 				__('Wordpress mysql username','xcloner-backup-and-restore'),
386 386
 				$this->get_db_username(),
387 387
 				'disabled'
388 388
 				)
389
-	    );
389
+		);
390 390
 	    
391
-	    register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_database', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
392
-	    add_settings_field(
393
-	        'xcloner_mysql_database',
394
-	        __('Mysql Database','xcloner-backup-and-restore'),
395
-	        array($this, 'do_form_text_field'),
396
-	        'xcloner_mysql_settings_page',
397
-	        'xcloner_mysql_settings_group',
398
-	        array('xcloner_mysql_database',
391
+		register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_database', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
392
+		add_settings_field(
393
+			'xcloner_mysql_database',
394
+			__('Mysql Database','xcloner-backup-and-restore'),
395
+			array($this, 'do_form_text_field'),
396
+			'xcloner_mysql_settings_page',
397
+			'xcloner_mysql_settings_group',
398
+			array('xcloner_mysql_database',
399 399
 				__('Wordpress mysql database','xcloner-backup-and-restore'),
400 400
 				$this->get_db_database(),
401 401
 				'disabled'
402 402
 				)
403
-	    );
403
+		);
404 404
 	    
405
-	    //REGISTERING THE 'SYSTEM SECTION' FIELDS
406
-	    register_setting('xcloner_system_settings_group', 'xcloner_size_limit_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
407
-	    add_settings_field(
408
-	        'xcloner_size_limit_per_request',
409
-	       __('Data Size Limit Per Request','xcloner-backup-and-restore'),
410
-	        array($this, 'do_form_range_field'),
411
-	        'xcloner_system_settings_page',
412
-	        'xcloner_system_settings_group',
413
-	        array('xcloner_size_limit_per_request',
414
-	         __('Use this option to set how much file data can XCloner backup in one AJAX request. Range 0-1024 MB','xcloner-backup-and-restore'), 
415
-	         0,
416
-	         1024
417
-	         )
418
-	    );
405
+		//REGISTERING THE 'SYSTEM SECTION' FIELDS
406
+		register_setting('xcloner_system_settings_group', 'xcloner_size_limit_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
407
+		add_settings_field(
408
+			'xcloner_size_limit_per_request',
409
+		   __('Data Size Limit Per Request','xcloner-backup-and-restore'),
410
+			array($this, 'do_form_range_field'),
411
+			'xcloner_system_settings_page',
412
+			'xcloner_system_settings_group',
413
+			array('xcloner_size_limit_per_request',
414
+			 __('Use this option to set how much file data can XCloner backup in one AJAX request. Range 0-1024 MB','xcloner-backup-and-restore'), 
415
+			 0,
416
+			 1024
417
+			 )
418
+		);
419 419
 	    
420 420
 		register_setting('xcloner_system_settings_group', 'xcloner_files_to_process_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
421
-	    add_settings_field(
422
-	        'xcloner_files_to_process_per_request',
423
-	       __('Files To Process Per Request','xcloner-backup-and-restore'),
424
-	        array($this, 'do_form_range_field'),
425
-	        'xcloner_system_settings_page',
426
-	        'xcloner_system_settings_group',
427
-	        array('xcloner_files_to_process_per_request',
428
-	         __('Use this option to set how many files XCloner should process at one time before doing another AJAX call','xcloner-backup-and-restore'), 
429
-	         0,
430
-	         1000
431
-	         )
432
-	    );
421
+		add_settings_field(
422
+			'xcloner_files_to_process_per_request',
423
+		   __('Files To Process Per Request','xcloner-backup-and-restore'),
424
+			array($this, 'do_form_range_field'),
425
+			'xcloner_system_settings_page',
426
+			'xcloner_system_settings_group',
427
+			array('xcloner_files_to_process_per_request',
428
+			 __('Use this option to set how many files XCloner should process at one time before doing another AJAX call','xcloner-backup-and-restore'), 
429
+			 0,
430
+			 1000
431
+			 )
432
+		);
433 433
 	    
434 434
 		register_setting('xcloner_system_settings_group', 'xcloner_directories_to_scan_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
435
-	    add_settings_field(
436
-	        'xcloner_directories_to_scan_per_request',
437
-	       __('Directories To Scan Per Request','xcloner-backup-and-restore'),
438
-	        array($this, 'do_form_range_field'),
439
-	        'xcloner_system_settings_page',
440
-	        'xcloner_system_settings_group',
441
-	        array('xcloner_directories_to_scan_per_request',
442
-	         __('Use this option to set how many directories XCloner should scan at one time before doing another AJAX call','xcloner-backup-and-restore'), 
443
-	         0,
444
-	         1000
445
-	         )
446
-	    );
435
+		add_settings_field(
436
+			'xcloner_directories_to_scan_per_request',
437
+		   __('Directories To Scan Per Request','xcloner-backup-and-restore'),
438
+			array($this, 'do_form_range_field'),
439
+			'xcloner_system_settings_page',
440
+			'xcloner_system_settings_group',
441
+			array('xcloner_directories_to_scan_per_request',
442
+			 __('Use this option to set how many directories XCloner should scan at one time before doing another AJAX call','xcloner-backup-and-restore'), 
443
+			 0,
444
+			 1000
445
+			 )
446
+		);
447 447
 	    
448 448
 		register_setting('xcloner_system_settings_group', 'xcloner_database_records_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
449
-	    add_settings_field(
450
-	        'xcloner_database_records_per_request',
451
-	       __('Database Records Per Request','xcloner-backup-and-restore'),
452
-	        array($this, 'do_form_range_field'),
453
-	        'xcloner_system_settings_page',
454
-	        'xcloner_system_settings_group',
455
-	        array('xcloner_database_records_per_request',
456
-	         __('Use this option to set how many database table records should be fetched per AJAX request, or set to 0 to fetch all.  Range 0-100000 records','xcloner-backup-and-restore'), 
457
-	         0,
458
-	         100000
459
-	         )
460
-	    );
449
+		add_settings_field(
450
+			'xcloner_database_records_per_request',
451
+		   __('Database Records Per Request','xcloner-backup-and-restore'),
452
+			array($this, 'do_form_range_field'),
453
+			'xcloner_system_settings_page',
454
+			'xcloner_system_settings_group',
455
+			array('xcloner_database_records_per_request',
456
+			 __('Use this option to set how many database table records should be fetched per AJAX request, or set to 0 to fetch all.  Range 0-100000 records','xcloner-backup-and-restore'), 
457
+			 0,
458
+			 100000
459
+			 )
460
+		);
461 461
 	    
462 462
 		register_setting('xcloner_system_settings_group', 'xcloner_exclude_files_larger_than_mb', array($this->xcloner_sanitization, "sanitize_input_as_int"));
463
-	    add_settings_field(
464
-	        'xcloner_exclude_files_larger_than_mb',
465
-	       __('Exclude files larger than (MB)','xcloner-backup-and-restore'),
466
-	        array($this, 'do_form_number_field'),
467
-	        'xcloner_system_settings_page',
468
-	        'xcloner_system_settings_group',
469
-	        array('xcloner_exclude_files_larger_than_mb',
470
-	         __('Use this option to automatically exclude files larger than a certain size in MB, or set to 0 to include all. Range 0-1000 MB','xcloner-backup-and-restore'), 
471
-	         )
472
-	    );
463
+		add_settings_field(
464
+			'xcloner_exclude_files_larger_than_mb',
465
+		   __('Exclude files larger than (MB)','xcloner-backup-and-restore'),
466
+			array($this, 'do_form_number_field'),
467
+			'xcloner_system_settings_page',
468
+			'xcloner_system_settings_group',
469
+			array('xcloner_exclude_files_larger_than_mb',
470
+			 __('Use this option to automatically exclude files larger than a certain size in MB, or set to 0 to include all. Range 0-1000 MB','xcloner-backup-and-restore'), 
471
+			 )
472
+		);
473 473
 	    
474 474
 		register_setting('xcloner_system_settings_group', 'xcloner_split_backup_limit', array($this->xcloner_sanitization, "sanitize_input_as_int"));
475
-	    add_settings_field(
476
-	        'xcloner_split_backup_limit',
477
-	       __('Split Backup Archive Limit (MB)','xcloner-backup-and-restore'),
478
-	        array($this, 'do_form_number_field'),
479
-	        'xcloner_system_settings_page',
480
-	        'xcloner_system_settings_group',
481
-	        array('xcloner_split_backup_limit',
482
-	         __('Use this option to automatically split the backup archive into smaller parts. Range  0-10000 MB','xcloner-backup-and-restore'), 
483
-	         )
484
-	    );
475
+		add_settings_field(
476
+			'xcloner_split_backup_limit',
477
+		   __('Split Backup Archive Limit (MB)','xcloner-backup-and-restore'),
478
+			array($this, 'do_form_number_field'),
479
+			'xcloner_system_settings_page',
480
+			'xcloner_system_settings_group',
481
+			array('xcloner_split_backup_limit',
482
+			 __('Use this option to automatically split the backup archive into smaller parts. Range  0-10000 MB','xcloner-backup-and-restore'), 
483
+			 )
484
+		);
485 485
 	    
486
-	    register_setting('xcloner_system_settings_group', 'xcloner_force_tmp_path_site_root');
487
-	    add_settings_field(
488
-	        'xcloner_force_tmp_path_site_root',
489
-	        __('Force Temporary Path Within XCloner Storage','xcloner-backup-and-restore'),
490
-	        array($this, 'do_form_switch_field'),
491
-	        'xcloner_system_settings_page',
492
-	        'xcloner_system_settings_group',
493
-	        array('xcloner_force_tmp_path_site_root',
486
+		register_setting('xcloner_system_settings_group', 'xcloner_force_tmp_path_site_root');
487
+		add_settings_field(
488
+			'xcloner_force_tmp_path_site_root',
489
+			__('Force Temporary Path Within XCloner Storage','xcloner-backup-and-restore'),
490
+			array($this, 'do_form_switch_field'),
491
+			'xcloner_system_settings_page',
492
+			'xcloner_system_settings_group',
493
+			array('xcloner_force_tmp_path_site_root',
494 494
 				sprintf(__('Enable this option if you want the XCloner Temporary Path to be within your XCloner Storage Location','xcloner-backup-and-restore'), $this->get_table_prefix())
495 495
 				)
496
-	    );
496
+		);
497 497
 		
498 498
 		//REGISTERING THE 'CLEANUP SECTION' FIELDS
499 499
 		register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_retention_limit_days', array($this->xcloner_sanitization, "sanitize_input_as_int"));
500
-	    add_settings_field(
501
-	        'xcloner_cleanup_retention_limit_days',
502
-	        __('Cleanup by Date(days)','xcloner-backup-and-restore'),
503
-	        array($this, 'do_form_number_field'),
504
-	        'xcloner_cleanup_settings_page',
505
-	        'xcloner_cleanup_settings_group',
506
-	        array('xcloner_cleanup_retention_limit_days',
500
+		add_settings_field(
501
+			'xcloner_cleanup_retention_limit_days',
502
+			__('Cleanup by Date(days)','xcloner-backup-and-restore'),
503
+			array($this, 'do_form_number_field'),
504
+			'xcloner_cleanup_settings_page',
505
+			'xcloner_cleanup_settings_group',
506
+			array('xcloner_cleanup_retention_limit_days',
507 507
 				__('Specify the maximum number of days a backup archive can be kept on the server. 0 disables this option','xcloner-backup-and-restore')
508 508
 			)
509
-	    );
509
+		);
510 510
 	    
511 511
 		register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_retention_limit_archives', array($this->xcloner_sanitization, "sanitize_input_as_int"));
512
-	    add_settings_field(
513
-	        'xcloner_cleanup_retention_limit_archives',
514
-	        __('Cleanup by Quantity','xcloner-backup-and-restore'),
515
-	        array($this, 'do_form_number_field'),
516
-	        'xcloner_cleanup_settings_page',
517
-	        'xcloner_cleanup_settings_group',
518
-	        array('xcloner_cleanup_retention_limit_archives',
512
+		add_settings_field(
513
+			'xcloner_cleanup_retention_limit_archives',
514
+			__('Cleanup by Quantity','xcloner-backup-and-restore'),
515
+			array($this, 'do_form_number_field'),
516
+			'xcloner_cleanup_settings_page',
517
+			'xcloner_cleanup_settings_group',
518
+			array('xcloner_cleanup_retention_limit_archives',
519 519
 				__('Specify the maximum number of backup archives to keep on the server. 0 disables this option','xcloner-backup-and-restore')
520 520
 			)
521
-	    );
521
+		);
522 522
 	    
523 523
 		register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_capacity_limit', array($this->xcloner_sanitization, "sanitize_input_as_int"));
524
-	    add_settings_field(
525
-	        'xcloner_cleanup_capacity_limit',
526
-	        __('Cleanup by Capacity(MB)','xcloner-backup-and-restore'),
527
-	        array($this, 'do_form_number_field'),
528
-	        'xcloner_cleanup_settings_page',
529
-	        'xcloner_cleanup_settings_group',
530
-	        array('xcloner_cleanup_capacity_limit',
524
+		add_settings_field(
525
+			'xcloner_cleanup_capacity_limit',
526
+			__('Cleanup by Capacity(MB)','xcloner-backup-and-restore'),
527
+			array($this, 'do_form_number_field'),
528
+			'xcloner_cleanup_settings_page',
529
+			'xcloner_cleanup_settings_group',
530
+			array('xcloner_cleanup_capacity_limit',
531 531
 				__('Remove oldest backups if all created backups exceed the configured limit in Megabytes. 0 disables this option','xcloner-backup-and-restore')
532 532
 			)
533
-	    );
533
+		);
534 534
 		
535 535
 		//REGISTERING THE 'CRON SECTION' FIELDS
536 536
 		register_setting('xcloner_cron_settings_group', 'xcloner_cron_frequency');
537
-	    add_settings_field(
538
-	        'xcloner_cron_frequency',
539
-	        __('Cron frequency','xcloner-backup-and-restore'),
540
-	        array($this, 'do_form_text_field'),
541
-	        'xcloner_cron_settings_page',
542
-	        'xcloner_cron_settings_group',
543
-	        array('xcloner_cron_frequency',
537
+		add_settings_field(
538
+			'xcloner_cron_frequency',
539
+			__('Cron frequency','xcloner-backup-and-restore'),
540
+			array($this, 'do_form_text_field'),
541
+			'xcloner_cron_settings_page',
542
+			'xcloner_cron_settings_group',
543
+			array('xcloner_cron_frequency',
544 544
 				__('Cron frequency')
545 545
 			)
546
-	    );
546
+		);
547 547
 	}
548 548
 	 
549 549
 	
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 	// section content cb
557 557
 	public function xcloner_settings_section_cb()
558 558
 	{
559
-	    //echo '<p>WPOrg Section Introduction.</p>';
559
+		//echo '<p>WPOrg Section Introduction.</p>';
560 560
 	}
561 561
 	 
562 562
 	// text field content cb
@@ -571,8 +571,8 @@  discard block
 block discarded – undo
571 571
 		
572 572
 		if(!$value)
573 573
 			$value = get_option($fieldname);
574
-	    // output the field
575
-	    ?>
574
+		// output the field
575
+		?>
576 576
 	    <div class="row">
577 577
 	        <div class="input-field col s10 m10 l8">
578 578
 	          <input class="validate" <?php echo ($disabled)?"disabled":""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="text" class="validate" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>">
@@ -598,8 +598,8 @@  discard block
 block discarded – undo
598 598
 		
599 599
 		if(!$value)
600 600
 			$value = get_option($fieldname);
601
-	    // output the field
602
-	    ?>
601
+		// output the field
602
+		?>
603 603
 	    <div class="row">
604 604
 	        <div class="input-field col s10 m10 l8">
605 605
 	          <textarea class="validate" <?php echo ($disabled)?"disabled":""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="text" class="validate" value=""><?php echo isset($value) ? esc_attr($value) : ''; ?></textarea>
@@ -641,8 +641,8 @@  discard block
 block discarded – undo
641 641
 		
642 642
 		if(!$value)
643 643
 			$value = get_option($fieldname);
644
-	    // output the field
645
-	    ?>
644
+		// output the field
645
+		?>
646 646
 	    <div class="row">
647 647
 	        <div class="input-field col s10 m5 l3">
648 648
 	          <input class="validate" <?php echo ($disabled)?"disabled":""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="number" class="validate" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>">
Please login to merge, or discard this patch.
Spacing   +86 added lines, -86 removed lines patch added patch discarded remove patch
@@ -4,14 +4,14 @@  discard block
 block discarded – undo
4 4
 {
5 5
 	private $logger_file = "xcloner_main_%s.log";
6 6
 	private $logger_file_hash = "xcloner%s.log";
7
-	private $hash ;
7
+	private $hash;
8 8
 	private $xcloner_sanitization;
9 9
 	private $xcloner_container;
10 10
 	
11 11
 	public function __construct(Xcloner $xcloner_container, $hash = "")
12 12
 	{
13 13
 		$this->xcloner_container = $xcloner_container;
14
-		if(isset($hash))
14
+		if (isset($hash))
15 15
 			$this->set_hash($hash);
16 16
 	}
17 17
 	
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 	
23 23
 	public function get_logger_filename($include_hash = 0)
24 24
 	{
25
-		if($include_hash)
25
+		if ($include_hash)
26 26
 			$filename = sprintf($this->logger_file_hash, $this->get_hash()); 
27 27
 		else
28 28
 			$filename = sprintf($this->logger_file, $this->get_server_unique_hash(5));
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	
33 33
 	public function get_xcloner_start_path()
34 34
 	{
35
-		if(!get_option('xcloner_start_path') or !is_dir(get_option('xcloner_start_path')))
35
+		if (!get_option('xcloner_start_path') or !is_dir(get_option('xcloner_start_path')))
36 36
 			$path = realpath(ABSPATH);
37 37
 		else
38 38
 			$path = get_option('xcloner_start_path');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	
50 50
 	public function get_xcloner_store_path()
51 51
 	{
52
-		if(!get_option('xcloner_store_path')  or !is_dir(get_option('xcloner_store_path')))
52
+		if (!get_option('xcloner_store_path') or !is_dir(get_option('xcloner_store_path')))
53 53
 			$path = realpath(XCLONER_STORAGE_PATH);
54 54
 		else
55 55
 			$path = get_option('xcloner_store_path');
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 	public function get_xcloner_tmp_path()
67 67
 	{
68 68
 		$path = sys_get_temp_dir().DS.".".$this->get_xcloner_tmp_path_suffix();
69
-		if(!is_dir($path))
69
+		if (!is_dir($path))
70 70
 		{
71 71
 			@mkdir($path);
72 72
 			@chmod($path, 0777);
73 73
 		}
74 74
 		
75
-		if(!is_dir($path) or !is_writeable($path) or get_option('xcloner_force_tmp_path_site_root'))
75
+		if (!is_dir($path) or !is_writeable($path) or get_option('xcloner_force_tmp_path_site_root'))
76 76
 			$path = $this->get_xcloner_store_path().DS.".".$this->get_xcloner_tmp_path_suffix();
77 77
 		
78 78
 		return $path;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	
81 81
 	public function get_enable_mysql_backup()
82 82
 	{
83
-		if(get_option('xcloner_enable_mysql_backup'))
83
+		if (get_option('xcloner_enable_mysql_backup'))
84 84
 			return true;
85 85
 		
86 86
 		return false;	
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
 	
89 89
 	public function get_backup_extension_name($ext = "")
90 90
 	{
91
-		if(!$ext)
91
+		if (!$ext)
92 92
 		{
93
-			if(get_option('xcloner_backup_compression_level'))
93
+			if (get_option('xcloner_backup_compression_level'))
94 94
 				$ext = ".tgz";
95 95
 			else
96 96
 				$ext = ".tar";
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	
101 101
 	public function get_hash()
102 102
 	{
103
-		if(!$this->hash){
103
+		if (!$this->hash) {
104 104
 			$this->set_hash("-".$this->get_server_unique_hash(5));
105 105
 		}
106 106
 		
@@ -112,17 +112,17 @@  discard block
 block discarded – undo
112 112
 	{
113 113
 		$hash = "-".md5(rand());
114 114
 		
115
-		$this->set_hash(substr( $hash, 0, 6));
115
+		$this->set_hash(substr($hash, 0, 6));
116 116
 		
117 117
 		return $hash;
118 118
 	}
119 119
 	
120 120
 	public function set_hash($hash = "")
121 121
 	{
122
-		if(substr($hash, 0, 1) != "-" and strlen($hash))
122
+		if (substr($hash, 0, 1) != "-" and strlen($hash))
123 123
 			$hash = "-".$hash;
124 124
 			
125
-		$this->hash = substr( $hash, 0, 6);
125
+		$this->hash = substr($hash, 0, 6);
126 126
 		
127 127
 		return $this;
128 128
 	}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	{
132 132
 		$data = parse_url(get_site_url());
133 133
 			
134
-		$backup_name = "backup_[domain]".(isset($data['port'])?":".$data['port']:"")."-[time]-".($this->get_enable_mysql_backup()?"sql":"nosql");
134
+		$backup_name = "backup_[domain]".(isset($data['port']) ? ":".$data['port'] : "")."-[time]-".($this->get_enable_mysql_backup() ? "sql" : "nosql");
135 135
 		
136 136
 		return $backup_name;
137 137
 	}
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	{
141 141
 		global $wpdb;
142 142
 		
143
-		if(!$data = get_option('xcloner_mysql_hostname'))
143
+		if (!$data = get_option('xcloner_mysql_hostname'))
144 144
 			$data = $wpdb->dbhost;
145 145
 		
146 146
 		return $data;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	{
151 151
 		global $wpdb;
152 152
 		
153
-		if(!$data = get_option('xcloner_mysql_username'))
153
+		if (!$data = get_option('xcloner_mysql_username'))
154 154
 			$data = $wpdb->dbuser;
155 155
 		
156 156
 		return $data;
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 	{
161 161
 		global $wpdb;
162 162
 		
163
-		if(!$data = get_option('xcloner_mysql_password'))
163
+		if (!$data = get_option('xcloner_mysql_password'))
164 164
 			$data = $wpdb->dbpassword;
165 165
 		
166 166
 		return $data;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	{
171 171
 		global $wpdb;
172 172
 		
173
-		if(!$data = get_option('xcloner_mysql_database'))
173
+		if (!$data = get_option('xcloner_mysql_database'))
174 174
 			$data = $wpdb->dbname;
175 175
 		
176 176
 		return $data;
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	{
195 195
 		$hash = md5(get_home_url().__DIR__);
196 196
 		
197
-		if($strlen)
197
+		if ($strlen)
198 198
 			$hash = substr($hash, 0, $strlen);
199 199
 			
200 200
 		return $hash;
@@ -206,20 +206,20 @@  discard block
 block discarded – undo
206 206
 	    $this->xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
207 207
 	    
208 208
 	    //ADDING MISSING OPTIONS
209
-	    if( false == get_option( 'xcloner_mysql_settings_page' ) ) {  
210
-			add_option( 'xcloner_mysql_settings_page' );
209
+	    if (false == get_option('xcloner_mysql_settings_page')) {  
210
+			add_option('xcloner_mysql_settings_page');
211 211
 		} // end if
212 212
 		
213
-	    if( false == get_option( 'xcloner_cron_settings_page' ) ) {  
214
-			add_option( 'xcloner_cron_settings_page' );
213
+	    if (false == get_option('xcloner_cron_settings_page')) {  
214
+			add_option('xcloner_cron_settings_page');
215 215
 		} // end if
216 216
 	    
217
-	    if( false == get_option( 'xcloner_system_settings_page' ) ) {  
218
-			add_option( 'xcloner_system_settings_page' );
217
+	    if (false == get_option('xcloner_system_settings_page')) {  
218
+			add_option('xcloner_system_settings_page');
219 219
 		} // end if
220 220
 		
221
-	    if( false == get_option( 'xcloner_cleanup_settings_page' ) ) {  
222
-			add_option( 'xcloner_cleanup_settings_page' );
221
+	    if (false == get_option('xcloner_cleanup_settings_page')) {  
222
+			add_option('xcloner_cleanup_settings_page');
223 223
 		} // end if
224 224
 	 
225 225
 	    
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 	    //SYSTEM section
243 243
 	    add_settings_section(
244 244
 	        'xcloner_system_settings_group',
245
-	        __('These are advanced options recommended for developers!','xcloner-backup-and-restore'),
245
+	        __('These are advanced options recommended for developers!', 'xcloner-backup-and-restore'),
246 246
 	        array($this, 'xcloner_settings_section_cb'),
247 247
 	        'xcloner_system_settings_page'
248 248
 	    );
@@ -270,12 +270,12 @@  discard block
 block discarded – undo
270 270
 		register_setting('xcloner_general_settings_group', 'xcloner_backup_compression_level', array($this->xcloner_sanitization, "sanitize_input_as_int"));
271 271
 	    add_settings_field(
272 272
 	        'xcloner_backup_compression_level',
273
-	       __('Backup Compression Level','xcloner-backup-and-restore'),
273
+	       __('Backup Compression Level', 'xcloner-backup-and-restore'),
274 274
 	        array($this, 'do_form_range_field'),
275 275
 	        'xcloner_settings_page',
276 276
 	        'xcloner_general_settings_group',
277 277
 	        array('xcloner_backup_compression_level',
278
-	         __('Options between [0-9]. Value 0 means no compression, while 9 is maximum compression affecting cpu load','xcloner-backup-and-restore'), 
278
+	         __('Options between [0-9]. Value 0 means no compression, while 9 is maximum compression affecting cpu load', 'xcloner-backup-and-restore'), 
279 279
 	         0,
280 280
 	         9
281 281
 	         )
@@ -284,12 +284,12 @@  discard block
 block discarded – undo
284 284
 	    register_setting('xcloner_general_settings_group', 'xcloner_start_path', array($this->xcloner_sanitization, "sanitize_input_as_absolute_path"));
285 285
 	    add_settings_field(
286 286
 	        'xcloner_start_path',
287
-	        __('Backup Start Location','xcloner-backup-and-restore'),
287
+	        __('Backup Start Location', 'xcloner-backup-and-restore'),
288 288
 	        array($this, 'do_form_text_field'),
289 289
 	        'xcloner_settings_page',
290 290
 	        'xcloner_general_settings_group',
291 291
 	        array('xcloner_start_path',
292
-				__('Base path location from where XCloner can start the Backup.','xcloner-backup-and-restore'),
292
+				__('Base path location from where XCloner can start the Backup.', 'xcloner-backup-and-restore'),
293 293
 				$this->get_xcloner_start_path(),
294 294
 				//'disabled'
295 295
 				)
@@ -298,12 +298,12 @@  discard block
 block discarded – undo
298 298
 	    register_setting('xcloner_general_settings_group', 'xcloner_store_path', array($this->xcloner_sanitization, "sanitize_input_as_absolute_path"));
299 299
 	    add_settings_field(
300 300
 	        'xcloner_store_path',
301
-	        __('Backup Storage Location','xcloner-backup-and-restore'),
301
+	        __('Backup Storage Location', 'xcloner-backup-and-restore'),
302 302
 	        array($this, 'do_form_text_field'),
303 303
 	        'xcloner_settings_page',
304 304
 	        'xcloner_general_settings_group',
305 305
 	        array('xcloner_store_path',
306
-				__('Location where XCloner will store the Backup archives.','xcloner-backup-and-restore'),
306
+				__('Location where XCloner will store the Backup archives.', 'xcloner-backup-and-restore'),
307 307
 				$this->get_xcloner_store_path(), 
308 308
 				//'disabled'
309 309
 				)
@@ -312,24 +312,24 @@  discard block
 block discarded – undo
312 312
 	    register_setting('xcloner_general_settings_group', 'xcloner_enable_log', array($this->xcloner_sanitization, "sanitize_input_as_int"));
313 313
 	    add_settings_field(
314 314
 	        'xcloner_enable_log',
315
-	        __('Enable XCloner Backup Log','xcloner-backup-and-restore'),
315
+	        __('Enable XCloner Backup Log', 'xcloner-backup-and-restore'),
316 316
 	        array($this, 'do_form_switch_field'),
317 317
 	        'xcloner_settings_page',
318 318
 	        'xcloner_general_settings_group',
319 319
 	        array('xcloner_enable_log',
320
-				sprintf(__('Enable the XCloner Backup log. You will find it stored unde the Backup Storage Location, file %s','xcloner-backup-and-restore'), $this->get_logger_filename())
320
+				sprintf(__('Enable the XCloner Backup log. You will find it stored unde the Backup Storage Location, file %s', 'xcloner-backup-and-restore'), $this->get_logger_filename())
321 321
 				)
322 322
 		);	
323 323
 		
324 324
 		register_setting('xcloner_general_settings_group', 'xcloner_regex_exclude', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
325 325
 	    add_settings_field(
326 326
 	        'xcloner_regex_exclude',
327
-	        __('Regex Exclude Files','xcloner-backup-and-restore'),
327
+	        __('Regex Exclude Files', 'xcloner-backup-and-restore'),
328 328
 	        array($this, 'do_form_textarea_field'),
329 329
 	        'xcloner_settings_page',
330 330
 	        'xcloner_general_settings_group',
331 331
 	        array('xcloner_regex_exclude',
332
-				__('Regular expression match to exclude files and folders, example patterns provided below, one pattern per line','xcloner-backup-and-restore'),
332
+				__('Regular expression match to exclude files and folders, example patterns provided below, one pattern per line', 'xcloner-backup-and-restore'),
333 333
 				//$this->get_xcloner_store_path(), 
334 334
 				//'disabled'
335 335
 				)
@@ -339,36 +339,36 @@  discard block
 block discarded – undo
339 339
 		register_setting('xcloner_mysql_settings_group', 'xcloner_enable_mysql_backup', array($this->xcloner_sanitization, "sanitize_input_as_int"));
340 340
 	    add_settings_field(
341 341
 	        'xcloner_enable_mysql_backup',
342
-	        __('Enable Mysql Backup','xcloner-backup-and-restore'),
342
+	        __('Enable Mysql Backup', 'xcloner-backup-and-restore'),
343 343
 	        array($this, 'do_form_switch_field'),
344 344
 	        'xcloner_mysql_settings_page',
345 345
 	        'xcloner_mysql_settings_group',
346 346
 	        array('xcloner_enable_mysql_backup',
347
-				__('Enable Mysql Backup Option. If you don\'t want to backup the database, you can disable this.','xcloner-backup-and-restore')
347
+				__('Enable Mysql Backup Option. If you don\'t want to backup the database, you can disable this.', 'xcloner-backup-and-restore')
348 348
 				)
349 349
 	    );
350 350
 	    
351 351
 	    register_setting('xcloner_mysql_settings_group', 'xcloner_backup_only_wp_tables');
352 352
 	    add_settings_field(
353 353
 	        'xcloner_backup_only_wp_tables',
354
-	        __('Backup only WP tables','xcloner-backup-and-restore'),
354
+	        __('Backup only WP tables', 'xcloner-backup-and-restore'),
355 355
 	        array($this, 'do_form_switch_field'),
356 356
 	        'xcloner_mysql_settings_page',
357 357
 	        'xcloner_mysql_settings_group',
358 358
 	        array('xcloner_backup_only_wp_tables',
359
-				sprintf(__('Enable this if you only want to Backup only tables starting with \'%s\' prefix','xcloner-backup-and-restore'), $this->get_table_prefix())
359
+				sprintf(__('Enable this if you only want to Backup only tables starting with \'%s\' prefix', 'xcloner-backup-and-restore'), $this->get_table_prefix())
360 360
 				)
361 361
 	    );
362 362
 	    
363 363
 	    register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_hostname', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
364 364
 	    add_settings_field(
365 365
 	        'xcloner_mysql_hostname',
366
-	        __('Mysql Hostname','xcloner-backup-and-restore'),
366
+	        __('Mysql Hostname', 'xcloner-backup-and-restore'),
367 367
 	        array($this, 'do_form_text_field'),
368 368
 	        'xcloner_mysql_settings_page',
369 369
 	        'xcloner_mysql_settings_group',
370 370
 	        array('xcloner_mysql_hostname',
371
-				__('Wordpress mysql hostname','xcloner-backup-and-restore'),
371
+				__('Wordpress mysql hostname', 'xcloner-backup-and-restore'),
372 372
 				$this->get_db_hostname(),
373 373
 				'disabled'
374 374
 				)
@@ -377,12 +377,12 @@  discard block
 block discarded – undo
377 377
 	    register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_username', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
378 378
 	    add_settings_field(
379 379
 	        'xcloner_mysql_username',
380
-	        __('Mysql Username','xcloner-backup-and-restore'),
380
+	        __('Mysql Username', 'xcloner-backup-and-restore'),
381 381
 	        array($this, 'do_form_text_field'),
382 382
 	        'xcloner_mysql_settings_page',
383 383
 	        'xcloner_mysql_settings_group',
384 384
 	        array('xcloner_mysql_username',
385
-				__('Wordpress mysql username','xcloner-backup-and-restore'),
385
+				__('Wordpress mysql username', 'xcloner-backup-and-restore'),
386 386
 				$this->get_db_username(),
387 387
 				'disabled'
388 388
 				)
@@ -391,12 +391,12 @@  discard block
 block discarded – undo
391 391
 	    register_setting('xcloner_mysql_settings_group', 'xcloner_mysql_database', array($this->xcloner_sanitization, "sanitize_input_as_raw"));
392 392
 	    add_settings_field(
393 393
 	        'xcloner_mysql_database',
394
-	        __('Mysql Database','xcloner-backup-and-restore'),
394
+	        __('Mysql Database', 'xcloner-backup-and-restore'),
395 395
 	        array($this, 'do_form_text_field'),
396 396
 	        'xcloner_mysql_settings_page',
397 397
 	        'xcloner_mysql_settings_group',
398 398
 	        array('xcloner_mysql_database',
399
-				__('Wordpress mysql database','xcloner-backup-and-restore'),
399
+				__('Wordpress mysql database', 'xcloner-backup-and-restore'),
400 400
 				$this->get_db_database(),
401 401
 				'disabled'
402 402
 				)
@@ -406,12 +406,12 @@  discard block
 block discarded – undo
406 406
 	    register_setting('xcloner_system_settings_group', 'xcloner_size_limit_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
407 407
 	    add_settings_field(
408 408
 	        'xcloner_size_limit_per_request',
409
-	       __('Data Size Limit Per Request','xcloner-backup-and-restore'),
409
+	       __('Data Size Limit Per Request', 'xcloner-backup-and-restore'),
410 410
 	        array($this, 'do_form_range_field'),
411 411
 	        'xcloner_system_settings_page',
412 412
 	        'xcloner_system_settings_group',
413 413
 	        array('xcloner_size_limit_per_request',
414
-	         __('Use this option to set how much file data can XCloner backup in one AJAX request. Range 0-1024 MB','xcloner-backup-and-restore'), 
414
+	         __('Use this option to set how much file data can XCloner backup in one AJAX request. Range 0-1024 MB', 'xcloner-backup-and-restore'), 
415 415
 	         0,
416 416
 	         1024
417 417
 	         )
@@ -420,12 +420,12 @@  discard block
 block discarded – undo
420 420
 		register_setting('xcloner_system_settings_group', 'xcloner_files_to_process_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
421 421
 	    add_settings_field(
422 422
 	        'xcloner_files_to_process_per_request',
423
-	       __('Files To Process Per Request','xcloner-backup-and-restore'),
423
+	       __('Files To Process Per Request', 'xcloner-backup-and-restore'),
424 424
 	        array($this, 'do_form_range_field'),
425 425
 	        'xcloner_system_settings_page',
426 426
 	        'xcloner_system_settings_group',
427 427
 	        array('xcloner_files_to_process_per_request',
428
-	         __('Use this option to set how many files XCloner should process at one time before doing another AJAX call','xcloner-backup-and-restore'), 
428
+	         __('Use this option to set how many files XCloner should process at one time before doing another AJAX call', 'xcloner-backup-and-restore'), 
429 429
 	         0,
430 430
 	         1000
431 431
 	         )
@@ -434,12 +434,12 @@  discard block
 block discarded – undo
434 434
 		register_setting('xcloner_system_settings_group', 'xcloner_directories_to_scan_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
435 435
 	    add_settings_field(
436 436
 	        'xcloner_directories_to_scan_per_request',
437
-	       __('Directories To Scan Per Request','xcloner-backup-and-restore'),
437
+	       __('Directories To Scan Per Request', 'xcloner-backup-and-restore'),
438 438
 	        array($this, 'do_form_range_field'),
439 439
 	        'xcloner_system_settings_page',
440 440
 	        'xcloner_system_settings_group',
441 441
 	        array('xcloner_directories_to_scan_per_request',
442
-	         __('Use this option to set how many directories XCloner should scan at one time before doing another AJAX call','xcloner-backup-and-restore'), 
442
+	         __('Use this option to set how many directories XCloner should scan at one time before doing another AJAX call', 'xcloner-backup-and-restore'), 
443 443
 	         0,
444 444
 	         1000
445 445
 	         )
@@ -448,12 +448,12 @@  discard block
 block discarded – undo
448 448
 		register_setting('xcloner_system_settings_group', 'xcloner_database_records_per_request', array($this->xcloner_sanitization, "sanitize_input_as_int"));
449 449
 	    add_settings_field(
450 450
 	        'xcloner_database_records_per_request',
451
-	       __('Database Records Per Request','xcloner-backup-and-restore'),
451
+	       __('Database Records Per Request', 'xcloner-backup-and-restore'),
452 452
 	        array($this, 'do_form_range_field'),
453 453
 	        'xcloner_system_settings_page',
454 454
 	        'xcloner_system_settings_group',
455 455
 	        array('xcloner_database_records_per_request',
456
-	         __('Use this option to set how many database table records should be fetched per AJAX request, or set to 0 to fetch all.  Range 0-100000 records','xcloner-backup-and-restore'), 
456
+	         __('Use this option to set how many database table records should be fetched per AJAX request, or set to 0 to fetch all.  Range 0-100000 records', 'xcloner-backup-and-restore'), 
457 457
 	         0,
458 458
 	         100000
459 459
 	         )
@@ -462,36 +462,36 @@  discard block
 block discarded – undo
462 462
 		register_setting('xcloner_system_settings_group', 'xcloner_exclude_files_larger_than_mb', array($this->xcloner_sanitization, "sanitize_input_as_int"));
463 463
 	    add_settings_field(
464 464
 	        'xcloner_exclude_files_larger_than_mb',
465
-	       __('Exclude files larger than (MB)','xcloner-backup-and-restore'),
465
+	       __('Exclude files larger than (MB)', 'xcloner-backup-and-restore'),
466 466
 	        array($this, 'do_form_number_field'),
467 467
 	        'xcloner_system_settings_page',
468 468
 	        'xcloner_system_settings_group',
469 469
 	        array('xcloner_exclude_files_larger_than_mb',
470
-	         __('Use this option to automatically exclude files larger than a certain size in MB, or set to 0 to include all. Range 0-1000 MB','xcloner-backup-and-restore'), 
470
+	         __('Use this option to automatically exclude files larger than a certain size in MB, or set to 0 to include all. Range 0-1000 MB', 'xcloner-backup-and-restore'), 
471 471
 	         )
472 472
 	    );
473 473
 	    
474 474
 		register_setting('xcloner_system_settings_group', 'xcloner_split_backup_limit', array($this->xcloner_sanitization, "sanitize_input_as_int"));
475 475
 	    add_settings_field(
476 476
 	        'xcloner_split_backup_limit',
477
-	       __('Split Backup Archive Limit (MB)','xcloner-backup-and-restore'),
477
+	       __('Split Backup Archive Limit (MB)', 'xcloner-backup-and-restore'),
478 478
 	        array($this, 'do_form_number_field'),
479 479
 	        'xcloner_system_settings_page',
480 480
 	        'xcloner_system_settings_group',
481 481
 	        array('xcloner_split_backup_limit',
482
-	         __('Use this option to automatically split the backup archive into smaller parts. Range  0-10000 MB','xcloner-backup-and-restore'), 
482
+	         __('Use this option to automatically split the backup archive into smaller parts. Range  0-10000 MB', 'xcloner-backup-and-restore'), 
483 483
 	         )
484 484
 	    );
485 485
 	    
486 486
 	    register_setting('xcloner_system_settings_group', 'xcloner_force_tmp_path_site_root');
487 487
 	    add_settings_field(
488 488
 	        'xcloner_force_tmp_path_site_root',
489
-	        __('Force Temporary Path Within XCloner Storage','xcloner-backup-and-restore'),
489
+	        __('Force Temporary Path Within XCloner Storage', 'xcloner-backup-and-restore'),
490 490
 	        array($this, 'do_form_switch_field'),
491 491
 	        'xcloner_system_settings_page',
492 492
 	        'xcloner_system_settings_group',
493 493
 	        array('xcloner_force_tmp_path_site_root',
494
-				sprintf(__('Enable this option if you want the XCloner Temporary Path to be within your XCloner Storage Location','xcloner-backup-and-restore'), $this->get_table_prefix())
494
+				sprintf(__('Enable this option if you want the XCloner Temporary Path to be within your XCloner Storage Location', 'xcloner-backup-and-restore'), $this->get_table_prefix())
495 495
 				)
496 496
 	    );
497 497
 		
@@ -499,36 +499,36 @@  discard block
 block discarded – undo
499 499
 		register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_retention_limit_days', array($this->xcloner_sanitization, "sanitize_input_as_int"));
500 500
 	    add_settings_field(
501 501
 	        'xcloner_cleanup_retention_limit_days',
502
-	        __('Cleanup by Date(days)','xcloner-backup-and-restore'),
502
+	        __('Cleanup by Date(days)', 'xcloner-backup-and-restore'),
503 503
 	        array($this, 'do_form_number_field'),
504 504
 	        'xcloner_cleanup_settings_page',
505 505
 	        'xcloner_cleanup_settings_group',
506 506
 	        array('xcloner_cleanup_retention_limit_days',
507
-				__('Specify the maximum number of days a backup archive can be kept on the server. 0 disables this option','xcloner-backup-and-restore')
507
+				__('Specify the maximum number of days a backup archive can be kept on the server. 0 disables this option', 'xcloner-backup-and-restore')
508 508
 			)
509 509
 	    );
510 510
 	    
511 511
 		register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_retention_limit_archives', array($this->xcloner_sanitization, "sanitize_input_as_int"));
512 512
 	    add_settings_field(
513 513
 	        'xcloner_cleanup_retention_limit_archives',
514
-	        __('Cleanup by Quantity','xcloner-backup-and-restore'),
514
+	        __('Cleanup by Quantity', 'xcloner-backup-and-restore'),
515 515
 	        array($this, 'do_form_number_field'),
516 516
 	        'xcloner_cleanup_settings_page',
517 517
 	        'xcloner_cleanup_settings_group',
518 518
 	        array('xcloner_cleanup_retention_limit_archives',
519
-				__('Specify the maximum number of backup archives to keep on the server. 0 disables this option','xcloner-backup-and-restore')
519
+				__('Specify the maximum number of backup archives to keep on the server. 0 disables this option', 'xcloner-backup-and-restore')
520 520
 			)
521 521
 	    );
522 522
 	    
523 523
 		register_setting('xcloner_cleanup_settings_group', 'xcloner_cleanup_capacity_limit', array($this->xcloner_sanitization, "sanitize_input_as_int"));
524 524
 	    add_settings_field(
525 525
 	        'xcloner_cleanup_capacity_limit',
526
-	        __('Cleanup by Capacity(MB)','xcloner-backup-and-restore'),
526
+	        __('Cleanup by Capacity(MB)', 'xcloner-backup-and-restore'),
527 527
 	        array($this, 'do_form_number_field'),
528 528
 	        'xcloner_cleanup_settings_page',
529 529
 	        'xcloner_cleanup_settings_group',
530 530
 	        array('xcloner_cleanup_capacity_limit',
531
-				__('Remove oldest backups if all created backups exceed the configured limit in Megabytes. 0 disables this option','xcloner-backup-and-restore')
531
+				__('Remove oldest backups if all created backups exceed the configured limit in Megabytes. 0 disables this option', 'xcloner-backup-and-restore')
532 532
 			)
533 533
 	    );
534 534
 		
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
 		register_setting('xcloner_cron_settings_group', 'xcloner_cron_frequency');
537 537
 	    add_settings_field(
538 538
 	        'xcloner_cron_frequency',
539
-	        __('Cron frequency','xcloner-backup-and-restore'),
539
+	        __('Cron frequency', 'xcloner-backup-and-restore'),
540 540
 	        array($this, 'do_form_text_field'),
541 541
 	        'xcloner_cron_settings_page',
542 542
 	        'xcloner_cron_settings_group',
@@ -562,20 +562,20 @@  discard block
 block discarded – undo
562 562
 	// text field content cb
563 563
 	public function do_form_text_field($params)
564 564
 	{
565
-		if(!isset($params['3']))
565
+		if (!isset($params['3']))
566 566
 			$params[3] = 0;
567
-		if(!isset($params['2']))
567
+		if (!isset($params['2']))
568 568
 			$params[2] = 0;	
569 569
 			
570 570
 		list($fieldname, $label, $value, $disabled) = $params;
571 571
 		
572
-		if(!$value)
572
+		if (!$value)
573 573
 			$value = get_option($fieldname);
574 574
 	    // output the field
575 575
 	    ?>
576 576
 	    <div class="row">
577 577
 	        <div class="input-field col s10 m10 l8">
578
-	          <input class="validate" <?php echo ($disabled)?"disabled":""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="text" class="validate" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>">
578
+	          <input class="validate" <?php echo ($disabled) ? "disabled" : ""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="text" class="validate" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>">
579 579
 	        </div>
580 580
 	        <div class="col s2 m2 ">
581 581
 				<a class="btn-floating tooltipped btn-small" data-position="left" data-delay="50" data-tooltip="<?php echo $label?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
@@ -589,20 +589,20 @@  discard block
 block discarded – undo
589 589
 	// textarea field content cb
590 590
 	public function do_form_textarea_field($params)
591 591
 	{
592
-		if(!isset($params['3']))
592
+		if (!isset($params['3']))
593 593
 			$params[3] = 0;
594
-		if(!isset($params['2']))
594
+		if (!isset($params['2']))
595 595
 			$params[2] = 0;	
596 596
 			
597 597
 		list($fieldname, $label, $value, $disabled) = $params;
598 598
 		
599
-		if(!$value)
599
+		if (!$value)
600 600
 			$value = get_option($fieldname);
601 601
 	    // output the field
602 602
 	    ?>
603 603
 	    <div class="row">
604 604
 	        <div class="input-field col s10 m10 l8">
605
-	          <textarea class="validate" <?php echo ($disabled)?"disabled":""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="text" class="validate" value=""><?php echo isset($value) ? esc_attr($value) : ''; ?></textarea>
605
+	          <textarea class="validate" <?php echo ($disabled) ? "disabled" : ""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="text" class="validate" value=""><?php echo isset($value) ? esc_attr($value) : ''; ?></textarea>
606 606
 	        </div>
607 607
 	        <div class="col s2 m2 ">
608 608
 				<a class="btn-floating tooltipped btn-small" data-position="center" data-html="true" data-delay="50" data-tooltip="<?php echo $label?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
@@ -632,20 +632,20 @@  discard block
 block discarded – undo
632 632
 	// number field content cb
633 633
 	public function do_form_number_field($params)
634 634
 	{
635
-		if(!isset($params['3']))
635
+		if (!isset($params['3']))
636 636
 			$params[3] = 0;
637
-		if(!isset($params['2']))
637
+		if (!isset($params['2']))
638 638
 			$params[2] = 0;	
639 639
 			
640 640
 		list($fieldname, $label, $value, $disabled) = $params;
641 641
 		
642
-		if(!$value)
642
+		if (!$value)
643 643
 			$value = get_option($fieldname);
644 644
 	    // output the field
645 645
 	    ?>
646 646
 	    <div class="row">
647 647
 	        <div class="input-field col s10 m5 l3">
648
-	          <input class="validate" <?php echo ($disabled)?"disabled":""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="number" class="validate" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>">
648
+	          <input class="validate" <?php echo ($disabled) ? "disabled" : ""?> name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" type="number" class="validate" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>">
649 649
 	        </div>
650 650
 	        <div class="col s2 m2 ">
651 651
 				<a class="btn-floating tooltipped btn-small" data-position="center" data-delay="50" data-tooltip="<?php echo $label?>" data-tooltip-id=""><i class="material-icons">help_outline</i></a>
@@ -658,7 +658,7 @@  discard block
 block discarded – undo
658 658
 	
659 659
 	public function do_form_range_field($params)
660 660
 	{
661
-		if(!isset($params['4']))
661
+		if (!isset($params['4']))
662 662
 			$params[4] = 0;
663 663
 			
664 664
 		list($fieldname, $label, $range_start, $range_end, $disabled) = $params;
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 		<div class="row">
668 668
 	        <div class="input-field col s10 m10 l8">
669 669
 				<p class="range-field">
670
-			      <input <?php echo ($disabled)?"disabled":""?> type="range" name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" min="<?php echo $range_start?>" max="<?php echo $range_end?>" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>" />
670
+			      <input <?php echo ($disabled) ? "disabled" : ""?> type="range" name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" min="<?php echo $range_start?>" max="<?php echo $range_end?>" value="<?php echo isset($value) ? esc_attr($value) : ''; ?>" />
671 671
 			    </p>
672 672
 			</div>
673 673
 			<div class="col s2 m2 ">
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 	
681 681
 	public function do_form_switch_field($params)
682 682
 	{
683
-		if(!isset($params['2']))
683
+		if (!isset($params['2']))
684 684
 			$params[2] = 0;
685 685
 		list($fieldname, $label, $disabled) = $params;
686 686
 		$value = get_option($fieldname);
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 			<div class="switch">
691 691
 				<label>
692 692
 				  Off
693
-				  <input <?php echo ($disabled)?"disabled":""?> type="checkbox" name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" value="1" <?php echo ($value) ? 'checked="checked"' : ''; ?>">
693
+				  <input <?php echo ($disabled) ? "disabled" : ""?> type="checkbox" name="<?php echo $fieldname?>" id="<?php echo $fieldname?>" value="1" <?php echo ($value) ? 'checked="checked"' : ''; ?>">
694 694
 				  <span class="lever"></span>
695 695
 				  On
696 696
 				</label>
Please login to merge, or discard this patch.
Braces   +80 added lines, -56 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@  discard block
 block discarded – undo
11 11
 	public function __construct(Xcloner $xcloner_container, $hash = "")
12 12
 	{
13 13
 		$this->xcloner_container = $xcloner_container;
14
-		if(isset($hash))
15
-			$this->set_hash($hash);
14
+		if(isset($hash)) {
15
+					$this->set_hash($hash);
16
+		}
16 17
 	}
17 18
 	
18 19
 	private function get_xcloner_container()
@@ -22,20 +23,22 @@  discard block
 block discarded – undo
22 23
 	
23 24
 	public function get_logger_filename($include_hash = 0)
24 25
 	{
25
-		if($include_hash)
26
-			$filename = sprintf($this->logger_file_hash, $this->get_hash()); 
27
-		else
28
-			$filename = sprintf($this->logger_file, $this->get_server_unique_hash(5));
26
+		if($include_hash) {
27
+					$filename = sprintf($this->logger_file_hash, $this->get_hash());
28
+		} else {
29
+					$filename = sprintf($this->logger_file, $this->get_server_unique_hash(5));
30
+		}
29 31
 		
30 32
 		return $filename;
31 33
 	}
32 34
 	
33 35
 	public function get_xcloner_start_path()
34 36
 	{
35
-		if(!get_option('xcloner_start_path') or !is_dir(get_option('xcloner_start_path')))
36
-			$path = realpath(ABSPATH);
37
-		else
38
-			$path = get_option('xcloner_start_path');
37
+		if(!get_option('xcloner_start_path') or !is_dir(get_option('xcloner_start_path'))) {
38
+					$path = realpath(ABSPATH);
39
+		} else {
40
+					$path = get_option('xcloner_start_path');
41
+		}
39 42
 		
40 43
 		return $path;
41 44
 	}
@@ -49,10 +52,11 @@  discard block
 block discarded – undo
49 52
 	
50 53
 	public function get_xcloner_store_path()
51 54
 	{
52
-		if(!get_option('xcloner_store_path')  or !is_dir(get_option('xcloner_store_path')))
53
-			$path = realpath(XCLONER_STORAGE_PATH);
54
-		else
55
-			$path = get_option('xcloner_store_path');
55
+		if(!get_option('xcloner_store_path')  or !is_dir(get_option('xcloner_store_path'))) {
56
+					$path = realpath(XCLONER_STORAGE_PATH);
57
+		} else {
58
+					$path = get_option('xcloner_store_path');
59
+		}
56 60
 		
57 61
 		return $path;
58 62
 	}
@@ -72,16 +76,18 @@  discard block
 block discarded – undo
72 76
 			@chmod($path, 0777);
73 77
 		}
74 78
 		
75
-		if(!is_dir($path) or !is_writeable($path) or get_option('xcloner_force_tmp_path_site_root'))
76
-			$path = $this->get_xcloner_store_path().DS.".".$this->get_xcloner_tmp_path_suffix();
79
+		if(!is_dir($path) or !is_writeable($path) or get_option('xcloner_force_tmp_path_site_root')) {
80
+					$path = $this->get_xcloner_store_path().DS.".".$this->get_xcloner_tmp_path_suffix();
81
+		}
77 82
 		
78 83
 		return $path;
79 84
 	}
80 85
 	
81 86
 	public function get_enable_mysql_backup()
82 87
 	{
83
-		if(get_option('xcloner_enable_mysql_backup'))
84
-			return true;
88
+		if(get_option('xcloner_enable_mysql_backup')) {
89
+					return true;
90
+		}
85 91
 		
86 92
 		return false;	
87 93
 	}
@@ -90,10 +96,11 @@  discard block
 block discarded – undo
90 96
 	{
91 97
 		if(!$ext)
92 98
 		{
93
-			if(get_option('xcloner_backup_compression_level'))
94
-				$ext = ".tgz";
95
-			else
96
-				$ext = ".tar";
99
+			if(get_option('xcloner_backup_compression_level')) {
100
+							$ext = ".tgz";
101
+			} else {
102
+							$ext = ".tar";
103
+			}
97 104
 		}	
98 105
 		return ($this->get_hash()).$ext;	
99 106
 	}
@@ -119,8 +126,9 @@  discard block
 block discarded – undo
119 126
 	
120 127
 	public function set_hash($hash = "")
121 128
 	{
122
-		if(substr($hash, 0, 1) != "-" and strlen($hash))
123
-			$hash = "-".$hash;
129
+		if(substr($hash, 0, 1) != "-" and strlen($hash)) {
130
+					$hash = "-".$hash;
131
+		}
124 132
 			
125 133
 		$this->hash = substr( $hash, 0, 6);
126 134
 		
@@ -140,8 +148,9 @@  discard block
 block discarded – undo
140 148
 	{
141 149
 		global $wpdb;
142 150
 		
143
-		if(!$data = get_option('xcloner_mysql_hostname'))
144
-			$data = $wpdb->dbhost;
151
+		if(!$data = get_option('xcloner_mysql_hostname')) {
152
+					$data = $wpdb->dbhost;
153
+		}
145 154
 		
146 155
 		return $data;
147 156
 	}
@@ -150,8 +159,9 @@  discard block
 block discarded – undo
150 159
 	{
151 160
 		global $wpdb;
152 161
 		
153
-		if(!$data = get_option('xcloner_mysql_username'))
154
-			$data = $wpdb->dbuser;
162
+		if(!$data = get_option('xcloner_mysql_username')) {
163
+					$data = $wpdb->dbuser;
164
+		}
155 165
 		
156 166
 		return $data;
157 167
 	}
@@ -160,8 +170,9 @@  discard block
 block discarded – undo
160 170
 	{
161 171
 		global $wpdb;
162 172
 		
163
-		if(!$data = get_option('xcloner_mysql_password'))
164
-			$data = $wpdb->dbpassword;
173
+		if(!$data = get_option('xcloner_mysql_password')) {
174
+					$data = $wpdb->dbpassword;
175
+		}
165 176
 		
166 177
 		return $data;
167 178
 	}
@@ -170,8 +181,9 @@  discard block
 block discarded – undo
170 181
 	{
171 182
 		global $wpdb;
172 183
 		
173
-		if(!$data = get_option('xcloner_mysql_database'))
174
-			$data = $wpdb->dbname;
184
+		if(!$data = get_option('xcloner_mysql_database')) {
185
+					$data = $wpdb->dbname;
186
+		}
175 187
 		
176 188
 		return $data;
177 189
 	}
@@ -194,8 +206,9 @@  discard block
 block discarded – undo
194 206
 	{
195 207
 		$hash = md5(get_home_url().__DIR__);
196 208
 		
197
-		if($strlen)
198
-			$hash = substr($hash, 0, $strlen);
209
+		if($strlen) {
210
+					$hash = substr($hash, 0, $strlen);
211
+		}
199 212
 			
200 213
 		return $hash;
201 214
 	}
@@ -562,15 +575,18 @@  discard block
 block discarded – undo
562 575
 	// text field content cb
563 576
 	public function do_form_text_field($params)
564 577
 	{
565
-		if(!isset($params['3']))
566
-			$params[3] = 0;
567
-		if(!isset($params['2']))
568
-			$params[2] = 0;	
578
+		if(!isset($params['3'])) {
579
+					$params[3] = 0;
580
+		}
581
+		if(!isset($params['2'])) {
582
+					$params[2] = 0;
583
+		}
569 584
 			
570 585
 		list($fieldname, $label, $value, $disabled) = $params;
571 586
 		
572
-		if(!$value)
573
-			$value = get_option($fieldname);
587
+		if(!$value) {
588
+					$value = get_option($fieldname);
589
+		}
574 590
 	    // output the field
575 591
 	    ?>
576 592
 	    <div class="row">
@@ -589,15 +605,18 @@  discard block
 block discarded – undo
589 605
 	// textarea field content cb
590 606
 	public function do_form_textarea_field($params)
591 607
 	{
592
-		if(!isset($params['3']))
593
-			$params[3] = 0;
594
-		if(!isset($params['2']))
595
-			$params[2] = 0;	
608
+		if(!isset($params['3'])) {
609
+					$params[3] = 0;
610
+		}
611
+		if(!isset($params['2'])) {
612
+					$params[2] = 0;
613
+		}
596 614
 			
597 615
 		list($fieldname, $label, $value, $disabled) = $params;
598 616
 		
599
-		if(!$value)
600
-			$value = get_option($fieldname);
617
+		if(!$value) {
618
+					$value = get_option($fieldname);
619
+		}
601 620
 	    // output the field
602 621
 	    ?>
603 622
 	    <div class="row">
@@ -632,15 +651,18 @@  discard block
 block discarded – undo
632 651
 	// number field content cb
633 652
 	public function do_form_number_field($params)
634 653
 	{
635
-		if(!isset($params['3']))
636
-			$params[3] = 0;
637
-		if(!isset($params['2']))
638
-			$params[2] = 0;	
654
+		if(!isset($params['3'])) {
655
+					$params[3] = 0;
656
+		}
657
+		if(!isset($params['2'])) {
658
+					$params[2] = 0;
659
+		}
639 660
 			
640 661
 		list($fieldname, $label, $value, $disabled) = $params;
641 662
 		
642
-		if(!$value)
643
-			$value = get_option($fieldname);
663
+		if(!$value) {
664
+					$value = get_option($fieldname);
665
+		}
644 666
 	    // output the field
645 667
 	    ?>
646 668
 	    <div class="row">
@@ -658,8 +680,9 @@  discard block
 block discarded – undo
658 680
 	
659 681
 	public function do_form_range_field($params)
660 682
 	{
661
-		if(!isset($params['4']))
662
-			$params[4] = 0;
683
+		if(!isset($params['4'])) {
684
+					$params[4] = 0;
685
+		}
663 686
 			
664 687
 		list($fieldname, $label, $range_start, $range_end, $disabled) = $params;
665 688
 		$value = get_option($fieldname);
@@ -680,8 +703,9 @@  discard block
 block discarded – undo
680 703
 	
681 704
 	public function do_form_switch_field($params)
682 705
 	{
683
-		if(!isset($params['2']))
684
-			$params[2] = 0;
706
+		if(!isset($params['2'])) {
707
+					$params[2] = 0;
708
+		}
685 709
 		list($fieldname, $label, $disabled) = $params;
686 710
 		$value = get_option($fieldname);
687 711
 	?>
Please login to merge, or discard this patch.
includes/class-xcloner-remote-storage.php 5 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -198,6 +198,9 @@
 block discarded – undo
198 198
 		}
199 199
 	}
200 200
 	
201
+	/**
202
+	 * @param string $storage_type
203
+	 */
201 204
 	public function verify_filesystem($storage_type)
202 205
 	{
203 206
 		$method = "get_".$storage_type."_filesystem";
Please login to merge, or discard this patch.
Unused Use Statements   -7 removed lines patch added patch discarded remove patch
@@ -1,23 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 use League\Flysystem\Config;
3 3
 use League\Flysystem\Filesystem;
4
-
5 4
 use League\Flysystem\Adapter\Ftp as Adapter;
6
-
7 5
 use League\Flysystem\Sftp\SftpAdapter;
8
-
9 6
 use League\Flysystem\Dropbox\DropboxAdapter;
10 7
 use Dropbox\Client;
11
-
12 8
 use MicrosoftAzure\Storage\Common\ServicesBuilder;
13 9
 use League\Flysystem\Azure\AzureAdapter;
14
-
15 10
 use Aws\S3\S3Client;
16 11
 use League\Flysystem\AwsS3v3\AwsS3Adapter;
17
-
18 12
 use Mhetreramesh\Flysystem\BackblazeAdapter;
19 13
 use ChrisWhite\B2\Client as B2Client;
20
-
21 14
 use Sabre\DAV\Client as SabreClient;
22 15
 use League\Flysystem\WebDAV\WebDAVAdapter;
23 16
 
Please login to merge, or discard this patch.
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -385,9 +385,9 @@  discard block
 block discarded – undo
385 385
 		}
386 386
 		
387 387
 		$endpoint = sprintf(
388
-		    'DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s',
389
-		    get_option("xcloner_azure_account_name"),
390
-		    get_option("xcloner_azure_api_key")
388
+			'DefaultEndpointsProtocol=https;AccountName=%s;AccountKey=%s',
389
+			get_option("xcloner_azure_account_name"),
390
+			get_option("xcloner_azure_api_key")
391 391
 		);
392 392
 		
393 393
 		$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($endpoint);
@@ -431,12 +431,12 @@  discard block
 block discarded – undo
431 431
 		
432 432
 		
433 433
 		$client = new S3Client([
434
-		    'credentials' => [
435
-		        'key'    => get_option("xcloner_aws_key"),
436
-		        'secret' => get_option("xcloner_aws_secret")
437
-		    ],
438
-		    'region' => get_option("xcloner_aws_region"),
439
-		    'version' => 'latest',
434
+			'credentials' => [
435
+				'key'    => get_option("xcloner_aws_key"),
436
+				'secret' => get_option("xcloner_aws_secret")
437
+			],
438
+			'region' => get_option("xcloner_aws_region"),
439
+			'version' => 'latest',
440 440
 		]);
441 441
 		
442 442
 		$adapter = new AwsS3Adapter($client, get_option("xcloner_aws_bucket_name"));
@@ -599,9 +599,9 @@  discard block
 block discarded – undo
599 599
 		{
600 600
 			$query = sprintf('mimeType = \'application/vnd.google-apps.folder\' and \'%s\' in parents and name contains \'%s\'', $parent, $dir);
601 601
 			$response = $service->files->listFiles([
602
-	                'pageSize' => 1,
603
-	                'q' => $query
604
-	            ]);
602
+					'pageSize' => 1,
603
+					'q' => $query
604
+				]);
605 605
 			
606 606
 			if(sizeof($response))
607 607
 			{
@@ -630,16 +630,16 @@  discard block
 block discarded – undo
630 630
 		$this->logger->info(sprintf("Creating the FTP remote storage connection"), array(""));
631 631
 		
632 632
 		$adapter = new Adapter([
633
-		    'host' => get_option("xcloner_ftp_hostname"),
634
-		    'username' => get_option("xcloner_ftp_username"),
635
-		    'password' => get_option("xcloner_ftp_password"),
636
-		
637
-		    /** optional config settings */
638
-		    'port' => get_option("xcloner_ftp_port", 21),
639
-		    'root' => get_option("xcloner_ftp_path"),
640
-		    'passive' => get_option("xcloner_ftp_transfer_mode"),
641
-		    'ssl' => get_option("xcloner_ftp_ssl_mode"),
642
-		    'timeout' => get_option("xcloner_ftp_timeout", 30),
633
+			'host' => get_option("xcloner_ftp_hostname"),
634
+			'username' => get_option("xcloner_ftp_username"),
635
+			'password' => get_option("xcloner_ftp_password"),
636
+		
637
+			/** optional config settings */
638
+			'port' => get_option("xcloner_ftp_port", 21),
639
+			'root' => get_option("xcloner_ftp_path"),
640
+			'passive' => get_option("xcloner_ftp_transfer_mode"),
641
+			'ssl' => get_option("xcloner_ftp_ssl_mode"),
642
+			'timeout' => get_option("xcloner_ftp_timeout", 30),
643 643
 		]);
644 644
 		
645 645
 		$adapter->connect();
@@ -656,15 +656,15 @@  discard block
 block discarded – undo
656 656
 		$this->logger->info(sprintf("Creating the SFTP remote storage connection"), array(""));
657 657
 		
658 658
 		$adapter = new SftpAdapter([
659
-		    'host' => get_option("xcloner_sftp_hostname"),
660
-		    'username' => get_option("xcloner_sftp_username"),
661
-		    'password' => get_option("xcloner_sftp_password"),
662
-		
663
-		    /** optional config settings */
664
-		    'port' => get_option("xcloner_sftp_port", 22),
665
-		    'root' => get_option("xcloner_sftp_path"),
666
-		    'privateKey' => get_option("xcloner_sftp_private_key"),
667
-		    'timeout' => get_option("xcloner_ftp_timeout", 30),
659
+			'host' => get_option("xcloner_sftp_hostname"),
660
+			'username' => get_option("xcloner_sftp_username"),
661
+			'password' => get_option("xcloner_sftp_password"),
662
+		
663
+			/** optional config settings */
664
+			'port' => get_option("xcloner_sftp_port", 22),
665
+			'root' => get_option("xcloner_sftp_path"),
666
+			'privateKey' => get_option("xcloner_sftp_private_key"),
667
+			'timeout' => get_option("xcloner_ftp_timeout", 30),
668 668
 		]);
669 669
 		
670 670
 		$adapter->connect();
Please login to merge, or discard this patch.
Spacing   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
 use Sabre\DAV\Client as SabreClient;
22 22
 use League\Flysystem\WebDAV\WebDAVAdapter;
23 23
 
24
-class Xcloner_Remote_Storage{
24
+class Xcloner_Remote_Storage {
25 25
 	
26
-	private $gdrive_app_name 		= "XCloner Backup and Restore";
26
+	private $gdrive_app_name = "XCloner Backup and Restore";
27 27
 	
28 28
 	private $storage_fields = array(
29 29
 					"option_prefix" => "xcloner_",
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 	{
134 134
 		$this->xcloner_sanitization 	= $xcloner_container->get_xcloner_sanitization();
135 135
 		$this->xcloner_file_system 		= $xcloner_container->get_xcloner_filesystem();
136
-		$this->logger 					= $xcloner_container->get_xcloner_logger()->withName("xcloner_remote_storage");
137
-		$this->xcloner 					= $xcloner_container;
136
+		$this->logger = $xcloner_container->get_xcloner_logger()->withName("xcloner_remote_storage");
137
+		$this->xcloner = $xcloner_container;
138 138
 	}
139 139
 	
140 140
 	private function get_xcloner_container()
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 	public function get_available_storages()
146 146
 	{
147 147
 		$return = array();
148
-		foreach($this->storage_fields as $storage=>$data)
148
+		foreach ($this->storage_fields as $storage=>$data)
149 149
 		{
150 150
 			$check_field = $this->storage_fields["option_prefix"].$storage."_enable";
151
-			if(get_option($check_field))
151
+			if (get_option($check_field))
152 152
 				$return[$storage] = $data['text'];
153 153
 		}
154 154
 		
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 	
158 158
 	public function save($action = "ftp")
159 159
 	{
160
-		if(!$action)
160
+		if (!$action)
161 161
 		{
162 162
 			return false;
163 163
 		}
@@ -165,17 +165,17 @@  discard block
 block discarded – undo
165 165
 		$storage = $this->xcloner_sanitization->sanitize_input_as_string($action);
166 166
 		$this->logger->debug(sprintf("Saving the remote storage %s options", strtoupper($action)));	
167 167
 		
168
-		if(is_array($this->storage_fields[$storage]))
168
+		if (is_array($this->storage_fields[$storage]))
169 169
 		{
170
-			foreach($this->storage_fields[$storage] as $field=>$validation)
170
+			foreach ($this->storage_fields[$storage] as $field=>$validation)
171 171
 			{
172 172
 				$check_field = $this->storage_fields["option_prefix"].$field;
173 173
 				$sanitize_method = "sanitize_input_as_".$validation;
174 174
 				
175
-				if(!isset($_POST[$check_field]))
175
+				if (!isset($_POST[$check_field]))
176 176
 					$_POST[$check_field] = 0;
177 177
 				
178
-				if(!method_exists($this->xcloner_sanitization, $sanitize_method))
178
+				if (!method_exists($this->xcloner_sanitization, $sanitize_method))
179 179
 					$sanitize_method = "sanitize_input_as_string";
180 180
 					
181 181
 				$sanitized_value = $this->xcloner_sanitization->$sanitize_method($_POST[$check_field]);
@@ -189,11 +189,11 @@  discard block
 block discarded – undo
189 189
 	
190 190
 	public function check($action = "ftp")
191 191
 	{
192
-		try{
192
+		try {
193 193
 			$this->verify_filesystem($action);
194 194
 			$this->xcloner->trigger_message(__("%s connection is valid.", 'xcloner-backup-and-restore'), "success", ucfirst($action));
195 195
 			$this->logger->debug(sprintf("Connection to remote storage %s is valid", strtoupper($action)));	
196
-		}catch(Exception $e){
196
+		}catch (Exception $e) {
197 197
 			$this->xcloner->trigger_message("%s connection error: ".$e->getMessage(), "error", ucfirst($action));
198 198
 		}
199 199
 	}
@@ -204,35 +204,35 @@  discard block
 block discarded – undo
204 204
 		
205 205
 		$this->logger->info(sprintf("Checking validity of the remote storage %s filesystem", strtoupper($storage_type)));	
206 206
 		
207
-		if(!method_exists($this, $method))
207
+		if (!method_exists($this, $method))
208 208
 			return false;
209 209
 		
210 210
 		list($adapter, $filesystem) = $this->$method();
211 211
 		
212 212
 		$test_file = substr(".xcloner_".md5(time()), 0, 15);
213 213
 		
214
-		if($storage_type == "gdrive")
214
+		if ($storage_type == "gdrive")
215 215
 		{
216
-			if(!is_array($filesystem->listContents()))
217
-				throw new Exception(__("Could not read data",'xcloner-backup-and-restore'));
216
+			if (!is_array($filesystem->listContents()))
217
+				throw new Exception(__("Could not read data", 'xcloner-backup-and-restore'));
218 218
 			$this->logger->debug(sprintf("I can list data from remote storage %s", strtoupper($storage_type)));	
219 219
 			
220 220
 			return true;
221 221
 		}
222 222
 			
223 223
 		//testing write access
224
-		if(!$filesystem->write($test_file, "data"))
225
-			throw new Exception(__("Could not write data",'xcloner-backup-and-restore'));
224
+		if (!$filesystem->write($test_file, "data"))
225
+			throw new Exception(__("Could not write data", 'xcloner-backup-and-restore'));
226 226
 		$this->logger->debug(sprintf("I can write data to remote storage %s", strtoupper($storage_type)));	
227 227
 		
228 228
 		//testing read access
229
-		if(!$filesystem->read($test_file))
230
-			throw new Exception(__("Could not read data",'xcloner-backup-and-restore'));
229
+		if (!$filesystem->read($test_file))
230
+			throw new Exception(__("Could not read data", 'xcloner-backup-and-restore'));
231 231
 		$this->logger->debug(sprintf("I can read data to remote storage %s", strtoupper($storage_type)));		
232 232
 		
233 233
 		//delete test file
234
-		if(!$filesystem->delete($test_file))
235
-			throw new Exception(__("Could not delete data",'xcloner-backup-and-restore'));
234
+		if (!$filesystem->delete($test_file))
235
+			throw new Exception(__("Could not delete data", 'xcloner-backup-and-restore'));
236 236
 		$this->logger->debug(sprintf("I can delete data to remote storage %s", strtoupper($storage_type)));		
237 237
 		
238 238
 		return true;
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
 	
241 241
 	public function upload_backup_to_storage($file, $storage)
242 242
 	{
243
-		if(!$this->xcloner_file_system->get_storage_filesystem()->has($file))
243
+		if (!$this->xcloner_file_system->get_storage_filesystem()->has($file))
244 244
 		{
245 245
 			$this->logger->info(sprintf("File not found %s in local storage", $file));
246 246
 			return false;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 			
249 249
 		$method = "get_".$storage."_filesystem";	
250 250
 		
251
-		if(!method_exists($this, $method))
251
+		if (!method_exists($this, $method))
252 252
 			return false;
253 253
 			
254 254
 		list($remote_storage_adapter, $remote_storage_filesystem) = $this->$method();
@@ -266,22 +266,22 @@  discard block
 block discarded – undo
266 266
 		
267 267
 		$backup_file_stream = $this->xcloner_file_system->get_storage_filesystem()->readStream($file);
268 268
 
269
-		if(!$remote_storage_filesystem->writeStream($file, $backup_file_stream))
269
+		if (!$remote_storage_filesystem->writeStream($file, $backup_file_stream))
270 270
 		{
271 271
 			$this->logger->info(sprintf("Could not transfer file %s", $file));
272 272
 			return false;
273 273
 		}
274 274
 		
275
-		if($this->xcloner_file_system->is_multipart($file))
275
+		if ($this->xcloner_file_system->is_multipart($file))
276 276
 		{
277 277
 			$parts = $this->xcloner_file_system->get_multipart_files($file);
278
-			if(is_array($parts))
279
-				foreach($parts as $part_file)
278
+			if (is_array($parts))
279
+				foreach ($parts as $part_file)
280 280
 				{
281 281
 					$this->logger->info(sprintf("Transferring backup %s to remote storage %s", $part_file, strtoupper($storage)), array(""));
282 282
 					
283 283
 					$backup_file_stream = $this->xcloner_file_system->get_storage_filesystem()->readStream($part_file);
284
-					if(!$remote_storage_filesystem->writeStream($part_file, $backup_file_stream))
284
+					if (!$remote_storage_filesystem->writeStream($part_file, $backup_file_stream))
285 285
 						return false;
286 286
 				}
287 287
 		}
@@ -298,18 +298,18 @@  discard block
 block discarded – undo
298 298
 		
299 299
 		$target_filename = $file;
300 300
 		
301
-		if(!method_exists($this, $method))
301
+		if (!method_exists($this, $method))
302 302
 			return false;
303 303
 			
304 304
 		list($remote_storage_adapter, $remote_storage_filesystem) = $this->$method();
305 305
 		
306
-		if(!$remote_storage_filesystem->has($file))
306
+		if (!$remote_storage_filesystem->has($file))
307 307
 		{
308 308
 			$this->logger->info(sprintf("File not found %s in remote storage %s", $file, strtoupper($storage)));
309 309
 			return false;
310 310
 		}
311 311
 		
312
-		if($storage == "gdrive")
312
+		if ($storage == "gdrive")
313 313
 		{
314 314
 			$metadata = $remote_storage_filesystem->getMetadata($file);
315 315
 			$target_filename = $metadata['filename'].".".$metadata['extension'];
@@ -319,22 +319,22 @@  discard block
 block discarded – undo
319 319
 		
320 320
 		$backup_file_stream = $remote_storage_filesystem->readStream($file);
321 321
 
322
-		if(!$this->xcloner_file_system->get_storage_filesystem()->writeStream($target_filename, $backup_file_stream))
322
+		if (!$this->xcloner_file_system->get_storage_filesystem()->writeStream($target_filename, $backup_file_stream))
323 323
 		{
324 324
 			$this->logger->info(sprintf("Could not transfer file %s", $file));
325 325
 			return false;
326 326
 		}
327 327
 		
328
-		if($this->xcloner_file_system->is_multipart($target_filename))
328
+		if ($this->xcloner_file_system->is_multipart($target_filename))
329 329
 		{
330 330
 			$parts = $this->xcloner_file_system->get_multipart_files($file, $storage);
331
-			if(is_array($parts))
332
-				foreach($parts as $part_file)
331
+			if (is_array($parts))
332
+				foreach ($parts as $part_file)
333 333
 				{
334 334
 					$this->logger->info(sprintf("Transferring backup %s to local storage from %s storage", $part_file, strtoupper($storage)), array(""));
335 335
 					
336 336
 					$backup_file_stream = $remote_storage_filesystem->readStream($part_file);
337
-					if(!$this->xcloner_file_system->get_storage_filesystem()->writeStream($part_file, $backup_file_stream))
337
+					if (!$this->xcloner_file_system->get_storage_filesystem()->writeStream($part_file, $backup_file_stream))
338 338
 						return false;
339 339
 				}
340 340
 		}
@@ -348,19 +348,19 @@  discard block
 block discarded – undo
348 348
 	public function clean_remote_storage($storage, $remote_storage_filesystem)
349 349
 	{
350 350
 		$check_field = $this->storage_fields["option_prefix"].$storage."_cleanup_days";
351
-		if($expire_days = get_option($check_field))
351
+		if ($expire_days = get_option($check_field))
352 352
 		{
353 353
 			$this->logger->info(sprintf("Doing %s remote storage cleanup for %s days limit", strtoupper($storage), $expire_days));
354 354
 			$files = $remote_storage_filesystem->listContents();
355 355
 			
356 356
 			$current_timestamp = strtotime("-".$expire_days." days");
357 357
 			
358
-			if(is_array($files))
359
-			foreach($files as $file)
358
+			if (is_array($files))
359
+			foreach ($files as $file)
360 360
 			{
361 361
 				$file['timestamp'] = $remote_storage_filesystem->getTimestamp($file['path']);
362 362
 				
363
-				if($current_timestamp >= $file['timestamp'])
363
+				if ($current_timestamp >= $file['timestamp'])
364 364
 				{
365 365
 					$remote_storage_filesystem->delete($file['path']);
366 366
 					$this->logger->info("Deleting remote file ".$file['path']." matching rule", array("RETENTION LIMIT TIMESTAMP", $file['timestamp']." =< ".$expire_days));
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 	{
499 499
 
500 500
 		//if((function_exists("is_plugin_active") && !is_plugin_active("xcloner-google-drive/xcloner-google-drive.php")) || !file_exists(__DIR__ . "/../../xcloner-google-drive/vendor/autoload.php"))
501
-		if(!class_exists('Google_Client'))
501
+		if (!class_exists('Google_Client'))
502 502
 		{
503 503
 			return false;
504 504
 		}
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 	{
525 525
 		$client = $this->gdrive_construct();
526 526
 		
527
-		if(!$client)
527
+		if (!$client)
528 528
 			return false;
529 529
 			
530 530
 		return $authUrl = $client->createAuthUrl();
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
 	{
535 535
 		$client = $this->gdrive_construct();
536 536
 		
537
-		if(!$client)
537
+		if (!$client)
538 538
 		{
539 539
 			$error_msg = "Could not initialize the Google Drive Class, please check that the xcloner-google-drive plugin is enabled...";
540 540
 			$this->logger->error($error_msg);
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
 		update_option("xcloner_gdrive_access_token", $token['access_token']);
548 548
 		update_option("xcloner_gdrive_refresh_token", $token['refresh_token']);
549 549
 		
550
-		$redirect_url = ('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']."?page=xcloner_remote_storage_page#gdrive");
550
+		$redirect_url = ('http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?page=xcloner_remote_storage_page#gdrive");
551 551
 		
552 552
 		?>
553 553
 		<script>
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 		
573 573
 		$client = $this->gdrive_construct();
574 574
 		
575
-		if(!$client)
575
+		if (!$client)
576 576
 		{
577 577
 			$error_msg = "Could not initialize the Google Drive Class, please check that the xcloner-google-drive plugin is enabled...";
578 578
 			$this->logger->error($error_msg);
@@ -584,18 +584,18 @@  discard block
 block discarded – undo
584 584
 		$service = new \Google_Service_Drive($client);
585 585
 		
586 586
 		$parent = 'root';
587
-		$dir = basename( get_option("xcloner_gdrive_target_folder"));
587
+		$dir = basename(get_option("xcloner_gdrive_target_folder"));
588 588
 		
589 589
 		$folderID = get_option("xcloner_gdrive_target_folder");
590 590
 		
591 591
 		$tmp = parse_url($folderID);
592 592
 		
593
-		if(isset($tmp['query']))
593
+		if (isset($tmp['query']))
594 594
 		{
595 595
 			$folderID = str_replace("id=", "", $tmp['query']);
596 596
 		}
597 597
 		
598
-		if(stristr($folderID, "/"))
598
+		if (stristr($folderID, "/"))
599 599
 		{
600 600
 			$query = sprintf('mimeType = \'application/vnd.google-apps.folder\' and \'%s\' in parents and name contains \'%s\'', $parent, $dir);
601 601
 			$response = $service->files->listFiles([
@@ -603,12 +603,12 @@  discard block
 block discarded – undo
603 603
 	                'q' => $query
604 604
 	            ]);
605 605
 			
606
-			if(sizeof($response))
606
+			if (sizeof($response))
607 607
 			{
608 608
 				foreach ($response as $obj) {
609
-					$folderID =  $obj->getId();
609
+					$folderID = $obj->getId();
610 610
 				}
611
-			}else{
611
+			} else {
612 612
 				$this->xcloner->trigger_message(sprintf(__("Could not find folder ID by name %s", 'xcloner-backup-and-restore'), $folderID), "error");
613 613
 			}
614 614
 		}
Please login to merge, or discard this patch.
Braces   +50 added lines, -34 removed lines patch added patch discarded remove patch
@@ -148,8 +148,9 @@  discard block
 block discarded – undo
148 148
 		foreach($this->storage_fields as $storage=>$data)
149 149
 		{
150 150
 			$check_field = $this->storage_fields["option_prefix"].$storage."_enable";
151
-			if(get_option($check_field))
152
-				$return[$storage] = $data['text'];
151
+			if(get_option($check_field)) {
152
+							$return[$storage] = $data['text'];
153
+			}
153 154
 		}
154 155
 		
155 156
 		return $return;
@@ -172,11 +173,13 @@  discard block
 block discarded – undo
172 173
 				$check_field = $this->storage_fields["option_prefix"].$field;
173 174
 				$sanitize_method = "sanitize_input_as_".$validation;
174 175
 				
175
-				if(!isset($_POST[$check_field]))
176
-					$_POST[$check_field] = 0;
176
+				if(!isset($_POST[$check_field])) {
177
+									$_POST[$check_field] = 0;
178
+				}
177 179
 				
178
-				if(!method_exists($this->xcloner_sanitization, $sanitize_method))
179
-					$sanitize_method = "sanitize_input_as_string";
180
+				if(!method_exists($this->xcloner_sanitization, $sanitize_method)) {
181
+									$sanitize_method = "sanitize_input_as_string";
182
+				}
180 183
 					
181 184
 				$sanitized_value = $this->xcloner_sanitization->$sanitize_method($_POST[$check_field]);
182 185
 				update_option($check_field, $sanitized_value);
@@ -193,7 +196,7 @@  discard block
 block discarded – undo
193 196
 			$this->verify_filesystem($action);
194 197
 			$this->xcloner->trigger_message(__("%s connection is valid.", 'xcloner-backup-and-restore'), "success", ucfirst($action));
195 198
 			$this->logger->debug(sprintf("Connection to remote storage %s is valid", strtoupper($action)));	
196
-		}catch(Exception $e){
199
+		} catch(Exception $e){
197 200
 			$this->xcloner->trigger_message("%s connection error: ".$e->getMessage(), "error", ucfirst($action));
198 201
 		}
199 202
 	}
@@ -204,8 +207,9 @@  discard block
 block discarded – undo
204 207
 		
205 208
 		$this->logger->info(sprintf("Checking validity of the remote storage %s filesystem", strtoupper($storage_type)));	
206 209
 		
207
-		if(!method_exists($this, $method))
208
-			return false;
210
+		if(!method_exists($this, $method)) {
211
+					return false;
212
+		}
209 213
 		
210 214
 		list($adapter, $filesystem) = $this->$method();
211 215
 		
@@ -213,26 +217,30 @@  discard block
 block discarded – undo
213 217
 		
214 218
 		if($storage_type == "gdrive")
215 219
 		{
216
-			if(!is_array($filesystem->listContents()))
217
-				throw new Exception(__("Could not read data",'xcloner-backup-and-restore'));
220
+			if(!is_array($filesystem->listContents())) {
221
+							throw new Exception(__("Could not read data",'xcloner-backup-and-restore'));
222
+			}
218 223
 			$this->logger->debug(sprintf("I can list data from remote storage %s", strtoupper($storage_type)));	
219 224
 			
220 225
 			return true;
221 226
 		}
222 227
 			
223 228
 		//testing write access
224
-		if(!$filesystem->write($test_file, "data"))
225
-			throw new Exception(__("Could not write data",'xcloner-backup-and-restore'));
229
+		if(!$filesystem->write($test_file, "data")) {
230
+					throw new Exception(__("Could not write data",'xcloner-backup-and-restore'));
231
+		}
226 232
 		$this->logger->debug(sprintf("I can write data to remote storage %s", strtoupper($storage_type)));	
227 233
 		
228 234
 		//testing read access
229
-		if(!$filesystem->read($test_file))
230
-			throw new Exception(__("Could not read data",'xcloner-backup-and-restore'));
235
+		if(!$filesystem->read($test_file)) {
236
+					throw new Exception(__("Could not read data",'xcloner-backup-and-restore'));
237
+		}
231 238
 		$this->logger->debug(sprintf("I can read data to remote storage %s", strtoupper($storage_type)));		
232 239
 		
233 240
 		//delete test file
234
-		if(!$filesystem->delete($test_file))
235
-			throw new Exception(__("Could not delete data",'xcloner-backup-and-restore'));
241
+		if(!$filesystem->delete($test_file)) {
242
+					throw new Exception(__("Could not delete data",'xcloner-backup-and-restore'));
243
+		}
236 244
 		$this->logger->debug(sprintf("I can delete data to remote storage %s", strtoupper($storage_type)));		
237 245
 		
238 246
 		return true;
@@ -248,8 +256,9 @@  discard block
 block discarded – undo
248 256
 			
249 257
 		$method = "get_".$storage."_filesystem";	
250 258
 		
251
-		if(!method_exists($this, $method))
252
-			return false;
259
+		if(!method_exists($this, $method)) {
260
+					return false;
261
+		}
253 262
 			
254 263
 		list($remote_storage_adapter, $remote_storage_filesystem) = $this->$method();
255 264
 		
@@ -275,14 +284,16 @@  discard block
 block discarded – undo
275 284
 		if($this->xcloner_file_system->is_multipart($file))
276 285
 		{
277 286
 			$parts = $this->xcloner_file_system->get_multipart_files($file);
278
-			if(is_array($parts))
279
-				foreach($parts as $part_file)
287
+			if(is_array($parts)) {
288
+							foreach($parts as $part_file)
280 289
 				{
281 290
 					$this->logger->info(sprintf("Transferring backup %s to remote storage %s", $part_file, strtoupper($storage)), array(""));
291
+			}
282 292
 					
283 293
 					$backup_file_stream = $this->xcloner_file_system->get_storage_filesystem()->readStream($part_file);
284
-					if(!$remote_storage_filesystem->writeStream($part_file, $backup_file_stream))
285
-						return false;
294
+					if(!$remote_storage_filesystem->writeStream($part_file, $backup_file_stream)) {
295
+											return false;
296
+					}
286 297
 				}
287 298
 		}
288 299
 		
@@ -298,8 +309,9 @@  discard block
 block discarded – undo
298 309
 		
299 310
 		$target_filename = $file;
300 311
 		
301
-		if(!method_exists($this, $method))
302
-			return false;
312
+		if(!method_exists($this, $method)) {
313
+					return false;
314
+		}
303 315
 			
304 316
 		list($remote_storage_adapter, $remote_storage_filesystem) = $this->$method();
305 317
 		
@@ -328,14 +340,16 @@  discard block
 block discarded – undo
328 340
 		if($this->xcloner_file_system->is_multipart($target_filename))
329 341
 		{
330 342
 			$parts = $this->xcloner_file_system->get_multipart_files($file, $storage);
331
-			if(is_array($parts))
332
-				foreach($parts as $part_file)
343
+			if(is_array($parts)) {
344
+							foreach($parts as $part_file)
333 345
 				{
334 346
 					$this->logger->info(sprintf("Transferring backup %s to local storage from %s storage", $part_file, strtoupper($storage)), array(""));
347
+			}
335 348
 					
336 349
 					$backup_file_stream = $remote_storage_filesystem->readStream($part_file);
337
-					if(!$this->xcloner_file_system->get_storage_filesystem()->writeStream($part_file, $backup_file_stream))
338
-						return false;
350
+					if(!$this->xcloner_file_system->get_storage_filesystem()->writeStream($part_file, $backup_file_stream)) {
351
+											return false;
352
+					}
339 353
 				}
340 354
 		}
341 355
 		
@@ -355,10 +369,11 @@  discard block
 block discarded – undo
355 369
 			
356 370
 			$current_timestamp = strtotime("-".$expire_days." days");
357 371
 			
358
-			if(is_array($files))
359
-			foreach($files as $file)
372
+			if(is_array($files)) {
373
+						foreach($files as $file)
360 374
 			{
361 375
 				$file['timestamp'] = $remote_storage_filesystem->getTimestamp($file['path']);
376
+			}
362 377
 				
363 378
 				if($current_timestamp >= $file['timestamp'])
364 379
 				{
@@ -524,8 +539,9 @@  discard block
 block discarded – undo
524 539
 	{
525 540
 		$client = $this->gdrive_construct();
526 541
 		
527
-		if(!$client)
528
-			return false;
542
+		if(!$client) {
543
+					return false;
544
+		}
529 545
 			
530 546
 		return $authUrl = $client->createAuthUrl();
531 547
 	}
@@ -608,7 +624,7 @@  discard block
 block discarded – undo
608 624
 				foreach ($response as $obj) {
609 625
 					$folderID =  $obj->getId();
610 626
 				}
611
-			}else{
627
+			} else{
612 628
 				$this->xcloner->trigger_message(sprintf(__("Could not find folder ID by name %s", 'xcloner-backup-and-restore'), $folderID), "error");
613 629
 			}
614 630
 		}
Please login to merge, or discard this patch.
public/class-xcloner-public.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,6 @@
 block discarded – undo
44 44
 	 * Initialize the class and set its properties.
45 45
 	 *
46 46
 	 * @since    1.0.0
47
-	 * @param      string    $plugin_name       The name of the plugin.
48
-	 * @param      string    $version    The version of this plugin.
49 47
 	 */
50 48
 	public function __construct( Xcloner $xcloner_container ) {
51 49
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 	 * @param      string    $plugin_name       The name of the plugin.
48 48
 	 * @param      string    $version    The version of this plugin.
49 49
 	 */
50
-	public function __construct( Xcloner $xcloner_container ) {
50
+	public function __construct(Xcloner $xcloner_container) {
51 51
 
52
-		$this->plugin_name 			= $xcloner_container->get_plugin_name();
53
-		$this->version				= $xcloner_container->get_version();
52
+		$this->plugin_name = $xcloner_container->get_plugin_name();
53
+		$this->version = $xcloner_container->get_version();
54 54
 
55 55
 	}
56 56
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		 * class.
74 74
 		 */
75 75
 
76
-		wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/xcloner-public.css', array(), $this->version, 'all' );
76
+		wp_enqueue_style($this->plugin_name, plugin_dir_url(__FILE__).'css/xcloner-public.css', array(), $this->version, 'all');
77 77
 
78 78
 	}
79 79
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		 * class.
97 97
 		 */
98 98
 
99
-		wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/xcloner-public.js', array( 'jquery' ), $this->version, false );
99
+		wp_enqueue_script($this->plugin_name, plugin_dir_url(__FILE__).'js/xcloner-public.js', array('jquery'), $this->version, false);
100 100
 
101 101
 	}
102 102
 
Please login to merge, or discard this patch.
xcloner.php 2 patches
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@  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 37
 define("DS", DIRECTORY_SEPARATOR);
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
  */
43 43
 function activate_xcloner() 
44 44
 {
45
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-xcloner-activator.php';
45
+	require_once plugin_dir_path(__FILE__).'includes/class-xcloner-activator.php';
46 46
 	Xcloner_Activator::activate();
47 47
 }
48 48
 
@@ -52,31 +52,31 @@  discard block
 block discarded – undo
52 52
  */
53 53
 function deactivate_xcloner() 
54 54
 {
55
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-xcloner-deactivator.php';
55
+	require_once plugin_dir_path(__FILE__).'includes/class-xcloner-deactivator.php';
56 56
 	Xcloner_Deactivator::deactivate();
57 57
 }
58 58
 
59
-register_activation_hook( __FILE__, 'activate_xcloner' );
60
-register_deactivation_hook( __FILE__, 'deactivate_xcloner' );
59
+register_activation_hook(__FILE__, 'activate_xcloner');
60
+register_deactivation_hook(__FILE__, 'deactivate_xcloner');
61 61
 
62
-require_once plugin_dir_path( __FILE__ ) . 'includes/class-xcloner-activator.php';	
62
+require_once plugin_dir_path(__FILE__).'includes/class-xcloner-activator.php';	
63 63
 
64
-if(version_compare(phpversion(), Xcloner_Activator::xcloner_minimum_version, '<'))
64
+if (version_compare(phpversion(), Xcloner_Activator::xcloner_minimum_version, '<'))
65 65
 {
66 66
 	?>
67 67
 	<div class="error notice">
68
-		<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>
68
+		<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>
69 69
 	</div>
70 70
 	<?php	
71
-	require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
72
-	deactivate_plugins( plugin_basename( __FILE__ ) );
71
+	require_once(ABSPATH.'wp-admin/includes/plugin.php');
72
+	deactivate_plugins(plugin_basename(__FILE__));
73 73
 	return;
74 74
 }		
75 75
 		
76
-$db_installed_ver = get_option( "xcloner_db_version" );
76
+$db_installed_ver = get_option("xcloner_db_version");
77 77
 $xcloner_db_version = Xcloner_Activator::xcloner_db_version;
78 78
 
79
-if($db_installed_ver != $xcloner_db_version)
79
+if ($db_installed_ver != $xcloner_db_version)
80 80
 {
81 81
 	Xcloner_Activator::activate();
82 82
 }
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
 	wp_deregister_script('heartbeat');
92 92
 }
93 93
 
94
-if(isset($_GET['page']) and stristr($_GET['page'] ,  "xcloner_"))
94
+if (isset($_GET['page']) and stristr($_GET['page'], "xcloner_"))
95 95
 {
96
-	add_action( 'init', 'stop_heartbeat', 1 );
96
+	add_action('init', 'stop_heartbeat', 1);
97 97
 }	
98 98
 
99 99
 /**
@@ -116,14 +116,14 @@  discard block
 block discarded – undo
116 116
 
117 117
 }
118 118
 
119
-require_once(plugin_dir_path( __FILE__ )  . '/vendor/autoload.php');
120
-require plugin_dir_path( __FILE__ ) . 'includes/class-xcloner.php';
119
+require_once(plugin_dir_path(__FILE__).'/vendor/autoload.php');
120
+require plugin_dir_path(__FILE__).'includes/class-xcloner.php';
121 121
 
122
-try{
122
+try {
123 123
 	
124 124
 	$xcloner_plugin = run_xcloner();
125 125
 	
126
-}catch(Exception $e){
126
+}catch (Exception $e) {
127 127
 	
128 128
 	echo $e->getMessage();
129 129
 	
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
 define("DS", DIRECTORY_SEPARATOR);
38 39
 
@@ -123,7 +124,7 @@  discard block
 block discarded – undo
123 124
 	
124 125
 	$xcloner_plugin = run_xcloner();
125 126
 	
126
-}catch(Exception $e){
127
+} catch(Exception $e){
127 128
 	
128 129
 	echo $e->getMessage();
129 130
 	
Please login to merge, or discard this patch.
admin/partials/xcloner_remote_storage_page.php 2 patches
Spacing   +136 added lines, -136 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 $gdrive_auth_url = "";
5 5
 
6
-if(method_exists($remote_storage, "get_gdrive_auth_url"))
6
+if (method_exists($remote_storage, "get_gdrive_auth_url"))
7 7
 	$gdrive_auth_url = $remote_storage->get_gdrive_auth_url();
8 8
 
9 9
 $gdrive_construct = $remote_storage->gdrive_construct();
@@ -20,12 +20,12 @@  discard block
 block discarded – undo
20 20
 			<!-- FTP STORAGE-->
21 21
 			<li id="ftp">
22 22
 				<div class="collapsible-header">
23
-					<i class="material-icons">computer</i><?php echo __("FTP Storage",'xcloner-backup-and-restore')?>
23
+					<i class="material-icons">computer</i><?php echo __("FTP Storage", 'xcloner-backup-and-restore')?>
24 24
 					<div class="right">
25 25
 						<div class="switch">
26 26
 							<label>
27 27
 							Off
28
-							<input type="checkbox" name="xcloner_ftp_enable" class="status" value="1" <?php if(get_option("xcloner_ftp_enable")) echo "checked"?> \>
28
+							<input type="checkbox" name="xcloner_ftp_enable" class="status" value="1" <?php if (get_option("xcloner_ftp_enable")) echo "checked"?> \>
29 29
 							<span class="lever"></span>
30 30
 							On
31 31
 							</label>
@@ -35,96 +35,96 @@  discard block
 block discarded – undo
35 35
 				<div class="collapsible-body">
36 36
 					<div class="row">
37 37
 						<div class="col s12 m3 label">
38
-							<label for="ftp_host"><?php echo __("Ftp Hostname",'xcloner-backup-and-restore')?></label>
38
+							<label for="ftp_host"><?php echo __("Ftp Hostname", 'xcloner-backup-and-restore')?></label>
39 39
 						</div>
40 40
 						<div class="col s12 m6">
41
-							<input placeholder="<?php echo __("Ftp Hostname",'xcloner-backup-and-restore')?>" id="ftp_host" type="text" name="xcloner_ftp_hostname" class="validate" value="<?php echo get_option("xcloner_ftp_hostname")?>">
41
+							<input placeholder="<?php echo __("Ftp Hostname", 'xcloner-backup-and-restore')?>" id="ftp_host" type="text" name="xcloner_ftp_hostname" class="validate" value="<?php echo get_option("xcloner_ftp_hostname")?>">
42 42
 				        </div>
43 43
 				        <div class=" col s12 m2">
44
-							<input placeholder="<?php echo __("Ftp Port",'xcloner-backup-and-restore')?>" id="ftp_port" type="text" name="xcloner_ftp_port" class="validate" value="<?php echo get_option("xcloner_ftp_port", 21)?>">
44
+							<input placeholder="<?php echo __("Ftp Port", 'xcloner-backup-and-restore')?>" id="ftp_port" type="text" name="xcloner_ftp_port" class="validate" value="<?php echo get_option("xcloner_ftp_port", 21)?>">
45 45
 				        </div>
46 46
 			        </div>
47 47
 			        
48 48
 			        <div class="row">
49 49
 						<div class="col s12 m3 label">
50
-							<label for="ftp_username"><?php echo __("Ftp Username",'xcloner-backup-and-restore')?></label>
50
+							<label for="ftp_username"><?php echo __("Ftp Username", 'xcloner-backup-and-restore')?></label>
51 51
 						</div>	
52 52
 						<div class=" col s12 m6">
53
-							<input placeholder="<?php echo __("Ftp Username",'xcloner-backup-and-restore')?>" id="ftp_username" type="text" name="xcloner_ftp_username" class="validate" value="<?php echo get_option("xcloner_ftp_username")?>" autocomplete="off" >
53
+							<input placeholder="<?php echo __("Ftp Username", 'xcloner-backup-and-restore')?>" id="ftp_username" type="text" name="xcloner_ftp_username" class="validate" value="<?php echo get_option("xcloner_ftp_username")?>" autocomplete="off" >
54 54
 				        </div>
55 55
 			        </div>
56 56
 			        
57 57
 			        
58 58
 			        <div class="row">
59 59
 						<div class="col s12 m3 label">
60
-							<label for="ftp_password"><?php echo __("Ftp Password",'xcloner-backup-and-restore')?></label>
60
+							<label for="ftp_password"><?php echo __("Ftp Password", 'xcloner-backup-and-restore')?></label>
61 61
 						</div>
62 62
 						<div class=" col s12 m6">
63
-							<input placeholder="<?php echo __("Ftp Password",'xcloner-backup-and-restore')?>" id="ftp_password" type="password" name="xcloner_ftp_password" class="validate" value="<?php echo get_option("xcloner_ftp_password")?>" autocomplete="off" >
63
+							<input placeholder="<?php echo __("Ftp Password", 'xcloner-backup-and-restore')?>" id="ftp_password" type="password" name="xcloner_ftp_password" class="validate" value="<?php echo get_option("xcloner_ftp_password")?>" autocomplete="off" >
64 64
 				        </div>
65 65
 			        </div>
66 66
 			        
67 67
 			        <div class="row">
68 68
 						<div class="col s12 m3 label">
69
-							<label for="ftp_root"><?php echo __("Ftp Storage Folder",'xcloner-backup-and-restore')?></label>
69
+							<label for="ftp_root"><?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore')?></label>
70 70
 						</div>
71 71
 						<div class=" col s12 m6">
72
-							<input placeholder="<?php echo __("Ftp Storage Folder",'xcloner-backup-and-restore')?>" id="ftp_root" type="text" name="xcloner_ftp_path" class="validate" value="<?php echo get_option("xcloner_ftp_path")?>">
72
+							<input placeholder="<?php echo __("Ftp Storage Folder", 'xcloner-backup-and-restore')?>" id="ftp_root" type="text" name="xcloner_ftp_path" class="validate" value="<?php echo get_option("xcloner_ftp_path")?>">
73 73
 						</div>	
74 74
 			        </div>
75 75
 			        
76 76
 			        <div class="row">
77 77
 						<div class="col s12 m3 label">
78
-							<label for="ftp_root"><?php echo __("Ftp Transfer Mode",'xcloner-backup-and-restore')?></label>
78
+							<label for="ftp_root"><?php echo __("Ftp Transfer Mode", 'xcloner-backup-and-restore')?></label>
79 79
 						</div>
80 80
 						<div class=" col s12 m6 input-field inline">
81
-							<input name="xcloner_ftp_transfer_mode" type="radio" id="passive" value="1" <?php if(get_option("xcloner_ftp_transfer_mode", 1)) echo "checked"?> />
82
-							<label for="passive"><?php echo __("Passive",'xcloner-backup-and-restore')?></label>
81
+							<input name="xcloner_ftp_transfer_mode" type="radio" id="passive" value="1" <?php if (get_option("xcloner_ftp_transfer_mode", 1)) echo "checked"?> />
82
+							<label for="passive"><?php echo __("Passive", 'xcloner-backup-and-restore')?></label>
83 83
 
84
-							<input name="xcloner_ftp_transfer_mode" type="radio" id="active" value="0" <?php if(!get_option("xcloner_ftp_transfer_mode", 1)) echo "checked"?> />
85
-							<label for="active"><?php echo __("Active",'xcloner-backup-and-restore')?></label>
84
+							<input name="xcloner_ftp_transfer_mode" type="radio" id="active" value="0" <?php if (!get_option("xcloner_ftp_transfer_mode", 1)) echo "checked"?> />
85
+							<label for="active"><?php echo __("Active", 'xcloner-backup-and-restore')?></label>
86 86
 						</div>	
87 87
 			        </div>
88 88
 			        
89 89
 			        <div class="row">
90 90
 						<div class="col s12 m3 label">
91
-							<label for="ftp_ssl_mode"><?php echo __("Ftp Secure Connection",'xcloner-backup-and-restore')?></label>
91
+							<label for="ftp_ssl_mode"><?php echo __("Ftp Secure Connection", 'xcloner-backup-and-restore')?></label>
92 92
 						</div>
93 93
 						<div class=" col s12 m6 input-field inline">
94
-							<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_inactive" value="0" <?php if(!get_option("xcloner_ftp_ssl_mode")) echo "checked"?> />
95
-							<label for="ftp_ssl_mode_inactive"><?php echo __("Disable",'xcloner-backup-and-restore')?></label>
94
+							<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_inactive" value="0" <?php if (!get_option("xcloner_ftp_ssl_mode")) echo "checked"?> />
95
+							<label for="ftp_ssl_mode_inactive"><?php echo __("Disable", 'xcloner-backup-and-restore')?></label>
96 96
 
97
-							<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_active" value="1" <?php if(get_option("xcloner_ftp_ssl_mode")) echo "checked"?> />
98
-							<label for="ftp_ssl_mode_active"><?php echo __("Enable",'xcloner-backup-and-restore')?></label>
97
+							<input name="xcloner_ftp_ssl_mode" type="radio" id="ftp_ssl_mode_active" value="1" <?php if (get_option("xcloner_ftp_ssl_mode")) echo "checked"?> />
98
+							<label for="ftp_ssl_mode_active"><?php echo __("Enable", 'xcloner-backup-and-restore')?></label>
99 99
 						</div>	
100 100
 			        </div>
101 101
 			        
102 102
 			        <div class="row">
103 103
 						<div class="col s12 m3 label">
104
-							<label for="ftp_timeout"><?php echo __("Ftp Timeout",'xcloner-backup-and-restore')?></label>
104
+							<label for="ftp_timeout"><?php echo __("Ftp Timeout", 'xcloner-backup-and-restore')?></label>
105 105
 						</div>
106 106
 						<div class=" col s12 m2">
107
-							<input placeholder="<?php echo __("Ftp Timeout",'xcloner-backup-and-restore')?>" id="ftp_timeout" type="text" name="xcloner_ftp_timeout" class="validate" value="<?php echo get_option("xcloner_ftp_timeout", 30)?>">
107
+							<input placeholder="<?php echo __("Ftp Timeout", 'xcloner-backup-and-restore')?>" id="ftp_timeout" type="text" name="xcloner_ftp_timeout" class="validate" value="<?php echo get_option("xcloner_ftp_timeout", 30)?>">
108 108
 				        </div>
109 109
 			        </div>
110 110
 			        
111 111
 			        <div class="row">
112 112
 						<div class="col s12 m3 label">
113
-							<label for="ftp_cleanup_days"><?php echo __("Ftp Cleanup (days)",'xcloner-backup-and-restore')?></label>
113
+							<label for="ftp_cleanup_days"><?php echo __("Ftp Cleanup (days)", 'xcloner-backup-and-restore')?></label>
114 114
 						</div>
115 115
 						<div class=" col s12 m6">
116
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="ftp_cleanup_days" type="text" name="xcloner_ftp_cleanup_days" class="validate" value="<?php echo get_option("xcloner_ftp_cleanup_days")?>">
116
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="ftp_cleanup_days" type="text" name="xcloner_ftp_cleanup_days" class="validate" value="<?php echo get_option("xcloner_ftp_cleanup_days")?>">
117 117
 				        </div>
118 118
 			        </div>
119 119
 			        
120 120
 			        <div class="row">
121 121
 						<div class="col s6 m4">
122
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="ftp"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
122
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="ftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
123 123
 								<i class="material-icons right">save</i>
124 124
 							</button>
125 125
 						</div>	
126 126
 						<div class="col s6 m4">
127
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="ftp" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
127
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="ftp" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
128 128
 								<i class="material-icons right">import_export</i>
129 129
 							</button>
130 130
 						</div>
@@ -135,12 +135,12 @@  discard block
 block discarded – undo
135 135
 			<!-- SFTP STORAGE-->
136 136
 			<li id="sftp">
137 137
 				<div class="collapsible-header">
138
-					<i class="material-icons">computer</i><?php echo __("SFTP Storage",'xcloner-backup-and-restore')?>
138
+					<i class="material-icons">computer</i><?php echo __("SFTP Storage", 'xcloner-backup-and-restore')?>
139 139
 					<div class="right">
140 140
 						<div class="switch">
141 141
 							<label>
142 142
 							Off
143
-							<input type="checkbox" name="xcloner_sftp_enable" class="status" value="1" <?php if(get_option("xcloner_sftp_enable")) echo "checked"?> \>
143
+							<input type="checkbox" name="xcloner_sftp_enable" class="status" value="1" <?php if (get_option("xcloner_sftp_enable")) echo "checked"?> \>
144 144
 							<span class="lever"></span>
145 145
 							On
146 146
 							</label>
@@ -150,79 +150,79 @@  discard block
 block discarded – undo
150 150
 				<div class="collapsible-body">
151 151
 					<div class="row">
152 152
 						<div class="col s12 m3 label">
153
-							<label for="sftp_host"><?php echo __("SFTP Hostname",'xcloner-backup-and-restore')?></label>
153
+							<label for="sftp_host"><?php echo __("SFTP Hostname", 'xcloner-backup-and-restore')?></label>
154 154
 						</div>
155 155
 						<div class="col s12 m6">
156
-							<input placeholder="<?php echo __("SFTP Hostname",'xcloner-backup-and-restore')?>" id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate" value="<?php echo get_option("xcloner_sftp_hostname")?>">
156
+							<input placeholder="<?php echo __("SFTP Hostname", 'xcloner-backup-and-restore')?>" id="sftp_host" type="text" name="xcloner_sftp_hostname" class="validate" value="<?php echo get_option("xcloner_sftp_hostname")?>">
157 157
 				        </div>
158 158
 				        <div class=" col s12 m2">
159
-							<input placeholder="<?php echo __("SFTP Port",'xcloner-backup-and-restore')?>" id="sftp_port" type="text" name="xcloner_sftp_port" class="validate" value="<?php echo get_option("xcloner_sftp_port", 22)?>">
159
+							<input placeholder="<?php echo __("SFTP Port", 'xcloner-backup-and-restore')?>" id="sftp_port" type="text" name="xcloner_sftp_port" class="validate" value="<?php echo get_option("xcloner_sftp_port", 22)?>">
160 160
 				        </div>
161 161
 			        </div>
162 162
 			        
163 163
 			        <div class="row">
164 164
 						<div class="col s12 m3 label">
165
-							<label for="sftp_username"><?php echo __("SFTP Username",'xcloner-backup-and-restore')?></label>
165
+							<label for="sftp_username"><?php echo __("SFTP Username", 'xcloner-backup-and-restore')?></label>
166 166
 						</div>	
167 167
 						<div class=" col s12 m6">
168
-							<input placeholder="<?php echo __("SFTP Username",'xcloner-backup-and-restore')?>" id="sftp_username" type="text" name="xcloner_sftp_username" class="validate" value="<?php echo get_option("xcloner_sftp_username")?>" autocomplete="off" >
168
+							<input placeholder="<?php echo __("SFTP Username", 'xcloner-backup-and-restore')?>" id="sftp_username" type="text" name="xcloner_sftp_username" class="validate" value="<?php echo get_option("xcloner_sftp_username")?>" autocomplete="off" >
169 169
 				        </div>
170 170
 			        </div>
171 171
 			        
172 172
 			        
173 173
 			        <div class="row">
174 174
 						<div class="col s12 m3 label">
175
-							<label for="sftp_password"><?php echo __("SFTP Password",'xcloner-backup-and-restore')?></label>
175
+							<label for="sftp_password"><?php echo __("SFTP Password", 'xcloner-backup-and-restore')?></label>
176 176
 						</div>
177 177
 						<div class=" col s12 m6">
178
-							<input placeholder="<?php echo __("SFTP Password",'xcloner-backup-and-restore')?>" id="ftp_spassword" type="password" name="xcloner_sftp_password" class="validate" value="<?php echo get_option("xcloner_sftp_password")?>" autocomplete="off" >
178
+							<input placeholder="<?php echo __("SFTP Password", 'xcloner-backup-and-restore')?>" id="ftp_spassword" type="password" name="xcloner_sftp_password" class="validate" value="<?php echo get_option("xcloner_sftp_password")?>" autocomplete="off" >
179 179
 				        </div>
180 180
 			        </div>
181 181
 			        
182 182
 			        <div class="row">
183 183
 						<div class="col s12 m3 label">
184
-							<label for="sftp_private_key"><?php echo __("SFTP Private Key",'xcloner-backup-and-restore')?></label>
184
+							<label for="sftp_private_key"><?php echo __("SFTP Private Key", 'xcloner-backup-and-restore')?></label>
185 185
 						</div>
186 186
 						<div class=" col s12 m6">
187
-							<input placeholder="<?php echo __("SFTP Private Key",'xcloner-backup-and-restore')?>" id="sftp_private_key" type="text" name="xcloner_sftp_private_key" class="validate" value="<?php echo get_option("xcloner_sftp_private_key")?>">
187
+							<input placeholder="<?php echo __("SFTP Private Key", 'xcloner-backup-and-restore')?>" id="sftp_private_key" type="text" name="xcloner_sftp_private_key" class="validate" value="<?php echo get_option("xcloner_sftp_private_key")?>">
188 188
 						</div>	
189 189
 			        </div>
190 190
 			        
191 191
 			        <div class="row">
192 192
 						<div class="col s12 m3 label">
193
-							<label for="sftp_root"><?php echo __("SFTP Storage Folder",'xcloner-backup-and-restore')?></label>
193
+							<label for="sftp_root"><?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore')?></label>
194 194
 						</div>
195 195
 						<div class=" col s12 m6">
196
-							<input placeholder="<?php echo __("SFTP Storage Folder",'xcloner-backup-and-restore')?>" id="sftp_root" type="text" name="xcloner_sftp_path" class="validate" value="<?php echo get_option("xcloner_sftp_path")?>">
196
+							<input placeholder="<?php echo __("SFTP Storage Folder", 'xcloner-backup-and-restore')?>" id="sftp_root" type="text" name="xcloner_sftp_path" class="validate" value="<?php echo get_option("xcloner_sftp_path")?>">
197 197
 						</div>	
198 198
 			        </div>
199 199
 			        
200 200
 			        <div class="row">
201 201
 						<div class="col s12 m3 label">
202
-							<label for="sftp_timeout"><?php echo __("SFTP Timeout",'xcloner-backup-and-restore')?></label>
202
+							<label for="sftp_timeout"><?php echo __("SFTP Timeout", 'xcloner-backup-and-restore')?></label>
203 203
 						</div>
204 204
 						<div class=" col s12 m2">
205
-							<input placeholder="<?php echo __("SFTP Timeout",'xcloner-backup-and-restore')?>" id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate" value="<?php echo get_option("xcloner_sftp_timeout", 30)?>">
205
+							<input placeholder="<?php echo __("SFTP Timeout", 'xcloner-backup-and-restore')?>" id="sftp_timeout" type="text" name="xcloner_sftp_timeout" class="validate" value="<?php echo get_option("xcloner_sftp_timeout", 30)?>">
206 206
 				        </div>
207 207
 			        </div>
208 208
 			        
209 209
 			        <div class="row">
210 210
 						<div class="col s12 m3 label">
211
-							<label for="sftp_cleanup_days"><?php echo __("SFTP Cleanup (days)",'xcloner-backup-and-restore')?></label>
211
+							<label for="sftp_cleanup_days"><?php echo __("SFTP Cleanup (days)", 'xcloner-backup-and-restore')?></label>
212 212
 						</div>
213 213
 						<div class=" col s12 m6">
214
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="sftp_cleanup_days" type="text" name="xcloner_sftp_cleanup_days" class="validate" value="<?php echo get_option("xcloner_sftp_cleanup_days")?>">
214
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="sftp_cleanup_days" type="text" name="xcloner_sftp_cleanup_days" class="validate" value="<?php echo get_option("xcloner_sftp_cleanup_days")?>">
215 215
 				        </div>
216 216
 			        </div>
217 217
 			        
218 218
 			        <div class="row">
219 219
 						<div class="col s6 m4">
220
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="sftp"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
220
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="sftp"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
221 221
 								<i class="material-icons right">save</i>
222 222
 							</button>
223 223
 						</div>	
224 224
 						<div class="col s6 m4">
225
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="sftp" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
225
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="sftp" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
226 226
 								<i class="material-icons right">import_export</i>
227 227
 							</button>
228 228
 						</div>
@@ -234,12 +234,12 @@  discard block
 block discarded – undo
234 234
 			<!-- AWS STORAGE-->
235 235
 			<li id="aws">
236 236
 				<div class="collapsible-header">
237
-					<i class="material-icons">computer</i><?php echo __("AWS Storage",'xcloner-backup-and-restore')?>
237
+					<i class="material-icons">computer</i><?php echo __("AWS Storage", 'xcloner-backup-and-restore')?>
238 238
 					<div class="right">
239 239
 						<div class="switch">
240 240
 							<label>
241 241
 							Off
242
-							<input type="checkbox" name="xcloner_aws_enable" class="status" value="1" <?php if(get_option("xcloner_aws_enable")) echo "checked"?> \>
242
+							<input type="checkbox" name="xcloner_aws_enable" class="status" value="1" <?php if (get_option("xcloner_aws_enable")) echo "checked"?> \>
243 243
 							<span class="lever"></span>
244 244
 							On
245 245
 							</label>
@@ -261,35 +261,35 @@  discard block
 block discarded – undo
261 261
 			        
262 262
 			        <div class="row">
263 263
 						<div class="col s12 m3 label">
264
-							<label for="aws_key"><?php echo __("AWS Key",'xcloner-backup-and-restore')?></label>
264
+							<label for="aws_key"><?php echo __("AWS Key", 'xcloner-backup-and-restore')?></label>
265 265
 						</div>	
266 266
 						<div class=" col s12 m6">
267
-							<input placeholder="<?php echo __("AWS Key",'xcloner-backup-and-restore')?>" id="aws_key" type="text" name="xcloner_aws_key" class="validate" value="<?php echo get_option("xcloner_aws_key")?>" autocomplete="off" >
267
+							<input placeholder="<?php echo __("AWS Key", 'xcloner-backup-and-restore')?>" id="aws_key" type="text" name="xcloner_aws_key" class="validate" value="<?php echo get_option("xcloner_aws_key")?>" autocomplete="off" >
268 268
 				        </div>
269 269
 			        </div>
270 270
 			        
271 271
 			        <div class="row">
272 272
 						<div class="col s12 m3 label">
273
-							<label for="aws_secret"><?php echo __("AWS Secret",'xcloner-backup-and-restore')?></label>
273
+							<label for="aws_secret"><?php echo __("AWS Secret", 'xcloner-backup-and-restore')?></label>
274 274
 						</div>	
275 275
 						<div class=" col s12 m6">
276
-							<input placeholder="<?php echo __("AWS Secret",'xcloner-backup-and-restore')?>" id="aws_secret" type="text" name="xcloner_aws_secret" class="validate" value="<?php echo get_option("xcloner_aws_secret")?>" autocomplete="off" >
276
+							<input placeholder="<?php echo __("AWS Secret", 'xcloner-backup-and-restore')?>" id="aws_secret" type="text" name="xcloner_aws_secret" class="validate" value="<?php echo get_option("xcloner_aws_secret")?>" autocomplete="off" >
277 277
 				        </div>
278 278
 			        </div>
279 279
 			        
280 280
 			        <div class="row">
281 281
 						<div class="col s12 m3 label">
282
-							<label for="aws_region"><?php echo __("AWS Region",'xcloner-backup-and-restore')?></label>
282
+							<label for="aws_region"><?php echo __("AWS Region", 'xcloner-backup-and-restore')?></label>
283 283
 						</div>	
284 284
 						<div class=" col s12 m6">
285
-							<select placeholder="<?php echo __("example: us-east-1",'xcloner-backup-and-restore')?>" id="aws_region" type="text" name="xcloner_aws_region" class="validate" value="<?php echo get_option("xcloner_aws_region")?>" autocomplete="off" >
285
+							<select placeholder="<?php echo __("example: us-east-1", 'xcloner-backup-and-restore')?>" id="aws_region" type="text" name="xcloner_aws_region" class="validate" value="<?php echo get_option("xcloner_aws_region")?>" autocomplete="off" >
286 286
 							<option readonly value=""><?php echo __("Please Select AWS Region")?></option>
287 287
 							<?php 							
288 288
 							$aws_regions = $remote_storage->get_aws_regions();
289 289
 							
290
-							foreach($aws_regions as $key=>$region){
290
+							foreach ($aws_regions as $key=>$region) {
291 291
 								?>
292
-								<option value="<?php echo $key?>" <?php echo ($key == get_option('xcloner_aws_region')?"selected":"")?>><?php echo $region?> = <?php echo $key?></option>
292
+								<option value="<?php echo $key?>" <?php echo ($key == get_option('xcloner_aws_region') ? "selected" : "")?>><?php echo $region?> = <?php echo $key?></option>
293 293
 								<?php
294 294
 								}
295 295
 							?>
@@ -299,30 +299,30 @@  discard block
 block discarded – undo
299 299
 			        
300 300
 			        <div class="row">
301 301
 						<div class="col s12 m3 label">
302
-							<label for="aws_bucket_name"><?php echo __("AWS Bucket Name",'xcloner-backup-and-restore')?></label>
302
+							<label for="aws_bucket_name"><?php echo __("AWS Bucket Name", 'xcloner-backup-and-restore')?></label>
303 303
 						</div>	
304 304
 						<div class=" col s12 m6">
305
-							<input placeholder="<?php echo __("AWS Bucket Name",'xcloner-backup-and-restore')?>" id="aws_bucket_name" type="text" name="xcloner_aws_bucket_name" class="validate" value="<?php echo get_option("xcloner_aws_bucket_name")?>" autocomplete="off" >
305
+							<input placeholder="<?php echo __("AWS Bucket Name", 'xcloner-backup-and-restore')?>" id="aws_bucket_name" type="text" name="xcloner_aws_bucket_name" class="validate" value="<?php echo get_option("xcloner_aws_bucket_name")?>" autocomplete="off" >
306 306
 				        </div>
307 307
 			        </div>
308 308
 			        
309 309
 			        <div class="row">
310 310
 						<div class="col s12 m3 label">
311
-							<label for="aws_cleanup_days"><?php echo __("AWS Cleanup (days)",'xcloner-backup-and-restore')?></label>
311
+							<label for="aws_cleanup_days"><?php echo __("AWS Cleanup (days)", 'xcloner-backup-and-restore')?></label>
312 312
 						</div>
313 313
 						<div class=" col s12 m6">
314
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="aws_cleanup_days" type="text" name="xcloner_aws_cleanup_days" class="validate" value="<?php echo get_option("xcloner_aws_cleanup_days")?>">
314
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="aws_cleanup_days" type="text" name="xcloner_aws_cleanup_days" class="validate" value="<?php echo get_option("xcloner_aws_cleanup_days")?>">
315 315
 				        </div>
316 316
 			        </div>
317 317
 			        
318 318
 			        <div class="row">
319 319
 						<div class="col s6 m4">
320
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="aws"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
320
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="aws"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
321 321
 								<i class="material-icons right">save</i>
322 322
 							</button>
323 323
 						</div>	
324 324
 						<div class="col s6 m4">
325
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="aws" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
325
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="aws" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
326 326
 								<i class="material-icons right">import_export</i>
327 327
 							</button>
328 328
 						</div>
@@ -334,12 +334,12 @@  discard block
 block discarded – undo
334 334
 			<!-- DROPBOX STORAGE-->
335 335
 			<li id="dropbox">
336 336
 				<div class="collapsible-header">
337
-					<i class="material-icons">computer</i><?php echo __("Dropbox Storage",'xcloner-backup-and-restore')?>
337
+					<i class="material-icons">computer</i><?php echo __("Dropbox Storage", 'xcloner-backup-and-restore')?>
338 338
 					<div class="right">
339 339
 						<div class="switch">
340 340
 							<label>
341 341
 							Off
342
-							<input type="checkbox" name="xcloner_dropbox_enable" class="status" value="1" <?php if(get_option("xcloner_dropbox_enable")) echo "checked"?> \>
342
+							<input type="checkbox" name="xcloner_dropbox_enable" class="status" value="1" <?php if (get_option("xcloner_dropbox_enable")) echo "checked"?> \>
343 343
 							<span class="lever"></span>
344 344
 							On
345 345
 							</label>
@@ -361,49 +361,49 @@  discard block
 block discarded – undo
361 361
 			        
362 362
 			        <div class="row">
363 363
 						<div class="col s12 m3 label">
364
-							<label for="dropbox_access_token"><?php echo __("Dropbox Access Token",'xcloner-backup-and-restore')?></label>
364
+							<label for="dropbox_access_token"><?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore')?></label>
365 365
 						</div>	
366 366
 						<div class=" col s12 m6">
367
-							<input placeholder="<?php echo __("Dropbox Access Token",'xcloner-backup-and-restore')?>" id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token" class="validate" value="<?php echo get_option("xcloner_dropbox_access_token")?>" autocomplete="off" >
367
+							<input placeholder="<?php echo __("Dropbox Access Token", 'xcloner-backup-and-restore')?>" id="dropbox_access_token" type="text" name="xcloner_dropbox_access_token" class="validate" value="<?php echo get_option("xcloner_dropbox_access_token")?>" autocomplete="off" >
368 368
 				        </div>
369 369
 			        </div>
370 370
 			        
371 371
 			        
372 372
 			        <div class="row">
373 373
 						<div class="col s12 m3 label">
374
-							<label for="dropbox_app_secret"><?php echo __("Dropbox App Secret",'xcloner-backup-and-restore')?></label>
374
+							<label for="dropbox_app_secret"><?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore')?></label>
375 375
 						</div>
376 376
 						<div class=" col s12 m6">
377
-							<input placeholder="<?php echo __("Dropbox App Secret",'xcloner-backup-and-restore')?>" id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret" class="validate" value="<?php echo get_option("xcloner_dropbox_app_secret")?>" autocomplete="off" >
377
+							<input placeholder="<?php echo __("Dropbox App Secret", 'xcloner-backup-and-restore')?>" id="dropbox_app_secret" type="text" name="xcloner_dropbox_app_secret" class="validate" value="<?php echo get_option("xcloner_dropbox_app_secret")?>" autocomplete="off" >
378 378
 				        </div>
379 379
 			        </div>
380 380
 			        
381 381
 			        <div class="row">
382 382
 						<div class="col s12 m3 label">
383
-							<label for="dropbox_prefix"><?php echo __("Dropbox Prefix",'xcloner-backup-and-restore')?></label>
383
+							<label for="dropbox_prefix"><?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore')?></label>
384 384
 						</div>
385 385
 						<div class=" col s12 m6">
386
-							<input placeholder="<?php echo __("Dropbox Prefix",'xcloner-backup-and-restore')?>" id="dropbox_prefix" type="text" name="xcloner_dropbox_prefix" class="validate" value="<?php echo get_option("xcloner_dropbox_prefix")?>">
386
+							<input placeholder="<?php echo __("Dropbox Prefix", 'xcloner-backup-and-restore')?>" id="dropbox_prefix" type="text" name="xcloner_dropbox_prefix" class="validate" value="<?php echo get_option("xcloner_dropbox_prefix")?>">
387 387
 						</div>	
388 388
 			        </div>
389 389
 			        
390 390
 			        <div class="row">
391 391
 						<div class="col s12 m3 label">
392
-							<label for="dropbox_cleanup_days"><?php echo __("Dropbox Cleanup (days)",'xcloner-backup-and-restore')?></label>
392
+							<label for="dropbox_cleanup_days"><?php echo __("Dropbox Cleanup (days)", 'xcloner-backup-and-restore')?></label>
393 393
 						</div>
394 394
 						<div class=" col s12 m6">
395
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="dropbox_cleanup_days" type="text" name="xcloner_dropbox_cleanup_days" class="validate" value="<?php echo get_option("xcloner_dropbox_cleanup_days")?>">
395
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="dropbox_cleanup_days" type="text" name="xcloner_dropbox_cleanup_days" class="validate" value="<?php echo get_option("xcloner_dropbox_cleanup_days")?>">
396 396
 				        </div>
397 397
 			        </div>
398 398
 			        
399 399
 			        <div class="row">
400 400
 						<div class="col s6 m4">
401
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="dropbox"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
401
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="dropbox"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
402 402
 								<i class="material-icons right">save</i>
403 403
 							</button>
404 404
 						</div>	
405 405
 						<div class="col s6 m4">
406
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="dropbox" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
406
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="dropbox" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
407 407
 								<i class="material-icons right">import_export</i>
408 408
 							</button>
409 409
 						</div>
@@ -415,12 +415,12 @@  discard block
 block discarded – undo
415 415
 			<!-- AZURE STORAGE-->
416 416
 			<li id="azure">
417 417
 				<div class="collapsible-header">
418
-					<i class="material-icons">computer</i><?php echo __("Azure Blog Storage",'xcloner-backup-and-restore')?>
418
+					<i class="material-icons">computer</i><?php echo __("Azure Blog Storage", 'xcloner-backup-and-restore')?>
419 419
 					<div class="right">
420 420
 						<div class="switch">
421 421
 							<label>
422 422
 							Off
423
-							<input type="checkbox" name="xcloner_azure_enable" class="status" value="1" <?php if(get_option("xcloner_azure_enable")) echo "checked"?> \>
423
+							<input type="checkbox" name="xcloner_azure_enable" class="status" value="1" <?php if (get_option("xcloner_azure_enable")) echo "checked"?> \>
424 424
 							<span class="lever"></span>
425 425
 							On
426 426
 							</label>
@@ -435,56 +435,56 @@  discard block
 block discarded – undo
435 435
 						</div>	
436 436
 						<div class=" col s12 m6">
437 437
 							<p>
438
-								<?php echo sprintf(__('Visit %s and get your "Api Key".','xcloner-backup-and-restore'), '<a href="https://azure.microsoft.com/en-us/services/storage/blobs/" target="_blank">https://azure.microsoft.com/en-us/services/storage/blobs/</a>')?>
438
+								<?php echo sprintf(__('Visit %s and get your "Api Key".', 'xcloner-backup-and-restore'), '<a href="https://azure.microsoft.com/en-us/services/storage/blobs/" target="_blank">https://azure.microsoft.com/en-us/services/storage/blobs/</a>')?>
439 439
 							</p>
440 440
 				        </div>
441 441
 			        </div>
442 442
 			        
443 443
 			        <div class="row">
444 444
 						<div class="col s12 m3 label">
445
-							<label for="azure_account_name"><?php echo __("Azure Account Name",'xcloner-backup-and-restore')?></label>
445
+							<label for="azure_account_name"><?php echo __("Azure Account Name", 'xcloner-backup-and-restore')?></label>
446 446
 						</div>	
447 447
 						<div class=" col s12 m6">
448
-							<input placeholder="<?php echo __("Azure Account Name",'xcloner-backup-and-restore')?>" id="azure_account_name" type="text" name="xcloner_azure_account_name" class="validate" value="<?php echo get_option("xcloner_azure_account_name")?>" autocomplete="off" >
448
+							<input placeholder="<?php echo __("Azure Account Name", 'xcloner-backup-and-restore')?>" id="azure_account_name" type="text" name="xcloner_azure_account_name" class="validate" value="<?php echo get_option("xcloner_azure_account_name")?>" autocomplete="off" >
449 449
 				        </div>
450 450
 			        </div>
451 451
 			        
452 452
 			        
453 453
 			        <div class="row">
454 454
 						<div class="col s12 m3 label">
455
-							<label for="azure_api_key"><?php echo __("Azure Api Key",'xcloner-backup-and-restore')?></label>
455
+							<label for="azure_api_key"><?php echo __("Azure Api Key", 'xcloner-backup-and-restore')?></label>
456 456
 						</div>
457 457
 						<div class=" col s12 m6">
458
-							<input placeholder="<?php echo __("Azure Api Key",'xcloner-backup-and-restore')?>" id="azure_api_key" type="text" name="xcloner_azure_api_key" class="validate" value="<?php echo get_option("xcloner_azure_api_key")?>" autocomplete="off" >
458
+							<input placeholder="<?php echo __("Azure Api Key", 'xcloner-backup-and-restore')?>" id="azure_api_key" type="text" name="xcloner_azure_api_key" class="validate" value="<?php echo get_option("xcloner_azure_api_key")?>" autocomplete="off" >
459 459
 				        </div>
460 460
 			        </div>
461 461
 			        
462 462
 			        <div class="row">
463 463
 						<div class="col s12 m3 label">
464
-							<label for="azure_container"><?php echo __("Azure Container",'xcloner-backup-and-restore')?></label>
464
+							<label for="azure_container"><?php echo __("Azure Container", 'xcloner-backup-and-restore')?></label>
465 465
 						</div>
466 466
 						<div class=" col s12 m6">
467
-							<input placeholder="<?php echo __("Azure Container",'xcloner-backup-and-restore')?>" id="azure_container" type="text" name="xcloner_azure_container" class="validate" value="<?php echo get_option("xcloner_azure_container")?>">
467
+							<input placeholder="<?php echo __("Azure Container", 'xcloner-backup-and-restore')?>" id="azure_container" type="text" name="xcloner_azure_container" class="validate" value="<?php echo get_option("xcloner_azure_container")?>">
468 468
 						</div>	
469 469
 			        </div>
470 470
 			        
471 471
 			        <div class="row">
472 472
 						<div class="col s12 m3 label">
473
-							<label for="azure_cleanup_days"><?php echo __("Azure Cleanup (days)",'xcloner-backup-and-restore')?></label>
473
+							<label for="azure_cleanup_days"><?php echo __("Azure Cleanup (days)", 'xcloner-backup-and-restore')?></label>
474 474
 						</div>
475 475
 						<div class=" col s12 m6">
476
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="azure_cleanup_days" type="text" name="xcloner_azure_cleanup_days" class="validate" value="<?php echo get_option("xcloner_azure_cleanup_days")?>">
476
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="azure_cleanup_days" type="text" name="xcloner_azure_cleanup_days" class="validate" value="<?php echo get_option("xcloner_azure_cleanup_days")?>">
477 477
 				        </div>
478 478
 			        </div>
479 479
 			        
480 480
 			        <div class="row">
481 481
 						<div class="col s6 m4">
482
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="azure"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
482
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="azure"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
483 483
 								<i class="material-icons right">save</i>
484 484
 							</button>
485 485
 						</div>	
486 486
 						<div class="col s6 m4">
487
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="azure" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
487
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="azure" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
488 488
 								<i class="material-icons right">import_export</i>
489 489
 							</button>
490 490
 						</div>
@@ -496,12 +496,12 @@  discard block
 block discarded – undo
496 496
 			<!-- BACKBLAZE STORAGE-->
497 497
 			<li id="backblaze">
498 498
 				<div class="collapsible-header">
499
-					<i class="material-icons">computer</i><?php echo __("BackBlaze Storage",'xcloner-backup-and-restore')?>
499
+					<i class="material-icons">computer</i><?php echo __("BackBlaze Storage", 'xcloner-backup-and-restore')?>
500 500
 					<div class="right">
501 501
 						<div class="switch">
502 502
 							<label>
503 503
 							Off
504
-							<input type="checkbox" name="xcloner_backblaze_enable" class="status" value="1" <?php if(get_option("xcloner_backblaze_enable")) echo "checked"?> \>
504
+							<input type="checkbox" name="xcloner_backblaze_enable" class="status" value="1" <?php if (get_option("xcloner_backblaze_enable")) echo "checked"?> \>
505 505
 							<span class="lever"></span>
506 506
 							On
507 507
 							</label>
@@ -516,56 +516,56 @@  discard block
 block discarded – undo
516 516
 						</div>	
517 517
 						<div class=" col s12 m6">
518 518
 							<p>
519
-								<?php echo sprintf(__('Visit %s and get your Account Id and  Application Key.','xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>')?>
519
+								<?php echo sprintf(__('Visit %s and get your Account Id and  Application Key.', 'xcloner-backup-and-restore'), '<a href="https://secure.backblaze.com/b2_buckets.htm" target="_blank">https://secure.backblaze.com/b2_buckets.htm</a>')?>
520 520
 							</p>
521 521
 				        </div>
522 522
 			        </div>
523 523
 			        
524 524
 			        <div class="row">
525 525
 						<div class="col s12 m3 label">
526
-							<label for="backblaze_account_id"><?php echo __("BackBlaze Account Id",'xcloner-backup-and-restore')?></label>
526
+							<label for="backblaze_account_id"><?php echo __("BackBlaze Account Id", 'xcloner-backup-and-restore')?></label>
527 527
 						</div>	
528 528
 						<div class=" col s12 m6">
529
-							<input placeholder="<?php echo __("BackBlaze Account Id",'xcloner-backup-and-restore')?>" id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id" class="validate" value="<?php echo get_option("xcloner_backblaze_account_id")?>" autocomplete="off" >
529
+							<input placeholder="<?php echo __("BackBlaze Account Id", 'xcloner-backup-and-restore')?>" id="backblaze_account_id" type="text" name="xcloner_backblaze_account_id" class="validate" value="<?php echo get_option("xcloner_backblaze_account_id")?>" autocomplete="off" >
530 530
 				        </div>
531 531
 			        </div>
532 532
 			        
533 533
 			        
534 534
 			        <div class="row">
535 535
 						<div class="col s12 m3 label">
536
-							<label for="backblaze_application_key"><?php echo __("BackBlaze Application Key",'xcloner-backup-and-restore')?></label>
536
+							<label for="backblaze_application_key"><?php echo __("BackBlaze Application Key", 'xcloner-backup-and-restore')?></label>
537 537
 						</div>
538 538
 						<div class=" col s12 m6">
539
-							<input placeholder="<?php echo __("BackBlaze Application Key",'xcloner-backup-and-restore')?>" id="backblaze_application_key" type="text" name="xcloner_backblaze_application_key" class="validate" value="<?php echo get_option("xcloner_backblaze_application_key")?>" autocomplete="off" >
539
+							<input placeholder="<?php echo __("BackBlaze Application Key", 'xcloner-backup-and-restore')?>" id="backblaze_application_key" type="text" name="xcloner_backblaze_application_key" class="validate" value="<?php echo get_option("xcloner_backblaze_application_key")?>" autocomplete="off" >
540 540
 				        </div>
541 541
 			        </div>
542 542
 			        
543 543
 			        <div class="row">
544 544
 						<div class="col s12 m3 label">
545
-							<label for="backblaze_bucket_name"><?php echo __("BackBlaze Bucket Name",'xcloner-backup-and-restore')?></label>
545
+							<label for="backblaze_bucket_name"><?php echo __("BackBlaze Bucket Name", 'xcloner-backup-and-restore')?></label>
546 546
 						</div>
547 547
 						<div class=" col s12 m6">
548
-							<input placeholder="<?php echo __("BackBlaze Bucket Name",'xcloner-backup-and-restore')?>" id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name" class="validate" value="<?php echo get_option("xcloner_backblaze_bucket_name")?>" autocomplete="off" >
548
+							<input placeholder="<?php echo __("BackBlaze Bucket Name", 'xcloner-backup-and-restore')?>" id="backblaze_bucket_name" type="text" name="xcloner_backblaze_bucket_name" class="validate" value="<?php echo get_option("xcloner_backblaze_bucket_name")?>" autocomplete="off" >
549 549
 				        </div>
550 550
 			        </div>
551 551
 			        
552 552
 			        <div class="row">
553 553
 						<div class="col s12 m3 label">
554
-							<label for="backblaze_cleanup_days"><?php echo __("BackBlaze Cleanup (days)",'xcloner-backup-and-restore')?></label>
554
+							<label for="backblaze_cleanup_days"><?php echo __("BackBlaze Cleanup (days)", 'xcloner-backup-and-restore')?></label>
555 555
 						</div>
556 556
 						<div class=" col s12 m6">
557
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="backblaze_cleanup_days" type="text" name="xcloner_backblaze_cleanup_days" class="validate" value="<?php echo get_option("xcloner_backblaze_cleanup_days")?>">
557
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="backblaze_cleanup_days" type="text" name="xcloner_backblaze_cleanup_days" class="validate" value="<?php echo get_option("xcloner_backblaze_cleanup_days")?>">
558 558
 				        </div>
559 559
 			        </div>
560 560
 			        
561 561
 			        <div class="row">
562 562
 						<div class="col s6 m4">
563
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="backblaze"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
563
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="backblaze"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
564 564
 								<i class="material-icons right">save</i>
565 565
 							</button>
566 566
 						</div>	
567 567
 						<div class="col s6 m4">
568
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="backblaze" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
568
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="backblaze" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
569 569
 								<i class="material-icons right">import_export</i>
570 570
 							</button>
571 571
 						</div>
@@ -577,12 +577,12 @@  discard block
 block discarded – undo
577 577
 			<!-- WEBDAV STORAGE-->
578 578
 			<li id="webdav">
579 579
 				<div class="collapsible-header">
580
-					<i class="material-icons">computer</i><?php echo __("WebDAV Storage",'xcloner-backup-and-restore')?>
580
+					<i class="material-icons">computer</i><?php echo __("WebDAV Storage", 'xcloner-backup-and-restore')?>
581 581
 					<div class="right">
582 582
 						<div class="switch">
583 583
 							<label>
584 584
 							Off
585
-							<input type="checkbox" name="xcloner_webdav_enable" class="status" value="1" <?php if(get_option("xcloner_webdav_enable")) echo "checked"?> \>
585
+							<input type="checkbox" name="xcloner_webdav_enable" class="status" value="1" <?php if (get_option("xcloner_webdav_enable")) echo "checked"?> \>
586 586
 							<span class="lever"></span>
587 587
 							On
588 588
 							</label>
@@ -604,57 +604,57 @@  discard block
 block discarded – undo
604 604
 			        
605 605
 			        <div class="row">
606 606
 						<div class="col s12 m3 label">
607
-							<label for="webdav_url"><?php echo __("WebDAV Base Url",'xcloner-backup-and-restore')?></label>
607
+							<label for="webdav_url"><?php echo __("WebDAV Base Url", 'xcloner-backup-and-restore')?></label>
608 608
 						</div>	
609 609
 						<div class=" col s12 m6">
610
-							<input placeholder="<?php echo __("WebDAV Base Url",'xcloner-backup-and-restore')?>" id="webdav_url" type="text" name="xcloner_webdav_url" class="validate" value="<?php echo get_option("xcloner_webdav_url")?>" autocomplete="off" >
610
+							<input placeholder="<?php echo __("WebDAV Base Url", 'xcloner-backup-and-restore')?>" id="webdav_url" type="text" name="xcloner_webdav_url" class="validate" value="<?php echo get_option("xcloner_webdav_url")?>" autocomplete="off" >
611 611
 				        </div>
612 612
 			        </div>
613 613
 			        
614 614
 			        <div class="row">
615 615
 						<div class="col s12 m3 label">
616
-							<label for="webdav_username"><?php echo __("WebDAV Username",'xcloner-backup-and-restore')?></label>
616
+							<label for="webdav_username"><?php echo __("WebDAV Username", 'xcloner-backup-and-restore')?></label>
617 617
 						</div>
618 618
 						<div class=" col s12 m6">
619
-							<input placeholder="<?php echo __("WebDAV Username",'xcloner-backup-and-restore')?>" id="webdav_username" type="text" name="xcloner_webdav_username" class="validate" value="<?php echo get_option("xcloner_webdav_username")?>" autocomplete="off" >
619
+							<input placeholder="<?php echo __("WebDAV Username", 'xcloner-backup-and-restore')?>" id="webdav_username" type="text" name="xcloner_webdav_username" class="validate" value="<?php echo get_option("xcloner_webdav_username")?>" autocomplete="off" >
620 620
 				        </div>
621 621
 			        </div>
622 622
 			        
623 623
 			        <div class="row">
624 624
 						<div class="col s12 m3 label">
625
-							<label for="webdav_password"><?php echo __("WebDAV Password",'xcloner-backup-and-restore')?></label>
625
+							<label for="webdav_password"><?php echo __("WebDAV Password", 'xcloner-backup-and-restore')?></label>
626 626
 						</div>
627 627
 						<div class=" col s12 m6">
628
-							<input placeholder="<?php echo __("WebDAV Password",'xcloner-backup-and-restore')?>" id="webdav_password" type="password" name="xcloner_webdav_password" class="validate" value="<?php echo get_option("xcloner_webdav_password")?>" autocomplete="off" >
628
+							<input placeholder="<?php echo __("WebDAV Password", 'xcloner-backup-and-restore')?>" id="webdav_password" type="password" name="xcloner_webdav_password" class="validate" value="<?php echo get_option("xcloner_webdav_password")?>" autocomplete="off" >
629 629
 				        </div>
630 630
 			        </div>
631 631
 			        
632 632
 			        <div class="row">
633 633
 						<div class="col s12 m3 label">
634
-							<label for="webdav_target_folder"><?php echo __("WebDAV Target Folder",'xcloner-backup-and-restore')?></label>
634
+							<label for="webdav_target_folder"><?php echo __("WebDAV Target Folder", 'xcloner-backup-and-restore')?></label>
635 635
 						</div>	
636 636
 						<div class=" col s12 m6">
637
-							<input placeholder="<?php echo __("WebDAV Target Folder",'xcloner-backup-and-restore')?>" id="webdav_target_folder" type="text" name="xcloner_webdav_target_folder" class="validate" value="<?php echo get_option("xcloner_webdav_target_folder")?>" autocomplete="off" >
637
+							<input placeholder="<?php echo __("WebDAV Target Folder", 'xcloner-backup-and-restore')?>" id="webdav_target_folder" type="text" name="xcloner_webdav_target_folder" class="validate" value="<?php echo get_option("xcloner_webdav_target_folder")?>" autocomplete="off" >
638 638
 				        </div>
639 639
 			        </div>
640 640
 			        
641 641
 			        <div class="row">
642 642
 						<div class="col s12 m3 label">
643
-							<label for="webdav_cleanup_days"><?php echo __("WebDAV Cleanup (days)",'xcloner-backup-and-restore')?></label>
643
+							<label for="webdav_cleanup_days"><?php echo __("WebDAV Cleanup (days)", 'xcloner-backup-and-restore')?></label>
644 644
 						</div>
645 645
 						<div class=" col s12 m6">
646
-							<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="webdav_cleanup_days" type="text" name="xcloner_webdav_cleanup_days" class="validate" value="<?php echo get_option("xcloner_webdav_cleanup_days")?>">
646
+							<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="webdav_cleanup_days" type="text" name="xcloner_webdav_cleanup_days" class="validate" value="<?php echo get_option("xcloner_webdav_cleanup_days")?>">
647 647
 				        </div>
648 648
 			        </div>
649 649
 			        
650 650
 			        <div class="row">
651 651
 						<div class="col s6 m4">
652
-							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="webdav"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
652
+							<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="webdav"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
653 653
 								<i class="material-icons right">save</i>
654 654
 							</button>
655 655
 						</div>	
656 656
 						<div class="col s6 m4">
657
-							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="webdav" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
657
+							<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="webdav" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
658 658
 								<i class="material-icons right">import_export</i>
659 659
 							</button>
660 660
 						</div>
@@ -666,13 +666,13 @@  discard block
 block discarded – undo
666 666
 			<!-- Google DRIVE STORAGE-->
667 667
 			<li id="gdrive">
668 668
 				<div class="collapsible-header">
669
-					<i class="material-icons">computer</i><?php echo __("Google Drive Storage",'xcloner-backup-and-restore')?>
670
-					<?php if($gdrive_construct):?>
669
+					<i class="material-icons">computer</i><?php echo __("Google Drive Storage", 'xcloner-backup-and-restore')?>
670
+					<?php if ($gdrive_construct):?>
671 671
 					<div class="right">
672 672
 						<div class="switch">
673 673
 							<label>
674 674
 							Off
675
-							<input type="checkbox" name="xcloner_gdrive_enable" class="status" value="1" <?php if(get_option("xcloner_gdrive_enable")) echo "checked"?> \>
675
+							<input type="checkbox" name="xcloner_gdrive_enable" class="status" value="1" <?php if (get_option("xcloner_gdrive_enable")) echo "checked"?> \>
676 676
 							<span class="lever"></span>
677 677
 							On
678 678
 							</label>
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
 				</div>
683 683
 				<div class="collapsible-body">
684 684
 			        
685
-			        <?php if($gdrive_construct) : ?>
685
+			        <?php if ($gdrive_construct) : ?>
686 686
 			        
687 687
 				        <div class="row">
688 688
 							<div class="col s12 m3 label">
@@ -690,28 +690,28 @@  discard block
 block discarded – undo
690 690
 							</div>	
691 691
 							<div class=" col s12 m9">
692 692
 								<p>
693
-									<?php echo sprintf(__('Visit %s to create a new application and get your Client ID and Client Secret.','xcloner-backup-and-restore'), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>')?>
693
+									<?php echo sprintf(__('Visit %s to create a new application and get your Client ID and Client Secret.', 'xcloner-backup-and-restore'), '<a href="https://console.developers.google.com" target="_blank">https://console.developers.google.com</a>')?>
694 694
 									<a href="https://youtu.be/YXUVPUVgG8k" target="_blank" class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-html="true" 
695
-									data-tooltip="<?php echo sprintf(__('Click here to view a short video explaining how to create the Client ID and Client Secret as well as connecting XCloner with the Google Drive API %s','xcloner-backup-and-restore'),"<br />https://youtu.be/YXUVPUVgG8k")?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
695
+									data-tooltip="<?php echo sprintf(__('Click here to view a short video explaining how to create the Client ID and Client Secret as well as connecting XCloner with the Google Drive API %s', 'xcloner-backup-and-restore'), "<br />https://youtu.be/YXUVPUVgG8k")?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
696 696
 								</p>
697 697
 					        </div>
698 698
 				        </div>
699 699
 			        
700 700
 						<div class="row">
701 701
 							<div class="col s12 m3 label">
702
-								<label for="gdrive_client_id"><?php echo __("Client ID",'xcloner-backup-and-restore')?></label>
702
+								<label for="gdrive_client_id"><?php echo __("Client ID", 'xcloner-backup-and-restore')?></label>
703 703
 							</div>
704 704
 							<div class=" col s12 m6">
705
-								<input placeholder="<?php echo __("Google Client ID",'xcloner-backup-and-restore')?>" id="gdrive_client_id" type="text" name="xcloner_gdrive_client_id" class="validate" value="<?php echo get_option("xcloner_gdrive_client_id")?>">
705
+								<input placeholder="<?php echo __("Google Client ID", 'xcloner-backup-and-restore')?>" id="gdrive_client_id" type="text" name="xcloner_gdrive_client_id" class="validate" value="<?php echo get_option("xcloner_gdrive_client_id")?>">
706 706
 					        </div>
707 707
 				        </div>
708 708
 				        
709 709
 				        <div class="row">
710 710
 							<div class="col s12 m3 label">
711
-								<label for="gdrive_client_secret"><?php echo __("Client Secret",'xcloner-backup-and-restore')?></label>
711
+								<label for="gdrive_client_secret"><?php echo __("Client Secret", 'xcloner-backup-and-restore')?></label>
712 712
 							</div>
713 713
 							<div class=" col s12 m6">
714
-								<input placeholder="<?php echo __("Google Client Secret",'xcloner-backup-and-restore')?>" id="gdrive_client_secret" type="text" name="xcloner_gdrive_client_secret" class="validate" value="<?php echo get_option("xcloner_gdrive_client_secret")?>">
714
+								<input placeholder="<?php echo __("Google Client Secret", 'xcloner-backup-and-restore')?>" id="gdrive_client_secret" type="text" name="xcloner_gdrive_client_secret" class="validate" value="<?php echo get_option("xcloner_gdrive_client_secret")?>">
715 715
 					        </div>
716 716
 				        </div>
717 717
 				        
@@ -721,41 +721,41 @@  discard block
 block discarded – undo
721 721
 								&nbsp;
722 722
 							</div>	
723 723
 							<div class=" col s12 m6">
724
-									<a class="btn" target="_blank" id="gdrive_authorization_click" onclick="jQuery('#authentification_code').show()" href="<?php echo $gdrive_auth_url?>"><?php echo sprintf(__('Authorize Google Drive','xcloner-backup-and-restore'))?></a>
725
-									<input type="text" name="authentification_code" id="authentification_code" placeholder="<?php echo __("Paste Authorization Code Here","xcloner-backup-and-restore")?>">
724
+									<a class="btn" target="_blank" id="gdrive_authorization_click" onclick="jQuery('#authentification_code').show()" href="<?php echo $gdrive_auth_url?>"><?php echo sprintf(__('Authorize Google Drive', 'xcloner-backup-and-restore'))?></a>
725
+									<input type="text" name="authentification_code" id="authentification_code" placeholder="<?php echo __("Paste Authorization Code Here", "xcloner-backup-and-restore")?>">
726 726
 					        </div>
727 727
 				        </div>
728 728
 				        
729 729
 				        <div class="row">
730 730
 							<div class="col s12 m3 label">
731
-								<label for="gdrive_target_folder"><?php echo __("Folder ID or Root Path",'xcloner-backup-and-restore')?>
731
+								<label for="gdrive_target_folder"><?php echo __("Folder ID or Root Path", 'xcloner-backup-and-restore')?>
732 732
 									<a class="btn-floating tooltipped btn-small" data-position="right" data-delay="50" data-html="true" \
733 733
 									data-tooltip="<?php echo __('Folder ID can be found by right clicking on the folder name and selecting \'Get shareable link\' menu, format https://drive.google.com/open?id={FOLDER_ID}<br />
734 734
 									If you supply a folder name, it has to exists in the drive root and start with / , example /backups.xcloner.com/','xcloner-backup-and-restore')?>" data-tooltip-id="92c95730-94e9-7b59-bd52-14adc30d5e3e"><i class="material-icons">help_outline</i></a>	
735 735
 								</label>
736 736
 							</div>	
737 737
 							<div class=" col s12 m6">
738
-								<input placeholder="<?php echo __("Target Folder ID or Root Path",'xcloner-backup-and-restore')?>" id="gdrive_target_folder" type="text" name="xcloner_gdrive_target_folder" class="validate" value="<?php echo get_option("xcloner_gdrive_target_folder")?>" autocomplete="off" >
738
+								<input placeholder="<?php echo __("Target Folder ID or Root Path", 'xcloner-backup-and-restore')?>" id="gdrive_target_folder" type="text" name="xcloner_gdrive_target_folder" class="validate" value="<?php echo get_option("xcloner_gdrive_target_folder")?>" autocomplete="off" >
739 739
 					        </div>
740 740
 				        </div>
741 741
 				        
742 742
 				        <div class="row">
743 743
 							<div class="col s12 m3 label">
744
-								<label for="gdrive_cleanup_days"><?php echo __("Google Drive Cleanup (days)",'xcloner-backup-and-restore')?></label>
744
+								<label for="gdrive_cleanup_days"><?php echo __("Google Drive Cleanup (days)", 'xcloner-backup-and-restore')?></label>
745 745
 							</div>
746 746
 							<div class=" col s12 m6">
747
-								<input placeholder="<?php echo __("how many days to keep the backups for",'xcloner-backup-and-restore')?>" id="gdrive_cleanup_days" type="text" name="xcloner_gdrive_cleanup_days" class="validate" value="<?php echo get_option("xcloner_gdrive_cleanup_days")?>">
747
+								<input placeholder="<?php echo __("how many days to keep the backups for", 'xcloner-backup-and-restore')?>" id="gdrive_cleanup_days" type="text" name="xcloner_gdrive_cleanup_days" class="validate" value="<?php echo get_option("xcloner_gdrive_cleanup_days")?>">
748 748
 					        </div>
749 749
 				        </div>
750 750
 				        
751 751
 				        <div class="row">
752 752
 							<div class="col s6 m4">
753
-								<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="gdrive"><?php echo __("Save Settings",'xcloner-backup-and-restore')?>
753
+								<button class="btn waves-effect waves-light" type="submit" name="action" id="action"  value="gdrive"><?php echo __("Save Settings", 'xcloner-backup-and-restore')?>
754 754
 									<i class="material-icons right">save</i>
755 755
 								</button>
756 756
 							</div>	
757 757
 							<div class="col s6 m4">
758
-								<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="gdrive" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify",'xcloner-backup-and-restore')?>
758
+								<button class="btn waves-effect waves-light orange" type="submit" name="action" id="action"  value="gdrive" onclick="jQuery('#connection_check').val('1')"><?php echo __("Verify", 'xcloner-backup-and-restore')?>
759 759
 									<i class="material-icons right">import_export</i>
760 760
 								</button>
761 761
 							</div>
@@ -771,15 +771,15 @@  discard block
 block discarded – undo
771 771
 									<h6><?php echo __("This storage option requires the XCloner-Google-Drive Wordpress Plugin to be installed and activated.")?></h6>
772 772
 									<h6><?php echo __("PHP 5.5 minimum version is required.")?></h6>
773 773
 									<br />
774
-									<a class="install-now btn" data-slug="xcloner-google-drive" href="<?php echo $url;?>" aria-label="Install XCloner Google Drive 1.0.0 now" data-name="XCloner Google Drive 1.0.0">
775
-										<?php echo sprintf(__('Install Now','xcloner-backup-and-restore'))?>
774
+									<a class="install-now btn" data-slug="xcloner-google-drive" href="<?php echo $url; ?>" aria-label="Install XCloner Google Drive 1.0.0 now" data-name="XCloner Google Drive 1.0.0">
775
+										<?php echo sprintf(__('Install Now', 'xcloner-backup-and-restore'))?>
776 776
 									</a>
777 777
 									
778 778
 									<a href="<?php echo admin_url("plugin-install.php")?>?tab=plugin-information&amp;plugin=xcloner-google-drive&amp;TB_iframe=true&amp;width=772&amp;height=499" class="btn thickbox open-plugin-details-modal" aria-label="More information about Theme Check 20160523.1" data-title="Theme Check 20160523.1">
779 779
 									<!--
780 780
 									<a class="btn" href="https://github.com/ovidiul/XCloner-Google-Drive/archive/master.zip">
781 781
 									-->
782
-										<?php echo sprintf(__('More Details','xcloner-backup-and-restore'))?>
782
+										<?php echo sprintf(__('More Details', 'xcloner-backup-and-restore'))?>
783 783
 									</a>
784 784
 								</div>
785 785
 					        </div>
Please login to merge, or discard this patch.
Braces   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,9 @@  discard block
 block discarded – undo
3 3
 
4 4
 $gdrive_auth_url = "";
5 5
 
6
-if(method_exists($remote_storage, "get_gdrive_auth_url"))
6
+if(method_exists($remote_storage, "get_gdrive_auth_url")) {
7 7
 	$gdrive_auth_url = $remote_storage->get_gdrive_auth_url();
8
+}
8 9
 
9 10
 $gdrive_construct = $remote_storage->gdrive_construct();
10 11
 ?>
@@ -25,7 +26,8 @@  discard block
 block discarded – undo
25 26
 						<div class="switch">
26 27
 							<label>
27 28
 							Off
28
-							<input type="checkbox" name="xcloner_ftp_enable" class="status" value="1" <?php if(get_option("xcloner_ftp_enable")) echo "checked"?> \>
29
+							<input type="checkbox" name="xcloner_ftp_enable" class="status" value="1" <?php if(get_option("xcloner_ftp_enable")) {
30
+	echo "checked"?> \>
29 31
 							<span class="lever"></span>
30 32
 							On
31 33
 							</label>
@@ -286,6 +288,7 @@  discard block
 block discarded – undo
286 288
 							<option readonly value=""><?php echo __("Please Select AWS Region")?></option>
287 289
 							<?php 							
288 290
 							$aws_regions = $remote_storage->get_aws_regions();
291
+}
289 292
 							
290 293
 							foreach($aws_regions as $key=>$region){
291 294
 								?>
@@ -339,7 +342,8 @@  discard block
 block discarded – undo
339 342
 						<div class="switch">
340 343
 							<label>
341 344
 							Off
342
-							<input type="checkbox" name="xcloner_dropbox_enable" class="status" value="1" <?php if(get_option("xcloner_dropbox_enable")) echo "checked"?> \>
345
+							<input type="checkbox" name="xcloner_dropbox_enable" class="status" value="1" <?php if(get_option("xcloner_dropbox_enable")) {
346
+	echo "checked"?> \>
343 347
 							<span class="lever"></span>
344 348
 							On
345 349
 							</label>
@@ -767,6 +771,7 @@  discard block
 block discarded – undo
767 771
 								<div class="center">
768 772
 									<?php 
769 773
 										$url = wp_nonce_url(self_admin_url('update.php?action=install-plugin&plugin=xcloner-google-drive'), 'install-plugin_xcloner-google-drive');
774
+}
770 775
 									?>
771 776
 									<h6><?php echo __("This storage option requires the XCloner-Google-Drive Wordpress Plugin to be installed and activated.")?></h6>
772 777
 									<h6><?php echo __("PHP 5.5 minimum version is required.")?></h6>
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,14 +146,14 @@  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')?>
153 153
 						<span class="right"><a href="#<?php echo $logger_basename = basename($logger->get_main_logger_url())?>" class="download-logger"><?php echo $logger_basename?></a></span>
154 154
 					</div>
155 155
 					<div class="collapsible-body">
156
-						<div class="console" id="xcloner-console"><?php if($logger_content) echo implode("<br />\n", array_reverse($logger_content)); ?></div>
156
+						<div class="console" id="xcloner-console"><?php if ($logger_content) echo implode("<br />\n", array_reverse($logger_content)); ?></div>
157 157
 					</div>
158 158
 				</li>
159 159
 				<script>
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 					}, 2000);*/
166 166
 				})
167 167
 				</script>
168
-				<?php endif;?>
168
+				<?php endif; ?>
169 169
 			
170 170
 			</ul>
171 171
 			
@@ -177,59 +177,59 @@  discard block
 block discarded – undo
177 177
 	  
178 178
 	  <div class="card blue-grey darken-1 z-depth-4 backup-ready">
179 179
 		<div class="card-content white-text">
180
-		  <span class="card-title"><?php echo __("System Check",'xcloner-backup-and-restore')?></span>
180
+		  <span class="card-title"><?php echo __("System Check", 'xcloner-backup-and-restore')?></span>
181 181
 		  <ul>
182
-				<li class="card-panel <?php echo ($requirements->check_xcloner_start_path(1)?"teal":"red")?> lighten-2" >
183
-					<?php echo __('Backup Start Location','xcloner-backup-and-restore')?>: <span class="shorten_string "><?php echo $requirements->check_xcloner_start_path();?></span>
182
+				<li class="card-panel <?php echo ($requirements->check_xcloner_start_path(1) ? "teal" : "red")?> lighten-2" >
183
+					<?php echo __('Backup Start Location', 'xcloner-backup-and-restore')?>: <span class="shorten_string "><?php echo $requirements->check_xcloner_start_path(); ?></span>
184 184
 				</li>
185
-				<li class="card-panel <?php echo ($requirements->check_xcloner_store_path(1)?"teal":"red")?> lighten-2" >
186
-					<?php echo __('Backup Storage Location','xcloner-backup-and-restore')?>: <span class="shorten_string"><?php echo $requirements->check_xcloner_store_path();?></span>
185
+				<li class="card-panel <?php echo ($requirements->check_xcloner_store_path(1) ? "teal" : "red")?> lighten-2" >
186
+					<?php echo __('Backup Storage Location', 'xcloner-backup-and-restore')?>: <span class="shorten_string"><?php echo $requirements->check_xcloner_store_path(); ?></span>
187 187
 				</li>
188
-				<li class="card-panel <?php echo ($requirements->check_xcloner_tmp_path(1)?"teal":"red")?> lighten-2" >
189
-					<?php echo __('Temporary Location','xcloner-backup-and-restore')?>: <span class="shorten_string"><?php echo $requirements->check_xcloner_tmp_path();?></span>
188
+				<li class="card-panel <?php echo ($requirements->check_xcloner_tmp_path(1) ? "teal" : "red")?> lighten-2" >
189
+					<?php echo __('Temporary Location', 'xcloner-backup-and-restore')?>: <span class="shorten_string"><?php echo $requirements->check_xcloner_tmp_path(); ?></span>
190 190
 				</li>
191 191
 				
192
-				<li class="card-panel <?php echo ($requirements->check_min_php_version(1)?"teal":"red")?> lighten-2" >
193
-					<?php echo __('PHP Version Check','xcloner-backup-and-restore')?>: <?php echo $requirements->check_min_php_version();?>
192
+				<li class="card-panel <?php echo ($requirements->check_min_php_version(1) ? "teal" : "red")?> lighten-2" >
193
+					<?php echo __('PHP Version Check', 'xcloner-backup-and-restore')?>: <?php echo $requirements->check_min_php_version(); ?>
194 194
 					( >= <?php echo $requirements->get_constant('min_php_version')?>)
195 195
 				</li>
196
-				<li class="card-panel <?php echo ($requirements->check_safe_mode(1)?"teal":"orange")?> lighten-2" >
197
-					<?php echo __('PHP Safe Mode','xcloner-backup-and-restore')?>: <?php echo $requirements->check_safe_mode();?>
196
+				<li class="card-panel <?php echo ($requirements->check_safe_mode(1) ? "teal" : "orange")?> lighten-2" >
197
+					<?php echo __('PHP Safe Mode', 'xcloner-backup-and-restore')?>: <?php echo $requirements->check_safe_mode(); ?>
198 198
 					( <?php echo $requirements->get_constant('safe_mode')?>)
199 199
 				</li>
200
-				<li class="card-panel <?php echo ($requirements->check_backup_ready_status()?"teal":"red")?> lighten-2">
201
-					<?php echo ($requirements->check_backup_ready_status()?__('BACKUP READY','xcloner-backup-and-restore'):__('Backup not ready, please check above requirements','xcloner-backup-and-restore'))?>
202
-					<i class="material-icons right tiny"><?php echo ($requirements->check_backup_ready_status()?'thumb_up':'thumb_down')?></i>
200
+				<li class="card-panel <?php echo ($requirements->check_backup_ready_status() ? "teal" : "red")?> lighten-2">
201
+					<?php echo ($requirements->check_backup_ready_status() ? __('BACKUP READY', 'xcloner-backup-and-restore') : __('Backup not ready, please check above requirements', 'xcloner-backup-and-restore'))?>
202
+					<i class="material-icons right tiny"><?php echo ($requirements->check_backup_ready_status() ? 'thumb_up' : 'thumb_down')?></i>
203 203
 				</li>
204 204
 		  </ul>
205 205
 		  <ul class="additional_system_info">
206 206
 				<li class="card-panel grey darken-1" >
207
-					<?php echo __('PHP max_execution_time','xcloner-backup-and-restore')?>: <?php echo $requirements->get_max_execution_time();?>
207
+					<?php echo __('PHP max_execution_time', 'xcloner-backup-and-restore')?>: <?php echo $requirements->get_max_execution_time(); ?>
208 208
 				</li>
209 209
 				<li class="card-panel grey darken-1" >
210
-					<?php echo __('PHP memory_limit','xcloner-backup-and-restore')?>: <?php echo $requirements->get_memory_limit();?>
210
+					<?php echo __('PHP memory_limit', 'xcloner-backup-and-restore')?>: <?php echo $requirements->get_memory_limit(); ?>
211 211
 				</li>
212 212
 				<li class="card-panel grey darken-1" >
213
-					<?php echo __('PHP open_basedir','xcloner-backup-and-restore')?>: <?php echo $requirements->get_open_basedir();?>
213
+					<?php echo __('PHP open_basedir', 'xcloner-backup-and-restore')?>: <?php echo $requirements->get_open_basedir(); ?>
214 214
 				</li>
215 215
 				<?php 
216 216
 				$data = array();
217
-				if($requirements->check_backup_ready_status())
217
+				if ($requirements->check_backup_ready_status())
218 218
 					$data = $xcloner_file_system->estimate_read_write_time();
219 219
 				?>
220 220
 				<li class="card-panel grey darken-1" >
221
-					<?php echo __('Reading Time 1MB Block','xcloner-backup-and-restore')?>: <?php echo (isset($data['reading_time'])?$data['reading_time']:__("unknown"));?>
221
+					<?php echo __('Reading Time 1MB Block', 'xcloner-backup-and-restore')?>: <?php echo (isset($data['reading_time']) ? $data['reading_time'] : __("unknown")); ?>
222 222
 				</li>
223 223
 				<li class="card-panel grey darken-1" >
224
-					<?php echo __('Writing Time 1MB Block','xcloner-backup-and-restore')?>: <?php echo (isset($data['writing_time'])?$data['writing_time']:__("unknown"));?>
224
+					<?php echo __('Writing Time 1MB Block', 'xcloner-backup-and-restore')?>: <?php echo (isset($data['writing_time']) ? $data['writing_time'] : __("unknown")); ?>
225 225
 				</li>
226 226
 				<li class="card-panel grey darken-1" >
227
-					<?php echo __('Free Disk Space','xcloner-backup-and-restore')?>: <?php echo $requirements->get_free_disk_space();;?>
227
+					<?php echo __('Free Disk Space', 'xcloner-backup-and-restore')?>: <?php echo $requirements->get_free_disk_space(); ;?>
228 228
 				</li>
229 229
 		  </ul>
230 230
 		</div>
231 231
 		<div class="card-action">
232
-		  <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>
232
+		  <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>
233 233
 		</div>
234 234
 	  </div>
235 235
 
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>
@@ -153,7 +158,10 @@  discard block
 block discarded – undo
153 158
 						<span class="right"><a href="#<?php echo $logger_basename = basename($logger->get_main_logger_url())?>" class="download-logger"><?php echo $logger_basename?></a></span>
154 159
 					</div>
155 160
 					<div class="collapsible-body">
156
-						<div class="console" id="xcloner-console"><?php if($logger_content) echo implode("<br />\n", array_reverse($logger_content)); ?></div>
161
+						<div class="console" id="xcloner-console"><?php if($logger_content) {
162
+	echo implode("<br />\n", array_reverse($logger_content));
163
+}
164
+?></div>
157 165
 					</div>
158 166
 				</li>
159 167
 				<script>
@@ -214,8 +222,9 @@  discard block
 block discarded – undo
214 222
 				</li>
215 223
 				<?php 
216 224
 				$data = array();
217
-				if($requirements->check_backup_ready_status())
218
-					$data = $xcloner_file_system->estimate_read_write_time();
225
+				if($requirements->check_backup_ready_status()) {
226
+									$data = $xcloner_file_system->estimate_read_write_time();
227
+				}
219 228
 				?>
220 229
 				<li class="card-panel grey darken-1" >
221 230
 					<?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_manage_backups_page.php 2 patches
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-$xcloner_file_system 		= $this->get_xcloner_container()->get_xcloner_filesystem();
4
-$xcloner_sanitization 		= $this->get_xcloner_container()->get_xcloner_sanitization();
5
-$xcloner_remote_storage 	= $this->get_xcloner_container()->get_xcloner_remote_storage();
6
-$storage_selection 			= "";
3
+$xcloner_file_system = $this->get_xcloner_container()->get_xcloner_filesystem();
4
+$xcloner_sanitization = $this->get_xcloner_container()->get_xcloner_sanitization();
5
+$xcloner_remote_storage = $this->get_xcloner_container()->get_xcloner_remote_storage();
6
+$storage_selection = "";
7 7
 
8
-if(isset($_GET['storage_selection']) and $_GET['storage_selection'])
8
+if (isset($_GET['storage_selection']) and $_GET['storage_selection'])
9 9
 {
10 10
 	$storage_selection = $xcloner_sanitization->sanitize_input_as_string($_GET['storage_selection']);
11 11
 }
@@ -21,18 +21,18 @@  discard block
 block discarded – undo
21 21
 	<div class="col s12 m6 l9">
22 22
 		<h1><?= esc_html(get_admin_page_title()); ?></h1>
23 23
 	</div>	
24
-	<?php if(sizeof($available_storages)):?>
24
+	<?php if (sizeof($available_storages)):?>
25 25
 		<div class="col s12 m6 l3 remote-storage-selection">
26 26
 				<select name="storage_selection" id="storage_selection" class="validate" required >
27 27
 					
28
-					<?php if($storage_selection):?>
28
+					<?php if ($storage_selection):?>
29 29
 						<option value="" selected><?php echo __('Change To Local Storage...', 'xcloner-backup-and-restore') ?></option>
30 30
 					<?php else: ?>
31 31
 						<option value="" selected><?php echo __('Change To Remote Storage...', 'xcloner-backup-and-restore') ?></option>
32
-					<?php endif;?>
32
+					<?php endif; ?>
33 33
 						
34
-					<?php foreach($available_storages as $storage=>$text):?>
35
-						<option value="<?php echo $storage?>"<?php if($storage == $storage_selection) echo "selected"?>><?php echo $text?></option>
34
+					<?php foreach ($available_storages as $storage=>$text):?>
35
+						<option value="<?php echo $storage?>"<?php if ($storage == $storage_selection) echo "selected"?>><?php echo $text?></option>
36 36
 					<?php endforeach?>
37 37
 				</select>
38 38
 	<?php endif?>
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
 				  <label for="select_all">&nbsp;</label>
48 48
 				</p> 
49 49
 		  </th>
50
-		  <th data-field="id"><?php echo __("Backup Name",'xcloner-backup-and-restore')?></th>
51
-		  <th data-field="name"><?php echo __("Created Time",'xcloner-backup-and-restore')?></th>
52
-		  <th data-field="name"><?php echo __("Size",'xcloner-backup-and-restore')?></th>
53
-		  <th class="no-sort" data-field="price"><?php echo __("Action",'xcloner-backup-and-restore')?></th>
50
+		  <th data-field="id"><?php echo __("Backup Name", 'xcloner-backup-and-restore')?></th>
51
+		  <th data-field="name"><?php echo __("Created Time", 'xcloner-backup-and-restore')?></th>
52
+		  <th data-field="name"><?php echo __("Size", 'xcloner-backup-and-restore')?></th>
53
+		  <th class="no-sort" data-field="price"><?php echo __("Action", 'xcloner-backup-and-restore')?></th>
54 54
 		  
55 55
 	  </tr>
56 56
 	</thead>
@@ -60,20 +60,20 @@  discard block
 block discarded – undo
60 60
       
61 61
 <?php 
62 62
 $i = 0;
63
-foreach($backup_list as $file_info):?>
63
+foreach ($backup_list as $file_info):?>
64 64
 <?php 
65
-	if($storage_selection == "gdrive")
65
+	if ($storage_selection == "gdrive")
66 66
 		$file_info['path'] = $file_info['filename'].".".$file_info['extension'];
67 67
 	$file_exists_on_local_storage = true;
68 68
 	
69
-	if($storage_selection)
69
+	if ($storage_selection)
70 70
 	{
71
-		if(!$xcloner_file_system->get_storage_filesystem()->has($file_info['path']))
71
+		if (!$xcloner_file_system->get_storage_filesystem()->has($file_info['path']))
72 72
 			$file_exists_on_local_storage = false;
73 73
 	}
74 74
 
75 75
 ?>
76
-<?php if(!isset($file_info['parent'])):?>	
76
+<?php if (!isset($file_info['parent'])):?>	
77 77
 	
78 78
 	<tr>
79 79
 		<td class="checkbox">
@@ -84,55 +84,55 @@  discard block
 block discarded – undo
84 84
 		</td>
85 85
 		<td>
86 86
 			<span class=""><?php echo $file_info['path']?></span>
87
-			<?php if(!$file_exists_on_local_storage): ?>
88
-				<a href="#" title="<?php echo __("File does not exists on local storage","xcloner-backup-and-restore")?>"><i class="material-icons backup_warning">warning</i></a>
87
+			<?php if (!$file_exists_on_local_storage): ?>
88
+				<a href="#" title="<?php echo __("File does not exists on local storage", "xcloner-backup-and-restore")?>"><i class="material-icons backup_warning">warning</i></a>
89 89
 			<?php endif?>
90 90
 			<?php 
91
-			if(isset($file_info['childs']) and is_array($file_info['childs'])):
91
+			if (isset($file_info['childs']) and is_array($file_info['childs'])):
92 92
 			?>
93 93
 			<a href="#" title="expand" class="expand-multipart add"><i class="material-icons">add</i></a>
94 94
 			<a href="#" title="collapse" class="expand-multipart remove"><i class="material-icons">remove</i></a>
95 95
 			<ul class="multipart">
96
-			<?php foreach($file_info['childs'] as $child):?>
96
+			<?php foreach ($file_info['childs'] as $child):?>
97 97
 				<li>
98 98
 					<?php echo $child[0]?> (<?php echo size_format($child[2])?>) 
99 99
 					<?php
100 100
 					$child_exists_on_local_storage = true;
101
-					if($storage_selection)
101
+					if ($storage_selection)
102 102
 					{
103
-						if(!$xcloner_file_system->get_storage_filesystem()->has($child[0]))
103
+						if (!$xcloner_file_system->get_storage_filesystem()->has($child[0]))
104 104
 							$child_exists_on_local_storage = false;
105 105
 					}
106 106
 					?>
107
-					<?php if(!$child_exists_on_local_storage): ?>
108
-						<a href="#" title="<?php echo __("File does not exists on local storage","xcloner-backup-and-restore")?>"><i class="material-icons backup_warning">warning</i></a>
107
+					<?php if (!$child_exists_on_local_storage): ?>
108
+						<a href="#" title="<?php echo __("File does not exists on local storage", "xcloner-backup-and-restore")?>"><i class="material-icons backup_warning">warning</i></a>
109 109
 					<?php endif?>
110
-					<?php if(!$storage_selection) :?>
111
-						<a href="#<?php echo $child[0];?>" class="download" title="Download Backup"><i class="material-icons">file_download</i></a>
112
-						<a href="#<?php echo $child[0]?>" class="list-backup-content" title="<?php echo __('List Backup Content','xcloner-backup-and-restore')?>"><i class="material-icons">folder_open</i></a> 
113
-					<?php elseif($storage_selection != "gdrive" && !$xcloner_file_system->get_storage_filesystem()->has($child[0])): ?>
114
-						<a href="#<?php echo $child[0]?>" class="copy-remote-to-local" title="<?php echo __('Push Backup To Local Storage','xcloner-backup-and-restore')?>"><i class="material-icons">file_upload</i></a>
110
+					<?php if (!$storage_selection) :?>
111
+						<a href="#<?php echo $child[0]; ?>" class="download" title="Download Backup"><i class="material-icons">file_download</i></a>
112
+						<a href="#<?php echo $child[0]?>" class="list-backup-content" title="<?php echo __('List Backup Content', 'xcloner-backup-and-restore')?>"><i class="material-icons">folder_open</i></a> 
113
+					<?php elseif ($storage_selection != "gdrive" && !$xcloner_file_system->get_storage_filesystem()->has($child[0])): ?>
114
+						<a href="#<?php echo $child[0]?>" class="copy-remote-to-local" title="<?php echo __('Push Backup To Local Storage', 'xcloner-backup-and-restore')?>"><i class="material-icons">file_upload</i></a>
115 115
 					<?php endif?>
116 116
 				</li>
117
-				<?php endforeach;?>
117
+				<?php endforeach; ?>
118 118
 			</ul>
119
-			<?php endif;?>
119
+			<?php endif; ?>
120 120
 		</td>
121 121
 		<td><?php echo date("d M, Y H:i", $file_info['timestamp'])?></td>
122 122
 		<td><?php echo size_format($file_info['size'])?></td>
123 123
 		<td>
124
-			<?php if(!$storage_selection):?>
125
-				<a href="#<?php echo $file_info['basename'];?>" class="download" title="<?php echo __('Download Backup','xcloner-backup-and-restore')?>"><i class="material-icons">file_download</i></a>
124
+			<?php if (!$storage_selection):?>
125
+				<a href="#<?php echo $file_info['basename']; ?>" class="download" title="<?php echo __('Download Backup', 'xcloner-backup-and-restore')?>"><i class="material-icons">file_download</i></a>
126 126
 
127
-				<?php if(sizeof($available_storages)):?>
128
-					<a href="#<?php echo $file_info['basename']?>" class="cloud-upload" title="<?php echo __('Send Backup To Remote Storage','xcloner-backup-and-restore')?>"><i class="material-icons">cloud_upload</i></a>
127
+				<?php if (sizeof($available_storages)):?>
128
+					<a href="#<?php echo $file_info['basename']?>" class="cloud-upload" title="<?php echo __('Send Backup To Remote Storage', 'xcloner-backup-and-restore')?>"><i class="material-icons">cloud_upload</i></a>
129 129
 				<?php endif?>
130
-				<a href="#<?php echo $file_info['basename']?>" class="list-backup-content" title="<?php echo __('List Backup Content','xcloner-backup-and-restore')?>"><i class="material-icons">folder_open</i></a>
131
-			 <?php endif;?>
130
+				<a href="#<?php echo $file_info['basename']?>" class="list-backup-content" title="<?php echo __('List Backup Content', 'xcloner-backup-and-restore')?>"><i class="material-icons">folder_open</i></a>
131
+			 <?php endif; ?>
132 132
 			 	
133
-			<a href="#<?php echo $file_info['basename']?>" class="delete" title="<?php echo __('Delete Backup','xcloner-backup-and-restore')?>"><i class="material-icons">delete</i></a>
134
-			<?php if($storage_selection and !$file_exists_on_local_storage):?>
135
-				<a href="#<?php echo $file_info['basename'];?>" class="copy-remote-to-local" title="<?php echo __('Push Backup To Local Storage','xcloner-backup-and-restore')?>"><i class="material-icons">file_upload</i></a>
133
+			<a href="#<?php echo $file_info['basename']?>" class="delete" title="<?php echo __('Delete Backup', 'xcloner-backup-and-restore')?>"><i class="material-icons">delete</i></a>
134
+			<?php if ($storage_selection and !$file_exists_on_local_storage):?>
135
+				<a href="#<?php echo $file_info['basename']; ?>" class="copy-remote-to-local" title="<?php echo __('Push Backup To Local Storage', 'xcloner-backup-and-restore')?>"><i class="material-icons">file_upload</i></a>
136 136
 			<?php endif?>	
137 137
 			
138 138
 		</td>
@@ -145,12 +145,12 @@  discard block
 block discarded – undo
145 145
 	</tbody>
146 146
 </table>
147 147
 
148
-<a class="waves-effect waves-light btn delete-all"><i class="material-icons left">delete</i><?php echo __("Delete",'xcloner-backup-and-restore')?></a>
148
+<a class="waves-effect waves-light btn delete-all"><i class="material-icons left">delete</i><?php echo __("Delete", 'xcloner-backup-and-restore')?></a>
149 149
 
150 150
 <!-- List Backup Content Modal-->
151 151
 <div id="backup_cotent_modal" class="modal">
152 152
 	<div class="modal-content">
153
-		<h4><?php echo sprintf(__("Listing Backup Content ",'xcloner-backup-and-restore'), "")?></h4>
153
+		<h4><?php echo sprintf(__("Listing Backup Content ", 'xcloner-backup-and-restore'), "")?></h4>
154 154
 		<h5 class="backup-name"></h5>
155 155
 		
156 156
 		<div class="progress">
@@ -163,14 +163,14 @@  discard block
 block discarded – undo
163 163
 <!-- Local Transfer Modal-->
164 164
 <div id="local_storage_upload_modal" class="modal">
165 165
 	<div class="modal-content">
166
-		<h4><?php echo sprintf(__("Transfer Remote Backup To Local Storage",'xcloner-backup-and-restore'), "")?></h4>
166
+		<h4><?php echo sprintf(__("Transfer Remote Backup To Local Storage", 'xcloner-backup-and-restore'), "")?></h4>
167 167
 		<h5 class="backup-name"></h5>
168 168
 		
169 169
 		<div class="row status">
170 170
 			<div class="progress">
171 171
 				<div class="indeterminate"></div>
172 172
 			</div>
173
-			<?php echo __("Uploading backup to the local storage filesystem...",'xcloner-backup-and-restore')?> <span class="status-text"></span>
173
+			<?php echo __("Uploading backup to the local storage filesystem...", 'xcloner-backup-and-restore')?> <span class="status-text"></span>
174 174
 		</div>
175 175
 	</div>	
176 176
 </div>
@@ -180,17 +180,17 @@  discard block
 block discarded – undo
180 180
 	<form method="POST" class="remote-storage-form">
181 181
 	<input type="hidden" name="file" class="backup_name">	  
182 182
 	<div class="modal-content">
183
-	  <h4><?php echo __("Remote Storage Transfer",'xcloner-backup-and-restore')?></h4>
183
+	  <h4><?php echo __("Remote Storage Transfer", 'xcloner-backup-and-restore')?></h4>
184 184
 	  <p>
185
-	  <?php if(sizeof($available_storages)):?>
185
+	  <?php if (sizeof($available_storages)):?>
186 186
 			<div class="row">
187 187
 				<div class="col s12 label">
188
-					<label><?php echo sprintf(__('Send %s to remote storage','xcloner-backup-and-restore'), "<span class='backup_name'></span>") ?></label>
188
+					<label><?php echo sprintf(__('Send %s to remote storage', 'xcloner-backup-and-restore'), "<span class='backup_name'></span>") ?></label>
189 189
 				</div>
190 190
 				<div class="input-field col s8 m10">
191 191
 					<select name="transfer_storage" id="transfer_storage" class="validate" required >
192 192
 						<option value="" selected><?php echo __('please select...', 'xcloner-backup-and-restore') ?></option>
193
-						<?php foreach($available_storages as $storage=>$text):?>
193
+						<?php foreach ($available_storages as $storage=>$text):?>
194 194
 							<option value="<?php echo $storage?>"><?php echo $text?></option>
195 195
 						<?php endforeach?>
196 196
 						</select>
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 				</div>
202 202
 			</div>
203 203
 			<div class="row status">
204
-				<?php echo __("Uploading backup to the selected remote storage...",'xcloner-backup-and-restore')?> <span class="status-text"></span>
204
+				<?php echo __("Uploading backup to the selected remote storage...", 'xcloner-backup-and-restore')?> <span class="status-text"></span>
205 205
 				<div class="progress">
206 206
 					<div class="indeterminate"></div>
207 207
 				</div>
Please login to merge, or discard this patch.
Braces   +17 added lines, -9 removed lines patch added patch discarded remove patch
@@ -27,12 +27,16 @@  discard block
 block discarded – undo
27 27
 					
28 28
 					<?php if($storage_selection):?>
29 29
 						<option value="" selected><?php echo __('Change To Local Storage...', 'xcloner-backup-and-restore') ?></option>
30
-					<?php else: ?>
30
+					<?php else {
31
+	: ?>
31 32
 						<option value="" selected><?php echo __('Change To Remote Storage...', 'xcloner-backup-and-restore') ?></option>
32
-					<?php endif;?>
33
+					<?php endif;
34
+}
35
+?>
33 36
 						
34 37
 					<?php foreach($available_storages as $storage=>$text):?>
35
-						<option value="<?php echo $storage?>"<?php if($storage == $storage_selection) echo "selected"?>><?php echo $text?></option>
38
+						<option value="<?php echo $storage?>"<?php if($storage == $storage_selection) {
39
+	echo "selected"?>><?php echo $text?></option>
36 40
 					<?php endforeach?>
37 41
 				</select>
38 42
 	<?php endif?>
@@ -60,16 +64,19 @@  discard block
 block discarded – undo
60 64
       
61 65
 <?php 
62 66
 $i = 0;
67
+}
63 68
 foreach($backup_list as $file_info):?>
64 69
 <?php 
65
-	if($storage_selection == "gdrive")
66
-		$file_info['path'] = $file_info['filename'].".".$file_info['extension'];
70
+	if($storage_selection == "gdrive") {
71
+			$file_info['path'] = $file_info['filename'].".".$file_info['extension'];
72
+	}
67 73
 	$file_exists_on_local_storage = true;
68 74
 	
69 75
 	if($storage_selection)
70 76
 	{
71
-		if(!$xcloner_file_system->get_storage_filesystem()->has($file_info['path']))
72
-			$file_exists_on_local_storage = false;
77
+		if(!$xcloner_file_system->get_storage_filesystem()->has($file_info['path'])) {
78
+					$file_exists_on_local_storage = false;
79
+		}
73 80
 	}
74 81
 
75 82
 ?>
@@ -100,8 +107,9 @@  discard block
 block discarded – undo
100 107
 					$child_exists_on_local_storage = true;
101 108
 					if($storage_selection)
102 109
 					{
103
-						if(!$xcloner_file_system->get_storage_filesystem()->has($child[0]))
104
-							$child_exists_on_local_storage = false;
110
+						if(!$xcloner_file_system->get_storage_filesystem()->has($child[0])) {
111
+													$child_exists_on_local_storage = false;
112
+						}
105 113
 					}
106 114
 					?>
107 115
 					<?php if(!$child_exists_on_local_storage): ?>
Please login to merge, or discard this patch.