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 ( 67f878...5fe6bb )
by Liuta
07:51
created
includes/class-xcloner-i18n.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -41,21 +41,21 @@
 block discarded – undo
41 41
 class Xcloner_i18n
42 42
 {
43 43
 
44
-    /**
45
-     * Load the plugin text domain for translation.
46
-     *
47
-     * @since    1.0.0
48
-     */
49
-    public function load_plugin_textdomain()
50
-    {
44
+	/**
45
+	 * Load the plugin text domain for translation.
46
+	 *
47
+	 * @since    1.0.0
48
+	 */
49
+	public function load_plugin_textdomain()
50
+	{
51 51
 
52
-        load_plugin_textdomain(
53
-            'xcloner-backup-and-restore',
54
-            false,
55
-            dirname(dirname(plugin_basename(__FILE__))) . '/languages/'
56
-        );
52
+		load_plugin_textdomain(
53
+			'xcloner-backup-and-restore',
54
+			false,
55
+			dirname(dirname(plugin_basename(__FILE__))) . '/languages/'
56
+		);
57 57
 
58
-    }
58
+	}
59 59
 
60 60
 
61 61
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
         load_plugin_textdomain(
53 53
             'xcloner-backup-and-restore',
54 54
             false,
55
-            dirname(dirname(plugin_basename(__FILE__))) . '/languages/'
55
+            dirname(dirname(plugin_basename(__FILE__))).'/languages/'
56 56
         );
57 57
 
58 58
     }
Please login to merge, or discard this patch.
includes/class-xcloner-loader.php 1 patch
Indentation   +149 added lines, -149 removed lines patch added patch discarded remove patch
@@ -41,154 +41,154 @@
 block discarded – undo
41 41
 class Xcloner_Loader
42 42
 {
43 43
 
44
-    /**
45
-     * The array of actions registered with WordPress.
46
-     *
47
-     * @since    1.0.0
48
-     * @access   protected
49
-     * @var      array $actions The actions registered with WordPress to fire when the plugin loads.
50
-     */
51
-    protected $actions;
52
-
53
-    /**
54
-     * The array of filters registered with WordPress.
55
-     *
56
-     * @since    1.0.0
57
-     * @access   protected
58
-     * @var      array $filters The filters registered with WordPress to fire when the plugin loads.
59
-     */
60
-    protected $filters;
61
-
62
-    private $xcloner_plugin;
63
-
64
-    /**
65
-     * Initialize the collections used to maintain the actions and filters.
66
-     *
67
-     * @since    1.0.0
68
-     */
69
-    public function __construct(Xcloner $xcloner_container)
70
-    {
71
-
72
-        $this->actions = array();
73
-        $this->filters = array();
74
-
75
-        $this->xcloner_container = $xcloner_container;
76
-
77
-    }
78
-
79
-    public function xcloner_backup_add_admin_menu()
80
-    {
81
-        if (function_exists('add_menu_page')) {
82
-            add_menu_page(__('Site Backup', 'xcloner-backup-and-restore'),
83
-                __('Site Backup', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page',
84
-                array($this->xcloner_container, 'xcloner_display'), 'dashicons-backup');
85
-        }
86
-
87
-        if (function_exists('add_submenu_page')) {
88
-
89
-            add_submenu_page('xcloner_init_page', __('XCloner Dashboard', 'xcloner-backup-and-restore'),
90
-                __('Dashboard', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page',
91
-                array($this->xcloner_container, 'xcloner_display'));
92
-            add_submenu_page('xcloner_init_page', __('XCloner Backup Settings', 'xcloner-backup-and-restore'),
93
-                __('Settings', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_settings_page',
94
-                array($this->xcloner_container, 'xcloner_display'));
95
-            add_submenu_page('xcloner_init_page', __('Remote Storage Settings', 'xcloner-backup-and-restore'),
96
-                __('Remote Storage', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_remote_storage_page',
97
-                array($this->xcloner_container, 'xcloner_display'));
98
-            add_submenu_page('xcloner_init_page', __('Manage Backups', 'xcloner-backup-and-restore'),
99
-                __('Manage Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_manage_backups_page',
100
-                array($this->xcloner_container, 'xcloner_display'));
101
-            add_submenu_page('xcloner_init_page', __('Scheduled Backups', 'xcloner-backup-and-restore'),
102
-                __('Scheduled Backups', 'xcloner-backup-and-restore'), 'manage_options',
103
-                'xcloner_scheduled_backups_page', array($this->xcloner_container, 'xcloner_display'));
104
-            add_submenu_page('xcloner_init_page', __('Generate Backups', 'xcloner-backup-and-restore'),
105
-                __('Generate Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_generate_backups_page',
106
-                array($this->xcloner_container, 'xcloner_display'));
107
-            add_submenu_page('xcloner_init_page', __('Restore Backups', 'xcloner-backup-and-restore'),
108
-                __('Restore Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_restore_page',
109
-                array($this->xcloner_container, 'xcloner_display'));
110
-        }
111
-
112
-    }
113
-
114
-
115
-    /**
116
-     * Add a new action to the collection to be registered with WordPress.
117
-     *
118
-     * @since    1.0.0
119
-     * @param    string $hook The name of the WordPress action that is being registered.
120
-     * @param    object $component A reference to the instance of the object on which the action is defined.
121
-     * @param    string $callback The name of the function definition on the $component.
122
-     * @param    int $priority Optional. he priority at which the function should be fired. Default is 10.
123
-     * @param    int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
124
-     */
125
-    public function add_action($hook, $component, $callback, $priority = 10, $accepted_args = 1)
126
-    {
127
-        $this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
128
-    }
129
-
130
-    /**
131
-     * Add a new filter to the collection to be registered with WordPress.
132
-     *
133
-     * @since    1.0.0
134
-     * @param    string $hook The name of the WordPress filter that is being registered.
135
-     * @param    object $component A reference to the instance of the object on which the filter is defined.
136
-     * @param    string $callback The name of the function definition on the $component.
137
-     * @param    int $priority Optional. he priority at which the function should be fired. Default is 10.
138
-     * @param    int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1
139
-     */
140
-    public function add_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1)
141
-    {
142
-        $this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
143
-    }
144
-
145
-    /**
146
-     * A utility function that is used to register the actions and hooks into a single
147
-     * collection.
148
-     *
149
-     * @since    1.0.0
150
-     * @access   private
151
-     * @param    array $hooks The collection of hooks that is being registered (that is, actions or filters).
152
-     * @param    string $hook The name of the WordPress filter that is being registered.
153
-     * @param    object $component A reference to the instance of the object on which the filter is defined.
154
-     * @param    string $callback The name of the function definition on the $component.
155
-     * @param    int $priority The priority at which the function should be fired.
156
-     * @param    int $accepted_args The number of arguments that should be passed to the $callback.
157
-     * @return   array                                  The collection of actions and filters registered with WordPress.
158
-     */
159
-    private function add($hooks, $hook, $component, $callback, $priority, $accepted_args)
160
-    {
161
-
162
-        $hooks[] = array(
163
-            'hook' => $hook,
164
-            'component' => $component,
165
-            'callback' => $callback,
166
-            'priority' => $priority,
167
-            'accepted_args' => $accepted_args
168
-        );
169
-
170
-        return $hooks;
171
-
172
-    }
173
-
174
-    /**
175
-     * Register the filters and actions with WordPress.
176
-     *
177
-     * @since    1.0.0
178
-     */
179
-    public function run()
180
-    {
181
-
182
-        foreach ($this->filters as $hook) {
183
-            add_filter($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'],
184
-                $hook['accepted_args']);
185
-        }
186
-
187
-        foreach ($this->actions as $hook) {
188
-            add_action($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'],
189
-                $hook['accepted_args']);
190
-        }
191
-
192
-    }
44
+	/**
45
+	 * The array of actions registered with WordPress.
46
+	 *
47
+	 * @since    1.0.0
48
+	 * @access   protected
49
+	 * @var      array $actions The actions registered with WordPress to fire when the plugin loads.
50
+	 */
51
+	protected $actions;
52
+
53
+	/**
54
+	 * The array of filters registered with WordPress.
55
+	 *
56
+	 * @since    1.0.0
57
+	 * @access   protected
58
+	 * @var      array $filters The filters registered with WordPress to fire when the plugin loads.
59
+	 */
60
+	protected $filters;
61
+
62
+	private $xcloner_plugin;
63
+
64
+	/**
65
+	 * Initialize the collections used to maintain the actions and filters.
66
+	 *
67
+	 * @since    1.0.0
68
+	 */
69
+	public function __construct(Xcloner $xcloner_container)
70
+	{
71
+
72
+		$this->actions = array();
73
+		$this->filters = array();
74
+
75
+		$this->xcloner_container = $xcloner_container;
76
+
77
+	}
78
+
79
+	public function xcloner_backup_add_admin_menu()
80
+	{
81
+		if (function_exists('add_menu_page')) {
82
+			add_menu_page(__('Site Backup', 'xcloner-backup-and-restore'),
83
+				__('Site Backup', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page',
84
+				array($this->xcloner_container, 'xcloner_display'), 'dashicons-backup');
85
+		}
86
+
87
+		if (function_exists('add_submenu_page')) {
88
+
89
+			add_submenu_page('xcloner_init_page', __('XCloner Dashboard', 'xcloner-backup-and-restore'),
90
+				__('Dashboard', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_init_page',
91
+				array($this->xcloner_container, 'xcloner_display'));
92
+			add_submenu_page('xcloner_init_page', __('XCloner Backup Settings', 'xcloner-backup-and-restore'),
93
+				__('Settings', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_settings_page',
94
+				array($this->xcloner_container, 'xcloner_display'));
95
+			add_submenu_page('xcloner_init_page', __('Remote Storage Settings', 'xcloner-backup-and-restore'),
96
+				__('Remote Storage', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_remote_storage_page',
97
+				array($this->xcloner_container, 'xcloner_display'));
98
+			add_submenu_page('xcloner_init_page', __('Manage Backups', 'xcloner-backup-and-restore'),
99
+				__('Manage Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_manage_backups_page',
100
+				array($this->xcloner_container, 'xcloner_display'));
101
+			add_submenu_page('xcloner_init_page', __('Scheduled Backups', 'xcloner-backup-and-restore'),
102
+				__('Scheduled Backups', 'xcloner-backup-and-restore'), 'manage_options',
103
+				'xcloner_scheduled_backups_page', array($this->xcloner_container, 'xcloner_display'));
104
+			add_submenu_page('xcloner_init_page', __('Generate Backups', 'xcloner-backup-and-restore'),
105
+				__('Generate Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_generate_backups_page',
106
+				array($this->xcloner_container, 'xcloner_display'));
107
+			add_submenu_page('xcloner_init_page', __('Restore Backups', 'xcloner-backup-and-restore'),
108
+				__('Restore Backups', 'xcloner-backup-and-restore'), 'manage_options', 'xcloner_restore_page',
109
+				array($this->xcloner_container, 'xcloner_display'));
110
+		}
111
+
112
+	}
113
+
114
+
115
+	/**
116
+	 * Add a new action to the collection to be registered with WordPress.
117
+	 *
118
+	 * @since    1.0.0
119
+	 * @param    string $hook The name of the WordPress action that is being registered.
120
+	 * @param    object $component A reference to the instance of the object on which the action is defined.
121
+	 * @param    string $callback The name of the function definition on the $component.
122
+	 * @param    int $priority Optional. he priority at which the function should be fired. Default is 10.
123
+	 * @param    int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1.
124
+	 */
125
+	public function add_action($hook, $component, $callback, $priority = 10, $accepted_args = 1)
126
+	{
127
+		$this->actions = $this->add($this->actions, $hook, $component, $callback, $priority, $accepted_args);
128
+	}
129
+
130
+	/**
131
+	 * Add a new filter to the collection to be registered with WordPress.
132
+	 *
133
+	 * @since    1.0.0
134
+	 * @param    string $hook The name of the WordPress filter that is being registered.
135
+	 * @param    object $component A reference to the instance of the object on which the filter is defined.
136
+	 * @param    string $callback The name of the function definition on the $component.
137
+	 * @param    int $priority Optional. he priority at which the function should be fired. Default is 10.
138
+	 * @param    int $accepted_args Optional. The number of arguments that should be passed to the $callback. Default is 1
139
+	 */
140
+	public function add_filter($hook, $component, $callback, $priority = 10, $accepted_args = 1)
141
+	{
142
+		$this->filters = $this->add($this->filters, $hook, $component, $callback, $priority, $accepted_args);
143
+	}
144
+
145
+	/**
146
+	 * A utility function that is used to register the actions and hooks into a single
147
+	 * collection.
148
+	 *
149
+	 * @since    1.0.0
150
+	 * @access   private
151
+	 * @param    array $hooks The collection of hooks that is being registered (that is, actions or filters).
152
+	 * @param    string $hook The name of the WordPress filter that is being registered.
153
+	 * @param    object $component A reference to the instance of the object on which the filter is defined.
154
+	 * @param    string $callback The name of the function definition on the $component.
155
+	 * @param    int $priority The priority at which the function should be fired.
156
+	 * @param    int $accepted_args The number of arguments that should be passed to the $callback.
157
+	 * @return   array                                  The collection of actions and filters registered with WordPress.
158
+	 */
159
+	private function add($hooks, $hook, $component, $callback, $priority, $accepted_args)
160
+	{
161
+
162
+		$hooks[] = array(
163
+			'hook' => $hook,
164
+			'component' => $component,
165
+			'callback' => $callback,
166
+			'priority' => $priority,
167
+			'accepted_args' => $accepted_args
168
+		);
169
+
170
+		return $hooks;
171
+
172
+	}
173
+
174
+	/**
175
+	 * Register the filters and actions with WordPress.
176
+	 *
177
+	 * @since    1.0.0
178
+	 */
179
+	public function run()
180
+	{
181
+
182
+		foreach ($this->filters as $hook) {
183
+			add_filter($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'],
184
+				$hook['accepted_args']);
185
+		}
186
+
187
+		foreach ($this->actions as $hook) {
188
+			add_action($hook['hook'], array($hook['component'], $hook['callback']), $hook['priority'],
189
+				$hook['accepted_args']);
190
+		}
191
+
192
+	}
193 193
 
194 194
 }
Please login to merge, or discard this patch.
includes/class-xcloner-logger.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -10,61 +10,61 @@  discard block
 block discarded – undo
10 10
 	private $max_logger_files = 7;
11 11
 	private $main_logger_url;
12 12
 
13
-	public function __construct( Xcloner $xcloner_container, $logger_name = "xcloner_logger" ) {
14
-		if ( ! $xcloner_container->get_xcloner_settings() ) {
15
-			$xcloner_settings = new Xcloner_Settings( $xcloner_container );
13
+	public function __construct(Xcloner $xcloner_container, $logger_name = "xcloner_logger") {
14
+		if (!$xcloner_container->get_xcloner_settings()) {
15
+			$xcloner_settings = new Xcloner_Settings($xcloner_container);
16 16
 		} else {
17 17
 			$xcloner_settings = $xcloner_container->get_xcloner_settings();
18 18
 		}
19 19
 
20 20
 		$hash = $xcloner_settings->get_hash();
21
-		if ( $hash == "-" . $xcloner_settings->get_server_unique_hash( 5 ) ) {
21
+		if ($hash == "-".$xcloner_settings->get_server_unique_hash(5)) {
22 22
 			$hash = "";
23 23
 		}
24 24
 
25
-		$logger_path     = $xcloner_settings->get_xcloner_store_path() . DS . $xcloner_settings->get_logger_filename();
25
+		$logger_path     = $xcloner_settings->get_xcloner_store_path().DS.$xcloner_settings->get_logger_filename();
26 26
 		$logger_path_tmp = "";
27 27
 
28
-		if ( $hash ) {
29
-			$logger_path_tmp = $xcloner_settings->get_xcloner_tmp_path() . DS . $xcloner_settings->get_logger_filename( 1 );
28
+		if ($hash) {
29
+			$logger_path_tmp = $xcloner_settings->get_xcloner_tmp_path().DS.$xcloner_settings->get_logger_filename(1);
30 30
 		}
31 31
 
32 32
 		$this->logger_path = $logger_path;
33 33
 
34
-		if ( ! is_dir( $xcloner_settings->get_xcloner_store_path() ) or ! is_writable( $xcloner_settings->get_xcloner_store_path() ) ) {
34
+		if (!is_dir($xcloner_settings->get_xcloner_store_path()) or !is_writable($xcloner_settings->get_xcloner_store_path())) {
35 35
 			$logger_path     = 'php://stderr';
36 36
 			$logger_path_tmp = "";
37 37
 		}
38 38
 
39
-		if ( ! $xcloner_settings->get_xcloner_option( 'xcloner_enable_log' ) ) {
39
+		if (!$xcloner_settings->get_xcloner_option('xcloner_enable_log')) {
40 40
 			$logger_path     = 'php://stderr';
41 41
 			$logger_path_tmp = "";
42 42
 		}
43 43
 
44 44
 		// create a log channel
45
-		parent::__construct( $logger_name );
45
+		parent::__construct($logger_name);
46 46
 
47 47
 		$debug_level = Logger::INFO;
48 48
 
49
-		if ( WP_DEBUG ) {
49
+		if (WP_DEBUG) {
50 50
 			$debug_level = Logger::DEBUG;
51 51
 		}
52 52
 
53 53
 
54
-		if ( $logger_path ) {
55
-			if ( ! $xcloner_settings->get_xcloner_option( 'xcloner_enable_log' ) ) {
56
-				$stream = new StreamHandler( $logger_path, $debug_level );
54
+		if ($logger_path) {
55
+			if (!$xcloner_settings->get_xcloner_option('xcloner_enable_log')) {
56
+				$stream = new StreamHandler($logger_path, $debug_level);
57 57
 			} else {
58
-				$stream = new RotatingFileHandler( $logger_path, $this->max_logger_files, $debug_level );
58
+				$stream = new RotatingFileHandler($logger_path, $this->max_logger_files, $debug_level);
59 59
 			}
60 60
 
61
-			$this->pushHandler( $stream );
61
+			$this->pushHandler($stream);
62 62
 
63 63
 			$this->main_logger_url = $stream->getUrl();
64 64
 		}
65 65
 
66
-		if ( $hash and $logger_path_tmp ) {
67
-			$this->pushHandler( new StreamHandler( $logger_path_tmp, $debug_level ) );
66
+		if ($hash and $logger_path_tmp) {
67
+			$this->pushHandler(new StreamHandler($logger_path_tmp, $debug_level));
68 68
 		}
69 69
 
70 70
 		//return $this;
@@ -74,35 +74,35 @@  discard block
 block discarded – undo
74 74
 		return $this->main_logger_url;
75 75
 	}
76 76
 
77
-	function getLastDebugLines( $totalLines = 200 ) {
77
+	function getLastDebugLines($totalLines = 200) {
78 78
 		$lines = array();
79 79
 
80
-		if ( ! file_exists( $this->main_logger_url ) or ! is_readable( $this->main_logger_url ) ) {
80
+		if (!file_exists($this->main_logger_url) or !is_readable($this->main_logger_url)) {
81 81
 			return false;
82 82
 		}
83 83
 
84
-		$fp = fopen( $this->main_logger_url, 'r' );
85
-		fseek( $fp, - 1, SEEK_END );
86
-		$pos      = ftell( $fp );
84
+		$fp = fopen($this->main_logger_url, 'r');
85
+		fseek($fp, - 1, SEEK_END);
86
+		$pos      = ftell($fp);
87 87
 		$lastLine = "";
88 88
 
89 89
 		// Loop backword until we have our lines or we reach the start
90
-		while ( $pos > 0 && count( $lines ) < $totalLines ) {
90
+		while ($pos > 0 && count($lines) < $totalLines) {
91 91
 
92
-			$C = fgetc( $fp );
93
-			if ( $C == "\n" ) {
92
+			$C = fgetc($fp);
93
+			if ($C == "\n") {
94 94
 				// skip empty lines
95
-				if ( trim( $lastLine ) != "" ) {
95
+				if (trim($lastLine) != "") {
96 96
 					$lines[] = $lastLine;
97 97
 				}
98 98
 				$lastLine = '';
99 99
 			} else {
100
-				$lastLine = $C . $lastLine;
100
+				$lastLine = $C.$lastLine;
101 101
 			}
102
-			fseek( $fp, $pos -- );
102
+			fseek($fp, $pos--);
103 103
 		}
104 104
 
105
-		$lines = array_reverse( $lines );
105
+		$lines = array_reverse($lines);
106 106
 
107 107
 		return $lines;
108 108
 	}
Please login to merge, or discard this patch.
includes/class-xcloner-activator.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
 		if ( version_compare( phpversion(), Xcloner_Activator::xcloner_minimum_version, '<' ) ) {
65 65
 			wp_die( '<p>' . sprintf( __( "XCloner requires minimum PHP version %s in order to run correctly. We have detected your version as %s" ), Xcloner_Activator::xcloner_minimum_version, phpversion() ) . '</p>', __( "XCloner Activation Error" ), array( 'response'  => 500,
66
-			                                                                                                                                                                                                                                                       'back_link' => true
66
+																																																																   'back_link' => true
67 67
 			) );
68 68
 		}
69 69
 
Please login to merge, or discard this patch.
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -61,22 +61,22 @@  discard block
 block discarded – undo
61 61
 
62 62
 		global $wpdb;
63 63
 
64
-		if ( version_compare( phpversion(), Xcloner_Activator::xcloner_minimum_version, '<' ) ) {
65
-			wp_die( '<p>' . sprintf( __( "XCloner requires minimum PHP version %s in order to run correctly. We have detected your version as %s" ), Xcloner_Activator::xcloner_minimum_version, phpversion() ) . '</p>', __( "XCloner Activation Error" ), array( 'response'  => 500,
64
+		if (version_compare(phpversion(), Xcloner_Activator::xcloner_minimum_version, '<')) {
65
+			wp_die('<p>'.sprintf(__("XCloner requires minimum PHP version %s in order to run correctly. We have detected your version as %s"), Xcloner_Activator::xcloner_minimum_version, phpversion()).'</p>', __("XCloner Activation Error"), array('response'  => 500,
66 66
 			                                                                                                                                                                                                                                                       'back_link' => true
67
-			) );
67
+			));
68 68
 		}
69 69
 
70 70
 		$charset_collate = $wpdb->get_charset_collate();
71 71
 
72
-		$installed_ver = get_option( "xcloner_db_version" );
72
+		$installed_ver = get_option("xcloner_db_version");
73 73
 
74 74
 		$xcloner_db_version = Xcloner_Activator::xcloner_db_version;
75 75
 
76
-		$xcloner_scheduler_table = $wpdb->prefix . "xcloner_scheduler";
76
+		$xcloner_scheduler_table = $wpdb->prefix."xcloner_scheduler";
77 77
 
78
-		if ( $installed_ver != $xcloner_db_version ) {
79
-			$xcloner_schedule_sql = "CREATE TABLE `" . $xcloner_scheduler_table . "` (
78
+		if ($installed_ver != $xcloner_db_version) {
79
+			$xcloner_schedule_sql = "CREATE TABLE `".$xcloner_scheduler_table."` (
80 80
 				  `id` int(11) NOT NULL AUTO_INCREMENT,
81 81
 				  `name` varchar(255) NOT NULL,
82 82
 				  `recurrence` varchar(25) NOT NULL,
@@ -87,69 +87,69 @@  discard block
 block discarded – undo
87 87
 				  `status` int(1) NOT NULL,
88 88
 				  `last_backup` varchar(100) DEFAULT NULL,
89 89
 				  PRIMARY KEY  (`id`)
90
-				) " . $charset_collate . ";
90
+				) " . $charset_collate.";
91 91
 				";
92 92
 
93
-			require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
94
-			dbDelta( $xcloner_schedule_sql );
93
+			require_once(ABSPATH.'wp-admin/includes/upgrade.php');
94
+			dbDelta($xcloner_schedule_sql);
95 95
 
96
-			update_option( "xcloner_db_version", $xcloner_db_version );
96
+			update_option("xcloner_db_version", $xcloner_db_version);
97 97
 		}
98 98
 
99
-		if ( get_option( 'xcloner_backup_compression_level' ) === false ) {
100
-			update_option( 'xcloner_backup_compression_level', 0 );
99
+		if (get_option('xcloner_backup_compression_level') === false) {
100
+			update_option('xcloner_backup_compression_level', 0);
101 101
 		}
102 102
 
103
-		if ( get_option( 'xcloner_enable_log' ) === false ) {
104
-			update_option( 'xcloner_enable_log', 1 );
103
+		if (get_option('xcloner_enable_log') === false) {
104
+			update_option('xcloner_enable_log', 1);
105 105
 		}
106 106
 
107
-		if ( get_option( 'xcloner_enable_mysql_backup' ) === false ) {
108
-			update_option( 'xcloner_enable_mysql_backup', 1 );
107
+		if (get_option('xcloner_enable_mysql_backup') === false) {
108
+			update_option('xcloner_enable_mysql_backup', 1);
109 109
 		}
110 110
 
111
-		if ( get_option( 'xcloner_system_settings_page' ) === false ) {
112
-			update_option( 'xcloner_system_settings_page', 100 );
111
+		if (get_option('xcloner_system_settings_page') === false) {
112
+			update_option('xcloner_system_settings_page', 100);
113 113
 		}
114 114
 
115
-		if ( get_option( 'xcloner_files_to_process_per_request' ) === false ) {
116
-			update_option( 'xcloner_files_to_process_per_request', 250 );
115
+		if (get_option('xcloner_files_to_process_per_request') === false) {
116
+			update_option('xcloner_files_to_process_per_request', 250);
117 117
 		}
118 118
 
119
-		if ( get_option( 'xcloner_database_records_per_request' ) === false ) {
120
-			update_option( 'xcloner_database_records_per_request', 10000 );
119
+		if (get_option('xcloner_database_records_per_request') === false) {
120
+			update_option('xcloner_database_records_per_request', 10000);
121 121
 		}
122 122
 
123
-		if ( get_option( 'xcloner_exclude_files_larger_than_mb' ) === false ) {
124
-			update_option( 'xcloner_exclude_files_larger_than_mb', 0 );
123
+		if (get_option('xcloner_exclude_files_larger_than_mb') === false) {
124
+			update_option('xcloner_exclude_files_larger_than_mb', 0);
125 125
 		}
126 126
 
127
-		if ( get_option( 'xcloner_split_backup_limit' ) === false ) {
128
-			update_option( 'xcloner_split_backup_limit', 2048 );
127
+		if (get_option('xcloner_split_backup_limit') === false) {
128
+			update_option('xcloner_split_backup_limit', 2048);
129 129
 		}
130 130
 
131
-		if ( get_option( 'xcloner_size_limit_per_request' ) === false ) {
132
-			update_option( 'xcloner_size_limit_per_request', 50 );
131
+		if (get_option('xcloner_size_limit_per_request') === false) {
132
+			update_option('xcloner_size_limit_per_request', 50);
133 133
 		}
134 134
 
135
-		if ( get_option( 'xcloner_cleanup_retention_limit_days' ) === false ) {
136
-			update_option( 'xcloner_cleanup_retention_limit_days', 60 );
135
+		if (get_option('xcloner_cleanup_retention_limit_days') === false) {
136
+			update_option('xcloner_cleanup_retention_limit_days', 60);
137 137
 		}
138 138
 
139
-		if ( get_option( 'xcloner_cleanup_retention_limit_archives' ) === false ) {
140
-			update_option( 'xcloner_cleanup_retention_limit_archives', 100 );
139
+		if (get_option('xcloner_cleanup_retention_limit_archives') === false) {
140
+			update_option('xcloner_cleanup_retention_limit_archives', 100);
141 141
 		}
142 142
 
143
-		if ( get_option( 'xcloner_directories_to_scan_per_request' ) === false ) {
144
-			update_option( 'xcloner_directories_to_scan_per_request', 25 );
143
+		if (get_option('xcloner_directories_to_scan_per_request') === false) {
144
+			update_option('xcloner_directories_to_scan_per_request', 25);
145 145
 		}
146 146
 
147 147
 		/*if(!get_option('xcloner_diff_backup_recreate_period'))
148 148
 			update_option('xcloner_diff_backup_recreate_period', 10);
149 149
 			* */
150 150
 
151
-		if ( ! get_option( 'xcloner_regex_exclude' ) ) {
152
-			update_option( 'xcloner_regex_exclude', "(wp-content\/updraft|wp-content\/uploads\/wp_all_backup)(.*)$" . PHP_EOL . "(.*)\.(svn|git)(.*)$" . PHP_EOL . "wp-content\/cache(.*)$" . PHP_EOL . "(.*)error_log$" );
151
+		if (!get_option('xcloner_regex_exclude')) {
152
+			update_option('xcloner_regex_exclude', "(wp-content\/updraft|wp-content\/uploads\/wp_all_backup)(.*)$".PHP_EOL."(.*)\.(svn|git)(.*)$".PHP_EOL."wp-content\/cache(.*)$".PHP_EOL."(.*)error_log$");
153 153
 		}
154 154
 
155 155
 	}
Please login to merge, or discard this patch.
includes/class-xcloner-deactivator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@
 block discarded – undo
51 51
 
52 52
 		global $xcloner_plugin;
53 53
 
54
-		if ( is_a( $xcloner_plugin, 'Xcloner' ) ) {
54
+		if (is_a($xcloner_plugin, 'Xcloner')) {
55 55
 			try {
56 56
 				$xcloner_plugin->get_xcloner_filesystem()->cleanup_tmp_directories();
57
-			} catch ( Exception $e ) {
58
-				$xcloner_plugin->trigger_message_notice( $e->getMessage() );
57
+			}catch (Exception $e) {
58
+				$xcloner_plugin->trigger_message_notice($e->getMessage());
59 59
 			}
60 60
 
61 61
 			$xcloner_scheduler = $xcloner_plugin->get_xcloner_scheduler();
Please login to merge, or discard this patch.