Version Description
28/Oct/2015 =
FEATURE: Google Cloud Storage support (UpdraftPlus Premium)
FIX: Automatic backups of WordPress core prior to WP core upgrade in recent versions were including non-WP core files
FIX: OwnCloud 8.1's WebDAV server responds differently, breaking UD's communications: restore the ability to back up to OwnCloud WebDAV
TWEAK: Allow use of the Meta key for selecting multiple backup sets (as well as Control)
TWEAK: When sending backup data directly site-to-site (when migrating), handle the (very rare) case where a remote server complains of the chunk size after accepting previous chunks of the same size
TWEAK: Add message to final log line when sending backup set directly to a remote site, reminding the user of what to do next.
TWEAK: Tweak zip-splitting algorithm, to prevent delayed split on resumption when final file in the last-created zip is gigantic
TWEAK: By default, exclude directories that appear to be the UpdraftPlus internal directory of a site stored in a sub-directory when backing up WordPress core
TWEAK: In the debugging output, show more clearly when Curl is not installed
TWEAK: Remove trailing slashes from what WP returns as the uploads/plugins directories, in case the user has specified a manual directory over-ride and erroneously added a trailing slash
TWEAK: Replace all remaining http:// links to updraftplus.com with https://
TWEAK: Raise some of the Google Drive network timeouts
TWEAK: Suppress an internal PHP notice when pruning backups in some circumstances
TRANSLATIONS: Various updated translations
Release Info
Developer | DavidAnderson |
Plugin | UpdraftPlus WordPress Backup Plugin |
Version | 1.11.15 |
Comparing to | |
See all releases |
Code changes from version 1.11.12 to 1.11.15
- admin.php +30 -3
- backup.php +74 -34
- class-updraftplus.php +103 -22
- images/googlecloud.png +0 -0
- images/icons/googlecloud.png +0 -0
- includes/Google/Service/Pubsub.php +0 -933
- includes/cacert.pem +79 -376
- includes/labelauty/jquery-labelauty.css +7 -2
- includes/updraft-admin-ui.js +32 -1
- index.html +7 -7
- languages/updraftplus-ar.mo +0 -0
- languages/updraftplus-ar.po +874 -752
- languages/updraftplus-bn_BD.po +866 -746
- languages/updraftplus-ca_ES.po +866 -746
- languages/updraftplus-cs_CZ.mo +0 -0
- languages/updraftplus-cs_CZ.po +893 -773
- languages/updraftplus-da_DK.mo +0 -0
- languages/updraftplus-da_DK.po +893 -773
- languages/updraftplus-de_DE.mo +0 -0
- languages/updraftplus-de_DE.po +866 -746
- languages/updraftplus-el.mo +0 -0
- languages/updraftplus-el.po +206 -88
@@ -70,6 +70,14 @@ class UpdraftPlus_Admin {
|
|
70 |
}
|
71 |
if (!empty($clientid) && empty($token)) add_action('all_admin_notices', array($this,'show_admin_warning_googledrive'));
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
if ('dropbox' === $service || (is_array($service) && in_array('dropbox', $service))) {
|
74 |
$opts = UpdraftPlus_Options::get_updraft_option('updraft_dropbox');
|
75 |
if (empty($opts['tk_request_token'])) {
|
@@ -138,7 +146,7 @@ class UpdraftPlus_Admin {
|
|
138 |
public function updraft_ajaxrestore() {
|
139 |
// TODO: All needs testing with restricted filesystem permissions. Those credentials need to be POST-ed too - currently not.
|
140 |
// TODO
|
141 |
-
error_log(serialize($_POST));
|
142 |
|
143 |
if (empty($_POST['subaction']) || 'restore' != $_POST['subaction']) {
|
144 |
echo json_encode(array('e' => 'Illegitimate data sent (0)'));
|
@@ -781,6 +789,7 @@ error_log(serialize($_POST));
|
|
781 |
.selectric-items .ico-sftp { background: url(<?php echo $images_dir; ?>/folder.png) no-repeat; }
|
782 |
.selectric-items .ico-webdav { background: url(<?php echo $images_dir; ?>/webdav.png) no-repeat; }
|
783 |
.selectric-items .ico-s3generic { background: url(<?php echo $images_dir; ?>/folder.png) no-repeat; }
|
|
|
784 |
.selectric-items .ico-openstack { background: url(<?php echo $images_dir; ?>/openstack.png) no-repeat; }
|
785 |
.selectric-items .ico-dreamobjects { background: url(<?php echo $images_dir; ?>/dreamobjects.png) no-repeat; }
|
786 |
.selectric-items .ico-email { background: url(<?php echo $images_dir; ?>/email.png) no-repeat; }
|
@@ -943,9 +952,14 @@ error_log(serialize($_POST));
|
|
943 |
}
|
944 |
|
945 |
public function show_admin_warning_googledrive() {
|
946 |
-
$this->show_admin_warning('<strong>'.__('UpdraftPlus notice:','updraftplus').'</strong> <a href="'.UpdraftPlus_Options::admin_page_url().'?page=updraftplus&action=updraftmethod-googledrive-auth&updraftplus_googleauth=doit">'.sprintf(__('Click here to authenticate your %s account (you will not be able to back up to %s without it).','updraftplus'),'Google Drive','Google Drive').'</a>');
|
|
|
|
|
|
|
|
|
947 |
}
|
948 |
|
|
|
949 |
// This options filter removes ABSPATH off the front of updraft_dir, if it is given absolutely and contained within it
|
950 |
public function prune_updraft_dir_prefix($updraft_dir) {
|
951 |
if ('/' == substr($updraft_dir, 0, 1) || "\\" == substr($updraft_dir, 0, 1) || preg_match('/^[a-zA-Z]:/', $updraft_dir)) {
|
@@ -1205,6 +1219,12 @@ error_log(serialize($_POST));
|
|
1205 |
'ds' => $download_status,
|
1206 |
'u' => $logupdate_array
|
1207 |
));
|
|
|
|
|
|
|
|
|
|
|
|
|
1208 |
} elseif (isset($_REQUEST['subaction']) && 'callwpaction' == $_REQUEST['subaction'] && !empty($_REQUEST['wpaction'])) {
|
1209 |
|
1210 |
ob_start();
|
@@ -2948,6 +2968,13 @@ error_log(serialize($_POST));
|
|
2948 |
$this->settings_debugrow('WP_CONTENT_DIR:', htmlspecialchars(WP_CONTENT_DIR));
|
2949 |
$this->settings_debugrow('WP_PLUGIN_DIR:', htmlspecialchars(WP_PLUGIN_DIR));
|
2950 |
$this->settings_debugrow('Table prefix:', htmlspecialchars($updraftplus->get_table_prefix()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2951 |
$peak_memory_usage = memory_get_peak_usage(true)/1024/1024;
|
2952 |
$memory_usage = memory_get_usage(true)/1024/1024;
|
2953 |
$this->settings_debugrow(__('Peak memory usage','updraftplus').':', $peak_memory_usage.' MB');
|
@@ -2959,7 +2986,7 @@ error_log(serialize($_POST));
|
|
2959 |
$cv = curl_version();
|
2960 |
$cvs = $cv['version'].' / SSL: '.$cv['ssl_version'].' / libz: '.$cv['libz_version'];
|
2961 |
} else {
|
2962 |
-
$cvs = '
|
2963 |
}
|
2964 |
$this->settings_debugrow(sprintf(__('%s version:','updraftplus'), 'Curl'), htmlspecialchars($cvs));
|
2965 |
if (version_compare(phpversion(), '5.2.0', '>=') && extension_loaded('zip')) {
|
70 |
}
|
71 |
if (!empty($clientid) && empty($token)) add_action('all_admin_notices', array($this,'show_admin_warning_googledrive'));
|
72 |
}
|
73 |
+
if ('googlecloud' === $service || (is_array($service) && in_array('googlecloud', $service))) {
|
74 |
+
$opts = UpdraftPlus_Options::get_updraft_option('updraft_googlecloud');
|
75 |
+
if (!empty($opts)) {
|
76 |
+
$clientid = $opts['clientid'];
|
77 |
+
$token = (empty($opts['token'])) ? '' : $opts['token'];
|
78 |
+
}
|
79 |
+
if (!empty($clientid) && empty($token)) add_action('all_admin_notices', array($this,'show_admin_warning_googlecloud'));
|
80 |
+
}
|
81 |
if ('dropbox' === $service || (is_array($service) && in_array('dropbox', $service))) {
|
82 |
$opts = UpdraftPlus_Options::get_updraft_option('updraft_dropbox');
|
83 |
if (empty($opts['tk_request_token'])) {
|
146 |
public function updraft_ajaxrestore() {
|
147 |
// TODO: All needs testing with restricted filesystem permissions. Those credentials need to be POST-ed too - currently not.
|
148 |
// TODO
|
149 |
+
// error_log(serialize($_POST));
|
150 |
|
151 |
if (empty($_POST['subaction']) || 'restore' != $_POST['subaction']) {
|
152 |
echo json_encode(array('e' => 'Illegitimate data sent (0)'));
|
789 |
.selectric-items .ico-sftp { background: url(<?php echo $images_dir; ?>/folder.png) no-repeat; }
|
790 |
.selectric-items .ico-webdav { background: url(<?php echo $images_dir; ?>/webdav.png) no-repeat; }
|
791 |
.selectric-items .ico-s3generic { background: url(<?php echo $images_dir; ?>/folder.png) no-repeat; }
|
792 |
+
.selectric-items .ico-googlecloud { background: url(<?php echo $images_dir; ?>/googlecloud.png) no-repeat; }
|
793 |
.selectric-items .ico-openstack { background: url(<?php echo $images_dir; ?>/openstack.png) no-repeat; }
|
794 |
.selectric-items .ico-dreamobjects { background: url(<?php echo $images_dir; ?>/dreamobjects.png) no-repeat; }
|
795 |
.selectric-items .ico-email { background: url(<?php echo $images_dir; ?>/email.png) no-repeat; }
|
952 |
}
|
953 |
|
954 |
public function show_admin_warning_googledrive() {
|
955 |
+
$this->show_admin_warning('<strong>'.__('UpdraftPlus notice:','updraftplus').'</strong> <a href="'.UpdraftPlus_Options::admin_page_url().'?page=updraftplus&action=updraftmethod-googledrive-auth&updraftplus_googleauth=doit">'.sprintf(__('Click here to authenticate your %s account (you will not be able to back up to %s without it).','updraftplus'), 'Google Drive', 'Google Drive').'</a>');
|
956 |
+
}
|
957 |
+
|
958 |
+
public function show_admin_warning_googlecloud() {
|
959 |
+
$this->show_admin_warning('<strong>'.__('UpdraftPlus notice:','updraftplus').'</strong> <a href="'.UpdraftPlus_Options::admin_page_url().'?page=updraftplus&action=updraftmethod-googlecloud-auth&updraftplus_googleauth=doit">'.sprintf(__('Click here to authenticate your %s account (you will not be able to back up to %s without it).','updraftplus'), 'Google Cloud', 'Google Cloud').'</a>');
|
960 |
}
|
961 |
|
962 |
+
|
963 |
// This options filter removes ABSPATH off the front of updraft_dir, if it is given absolutely and contained within it
|
964 |
public function prune_updraft_dir_prefix($updraft_dir) {
|
965 |
if ('/' == substr($updraft_dir, 0, 1) || "\\" == substr($updraft_dir, 0, 1) || preg_match('/^[a-zA-Z]:/', $updraft_dir)) {
|
1219 |
'ds' => $download_status,
|
1220 |
'u' => $logupdate_array
|
1221 |
));
|
1222 |
+
} elseif (isset($_REQUEST['subaction']) && 'remotecontrol_createkey' == $_REQUEST['subaction']) {
|
1223 |
+
// Use the site URL - this means that if the site URL changes, communication ends; which is the case anyway
|
1224 |
+
$name_hash = md5(site_url()); // 32 characters
|
1225 |
+
$created = $updraftplus->create_remote_control_key($name_hash);
|
1226 |
+
echo json_encode($created);
|
1227 |
+
die;
|
1228 |
} elseif (isset($_REQUEST['subaction']) && 'callwpaction' == $_REQUEST['subaction'] && !empty($_REQUEST['wpaction'])) {
|
1229 |
|
1230 |
ob_start();
|
2968 |
$this->settings_debugrow('WP_CONTENT_DIR:', htmlspecialchars(WP_CONTENT_DIR));
|
2969 |
$this->settings_debugrow('WP_PLUGIN_DIR:', htmlspecialchars(WP_PLUGIN_DIR));
|
2970 |
$this->settings_debugrow('Table prefix:', htmlspecialchars($updraftplus->get_table_prefix()));
|
2971 |
+
|
2972 |
+
if (defined('UPDRAFTPLUS_EXPERIMENTAL_REMOTECONTROL') && UPDRAFTPLUS_EXPERIMENTAL_REMOTECONTROL) {
|
2973 |
+
$show_key_create = '<span id="updraftplus_remotecontrol_key"><a href="#" id="updraftplus_remotecontrol_keycreate_go">'.__('Create a new key (this will invalidate any currently in-use key and disconnect any existing remote control connection)', 'updraftplus').'</a></span>';
|
2974 |
+
$this->settings_debugrow('Remote control key:', $show_key_create);
|
2975 |
+
|
2976 |
+
}
|
2977 |
+
|
2978 |
$peak_memory_usage = memory_get_peak_usage(true)/1024/1024;
|
2979 |
$memory_usage = memory_get_usage(true)/1024/1024;
|
2980 |
$this->settings_debugrow(__('Peak memory usage','updraftplus').':', $peak_memory_usage.' MB');
|
2986 |
$cv = curl_version();
|
2987 |
$cvs = $cv['version'].' / SSL: '.$cv['ssl_version'].' / libz: '.$cv['libz_version'];
|
2988 |
} else {
|
2989 |
+
$cvs = __('Not installed', 'updraftplus').' ('.__('required for some remote storage providers', 'updraftplus').')';
|
2990 |
}
|
2991 |
$this->settings_debugrow(sprintf(__('%s version:','updraftplus'), 'Curl'), htmlspecialchars($cvs));
|
2992 |
if (version_compare(phpversion(), '5.2.0', '>=') && extension_loaded('zip')) {
|
@@ -456,36 +456,51 @@ class UpdraftPlus_Backup {
|
|
456 |
|
457 |
$remote_sent = (!empty($backup_to_examine['service']) && ((is_array($backup_to_examine['service']) && in_array('remotesend', $backup_to_examine['service'])) || 'remotesend' === $backup_to_examine['service'])) ? true : false;
|
458 |
|
|
|
|
|
459 |
# Databases
|
460 |
foreach ($backup_to_examine as $key => $data) {
|
461 |
if ('db' != strtolower(substr($key, 0, 2)) || '-size' == substr($key, -5, 5)) continue;
|
462 |
|
463 |
$how_many_found = (empty($database_backups_found[$key])) ? 0 : $database_backups_found[$key];
|
464 |
-
if ($is_autobackup
|
465 |
-
|
466 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
}
|
468 |
|
469 |
-
$prune_it = false;
|
470 |
-
|
471 |
if ($remote_sent) {
|
472 |
$prune_it = true;
|
473 |
$updraftplus->log("$backup_datestamp: $key: was sent to remote site; will remove from local record (only)");
|
474 |
} else {
|
475 |
|
476 |
if (empty($database_backups_found[$key])) $database_backups_found[$key] = 0;
|
477 |
-
$database_backups_found[$key] = $database_backups_found[$key] + 1;
|
478 |
|
479 |
-
if (
|
480 |
-
$
|
481 |
|
482 |
-
|
483 |
-
|
|
|
|
|
|
|
484 |
|
485 |
-
|
|
|
486 |
}
|
487 |
}
|
488 |
|
|
|
|
|
|
|
|
|
|
|
489 |
if ($prune_it) {
|
490 |
// This should only be able to happen if you import backups with a future timestamp
|
491 |
if (!empty($backup_to_examine['nonce']) && $backup_to_examine['nonce'] == $updraftplus->nonce) {
|
@@ -494,10 +509,10 @@ class UpdraftPlus_Backup {
|
|
494 |
}
|
495 |
}
|
496 |
|
497 |
-
// All backups must be run through this filter (in date order) regardless of the current state of $prune_it - so that filters are able to track state.
|
498 |
-
$prune_it = apply_filters('updraftplus_prune_or_not', $prune_it, 'db', $backup_datestamp, $database_backups_found[$key], $key, $data, $updraft_retain_db);
|
499 |
-
|
500 |
if ($prune_it) {
|
|
|
|
|
|
|
501 |
if (!empty($data)) {
|
502 |
$size_key = $key.'-size';
|
503 |
$size = isset($backup_to_examine[$size_key]) ? $backup_to_examine[$size_key] : null;
|
@@ -511,32 +526,43 @@ class UpdraftPlus_Backup {
|
|
511 |
|
512 |
}
|
513 |
|
|
|
|
|
514 |
$file_sizes = array();
|
515 |
|
516 |
# Files
|
517 |
foreach ($backupable_entities as $entity => $info) {
|
518 |
if (!empty($backup_to_examine[$entity])) {
|
519 |
|
520 |
-
if ($is_autobackup
|
521 |
-
|
522 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
}
|
524 |
|
525 |
-
$prune_it = false;
|
526 |
-
|
527 |
if ($remote_sent) {
|
528 |
$prune_it = true;
|
529 |
-
}
|
530 |
$file_entities_backups_found[$entity]++;
|
531 |
if ($file_entities_backups_found[$entity] > $updraft_retain) {
|
532 |
$prune_it = true;
|
533 |
}
|
534 |
}
|
535 |
|
536 |
-
// All backups must be run through this filter (in date order) regardless of the current state of $prune_it - so that filters are able to track state.
|
537 |
-
$
|
|
|
538 |
|
539 |
if ($prune_it) {
|
|
|
540 |
$prune_this = $backup_to_examine[$entity];
|
541 |
if (is_string($prune_this)) $prune_this = array($prune_this);
|
542 |
|
@@ -1204,8 +1230,8 @@ class UpdraftPlus_Backup {
|
|
1204 |
usort($all_tables, array($this, 'backup_db_sorttables'));
|
1205 |
|
1206 |
if (!$updraftplus->really_is_writable($this->updraft_dir)) {
|
1207 |
-
$updraftplus->log("The backup directory (".$this->updraft_dir.")
|
1208 |
-
$updraftplus->log($this->updraft_dir.": ".__('The backup directory is not writable - the database backup is expected to shortly fail.','updraftplus'), 'warning');
|
1209 |
# Why not just fail now? We saw a bizarre case when the results of really_is_writable() changed during the run.
|
1210 |
}
|
1211 |
|
@@ -1821,8 +1847,13 @@ class UpdraftPlus_Backup {
|
|
1821 |
$updraftplus->log(sprintf(__("%s: unreadable file - could not be backed up", 'updraftplus'), $use_path_when_storing.'/'.$e), 'warning', "unrfile-$e");
|
1822 |
}
|
1823 |
} elseif (is_dir($fullpath.'/'.$e)) {
|
1824 |
-
|
1825 |
-
|
|
|
|
|
|
|
|
|
|
|
1826 |
}
|
1827 |
}
|
1828 |
closedir($dir_handle);
|
@@ -1960,16 +1991,25 @@ class UpdraftPlus_Backup {
|
|
1960 |
|
1961 |
$updraftplus->log(basename($examine_zip).": Zip file already exists, with ".count($this->existing_files)." files");
|
1962 |
|
1963 |
-
# try_split is set if there have been no check-ins recently
|
1964 |
-
if ($j == $this->index
|
1965 |
-
if (
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1970 |
$do_bump_index = true;
|
1971 |
}
|
1972 |
-
unset($this->try_split);
|
1973 |
}
|
1974 |
|
1975 |
} elseif (file_exists($examine_zip)) {
|
456 |
|
457 |
$remote_sent = (!empty($backup_to_examine['service']) && ((is_array($backup_to_examine['service']) && in_array('remotesend', $backup_to_examine['service'])) || 'remotesend' === $backup_to_examine['service'])) ? true : false;
|
458 |
|
459 |
+
$any_deleted_via_filter_yet = false;
|
460 |
+
|
461 |
# Databases
|
462 |
foreach ($backup_to_examine as $key => $data) {
|
463 |
if ('db' != strtolower(substr($key, 0, 2)) || '-size' == substr($key, -5, 5)) continue;
|
464 |
|
465 |
$how_many_found = (empty($database_backups_found[$key])) ? 0 : $database_backups_found[$key];
|
466 |
+
if ($is_autobackup) {
|
467 |
+
if ($any_deleted_via_filter_yet) {
|
468 |
+
$updraftplus->log("This backup set ($backup_datestamp) was an automatic backup, but we have previously deleted a backup due to a limit, so it will be pruned (but not counted towards numerical limits).");
|
469 |
+
$prune_it = true;
|
470 |
+
} elseif ($how_many_found < $updraft_retain_db) {
|
471 |
+
$updraftplus->log("This backup set ($backup_datestamp) was an automatic backup, and we have not yet reached any retain limits, so it will not be counted or pruned. Skipping.");
|
472 |
+
continue;
|
473 |
+
}
|
474 |
+
} else {
|
475 |
+
$prune_it = false;
|
476 |
}
|
477 |
|
|
|
|
|
478 |
if ($remote_sent) {
|
479 |
$prune_it = true;
|
480 |
$updraftplus->log("$backup_datestamp: $key: was sent to remote site; will remove from local record (only)");
|
481 |
} else {
|
482 |
|
483 |
if (empty($database_backups_found[$key])) $database_backups_found[$key] = 0;
|
|
|
484 |
|
485 |
+
if (!$is_autobackup) {
|
486 |
+
$database_backups_found[$key] = $database_backups_found[$key] + 1;
|
487 |
|
488 |
+
if ($database_backups_found[$key] > $updraft_retain_db) {
|
489 |
+
$prune_it = true;
|
490 |
+
|
491 |
+
$fname = (is_string($data)) ? $data : $data[0];
|
492 |
+
$updraftplus->log("$backup_datestamp: $key: this set includes a database (".$fname."); db count is now ".$database_backups_found[$key]);
|
493 |
|
494 |
+
$updraftplus->log("$backup_datestamp: $key: over retain limit ($updraft_retain_db); will delete this database");
|
495 |
+
}
|
496 |
}
|
497 |
}
|
498 |
|
499 |
+
// All non-auto backups must be run through this filter (in date order) regardless of the current state of $prune_it - so that filters are able to track state.
|
500 |
+
$prune_it_before_filter = $prune_it;
|
501 |
+
|
502 |
+
if (!$is_autobackup) $prune_it = apply_filters('updraftplus_prune_or_not', $prune_it, 'db', $backup_datestamp, $database_backups_found[$key], $key, $data, $updraft_retain_db);
|
503 |
+
|
504 |
if ($prune_it) {
|
505 |
// This should only be able to happen if you import backups with a future timestamp
|
506 |
if (!empty($backup_to_examine['nonce']) && $backup_to_examine['nonce'] == $updraftplus->nonce) {
|
509 |
}
|
510 |
}
|
511 |
|
|
|
|
|
|
|
512 |
if ($prune_it) {
|
513 |
+
|
514 |
+
if (!$prune_it_before_filter) $any_deleted_via_filter_yet = true;
|
515 |
+
|
516 |
if (!empty($data)) {
|
517 |
$size_key = $key.'-size';
|
518 |
$size = isset($backup_to_examine[$size_key]) ? $backup_to_examine[$size_key] : null;
|
526 |
|
527 |
}
|
528 |
|
529 |
+
$any_deleted_via_filter_yet = false;
|
530 |
+
|
531 |
$file_sizes = array();
|
532 |
|
533 |
# Files
|
534 |
foreach ($backupable_entities as $entity => $info) {
|
535 |
if (!empty($backup_to_examine[$entity])) {
|
536 |
|
537 |
+
if ($is_autobackup) {
|
538 |
+
if ($any_deleted_via_filter_yet) {
|
539 |
+
$updraftplus->log("This backup set ($backup_datestamp) was an automatic backup, but we have previously deleted a backup due to a limit, so it will be pruned (but not counted towards numerical limits).");
|
540 |
+
$prune_it = true;
|
541 |
+
} elseif ($file_entities_backups_found[$entity] < $updraft_retain) {
|
542 |
+
$updraftplus->log("This backup set ($backup_datestamp) was an automatic backup, and we have not yet reached any retain limits, so it will not be counted or pruned. Skipping.");
|
543 |
+
continue;
|
544 |
+
} else {
|
545 |
+
$prune_it = false;
|
546 |
+
}
|
547 |
+
} else {
|
548 |
+
$prune_it = false;
|
549 |
}
|
550 |
|
|
|
|
|
551 |
if ($remote_sent) {
|
552 |
$prune_it = true;
|
553 |
+
} elseif (!$is_autobackup) {
|
554 |
$file_entities_backups_found[$entity]++;
|
555 |
if ($file_entities_backups_found[$entity] > $updraft_retain) {
|
556 |
$prune_it = true;
|
557 |
}
|
558 |
}
|
559 |
|
560 |
+
// All non-auto backups must be run through this filter (in date order) regardless of the current state of $prune_it - so that filters are able to track state.
|
561 |
+
$prune_it_before_filter = $prune_it;
|
562 |
+
if (!$is_autobackup) $prune_it = apply_filters('updraftplus_prune_or_not', $prune_it, 'files', $backup_datestamp, $file_entities_backups_found[$entity], $entity, $data, $updraft_retain);
|
563 |
|
564 |
if ($prune_it) {
|
565 |
+
if (!$prune_it_before_filter) $any_deleted_via_filter_yet = true;
|
566 |
$prune_this = $backup_to_examine[$entity];
|
567 |
if (is_string($prune_this)) $prune_this = array($prune_this);
|
568 |
|
1230 |
usort($all_tables, array($this, 'backup_db_sorttables'));
|
1231 |
|
1232 |
if (!$updraftplus->really_is_writable($this->updraft_dir)) {
|
1233 |
+
$updraftplus->log("The backup directory (".$this->updraft_dir.") could not be written to (could be account/disk space full, or wrong permissions).");
|
1234 |
+
$updraftplus->log($this->updraft_dir.": ".__('The backup directory is not writable (or disk space is full) - the database backup is expected to shortly fail.','updraftplus'), 'warning');
|
1235 |
# Why not just fail now? We saw a bizarre case when the results of really_is_writable() changed during the run.
|
1236 |
}
|
1237 |
|
1847 |
$updraftplus->log(sprintf(__("%s: unreadable file - could not be backed up", 'updraftplus'), $use_path_when_storing.'/'.$e), 'warning', "unrfile-$e");
|
1848 |
}
|
1849 |
} elseif (is_dir($fullpath.'/'.$e)) {
|
1850 |
+
if ('wpcore' == $this->whichone && 'updraft' == $e && basename($use_path_when_storing) == 'wp-content' && (!defined('UPDRAFTPLUS_WPCORE_INCLUDE_UPDRAFT_DIRS') || !UPDRAFTPLUS_WPCORE_INCLUDE_UPDRAFT_DIRS)) {
|
1851 |
+
// This test, of course, won't catch everything - it just aims to make things better by default
|
1852 |
+
$updraftplus->log("Directory excluded for looking like a sub-site's internal UpdraftPlus directory (enable by defining UPDRAFTPLUS_WPCORE_INCLUDE_UPDRAFT_DIRS): ".$use_path_when_storing.'/'.$e);
|
1853 |
+
} else {
|
1854 |
+
// no need to addEmptyDir here, as it gets done when we recurse
|
1855 |
+
$this->makezip_recursive_add($fullpath.'/'.$e, $use_path_when_storing.'/'.$e, $original_fullpath, $startlevels, $exclude);
|
1856 |
+
}
|
1857 |
}
|
1858 |
}
|
1859 |
closedir($dir_handle);
|
1991 |
|
1992 |
$updraftplus->log(basename($examine_zip).": Zip file already exists, with ".count($this->existing_files)." files");
|
1993 |
|
1994 |
+
# try_split is set if there have been no check-ins recently - or if it needs to be split anyway
|
1995 |
+
if ($j == $this->index) {
|
1996 |
+
if (isset($this->try_split)) {
|
1997 |
+
if (filesize($examine_zip) > 50*1048576) {
|
1998 |
+
# We could, as a future enhancement, save this back to the job data, if we see a case that needs it
|
1999 |
+
$this->zip_split_every = max(
|
2000 |
+
(int)$this->zip_split_every/2,
|
2001 |
+
UPDRAFTPLUS_SPLIT_MIN*1048576,
|
2002 |
+
min(filesize($examine_zip)-1048576, $this->zip_split_every)
|
2003 |
+
);
|
2004 |
+
$updraftplus->jobdata_set('split_every', (int)($this->zip_split_every/1048576));
|
2005 |
+
$updraftplus->log("No check-in on last two runs; bumping index and reducing zip split to: ".round($this->zip_split_every/1048576, 1)." Mb");
|
2006 |
+
$do_bump_index = true;
|
2007 |
+
}
|
2008 |
+
unset($this->try_split);
|
2009 |
+
} elseif (filesize($examine_zip) > $this->zip_split_every) {
|
2010 |
+
$updraftplus->log(sprintf("Zip size is at/near split limit (%s Mb / %s Mb) - bumping index (from: %d)", filesize($examine_zip), round($this->zip_split_every/1048576, 1), $this->index));
|
2011 |
$do_bump_index = true;
|
2012 |
}
|
|
|
2013 |
}
|
2014 |
|
2015 |
} elseif (file_exists($examine_zip)) {
|
@@ -19,6 +19,7 @@ class UpdraftPlus {
|
|
19 |
'ftp' => 'FTP',
|
20 |
'copycom' => 'Copy.Com',
|
21 |
'sftp' => 'SFTP / SCP',
|
|
|
22 |
'webdav' => 'WebDAV',
|
23 |
's3generic' => 'S3-Compatible (Generic)',
|
24 |
'openstack' => 'OpenStack (Swift)',
|
@@ -125,6 +126,48 @@ class UpdraftPlus {
|
|
125 |
die;
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
public function ensure_phpseclib($classes = false, $class_paths = false) {
|
129 |
|
130 |
if (false === strpos(get_include_path(), UPDRAFTPLUS_DIR.'/includes/phpseclib')) set_include_path(get_include_path().PATH_SEPARATOR.UPDRAFTPLUS_DIR.'/includes/phpseclib');
|
@@ -330,7 +373,7 @@ class UpdraftPlus {
|
|
330 |
|
331 |
public function siteid() {
|
332 |
$sid = get_site_option('updraftplus-addons_siteid');
|
333 |
-
if (!is_string($sid)) {
|
334 |
$sid = md5(rand().time().home_url());
|
335 |
update_site_option('updraftplus-addons_siteid', $sid);
|
336 |
}
|
@@ -785,7 +828,7 @@ class UpdraftPlus {
|
|
785 |
}
|
786 |
}
|
787 |
|
788 |
-
public function chunked_download($file, $method, $remote_size, $manually_break_up = false, $passback = null) {
|
789 |
|
790 |
try {
|
791 |
|
@@ -804,7 +847,7 @@ class UpdraftPlus {
|
|
804 |
return false;
|
805 |
}
|
806 |
|
807 |
-
$last_byte = ($manually_break_up) ? min($remote_size, $start_offset +
|
808 |
|
809 |
# This only affects logging
|
810 |
$expected_bytes_delivered_so_far = true;
|
@@ -836,7 +879,7 @@ class UpdraftPlus {
|
|
836 |
|
837 |
clearstatcache();
|
838 |
$start_offset = ftell($fh);
|
839 |
-
$last_byte = ($manually_break_up) ? min($remote_size, $start_offset +
|
840 |
|
841 |
}
|
842 |
|
@@ -1134,15 +1177,15 @@ class UpdraftPlus {
|
|
1134 |
|
1135 |
if ($full_info) {
|
1136 |
$arr = array(
|
1137 |
-
'plugins' => array('path' => WP_PLUGIN_DIR, 'description' => __('Plugins','updraftplus')),
|
1138 |
'themes' => array('path' => WP_CONTENT_DIR.'/themes', 'description' => __('Themes','updraftplus')),
|
1139 |
-
'uploads' => array('path' => $wp_upload_dir['basedir'], 'description' => __('Uploads','updraftplus'))
|
1140 |
);
|
1141 |
} else {
|
1142 |
$arr = array(
|
1143 |
-
'plugins' => WP_PLUGIN_DIR,
|
1144 |
'themes' => WP_CONTENT_DIR.'/themes',
|
1145 |
-
'uploads' => $wp_upload_dir['basedir']
|
1146 |
);
|
1147 |
}
|
1148 |
|
@@ -2193,6 +2236,8 @@ class UpdraftPlus {
|
|
2193 |
// Make sure that the final status is shown
|
2194 |
if (0 == $this->error_count()) {
|
2195 |
$send_an_email = true;
|
|
|
|
|
2196 |
if (0 == $this->error_count('warning')) {
|
2197 |
$final_message = __('The backup apparently succeeded and is now complete', 'updraftplus');
|
2198 |
# Ensure it is logged in English. Not hugely important; but helps with a tiny number of really broken setups in which the options cacheing is broken
|
@@ -2205,6 +2250,7 @@ class UpdraftPlus {
|
|
2205 |
$this->log('The backup apparently succeeded (with warnings) and is now complete');
|
2206 |
}
|
2207 |
}
|
|
|
2208 |
if ($do_cleanup) $delete_jobdata = apply_filters('updraftplus_backup_complete', $delete_jobdata);
|
2209 |
} elseif (false == $this->newresumption_scheduled) {
|
2210 |
$send_an_email = true;
|
@@ -2722,7 +2768,7 @@ class UpdraftPlus {
|
|
2722 |
return $interval;
|
2723 |
}
|
2724 |
|
2725 |
-
// Acts as a
|
2726 |
public function onedrive_checkchange($onedrive) {
|
2727 |
$opts = UpdraftPlus_Options::get_updraft_option('updraft_onedrive');
|
2728 |
if (!is_array($opts)) $opts = array();
|
@@ -2764,6 +2810,34 @@ class UpdraftPlus {
|
|
2764 |
return $opts;
|
2765 |
}
|
2766 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2767 |
public function ftp_sanitise($ftp) {
|
2768 |
if (is_array($ftp) && !empty($ftp['host']) && preg_match('#ftp(es|s)?://(.*)#i', $ftp['host'], $matches)) {
|
2769 |
$ftp['host'] = untrailingslashit($matches[2]);
|
@@ -2907,6 +2981,23 @@ class UpdraftPlus {
|
|
2907 |
return true;
|
2908 |
}
|
2909 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2910 |
public function spool_file($type, $fullpath, $encryption = "") {
|
2911 |
@set_time_limit(900);
|
2912 |
|
@@ -2922,18 +3013,8 @@ class UpdraftPlus {
|
|
2922 |
|
2923 |
header("Content-Length: ".filesize($fullpath));
|
2924 |
|
2925 |
-
|
2926 |
-
|
2927 |
-
} elseif ('.tar' == substr($fullpath, -4, 4)) {
|
2928 |
-
header('Content-type: application/x-tar');
|
2929 |
-
} elseif ('.tar.gz' == substr($fullpath, -7, 7)) {
|
2930 |
-
header('Content-type: application/x-tgz');
|
2931 |
-
} elseif ('.tar.bz2' == substr($fullpath, -8, 8)) {
|
2932 |
-
header('Content-type: application/x-bzip-compressed-tar');
|
2933 |
-
} else {
|
2934 |
-
// When we sent application/x-gzip, we found a case where the server compressed it a second time
|
2935 |
-
header('Content-type: application/octet-stream');
|
2936 |
-
}
|
2937 |
header("Content-Disposition: attachment; filename=\"".basename($fullpath)."\";");
|
2938 |
# Prevent the file being read into memory
|
2939 |
@ob_end_flush();
|
@@ -3387,7 +3468,7 @@ CREATE TABLE $wpdb->signups (
|
|
3387 |
public function get_settings_keys() {
|
3388 |
// N.B. updraft_backup_history is not included here, as we don't want that wiped
|
3389 |
return array('updraft_autobackup_default', 'updraft_dropbox', 'updraft_googledrive', 'updraftplus_tmp_googledrive_access_token', 'updraftplus_dismissedautobackup', 'updraftplus_dismissedexpiry', 'updraftplus_dismisseddashnotice', 'updraft_interval', 'updraft_interval_increments', 'updraft_interval_database', 'updraft_retain', 'updraft_retain_db', 'updraft_encryptionphrase', 'updraft_service', 'updraft_dropbox_appkey', 'updraft_dropbox_secret', 'updraft_googledrive_clientid', 'updraft_googledrive_secret', 'updraft_googledrive_remotepath', 'updraft_ftp_login', 'updraft_ftp_pass', 'updraft_ftp_remote_path', 'updraft_server_address', 'updraft_dir', 'updraft_email', 'updraft_delete_local', 'updraft_debug_mode', 'updraft_include_plugins', 'updraft_include_themes', 'updraft_include_uploads', 'updraft_include_others', 'updraft_include_wpcore', 'updraft_include_wpcore_exclude', 'updraft_include_more', 'updraft_include_blogs', 'updraft_include_mu-plugins',
|
3390 |
-
'updraft_include_others_exclude', 'updraft_include_uploads_exclude', 'updraft_lastmessage', 'updraft_googledrive_token', 'updraft_dropboxtk_request_token', 'updraft_dropboxtk_access_token', 'updraft_dropbox_folder', 'updraft_adminlocking', 'updraft_updraftvault', 'updraft_remotesites', 'updraft_migrator_localkeys', 'updraft_retain_extrarules',
|
3391 |
'updraft_last_backup', 'updraft_starttime_files', 'updraft_starttime_db', 'updraft_startday_db', 'updraft_startday_files', 'updraft_sftp_settings', 'updraft_s3', 'updraft_s3generic', 'updraft_dreamhost', 'updraft_s3generic_login', 'updraft_s3generic_pass', 'updraft_s3generic_remote_path', 'updraft_s3generic_endpoint', 'updraft_webdav_settings', 'updraft_openstack', 'updraft_bitcasa', 'updraft_copycom', 'updraft_onedrive', 'updraft_cloudfiles', 'updraft_cloudfiles_user', 'updraft_cloudfiles_apikey', 'updraft_cloudfiles_path', 'updraft_cloudfiles_authurl', 'updraft_ssl_useservercerts', 'updraft_ssl_disableverify', 'updraft_s3_login', 'updraft_s3_pass', 'updraft_s3_remote_path', 'updraft_dreamobjects_login', 'updraft_dreamobjects_pass', 'updraft_dreamobjects_remote_path', 'updraft_report_warningsonly', 'updraft_report_wholebackup', 'updraft_log_syslog', 'updraft_extradatabases');
|
3392 |
}
|
3393 |
|
19 |
'ftp' => 'FTP',
|
20 |
'copycom' => 'Copy.Com',
|
21 |
'sftp' => 'SFTP / SCP',
|
22 |
+
'googlecloud' => 'Google Cloud',
|
23 |
'webdav' => 'WebDAV',
|
24 |
's3generic' => 'S3-Compatible (Generic)',
|
25 |
'openstack' => 'OpenStack (Swift)',
|
126 |
die;
|
127 |
}
|
128 |
|
129 |
+
// Gets an RPC object, and sets some defaults on it that we always want
|
130 |
+
public function get_udrpc($indicator_name = 'migrator.updraftplus.com') {
|
131 |
+
if (!class_exists('UpdraftPlus_Remote_Communications')) require_once(UPDRAFTPLUS_DIR.'/includes/class-udrpc.php');
|
132 |
+
$ud_rpc = new UpdraftPlus_Remote_Communications($indicator_name);
|
133 |
+
$ud_rpc->set_can_generate(true);
|
134 |
+
return $ud_rpc;
|
135 |
+
}
|
136 |
+
|
137 |
+
public function create_remote_control_key($name_hash) {
|
138 |
+
|
139 |
+
$indicator_name = $name_hash.'.remotecontrol.updraftplus.com';
|
140 |
+
|
141 |
+
$our_keys = UpdraftPlus_Options::get_updraft_option('updraft_remotecontrol_localkeys');
|
142 |
+
if (!is_array($our_keys)) $our_keys = array();
|
143 |
+
|
144 |
+
if (isset($our_keys[$name_hash])) {
|
145 |
+
unset($our_keys[$name_hash]);
|
146 |
+
}
|
147 |
+
|
148 |
+
$ud_rpc = $this->get_udrpc($indicator_name);
|
149 |
+
|
150 |
+
if (is_object($ud_rpc) && $ud_rpc->generate_new_keypair()) {
|
151 |
+
$local_bundle = $ud_rpc->get_portable_bundle('base64_with_count');
|
152 |
+
|
153 |
+
$our_keys[$name_hash] = array(
|
154 |
+
'name' => 'UpdraftPlus.Com',
|
155 |
+
'key' => $ud_rpc->get_key_local()
|
156 |
+
);
|
157 |
+
UpdraftPlus_Options::update_updraft_option('updraft_remotecontrol_localkeys', $our_keys);
|
158 |
+
|
159 |
+
return array(
|
160 |
+
'bundle' => $local_bundle,
|
161 |
+
'r' => __('Key created successfully.', 'updraftplus').' '.__('You must copy and paste this key now - it cannot be shown again.', 'updraftplus'),
|
162 |
+
// 'selector' => $this->get_remotesites_selector(array()),
|
163 |
+
// 'ourkeys' => $this->list_our_keys($our_keys),
|
164 |
+
);
|
165 |
+
}
|
166 |
+
|
167 |
+
return false;
|
168 |
+
|
169 |
+
}
|
170 |
+
|
171 |
public function ensure_phpseclib($classes = false, $class_paths = false) {
|
172 |
|
173 |
if (false === strpos(get_include_path(), UPDRAFTPLUS_DIR.'/includes/phpseclib')) set_include_path(get_include_path().PATH_SEPARATOR.UPDRAFTPLUS_DIR.'/includes/phpseclib');
|
373 |
|
374 |
public function siteid() {
|
375 |
$sid = get_site_option('updraftplus-addons_siteid');
|
376 |
+
if (!is_string($sid) || empty($sid)) {
|
377 |
$sid = md5(rand().time().home_url());
|
378 |
update_site_option('updraftplus-addons_siteid', $sid);
|
379 |
}
|
828 |
}
|
829 |
}
|
830 |
|
831 |
+
public function chunked_download($file, $method, $remote_size, $manually_break_up = false, $passback = null, $chunk_size = 1048576) {
|
832 |
|
833 |
try {
|
834 |
|
847 |
return false;
|
848 |
}
|
849 |
|
850 |
+
$last_byte = ($manually_break_up) ? min($remote_size, $start_offset + $chunk_size) : $remote_size;
|
851 |
|
852 |
# This only affects logging
|
853 |
$expected_bytes_delivered_so_far = true;
|
879 |
|
880 |
clearstatcache();
|
881 |
$start_offset = ftell($fh);
|
882 |
+
$last_byte = ($manually_break_up) ? min($remote_size, $start_offset + $chunk_size) : $remote_size;
|
883 |
|
884 |
}
|
885 |
|
1177 |
|
1178 |
if ($full_info) {
|
1179 |
$arr = array(
|
1180 |
+
'plugins' => array('path' => untrailingslashit(WP_PLUGIN_DIR), 'description' => __('Plugins','updraftplus')),
|
1181 |
'themes' => array('path' => WP_CONTENT_DIR.'/themes', 'description' => __('Themes','updraftplus')),
|
1182 |
+
'uploads' => array('path' => untrailingslashit($wp_upload_dir['basedir']), 'description' => __('Uploads','updraftplus'))
|
1183 |
);
|
1184 |
} else {
|
1185 |
$arr = array(
|
1186 |
+
'plugins' => untrailingslashit(WP_PLUGIN_DIR),
|
1187 |
'themes' => WP_CONTENT_DIR.'/themes',
|
1188 |
+
'uploads' => untrailingslashit($wp_upload_dir['basedir'])
|
1189 |
);
|
1190 |
}
|
1191 |
|
2236 |
// Make sure that the final status is shown
|
2237 |
if (0 == $this->error_count()) {
|
2238 |
$send_an_email = true;
|
2239 |
+
$service = $this->jobdata_get('service');
|
2240 |
+
$remote_sent = (!empty($service) && ((is_array($service) && in_array('remotesend', $service)) || 'remotesend' === $service)) ? true : false;
|
2241 |
if (0 == $this->error_count('warning')) {
|
2242 |
$final_message = __('The backup apparently succeeded and is now complete', 'updraftplus');
|
2243 |
# Ensure it is logged in English. Not hugely important; but helps with a tiny number of really broken setups in which the options cacheing is broken
|
2250 |
$this->log('The backup apparently succeeded (with warnings) and is now complete');
|
2251 |
}
|
2252 |
}
|
2253 |
+
if ($remote_sent) $final_message .= '. '.__('To complete your migration/clone, you should now log in to the remote site and restore the backup set.', 'updraftplus');
|
2254 |
if ($do_cleanup) $delete_jobdata = apply_filters('updraftplus_backup_complete', $delete_jobdata);
|
2255 |
} elseif (false == $this->newresumption_scheduled) {
|
2256 |
$send_an_email = true;
|
2768 |
return $interval;
|
2769 |
}
|
2770 |
|
2771 |
+
// Acts as a WordPress options filter
|
2772 |
public function onedrive_checkchange($onedrive) {
|
2773 |
$opts = UpdraftPlus_Options::get_updraft_option('updraft_onedrive');
|
2774 |
if (!is_array($opts)) $opts = array();
|
2810 |
return $opts;
|
2811 |
}
|
2812 |
|
2813 |
+
// Acts as a WordPress options filter
|
2814 |
+
public function googlecloud_checkchange($google) {
|
2815 |
+
$opts = UpdraftPlus_Options::get_updraft_option('updraft_googlecloud');
|
2816 |
+
if (!is_array($google)) return $opts;
|
2817 |
+
|
2818 |
+
$old_token = (empty($opts['token'])) ? '' : $opts['token'];
|
2819 |
+
$old_client_id = (empty($opts['clientid'])) ? '' : $opts['clientid'];
|
2820 |
+
$old_client_secret = (empty($opts['secret'])) ? '' : $opts['secret'];
|
2821 |
+
|
2822 |
+
if($old_client_id == $google['clientid'] && $old_client_secret == $google['secret']){
|
2823 |
+
$google['token'] = $old_token;
|
2824 |
+
}
|
2825 |
+
if (!empty($opts['token']) && $old_client_id != $google['clientid']) {
|
2826 |
+
add_action('http_request_args', array($this, 'modify_http_options'));
|
2827 |
+
UpdraftPlus_Addons_RemoteStorage_googlecloud::gcloud_auth_revoke(false);
|
2828 |
+
remove_action('http_request_args', array($this, 'modify_http_options'));
|
2829 |
+
$google['token'] = '';
|
2830 |
+
unset($opts['ownername']);
|
2831 |
+
}
|
2832 |
+
foreach ($google as $key => $value) {
|
2833 |
+
// Trim spaces - I got support requests from users who didn't spot the spaces they introduced when copy/pasting
|
2834 |
+
$opts[$key] = ('clientid' == $key || 'secret' == $key) ? trim($value) : $value;
|
2835 |
+
if ($key == 'bucket_location') $opts[$key] = trim(strtolower($value));
|
2836 |
+
}
|
2837 |
+
|
2838 |
+
return $google;
|
2839 |
+
}
|
2840 |
+
|
2841 |
public function ftp_sanitise($ftp) {
|
2842 |
if (is_array($ftp) && !empty($ftp['host']) && preg_match('#ftp(es|s)?://(.*)#i', $ftp['host'], $matches)) {
|
2843 |
$ftp['host'] = untrailingslashit($matches[2]);
|
2981 |
return true;
|
2982 |
}
|
2983 |
|
2984 |
+
public function get_mime_type_from_filename($filename, $allow_gzip = true) {
|
2985 |
+
if ('.zip' == substr($filename, -4, 4)) {
|
2986 |
+
return 'application/zip';
|
2987 |
+
} elseif ('.tar' == substr($filename, -4, 4)) {
|
2988 |
+
return 'application/x-tar';
|
2989 |
+
} elseif ('.tar.gz' == substr($filename, -7, 7)) {
|
2990 |
+
return 'application/x-tgz';
|
2991 |
+
} elseif ('.tar.bz2' == substr($filename, -8, 8)) {
|
2992 |
+
return 'application/x-bzip-compressed-tar';
|
2993 |
+
} elseif ($allow_gzip && '.gz' == substr($filename, -3, 3)) {
|
2994 |
+
// When we sent application/x-gzip as a content-type header to the browser, we found a case where the server compressed it a second time (since observed several times)
|
2995 |
+
return 'application/x-gzip';
|
2996 |
+
} else {
|
2997 |
+
return 'application/octet-stream';
|
2998 |
+
}
|
2999 |
+
}
|
3000 |
+
|
3001 |
public function spool_file($type, $fullpath, $encryption = "") {
|
3002 |
@set_time_limit(900);
|
3003 |
|
3013 |
|
3014 |
header("Content-Length: ".filesize($fullpath));
|
3015 |
|
3016 |
+
header('Content-type: '.$this->get_mime_type_from_filename($fullpath, false));
|
3017 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3018 |
header("Content-Disposition: attachment; filename=\"".basename($fullpath)."\";");
|
3019 |
# Prevent the file being read into memory
|
3020 |
@ob_end_flush();
|
3468 |
public function get_settings_keys() {
|
3469 |
// N.B. updraft_backup_history is not included here, as we don't want that wiped
|
3470 |
return array('updraft_autobackup_default', 'updraft_dropbox', 'updraft_googledrive', 'updraftplus_tmp_googledrive_access_token', 'updraftplus_dismissedautobackup', 'updraftplus_dismissedexpiry', 'updraftplus_dismisseddashnotice', 'updraft_interval', 'updraft_interval_increments', 'updraft_interval_database', 'updraft_retain', 'updraft_retain_db', 'updraft_encryptionphrase', 'updraft_service', 'updraft_dropbox_appkey', 'updraft_dropbox_secret', 'updraft_googledrive_clientid', 'updraft_googledrive_secret', 'updraft_googledrive_remotepath', 'updraft_ftp_login', 'updraft_ftp_pass', 'updraft_ftp_remote_path', 'updraft_server_address', 'updraft_dir', 'updraft_email', 'updraft_delete_local', 'updraft_debug_mode', 'updraft_include_plugins', 'updraft_include_themes', 'updraft_include_uploads', 'updraft_include_others', 'updraft_include_wpcore', 'updraft_include_wpcore_exclude', 'updraft_include_more', 'updraft_include_blogs', 'updraft_include_mu-plugins',
|
3471 |
+
'updraft_include_others_exclude', 'updraft_include_uploads_exclude', 'updraft_lastmessage', 'updraft_googledrive_token', 'updraft_dropboxtk_request_token', 'updraft_dropboxtk_access_token', 'updraft_dropbox_folder', 'updraft_adminlocking', 'updraft_updraftvault', 'updraft_remotesites', 'updraft_migrator_localkeys', 'updraft_remotecontrol_localkeys', 'updraft_retain_extrarules', 'updraft_googlecloud',
|
3472 |
'updraft_last_backup', 'updraft_starttime_files', 'updraft_starttime_db', 'updraft_startday_db', 'updraft_startday_files', 'updraft_sftp_settings', 'updraft_s3', 'updraft_s3generic', 'updraft_dreamhost', 'updraft_s3generic_login', 'updraft_s3generic_pass', 'updraft_s3generic_remote_path', 'updraft_s3generic_endpoint', 'updraft_webdav_settings', 'updraft_openstack', 'updraft_bitcasa', 'updraft_copycom', 'updraft_onedrive', 'updraft_cloudfiles', 'updraft_cloudfiles_user', 'updraft_cloudfiles_apikey', 'updraft_cloudfiles_path', 'updraft_cloudfiles_authurl', 'updraft_ssl_useservercerts', 'updraft_ssl_disableverify', 'updraft_s3_login', 'updraft_s3_pass', 'updraft_s3_remote_path', 'updraft_dreamobjects_login', 'updraft_dreamobjects_pass', 'updraft_dreamobjects_remote_path', 'updraft_report_warningsonly', 'updraft_report_wholebackup', 'updraft_log_syslog', 'updraft_extradatabases');
|
3473 |
}
|
3474 |
|
Binary file
|
Binary file
|
@@ -1,933 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
* Copyright 2010 Google Inc.
|
4 |
-
*
|
5 |
-
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
6 |
-
* use this file except in compliance with the License. You may obtain a copy of
|
7 |
-
* the License at
|
8 |
-
*
|
9 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
10 |
-
*
|
11 |
-
* Unless required by applicable law or agreed to in writing, software
|
12 |
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
13 |
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
14 |
-
* License for the specific language governing permissions and limitations under
|
15 |
-
* the License.
|
16 |
-
*/
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Service definition for Pubsub (v1beta2).
|
20 |
-
*
|
21 |
-
* <p>
|
22 |
-
* Provides reliable, many-to-many, asynchronous messaging between applications.</p>
|
23 |
-
*
|
24 |
-
* <p>
|
25 |
-
* For more information about this service, see the API
|
26 |
-
* <a href="" target="_blank">Documentation</a>
|
27 |
-
* </p>
|
28 |
-
*
|
29 |
-
* @author Google, Inc.
|
30 |
-
*/
|
31 |
-
class Google_Service_Pubsub extends Google_Service
|
32 |
-
{
|
33 |
-
/** View and manage your data across Google Cloud Platform services. */
|
34 |
-
const CLOUD_PLATFORM =
|
35 |
-
"https://www.googleapis.com/auth/cloud-platform";
|
36 |
-
/** View and manage Pub/Sub topics and subscriptions. */
|
37 |
-
const PUBSUB =
|
38 |
-
"https://www.googleapis.com/auth/pubsub";
|
39 |
-
|
40 |
-
public $projects_subscriptions;
|
41 |
-
public $projects_topics;
|
42 |
-
public $projects_topics_subscriptions;
|
43 |
-
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Constructs the internal representation of the Pubsub service.
|
47 |
-
*
|
48 |
-
* @param Google_Client $client
|
49 |
-
*/
|
50 |
-
public function __construct(Google_Client $client)
|
51 |
-
{
|
52 |
-
parent::__construct($client);
|
53 |
-
$this->servicePath = 'v1beta2/';
|
54 |
-
$this->version = 'v1beta2';
|
55 |
-
$this->serviceName = 'pubsub';
|
56 |
-
|
57 |
-
$this->projects_subscriptions = new Google_Service_Pubsub_ProjectsSubscriptions_Resource(
|
58 |
-
$this,
|
59 |
-
$this->serviceName,
|
60 |
-
'subscriptions',
|
61 |
-
array(
|
62 |
-
'methods' => array(
|
63 |
-
'acknowledge' => array(
|
64 |
-
'path' => '{+subscription}:acknowledge',
|
65 |
-
'httpMethod' => 'POST',
|
66 |
-
'parameters' => array(
|
67 |
-
'subscription' => array(
|
68 |
-
'location' => 'path',
|
69 |
-
'type' => 'string',
|
70 |
-
'required' => true,
|
71 |
-
),
|
72 |
-
),
|
73 |
-
),'create' => array(
|
74 |
-
'path' => '{+name}',
|
75 |
-
'httpMethod' => 'PUT',
|
76 |
-
'parameters' => array(
|
77 |
-
'name' => array(
|
78 |
-
'location' => 'path',
|
79 |
-
'type' => 'string',
|
80 |
-
'required' => true,
|
81 |
-
),
|
82 |
-
),
|
83 |
-
),'delete' => array(
|
84 |
-
'path' => '{+subscription}',
|
85 |
-
'httpMethod' => 'DELETE',
|
86 |
-
'parameters' => array(
|
87 |
-
'subscription' => array(
|
88 |
-
'location' => 'path',
|
89 |
-
'type' => 'string',
|
90 |
-
'required' => true,
|
91 |
-
),
|
92 |
-
),
|
93 |
-
),'get' => array(
|
94 |
-
'path' => '{+subscription}',
|
95 |
-
'httpMethod' => 'GET',
|
96 |
-
'parameters' => array(
|
97 |
-
'subscription' => array(
|
98 |
-
'location' => 'path',
|
99 |
-
'type' => 'string',
|
100 |
-
'required' => true,
|
101 |
-
),
|
102 |
-
),
|
103 |
-
),'list' => array(
|
104 |
-
'path' => '{+project}/subscriptions',
|
105 |
-
'httpMethod' => 'GET',
|
106 |
-
'parameters' => array(
|
107 |
-
'project' => array(
|
108 |
-
'location' => 'path',
|
109 |
-
'type' => 'string',
|
110 |
-
'required' => true,
|
111 |
-
),
|
112 |
-
'pageToken' => array(
|
113 |
-
'location' => 'query',
|
114 |
-
'type' => 'string',
|
115 |
-
),
|
116 |
-
'pageSize' => array(
|
117 |
-
'location' => 'query',
|
118 |
-
'type' => 'integer',
|
119 |
-
),
|
120 |
-
),
|
121 |
-
),'modifyAckDeadline' => array(
|
122 |
-
'path' => '{+subscription}:modifyAckDeadline',
|
123 |
-
'httpMethod' => 'POST',
|
124 |
-
'parameters' => array(
|
125 |
-
'subscription' => array(
|
126 |
-
'location' => 'path',
|
127 |
-
'type' => 'string',
|
128 |
-
'required' => true,
|
129 |
-
),
|
130 |
-
),
|
131 |
-
),'modifyPushConfig' => array(
|
132 |
-
'path' => '{+subscription}:modifyPushConfig',
|
133 |
-
'httpMethod' => 'POST',
|
134 |
-
'parameters' => array(
|
135 |
-
'subscription' => array(
|
136 |
-
'location' => 'path',
|
137 |
-
'type' => 'string',
|
138 |
-
'required' => true,
|
139 |
-
),
|
140 |
-
),
|
141 |
-
),'pull' => array(
|
142 |
-
'path' => '{+subscription}:pull',
|
143 |
-
'httpMethod' => 'POST',
|
144 |
-
'parameters' => array(
|
145 |
-
'subscription' => array(
|
146 |
-
'location' => 'path',
|
147 |
-
'type' => 'string',
|
148 |
-
'required' => true,
|
149 |
-
),
|
150 |
-
),
|
151 |
-
),
|
152 |
-
)
|
153 |
-
)
|
154 |
-
);
|
155 |
-
$this->projects_topics = new Google_Service_Pubsub_ProjectsTopics_Resource(
|
156 |
-
$this,
|
157 |
-
$this->serviceName,
|
158 |
-
'topics',
|
159 |
-
array(
|
160 |
-
'methods' => array(
|
161 |
-
'create' => array(
|
162 |
-
'path' => '{+name}',
|
163 |
-
'httpMethod' => 'PUT',
|
164 |
-
'parameters' => array(
|
165 |
-
'name' => array(
|
166 |
-
'location' => 'path',
|
167 |
-
'type' => 'string',
|
168 |
-
'required' => true,
|
169 |
-
),
|
170 |
-
),
|
171 |
-
),'delete' => array(
|
172 |
-
'path' => '{+topic}',
|
173 |
-
'httpMethod' => 'DELETE',
|
174 |
-
'parameters' => array(
|
175 |
-
'topic' => array(
|
176 |
-
'location' => 'path',
|
177 |
-
'type' => 'string',
|
178 |
-
'required' => true,
|
179 |
-
),
|
180 |
-
),
|
181 |
-
),'get' => array(
|
182 |
-
'path' => '{+topic}',
|
183 |
-
'httpMethod' => 'GET',
|
184 |
-
'parameters' => array(
|
185 |
-
'topic' => array(
|
186 |
-
'location' => 'path',
|
187 |
-
'type' => 'string',
|
188 |
-
'required' => true,
|
189 |
-
),
|
190 |
-
),
|
191 |
-
),'list' => array(
|
192 |
-
'path' => '{+project}/topics',
|
193 |
-
'httpMethod' => 'GET',
|
194 |
-
'parameters' => array(
|
195 |
-
'project' => array(
|
196 |
-
'location' => 'path',
|
197 |
-
'type' => 'string',
|
198 |
-
'required' => true,
|
199 |
-
),
|
200 |
-
'pageToken' => array(
|
201 |
-
'location' => 'query',
|
202 |
-
'type' => 'string',
|
203 |
-
),
|
204 |
-
'pageSize' => array(
|
205 |
-
'location' => 'query',
|
206 |
-
'type' => 'integer',
|
207 |
-
),
|
208 |
-
),
|
209 |
-
),'publish' => array(
|
210 |
-
'path' => '{+topic}:publish',
|
211 |
-
'httpMethod' => 'POST',
|
212 |
-
'parameters' => array(
|
213 |
-
'topic' => array(
|
214 |
-
'location' => 'path',
|
215 |
-
'type' => 'string',
|
216 |
-
'required' => true,
|
217 |
-
),
|
218 |
-
),
|
219 |
-
),
|
220 |
-
)
|
221 |
-
)
|
222 |
-
);
|
223 |
-
$this->projects_topics_subscriptions = new Google_Service_Pubsub_ProjectsTopicsSubscriptions_Resource(
|
224 |
-
$this,
|
225 |
-
$this->serviceName,
|
226 |
-
'subscriptions',
|
227 |
-
array(
|
228 |
-
'methods' => array(
|
229 |
-
'list' => array(
|
230 |
-
'path' => '{+topic}/subscriptions',
|
231 |
-
'httpMethod' => 'GET',
|
232 |
-
'parameters' => array(
|
233 |
-
'topic' => array(
|
234 |
-
'location' => 'path',
|
235 |
-
'type' => 'string',
|
236 |
-
'required' => true,
|
237 |
-
),
|
238 |
-
'pageToken' => array(
|
239 |
-
'location' => 'query',
|
240 |
-
'type' => 'string',
|
241 |
-
),
|
242 |
-
'pageSize' => array(
|
243 |
-
'location' => 'query',
|
244 |
-
'type' => 'integer',
|
245 |
-
),
|
246 |
-
),
|
247 |
-
),
|
248 |
-
)
|
249 |
-
)
|
250 |
-
);
|
251 |
-
}
|
252 |
-
}
|
253 |
-
|
254 |
-
|
255 |
-
/**
|
256 |
-
* The "projects" collection of methods.
|
257 |
-
* Typical usage is:
|
258 |
-
* <code>
|
259 |
-
* $pubsubService = new Google_Service_Pubsub(...);
|
260 |
-
* $projects = $pubsubService->projects;
|
261 |
-
* </code>
|
262 |
-
*/
|
263 |
-
class Google_Service_Pubsub_Projects_Resource extends Google_Service_Resource
|
264 |
-
{
|
265 |
-
}
|
266 |
-
|
267 |
-
/**
|
268 |
-
* The "subscriptions" collection of methods.
|
269 |
-
* Typical usage is:
|
270 |
-
* <code>
|
271 |
-
* $pubsubService = new Google_Service_Pubsub(...);
|
272 |
-
* $subscriptions = $pubsubService->subscriptions;
|
273 |
-
* </code>
|
274 |
-
*/
|
275 |
-
class Google_Service_Pubsub_ProjectsSubscriptions_Resource extends Google_Service_Resource
|
276 |
-
{
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Acknowledges the messages associated with the ack tokens in the
|
280 |
-
* AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from
|
281 |
-
* the subscription. Acknowledging a message whose ack deadline has expired may
|
282 |
-
* succeed, but such a message may be redelivered later. Acknowledging a message
|
283 |
-
* more than once will not result in an error. (subscriptions.acknowledge)
|
284 |
-
*
|
285 |
-
* @param string $subscription
|
286 |
-
* @param Google_AcknowledgeRequest $postBody
|
287 |
-
* @param array $optParams Optional parameters.
|
288 |
-
* @return Google_Service_Pubsub_Empty
|
289 |
-
*/
|
290 |
-
public function acknowledge($subscription, Google_Service_Pubsub_AcknowledgeRequest $postBody, $optParams = array())
|
291 |
-
{
|
292 |
-
$params = array('subscription' => $subscription, 'postBody' => $postBody);
|
293 |
-
$params = array_merge($params, $optParams);
|
294 |
-
return $this->call('acknowledge', array($params), "Google_Service_Pubsub_Empty");
|
295 |
-
}
|
296 |
-
|
297 |
-
/**
|
298 |
-
* Creates a subscription to a given topic for a given subscriber. If the
|
299 |
-
* subscription already exists, returns ALREADY_EXISTS. If the corresponding
|
300 |
-
* topic doesn't exist, returns NOT_FOUND. If the name is not provided in the
|
301 |
-
* request, the server will assign a random name for this subscription on the
|
302 |
-
* same project as the topic. (subscriptions.create)
|
303 |
-
*
|
304 |
-
* @param string $name
|
305 |
-
* @param Google_Subscription $postBody
|
306 |
-
* @param array $optParams Optional parameters.
|
307 |
-
* @return Google_Service_Pubsub_Subscription
|
308 |
-
*/
|
309 |
-
public function create($name, Google_Service_Pubsub_Subscription $postBody, $optParams = array())
|
310 |
-
{
|
311 |
-
$params = array('name' => $name, 'postBody' => $postBody);
|
312 |
-
$params = array_merge($params, $optParams);
|
313 |
-
return $this->call('create', array($params), "Google_Service_Pubsub_Subscription");
|
314 |
-
}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* Deletes an existing subscription. All pending messages in the subscription
|
318 |
-
* are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.
|
319 |
-
* After a subscription is deleted, a new one may be created with the same name,
|
320 |
-
* but the new one has no association with the old subscription, or its topic
|
321 |
-
* unless the same topic is specified. (subscriptions.delete)
|
322 |
-
*
|
323 |
-
* @param string $subscription
|
324 |
-
* @param array $optParams Optional parameters.
|
325 |
-
* @return Google_Service_Pubsub_Empty
|
326 |
-
*/
|
327 |
-
public function delete($subscription, $optParams = array())
|
328 |
-
{
|
329 |
-
$params = array('subscription' => $subscription);
|
330 |
-
$params = array_merge($params, $optParams);
|
331 |
-
return $this->call('delete', array($params), "Google_Service_Pubsub_Empty");
|
332 |
-
}
|
333 |
-
|
334 |
-
/**
|
335 |
-
* Gets the configuration details of a subscription. (subscriptions.get)
|
336 |
-
*
|
337 |
-
* @param string $subscription
|
338 |
-
* @param array $optParams Optional parameters.
|
339 |
-
* @return Google_Service_Pubsub_Subscription
|
340 |
-
*/
|
341 |
-
public function get($subscription, $optParams = array())
|
342 |
-
{
|
343 |
-
$params = array('subscription' => $subscription);
|
344 |
-
$params = array_merge($params, $optParams);
|
345 |
-
return $this->call('get', array($params), "Google_Service_Pubsub_Subscription");
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Lists matching subscriptions. (subscriptions.listProjectsSubscriptions)
|
350 |
-
*
|
351 |
-
* @param string $project
|
352 |
-
* @param array $optParams Optional parameters.
|
353 |
-
*
|
354 |
-
* @opt_param string pageToken
|
355 |
-
* @opt_param int pageSize
|
356 |
-
* @return Google_Service_Pubsub_ListSubscriptionsResponse
|
357 |
-
*/
|
358 |
-
public function listProjectsSubscriptions($project, $optParams = array())
|
359 |
-
{
|
360 |
-
$params = array('project' => $project);
|
361 |
-
$params = array_merge($params, $optParams);
|
362 |
-
return $this->call('list', array($params), "Google_Service_Pubsub_ListSubscriptionsResponse");
|
363 |
-
}
|
364 |
-
|
365 |
-
/**
|
366 |
-
* Modifies the ack deadline for a specific message. This method is useful to
|
367 |
-
* indicate that more time is needed to process a message by the subscriber, or
|
368 |
-
* to make the message available for redelivery if the processing was
|
369 |
-
* interrupted. (subscriptions.modifyAckDeadline)
|
370 |
-
*
|
371 |
-
* @param string $subscription
|
372 |
-
* @param Google_ModifyAckDeadlineRequest $postBody
|
373 |
-
* @param array $optParams Optional parameters.
|
374 |
-
* @return Google_Service_Pubsub_Empty
|
375 |
-
*/
|
376 |
-
public function modifyAckDeadline($subscription, Google_Service_Pubsub_ModifyAckDeadlineRequest $postBody, $optParams = array())
|
377 |
-
{
|
378 |
-
$params = array('subscription' => $subscription, 'postBody' => $postBody);
|
379 |
-
$params = array_merge($params, $optParams);
|
380 |
-
return $this->call('modifyAckDeadline', array($params), "Google_Service_Pubsub_Empty");
|
381 |
-
}
|
382 |
-
|
383 |
-
/**
|
384 |
-
* Modifies the PushConfig for a specified subscription. This may be used to
|
385 |
-
* change a push subscription to a pull one (signified by an empty PushConfig)
|
386 |
-
* or vice versa, or change the endpoint URL and other attributes of a push
|
387 |
-
* subscription. Messages will accumulate for delivery continuously through the
|
388 |
-
* call regardless of changes to the PushConfig.
|
389 |
-
* (subscriptions.modifyPushConfig)
|
390 |
-
*
|
391 |
-
* @param string $subscription
|
392 |
-
* @param Google_ModifyPushConfigRequest $postBody
|
393 |
-
* @param array $optParams Optional parameters.
|
394 |
-
* @return Google_Service_Pubsub_Empty
|
395 |
-
*/
|
396 |
-
public function modifyPushConfig($subscription, Google_Service_Pubsub_ModifyPushConfigRequest $postBody, $optParams = array())
|
397 |
-
{
|
398 |
-
$params = array('subscription' => $subscription, 'postBody' => $postBody);
|
399 |
-
$params = array_merge($params, $optParams);
|
400 |
-
return $this->call('modifyPushConfig', array($params), "Google_Service_Pubsub_Empty");
|
401 |
-
}
|
402 |
-
|
403 |
-
/**
|
404 |
-
* Pulls messages from the server. Returns an empty list if there are no
|
405 |
-
* messages available in the backlog. The server may return UNAVAILABLE if there
|
406 |
-
* are too many concurrent pull requests pending for the given subscription.
|
407 |
-
* (subscriptions.pull)
|
408 |
-
*
|
409 |
-
* @param string $subscription
|
410 |
-
* @param Google_PullRequest $postBody
|
411 |
-
* @param array $optParams Optional parameters.
|
412 |
-
* @return Google_Service_Pubsub_PullResponse
|
413 |
-
*/
|
414 |
-
public function pull($subscription, Google_Service_Pubsub_PullRequest $postBody, $optParams = array())
|
415 |
-
{
|
416 |
-
$params = array('subscription' => $subscription, 'postBody' => $postBody);
|
417 |
-
$params = array_merge($params, $optParams);
|
418 |
-
return $this->call('pull', array($params), "Google_Service_Pubsub_PullResponse");
|
419 |
-
}
|
420 |
-
}
|
421 |
-
/**
|
422 |
-
* The "topics" collection of methods.
|
423 |
-
* Typical usage is:
|
424 |
-
* <code>
|
425 |
-
* $pubsubService = new Google_Service_Pubsub(...);
|
426 |
-
* $topics = $pubsubService->topics;
|
427 |
-
* </code>
|
428 |
-
*/
|
429 |
-
class Google_Service_Pubsub_ProjectsTopics_Resource extends Google_Service_Resource
|
430 |
-
{
|
431 |
-
|
432 |
-
/**
|
433 |
-
* Creates the given topic with the given name. (topics.create)
|
434 |
-
*
|
435 |
-
* @param string $name
|
436 |
-
* @param Google_Topic $postBody
|
437 |
-
* @param array $optParams Optional parameters.
|
438 |
-
* @return Google_Service_Pubsub_Topic
|
439 |
-
*/
|
440 |
-
public function create($name, Google_Service_Pubsub_Topic $postBody, $optParams = array())
|
441 |
-
{
|
442 |
-
$params = array('name' => $name, 'postBody' => $postBody);
|
443 |
-
$params = array_merge($params, $optParams);
|
444 |
-
return $this->call('create', array($params), "Google_Service_Pubsub_Topic");
|
445 |
-
}
|
446 |
-
|
447 |
-
/**
|
448 |
-
* Deletes the topic with the given name. Returns NOT_FOUND if the topic does
|
449 |
-
* not exist. After a topic is deleted, a new topic may be created with the same
|
450 |
-
* name; this is an entirely new topic with none of the old configuration or
|
451 |
-
* subscriptions. Existing subscriptions to this topic are not deleted.
|
452 |
-
* (topics.delete)
|
453 |
-
*
|
454 |
-
* @param string $topic
|
455 |
-
* @param array $optParams Optional parameters.
|
456 |
-
* @return Google_Service_Pubsub_Empty
|
457 |
-
*/
|
458 |
-
public function delete($topic, $optParams = array())
|
459 |
-
{
|
460 |
-
$params = array('topic' => $topic);
|
461 |
-
$params = array_merge($params, $optParams);
|
462 |
-
return $this->call('delete', array($params), "Google_Service_Pubsub_Empty");
|
463 |
-
}
|
464 |
-
|
465 |
-
/**
|
466 |
-
* Gets the configuration of a topic. (topics.get)
|
467 |
-
*
|
468 |
-
* @param string $topic
|
469 |
-
* @param array $optParams Optional parameters.
|
470 |
-
* @return Google_Service_Pubsub_Topic
|
471 |
-
*/
|
472 |
-
public function get($topic, $optParams = array())
|
473 |
-
{
|
474 |
-
$params = array('topic' => $topic);
|
475 |
-
$params = array_merge($params, $optParams);
|
476 |
-
return $this->call('get', array($params), "Google_Service_Pubsub_Topic");
|
477 |
-
}
|
478 |
-
|
479 |
-
/**
|
480 |
-
* Lists matching topics. (topics.listProjectsTopics)
|
481 |
-
*
|
482 |
-
* @param string $project
|
483 |
-
* @param array $optParams Optional parameters.
|
484 |
-
*
|
485 |
-
* @opt_param string pageToken
|
486 |
-
* @opt_param int pageSize
|
487 |
-
* @return Google_Service_Pubsub_ListTopicsResponse
|
488 |
-
*/
|
489 |
-
public function listProjectsTopics($project, $optParams = array())
|
490 |
-
{
|
491 |
-
$params = array('project' => $project);
|
492 |
-
$params = array_merge($params, $optParams);
|
493 |
-
return $this->call('list', array($params), "Google_Service_Pubsub_ListTopicsResponse");
|
494 |
-
}
|
495 |
-
|
496 |
-
/**
|
497 |
-
* Adds one or more messages to the topic. Returns NOT_FOUND if the topic does
|
498 |
-
* not exist. (topics.publish)
|
499 |
-
*
|
500 |
-
* @param string $topic
|
501 |
-
* @param Google_PublishRequest $postBody
|
502 |
-
* @param array $optParams Optional parameters.
|
503 |
-
* @return Google_Service_Pubsub_PublishResponse
|
504 |
-
*/
|
505 |
-
public function publish($topic, Google_Service_Pubsub_PublishRequest $postBody, $optParams = array())
|
506 |
-
{
|
507 |
-
$params = array('topic' => $topic, 'postBody' => $postBody);
|
508 |
-
$params = array_merge($params, $optParams);
|
509 |
-
return $this->call('publish', array($params), "Google_Service_Pubsub_PublishResponse");
|
510 |
-
}
|
511 |
-
}
|
512 |
-
|
513 |
-
/**
|
514 |
-
* The "subscriptions" collection of methods.
|
515 |
-
* Typical usage is:
|
516 |
-
* <code>
|
517 |
-
* $pubsubService = new Google_Service_Pubsub(...);
|
518 |
-
* $subscriptions = $pubsubService->subscriptions;
|
519 |
-
* </code>
|
520 |
-
*/
|
521 |
-
class Google_Service_Pubsub_ProjectsTopicsSubscriptions_Resource extends Google_Service_Resource
|
522 |
-
{
|
523 |
-
|
524 |
-
/**
|
525 |
-
* Lists the name of the subscriptions for this topic.
|
526 |
-
* (subscriptions.listProjectsTopicsSubscriptions)
|
527 |
-
*
|
528 |
-
* @param string $topic
|
529 |
-
* @param array $optParams Optional parameters.
|
530 |
-
*
|
531 |
-
* @opt_param string pageToken
|
532 |
-
* @opt_param int pageSize
|
533 |
-
* @return Google_Service_Pubsub_ListTopicSubscriptionsResponse
|
534 |
-
*/
|
535 |
-
public function listProjectsTopicsSubscriptions($topic, $optParams = array())
|
536 |
-
{
|
537 |
-
$params = array('topic' => $topic);
|
538 |
-
$params = array_merge($params, $optParams);
|
539 |
-
return $this->call('list', array($params), "Google_Service_Pubsub_ListTopicSubscriptionsResponse");
|
540 |
-
}
|
541 |
-
}
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
class Google_Service_Pubsub_AcknowledgeRequest extends Google_Collection
|
547 |
-
{
|
548 |
-
protected $collection_key = 'ackIds';
|
549 |
-
protected $internal_gapi_mappings = array(
|
550 |
-
);
|
551 |
-
public $ackIds;
|
552 |
-
|
553 |
-
|
554 |
-
public function setAckIds($ackIds)
|
555 |
-
{
|
556 |
-
$this->ackIds = $ackIds;
|
557 |
-
}
|
558 |
-
public function getAckIds()
|
559 |
-
{
|
560 |
-
return $this->ackIds;
|
561 |
-
}
|
562 |
-
}
|
563 |
-
|
564 |
-
class Google_Service_Pubsub_Empty extends Google_Model
|
565 |
-
{
|
566 |
-
}
|
567 |
-
|
568 |
-
class Google_Service_Pubsub_ListSubscriptionsResponse extends Google_Collection
|
569 |
-
{
|
570 |
-
protected $collection_key = 'subscriptions';
|
571 |
-
protected $internal_gapi_mappings = array(
|
572 |
-
);
|
573 |
-
public $nextPageToken;
|
574 |
-
protected $subscriptionsType = 'Google_Service_Pubsub_Subscription';
|
575 |
-
protected $subscriptionsDataType = 'array';
|
576 |
-
|
577 |
-
|
578 |
-
public function setNextPageToken($nextPageToken)
|
579 |
-
{
|
580 |
-
$this->nextPageToken = $nextPageToken;
|
581 |
-
}
|
582 |
-
public function getNextPageToken()
|
583 |
-
{
|
584 |
-
return $this->nextPageToken;
|
585 |
-
}
|
586 |
-
public function setSubscriptions($subscriptions)
|
587 |
-
{
|
588 |
-
$this->subscriptions = $subscriptions;
|
589 |
-
}
|
590 |
-
public function getSubscriptions()
|
591 |
-
{
|
592 |
-
return $this->subscriptions;
|
593 |
-
}
|
594 |
-
}
|
595 |
-
|
596 |
-
class Google_Service_Pubsub_ListTopicSubscriptionsResponse extends Google_Collection
|
597 |
-
{
|
598 |
-
protected $collection_key = 'subscriptions';
|
599 |
-
protected $internal_gapi_mappings = array(
|
600 |
-
);
|
601 |
-
public $nextPageToken;
|
602 |
-
public $subscriptions;
|
603 |
-
|
604 |
-
|
605 |
-
public function setNextPageToken($nextPageToken)
|
606 |
-
{
|
607 |
-
$this->nextPageToken = $nextPageToken;
|
608 |
-
}
|
609 |
-
public function getNextPageToken()
|
610 |
-
{
|
611 |
-
return $this->nextPageToken;
|
612 |
-
}
|
613 |
-
public function setSubscriptions($subscriptions)
|
614 |
-
{
|
615 |
-
$this->subscriptions = $subscriptions;
|
616 |
-
}
|
617 |
-
public function getSubscriptions()
|
618 |
-
{
|
619 |
-
return $this->subscriptions;
|
620 |
-
}
|
621 |
-
}
|
622 |
-
|
623 |
-
class Google_Service_Pubsub_ListTopicsResponse extends Google_Collection
|
624 |
-
{
|
625 |
-
protected $collection_key = 'topics';
|
626 |
-
protected $internal_gapi_mappings = array(
|
627 |
-
);
|
628 |
-
public $nextPageToken;
|
629 |
-
protected $topicsType = 'Google_Service_Pubsub_Topic';
|
630 |
-
protected $topicsDataType = 'array';
|
631 |
-
|
632 |
-
|
633 |
-
public function setNextPageToken($nextPageToken)
|
634 |
-
{
|
635 |
-
$this->nextPageToken = $nextPageToken;
|
636 |
-
}
|
637 |
-
public function getNextPageToken()
|
638 |
-
{
|
639 |
-
return $this->nextPageToken;
|
640 |
-
}
|
641 |
-
public function setTopics($topics)
|
642 |
-
{
|
643 |
-
$this->topics = $topics;
|
644 |
-
}
|
645 |
-
public function getTopics()
|
646 |
-
{
|
647 |
-
return $this->topics;
|
648 |
-
}
|
649 |
-
}
|
650 |
-
|
651 |
-
class Google_Service_Pubsub_ModifyAckDeadlineRequest extends Google_Model
|
652 |
-
{
|
653 |
-
protected $internal_gapi_mappings = array(
|
654 |
-
);
|
655 |
-
public $ackDeadlineSeconds;
|
656 |
-
public $ackId;
|
657 |
-
|
658 |
-
|
659 |
-
public function setAckDeadlineSeconds($ackDeadlineSeconds)
|
660 |
-
{
|
661 |
-
$this->ackDeadlineSeconds = $ackDeadlineSeconds;
|
662 |
-
}
|
663 |
-
public function getAckDeadlineSeconds()
|
664 |
-
{
|
665 |
-
return $this->ackDeadlineSeconds;
|
666 |
-
}
|
667 |
-
public function setAckId($ackId)
|
668 |
-
{
|
669 |
-
$this->ackId = $ackId;
|
670 |
-
}
|
671 |
-
public function getAckId()
|
672 |
-
{
|
673 |
-
return $this->ackId;
|
674 |
-
}
|
675 |
-
}
|
676 |
-
|
677 |
-
class Google_Service_Pubsub_ModifyPushConfigRequest extends Google_Model
|
678 |
-
{
|
679 |
-
protected $internal_gapi_mappings = array(
|
680 |
-
);
|
681 |
-
protected $pushConfigType = 'Google_Service_Pubsub_PushConfig';
|
682 |
-
protected $pushConfigDataType = '';
|
683 |
-
|
684 |
-
|
685 |
-
public function setPushConfig(Google_Service_Pubsub_PushConfig $pushConfig)
|
686 |
-
{
|
687 |
-
$this->pushConfig = $pushConfig;
|
688 |
-
}
|
689 |
-
public function getPushConfig()
|
690 |
-
{
|
691 |
-
return $this->pushConfig;
|
692 |
-
}
|
693 |
-
}
|
694 |
-
|
695 |
-
class Google_Service_Pubsub_PublishRequest extends Google_Collection
|
696 |
-
{
|
697 |
-
protected $collection_key = 'messages';
|
698 |
-
protected $internal_gapi_mappings = array(
|
699 |
-
);
|
700 |
-
protected $messagesType = 'Google_Service_Pubsub_PubsubMessage';
|
701 |
-
protected $messagesDataType = 'array';
|
702 |
-
|
703 |
-
|
704 |
-
public function setMessages($messages)
|
705 |
-
{
|
706 |
-
$this->messages = $messages;
|
707 |
-
}
|
708 |
-
public function getMessages()
|
709 |
-
{
|
710 |
-
return $this->messages;
|
711 |
-
}
|
712 |
-
}
|
713 |
-
|
714 |
-
class Google_Service_Pubsub_PublishResponse extends Google_Collection
|
715 |
-
{
|
716 |
-
protected $collection_key = 'messageIds';
|
717 |
-
protected $internal_gapi_mappings = array(
|
718 |
-
);
|
719 |
-
public $messageIds;
|
720 |
-
|
721 |
-
|
722 |
-
public function setMessageIds($messageIds)
|
723 |
-
{
|
724 |
-
$this->messageIds = $messageIds;
|
725 |
-
}
|
726 |
-
public function getMessageIds()
|
727 |
-
{
|
728 |
-
return $this->messageIds;
|
729 |
-
}
|
730 |
-
}
|
731 |
-
|
732 |
-
class Google_Service_Pubsub_PubsubMessage extends Google_Model
|
733 |
-
{
|
734 |
-
protected $internal_gapi_mappings = array(
|
735 |
-
);
|
736 |
-
public $attributes;
|
737 |
-
public $data;
|
738 |
-
public $messageId;
|
739 |
-
|
740 |
-
|
741 |
-
public function setAttributes($attributes)
|
742 |
-
{
|
743 |
-
$this->attributes = $attributes;
|
744 |
-
}
|
745 |
-
public function getAttributes()
|
746 |
-
{
|
747 |
-
return $this->attributes;
|
748 |
-
}
|
749 |
-
public function setData($data)
|
750 |
-
{
|
751 |
-
$this->data = $data;
|
752 |
-
}
|
753 |
-
public function getData()
|
754 |
-
{
|
755 |
-
return $this->data;
|
756 |
-
}
|
757 |
-
public function setMessageId($messageId)
|
758 |
-
{
|
759 |
-
$this->messageId = $messageId;
|
760 |
-
}
|
761 |
-
public function getMessageId()
|
762 |
-
{
|
763 |
-
return $this->messageId;
|
764 |
-
}
|
765 |
-
}
|
766 |
-
|
767 |
-
class Google_Service_Pubsub_PubsubMessageAttributes extends Google_Model
|
768 |
-
{
|
769 |
-
}
|
770 |
-
|
771 |
-
class Google_Service_Pubsub_PullRequest extends Google_Model
|
772 |
-
{
|
773 |
-
protected $internal_gapi_mappings = array(
|
774 |
-
);
|
775 |
-
public $maxMessages;
|
776 |
-
public $returnImmediately;
|
777 |
-
|
778 |
-
|
779 |
-
public function setMaxMessages($maxMessages)
|
780 |
-
{
|
781 |
-
$this->maxMessages = $maxMessages;
|
782 |
-
}
|
783 |
-
public function getMaxMessages()
|
784 |
-
{
|
785 |
-
return $this->maxMessages;
|
786 |
-
}
|
787 |
-
public function setReturnImmediately($returnImmediately)
|
788 |
-
{
|
789 |
-
$this->returnImmediately = $returnImmediately;
|
790 |
-
}
|
791 |
-
public function getReturnImmediately()
|
792 |
-
{
|
793 |
-
return $this->returnImmediately;
|
794 |
-
}
|
795 |
-
}
|
796 |
-
|
797 |
-
class Google_Service_Pubsub_PullResponse extends Google_Collection
|
798 |
-
{
|
799 |
-
protected $collection_key = 'receivedMessages';
|
800 |
-
protected $internal_gapi_mappings = array(
|
801 |
-
);
|
802 |
-
protected $receivedMessagesType = 'Google_Service_Pubsub_ReceivedMessage';
|
803 |
-
protected $receivedMessagesDataType = 'array';
|
804 |
-
|
805 |
-
|
806 |
-
public function setReceivedMessages($receivedMessages)
|
807 |
-
{
|
808 |
-
$this->receivedMessages = $receivedMessages;
|
809 |
-
}
|
810 |
-
public function getReceivedMessages()
|
811 |
-
{
|
812 |
-
return $this->receivedMessages;
|
813 |
-
}
|
814 |
-
}
|
815 |
-
|
816 |
-
class Google_Service_Pubsub_PushConfig extends Google_Model
|
817 |
-
{
|
818 |
-
protected $internal_gapi_mappings = array(
|
819 |
-
);
|
820 |
-
public $attributes;
|
821 |
-
public $pushEndpoint;
|
822 |
-
|
823 |
-
|
824 |
-
public function setAttributes($attributes)
|
825 |
-
{
|
826 |
-
$this->attributes = $attributes;
|
827 |
-
}
|
828 |
-
public function getAttributes()
|
829 |
-
{
|
830 |
-
return $this->attributes;
|
831 |
-
}
|
832 |
-
public function setPushEndpoint($pushEndpoint)
|
833 |
-
{
|
834 |
-
$this->pushEndpoint = $pushEndpoint;
|
835 |
-
}
|
836 |
-
public function getPushEndpoint()
|
837 |
-
{
|
838 |
-
return $this->pushEndpoint;
|
839 |
-
}
|
840 |
-
}
|
841 |
-
|
842 |
-
class Google_Service_Pubsub_PushConfigAttributes extends Google_Model
|
843 |
-
{
|
844 |
-
}
|
845 |
-
|
846 |
-
class Google_Service_Pubsub_ReceivedMessage extends Google_Model
|
847 |
-
{
|
848 |
-
protected $internal_gapi_mappings = array(
|
849 |
-
);
|
850 |
-
public $ackId;
|
851 |
-
protected $messageType = 'Google_Service_Pubsub_PubsubMessage';
|
852 |
-
protected $messageDataType = '';
|
853 |
-
|
854 |
-
|
855 |
-
public function setAckId($ackId)
|
856 |
-
{
|
857 |
-
$this->ackId = $ackId;
|
858 |
-
}
|
859 |
-
public function getAckId()
|
860 |
-
{
|
861 |
-
return $this->ackId;
|
862 |
-
}
|
863 |
-
public function setMessage(Google_Service_Pubsub_PubsubMessage $message)
|
864 |
-
{
|
865 |
-
$this->message = $message;
|
866 |
-
}
|
867 |
-
public function getMessage()
|
868 |
-
{
|
869 |
-
return $this->message;
|
870 |
-
}
|
871 |
-
}
|
872 |
-
|
873 |
-
class Google_Service_Pubsub_Subscription extends Google_Model
|
874 |
-
{
|
875 |
-
protected $internal_gapi_mappings = array(
|
876 |
-
);
|
877 |
-
public $ackDeadlineSeconds;
|
878 |
-
public $name;
|
879 |
-
protected $pushConfigType = 'Google_Service_Pubsub_PushConfig';
|
880 |
-
protected $pushConfigDataType = '';
|
881 |
-
public $topic;
|
882 |
-
|
883 |
-
|
884 |
-
public function setAckDeadlineSeconds($ackDeadlineSeconds)
|
885 |
-
{
|
886 |
-
$this->ackDeadlineSeconds = $ackDeadlineSeconds;
|
887 |
-
}
|
888 |
-
public function getAckDeadlineSeconds()
|
889 |
-
{
|
890 |
-
return $this->ackDeadlineSeconds;
|
891 |
-
}
|
892 |
-
public function setName($name)
|
893 |
-
{
|
894 |
-
$this->name = $name;
|
895 |
-
}
|
896 |
-
public function getName()
|
897 |
-
{
|
898 |
-
return $this->name;
|
899 |
-
}
|
900 |
-
public function setPushConfig(Google_Service_Pubsub_PushConfig $pushConfig)
|
901 |
-
{
|
902 |
-
$this->pushConfig = $pushConfig;
|
903 |
-
}
|
904 |
-
public function getPushConfig()
|
905 |
-
{
|
906 |
-
return $this->pushConfig;
|
907 |
-
}
|
908 |
-
public function setTopic($topic)
|
909 |
-
{
|
910 |
-
$this->topic = $topic;
|
911 |
-
}
|
912 |
-
public function getTopic()
|
913 |
-
{
|
914 |
-
return $this->topic;
|
915 |
-
}
|
916 |
-
}
|
917 |
-
|
918 |
-
class Google_Service_Pubsub_Topic extends Google_Model
|
919 |
-
{
|
920 |
-
protected $internal_gapi_mappings = array(
|
921 |
-
);
|
922 |
-
public $name;
|
923 |
-
|
924 |
-
|
925 |
-
public function setName($name)
|
926 |
-
{
|
927 |
-
$this->name = $name;
|
928 |
-
}
|
929 |
-
public function getName()
|
930 |
-
{
|
931 |
-
return $this->name;
|
932 |
-
}
|
933 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|