InfiniteWP Client - Version 1.5.0

Version Description

  • Improvement: Compatibility with PHP7.
  • Improvement: Memory usage in Multi call backup now optimized.
  • Improvement: Support for new Amazon S3 SDK. Added support for Frankfut bucket which will solve random errors in amazon backup. For php < v5.3.3 will use older S3 library.
  • Improvement: Timeout will be reduced in Single call backup Zip Archive.
  • Improvement: Client plugin will support MySQLi by using wpdb class.
  • Improvement: All tables created by client plugin will use default DB engine.
  • Improvement: Maintenance mode status also included in reload data. This will result in the IWP Admin Panel displaying relevant status colours.
  • Improvement: Support for WP Maintenance Addon's new options - Clear trash comments, Clear trash posts, Unused posts metadata, Unused comments metadata, Remove pingbacks, Remove trackbacks.
  • Improvement: Dedicated cacert.pem file introduced for Dropbox API." client plugin.
  • Fix: Issue with IWP DB Table version not updating.
  • Fix: Backup DB table now uses WP's charset (default UTF8). This will solve filename issues with foreign (umlaut) characters.
  • Fix: Temp files not getting deleted while using single call backup in certain cases.
Download this release

Release Info

Developer infinitewp
Plugin Icon 128x128 InfiniteWP Client
Version 1.5.0
Comparing to
See all releases

Code changes from version 1.4.3 to 1.5.0

Files changed (492) hide show
  1. addons/comments/comments.class.php +1 -1
  2. addons/google_webmasters/google_webmasters.class.php +1 -1
  3. addons/post_links/link.class.php +6 -4
  4. addons/post_links/post.class.php +30 -17
  5. addons/wp_optimize/optimize.class.php +84 -9
  6. backup.class.multicall.php +702 -322
  7. backup.class.singlecall.php +148 -82
  8. init.php +108 -46
  9. lib/amazon/autoload.php +7 -0
  10. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Aws.php +105 -0
  11. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Client/AbstractClient.php +283 -0
  12. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Client/AwsClientInterface.php +118 -0
  13. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Client/ClientBuilder.php +526 -0
  14. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Client/DefaultClient.php +67 -0
  15. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Client/ExpiredCredentialsChecker.php +80 -0
  16. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Client/ThrottlingErrorChecker.php +75 -0
  17. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Client/UploadBodyListener.php +95 -0
  18. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Client/UserAgentListener.php +61 -0
  19. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Command/AwsQueryVisitor.php +117 -0
  20. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Command/JsonCommand.php +47 -0
  21. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Command/QueryCommand.php +53 -0
  22. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Command/XmlResponseLocationVisitor.php +74 -0
  23. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Credentials/AbstractCredentialsDecorator.php +136 -0
  24. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Credentials/AbstractRefreshableCredentials.php +76 -0
  25. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Credentials/CacheableCredentials.php +73 -0
  26. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Credentials/Credentials.php +337 -0
  27. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Credentials/CredentialsInterface.php +96 -0
  28. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Credentials/NullCredentials.php +68 -0
  29. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Credentials/RefreshableInstanceProfileCredentials.php +59 -0
  30. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Enum.php +55 -0
  31. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Enum/ClientOptions.php +162 -0
  32. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Enum/DateFormat.php +31 -0
  33. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Enum/Region.php +63 -0
  34. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Enum/Size.php +53 -0
  35. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Enum/Time.php +46 -0
  36. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Enum/UaString.php +55 -0
  37. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/AwsExceptionInterface.php +30 -0
  38. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/BadMethodCallException.php +22 -0
  39. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/DomainException.php +22 -0
  40. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/ExceptionFactoryInterface.php +36 -0
  41. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/ExceptionListener.php +59 -0
  42. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/InstanceProfileCredentialsException.php +50 -0
  43. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/InvalidArgumentException.php +22 -0
  44. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/LogicException.php +22 -0
  45. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/MultipartUploadException.php +55 -0
  46. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/NamespaceExceptionFactory.php +103 -0
  47. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/OutOfBoundsException.php +22 -0
  48. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/OverflowException.php +22 -0
  49. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/Parser/AbstractJsonExceptionParser.php +66 -0
  50. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/Parser/DefaultXmlExceptionParser.php +100 -0
  51. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/Parser/ExceptionParserInterface.php +42 -0
  52. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/Parser/JsonQueryExceptionParser.php +41 -0
  53. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/Parser/JsonRestExceptionParser.php +48 -0
  54. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/RequiredExtensionNotLoadedException.php +22 -0
  55. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/RuntimeException.php +22 -0
  56. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/ServiceResponseException.php +183 -0
  57. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/TransferException.php +24 -0
  58. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Exception/UnexpectedValueException.php +22 -0
  59. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Facade/Facade.php +67 -0
  60. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Facade/FacadeInterface.php +32 -0
  61. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Facade/facade-classes.php +283 -0
  62. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Hash/ChunkHash.php +87 -0
  63. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Hash/ChunkHashInterface.php +52 -0
  64. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Hash/HashUtils.php +76 -0
  65. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Hash/TreeHash.php +195 -0
  66. lib/amazon/aws/aws-sdk-php/src/Aws/Common/HostNameUtils.php +85 -0
  67. lib/amazon/aws/aws-sdk-php/src/Aws/Common/InstanceMetadata/InstanceMetadataClient.php +102 -0
  68. lib/amazon/aws/aws-sdk-php/src/Aws/Common/InstanceMetadata/Waiter/ServiceAvailable.php +50 -0
  69. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Iterator/AwsResourceIterator.php +169 -0
  70. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Iterator/AwsResourceIteratorFactory.php +106 -0
  71. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/AbstractTransfer.php +270 -0
  72. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/AbstractTransferState.php +164 -0
  73. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/AbstractUploadBuilder.php +148 -0
  74. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/AbstractUploadId.php +89 -0
  75. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/AbstractUploadPart.php +101 -0
  76. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/TransferInterface.php +66 -0
  77. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/TransferStateInterface.php +92 -0
  78. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/UploadIdInterface.php +39 -0
  79. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Model/MultipartUpload/UploadPartInterface.php +46 -0
  80. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Resources/aws-config.php +314 -0
  81. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Resources/public-endpoints.php +79 -0
  82. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Resources/sdk1-config.php +138 -0
  83. lib/amazon/aws/aws-sdk-php/src/Aws/Common/RulesEndpointProvider.php +67 -0
  84. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Signature/AbstractSignature.php +44 -0
  85. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Signature/EndpointSignatureInterface.php +42 -0
  86. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Signature/SignatureInterface.php +52 -0
  87. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Signature/SignatureListener.php +83 -0
  88. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Signature/SignatureV2.php +109 -0
  89. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Signature/SignatureV3Https.php +52 -0
  90. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Signature/SignatureV4.php +470 -0
  91. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/AbstractResourceWaiter.php +53 -0
  92. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/AbstractWaiter.php +146 -0
  93. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/CallableWaiter.php +82 -0
  94. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/CompositeWaiterFactory.php +90 -0
  95. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/ConfigResourceWaiter.php +225 -0
  96. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/ResourceWaiterInterface.php +34 -0
  97. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/WaiterClassFactory.php +106 -0
  98. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/WaiterConfig.php +67 -0
  99. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/WaiterConfigFactory.php +98 -0
  100. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/WaiterFactoryInterface.php +41 -0
  101. lib/amazon/aws/aws-sdk-php/src/Aws/Common/Waiter/WaiterInterface.php +60 -0
  102. lib/amazon/aws/aws-sdk-php/src/Aws/S3/AcpListener.php +75 -0
  103. lib/amazon/aws/aws-sdk-php/src/Aws/S3/BucketStyleListener.php +89 -0
  104. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Command/S3Command.php +65 -0
  105. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/CannedAcl.php +32 -0
  106. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/EncodingType.php +27 -0
  107. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/Event.php +27 -0
  108. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/GranteeType.php +29 -0
  109. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/Group.php +29 -0
  110. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/MFADelete.php +28 -0
  111. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/MetadataDirective.php +28 -0
  112. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/Payer.php +28 -0
  113. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/Permission.php +31 -0
  114. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/Protocol.php +28 -0
  115. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/ServerSideEncryption.php +27 -0
  116. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/Status.php +28 -0
  117. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/Storage.php +29 -0
  118. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Enum/StorageClass.php +28 -0
  119. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/AccessDeniedException.php +22 -0
  120. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/AccountProblemException.php +22 -0
  121. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/AmbiguousGrantByEmailAddressException.php +22 -0
  122. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/BadDigestException.php +22 -0
  123. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/BucketAlreadyExistsException.php +22 -0
  124. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/BucketAlreadyOwnedByYouException.php +22 -0
  125. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/BucketNotEmptyException.php +22 -0
  126. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/CredentialsNotSupportedException.php +22 -0
  127. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/CrossLocationLoggingProhibitedException.php +22 -0
  128. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/DeleteMultipleObjectsException.php +48 -0
  129. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/EntityTooLargeException.php +22 -0
  130. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/EntityTooSmallException.php +22 -0
  131. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/ExpiredTokenException.php +22 -0
  132. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/IllegalVersioningConfigurationException.php +22 -0
  133. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/IncompleteBodyException.php +22 -0
  134. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/IncorrectNumberOfFilesInPostRequestException.php +22 -0
  135. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InlineDataTooLargeException.php +22 -0
  136. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InternalErrorException.php +22 -0
  137. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidAccessKeyIdException.php +22 -0
  138. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidAddressingHeaderException.php +22 -0
  139. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidArgumentException.php +22 -0
  140. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidBucketNameException.php +22 -0
  141. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidBucketStateException.php +22 -0
  142. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidDigestException.php +22 -0
  143. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidLocationConstraintException.php +22 -0
  144. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidPartException.php +22 -0
  145. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidPartOrderException.php +22 -0
  146. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidPayerException.php +22 -0
  147. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidPolicyDocumentException.php +22 -0
  148. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidRangeException.php +22 -0
  149. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidRequestException.php +22 -0
  150. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidSOAPRequestException.php +22 -0
  151. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidSecurityException.php +22 -0
  152. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidStorageClassException.php +22 -0
  153. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidTagErrorException.php +23 -0
  154. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidTargetBucketForLoggingException.php +22 -0
  155. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidTokenException.php +22 -0
  156. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/InvalidURIException.php +22 -0
  157. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/KeyTooLongException.php +22 -0
  158. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MalformedACLErrorException.php +22 -0
  159. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MalformedPOSTRequestException.php +22 -0
  160. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MalformedXMLException.php +22 -0
  161. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MaxMessageLengthExceededException.php +22 -0
  162. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MaxPostPreDataLengthExceededErrorException.php +22 -0
  163. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MetadataTooLargeException.php +22 -0
  164. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MethodNotAllowedException.php +22 -0
  165. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MissingAttachmentException.php +22 -0
  166. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MissingContentLengthException.php +22 -0
  167. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MissingRequestBodyErrorException.php +22 -0
  168. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MissingSecurityElementException.php +22 -0
  169. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/MissingSecurityHeaderException.php +22 -0
  170. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoLoggingStatusForKeyException.php +22 -0
  171. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchBucketException.php +22 -0
  172. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchBucketPolicyException.php +22 -0
  173. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchCORSConfigurationException.php +22 -0
  174. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchKeyException.php +22 -0
  175. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchLifecycleConfigurationException.php +22 -0
  176. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchTagSetErrorException.php +22 -0
  177. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchUploadException.php +22 -0
  178. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchVersionException.php +22 -0
  179. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NoSuchWebsiteConfigurationException.php +22 -0
  180. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NotImplementedException.php +22 -0
  181. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NotSignedUpException.php +22 -0
  182. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/NotSuchBucketPolicyException.php +22 -0
  183. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/ObjectAlreadyInActiveTierErrorException.php +22 -0
  184. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/ObjectNotInActiveTierErrorException.php +22 -0
  185. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/OperationAbortedException.php +22 -0
  186. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/Parser/S3ExceptionParser.php +72 -0
  187. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/PermanentRedirectException.php +22 -0
  188. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/PreconditionFailedException.php +22 -0
  189. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/RedirectException.php +22 -0
  190. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/RequestIsNotMultiPartContentException.php +22 -0
  191. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/RequestTimeTooSkewedException.php +22 -0
  192. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/RequestTimeoutException.php +22 -0
  193. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/RequestTorrentOfBucketErrorException.php +22 -0
  194. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/S3Exception.php +24 -0
  195. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/ServiceUnavailableException.php +22 -0
  196. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/SignatureDoesNotMatchException.php +22 -0
  197. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/SlowDownException.php +22 -0
  198. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/TemporaryRedirectException.php +22 -0
  199. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/TokenRefreshRequiredException.php +22 -0
  200. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/TooManyBucketsException.php +22 -0
  201. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/UnexpectedContentException.php +22 -0
  202. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/UnresolvableGrantByEmailAddressException.php +22 -0
  203. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Exception/UserKeyMustBeSpecifiedException.php +22 -0
  204. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Iterator/ListBucketsIterator.php +48 -0
  205. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Iterator/ListMultipartUploadsIterator.php +46 -0
  206. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Iterator/ListObjectVersionsIterator.php +48 -0
  207. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Iterator/ListObjectsIterator.php +68 -0
  208. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Iterator/OpendirIterator.php +86 -0
  209. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/Acp.php +243 -0
  210. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/AcpBuilder.php +134 -0
  211. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/ClearBucket.php +189 -0
  212. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/DeleteObjectsBatch.php +87 -0
  213. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/DeleteObjectsTransfer.php +133 -0
  214. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/Grant.php +139 -0
  215. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/Grantee.php +245 -0
  216. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/MultipartUpload/AbstractTransfer.php +103 -0
  217. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/MultipartUpload/ParallelTransfer.php +124 -0
  218. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/MultipartUpload/SerialTransfer.php +86 -0
  219. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/MultipartUpload/TransferState.php +41 -0
  220. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/MultipartUpload/UploadBuilder.php +297 -0
  221. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/MultipartUpload/UploadId.php +35 -0
  222. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/MultipartUpload/UploadPart.php +74 -0
  223. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Model/PostObject.php +275 -0
  224. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Resources/s3-2006-03-01.php +5022 -0
  225. lib/amazon/aws/aws-sdk-php/src/Aws/S3/ResumableDownload.php +176 -0
  226. lib/amazon/aws/aws-sdk-php/src/Aws/S3/S3Client.php +683 -0
  227. lib/amazon/aws/aws-sdk-php/src/Aws/S3/S3Md5Listener.php +73 -0
  228. lib/amazon/aws/aws-sdk-php/src/Aws/S3/S3Signature.php +266 -0
  229. lib/amazon/aws/aws-sdk-php/src/Aws/S3/S3SignatureInterface.php +24 -0
  230. lib/amazon/aws/aws-sdk-php/src/Aws/S3/S3SignatureV4.php +60 -0
  231. lib/amazon/aws/aws-sdk-php/src/Aws/S3/SocketTimeoutChecker.php +71 -0
  232. lib/amazon/aws/aws-sdk-php/src/Aws/S3/SseCpkListener.php +68 -0
  233. lib/amazon/aws/aws-sdk-php/src/Aws/S3/StreamWrapper.php +892 -0
  234. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/AbstractSync.php +127 -0
  235. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/AbstractSyncBuilder.php +435 -0
  236. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/ChangedFilesIterator.php +130 -0
  237. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/DownloadSync.php +95 -0
  238. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/DownloadSyncBuilder.php +129 -0
  239. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/FilenameConverterInterface.php +32 -0
  240. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/KeyConverter.php +67 -0
  241. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/UploadSync.php +86 -0
  242. lib/amazon/aws/aws-sdk-php/src/Aws/S3/Sync/UploadSyncBuilder.php +190 -0
  243. lib/amazon/composer/ClassLoader.php +413 -0
  244. lib/amazon/composer/autoload_classmap.php +9 -0
  245. lib/amazon/composer/autoload_namespaces.php +13 -0
  246. lib/amazon/composer/autoload_psr4.php +9 -0
  247. lib/amazon/composer/autoload_real.php +50 -0
  248. lib/amazon/guzzle/guzzle/src/Guzzle/Cache/AbstractCacheAdapter.php +21 -0
  249. lib/amazon/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterFactory.php +117 -0
  250. lib/amazon/guzzle/guzzle/src/Guzzle/Cache/CacheAdapterInterface.php +55 -0
  251. lib/amazon/guzzle/guzzle/src/Guzzle/Cache/ClosureCacheAdapter.php +57 -0
  252. lib/amazon/guzzle/guzzle/src/Guzzle/Cache/DoctrineCacheAdapter.php +41 -0
  253. lib/amazon/guzzle/guzzle/src/Guzzle/Cache/NullCacheAdapter.php +31 -0
  254. lib/amazon/guzzle/guzzle/src/Guzzle/Cache/Zf1CacheAdapter.php +44 -0
  255. lib/amazon/guzzle/guzzle/src/Guzzle/Cache/Zf2CacheAdapter.php +41 -0
  256. lib/amazon/guzzle/guzzle/src/Guzzle/Common/AbstractHasDispatcher.php +49 -0
  257. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Collection.php +403 -0
  258. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Event.php +52 -0
  259. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Exception/BadMethodCallException.php +5 -0
  260. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Exception/ExceptionCollection.php +108 -0
  261. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Exception/GuzzleException.php +8 -0
  262. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Exception/InvalidArgumentException.php +5 -0
  263. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Exception/RuntimeException.php +5 -0
  264. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Exception/UnexpectedValueException.php +5 -0
  265. lib/amazon/guzzle/guzzle/src/Guzzle/Common/FromConfigInterface.php +18 -0
  266. lib/amazon/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php +54 -0
  267. lib/amazon/guzzle/guzzle/src/Guzzle/Common/ToArrayInterface.php +16 -0
  268. lib/amazon/guzzle/guzzle/src/Guzzle/Common/Version.php +29 -0
  269. lib/amazon/guzzle/guzzle/src/Guzzle/Http/AbstractEntityBodyDecorator.php +221 -0
  270. lib/amazon/guzzle/guzzle/src/Guzzle/Http/CachingEntityBody.php +229 -0
  271. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Client.php +524 -0
  272. lib/amazon/guzzle/guzzle/src/Guzzle/Http/ClientInterface.php +223 -0
  273. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Curl/CurlHandle.php +464 -0
  274. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMulti.php +423 -0
  275. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiInterface.php +58 -0
  276. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Curl/CurlMultiProxy.php +150 -0
  277. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Curl/CurlVersion.php +66 -0
  278. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Curl/RequestMediator.php +147 -0
  279. lib/amazon/guzzle/guzzle/src/Guzzle/Http/EntityBody.php +201 -0
  280. lib/amazon/guzzle/guzzle/src/Guzzle/Http/EntityBody.php-tmp +188 -0
  281. lib/amazon/guzzle/guzzle/src/Guzzle/Http/EntityBodyInterface.php +73 -0
  282. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/BadResponseException.php +69 -0
  283. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/ClientErrorResponseException.php +8 -0
  284. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/CouldNotRewindStreamException.php +7 -0
  285. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/CurlException.php +101 -0
  286. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/HttpException.php +10 -0
  287. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/MultiTransferException.php +145 -0
  288. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/RequestException.php +39 -0
  289. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/ServerErrorResponseException.php +8 -0
  290. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Exception/TooManyRedirectsException.php +5 -0
  291. lib/amazon/guzzle/guzzle/src/Guzzle/Http/IoEmittingEntityBody.php +83 -0
  292. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/AbstractMessage.php +220 -0
  293. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequest.php +247 -0
  294. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/EntityEnclosingRequestInterface.php +137 -0
  295. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Header.php +182 -0
  296. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Header/CacheControl.php +121 -0
  297. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderCollection.php +108 -0
  298. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactory.php +26 -0
  299. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderFactoryInterface.php +19 -0
  300. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Header/HeaderInterface.php +83 -0
  301. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Header/Link.php +93 -0
  302. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/MessageInterface.php +102 -0
  303. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/PostFile.php +124 -0
  304. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/PostFileInterface.php +83 -0
  305. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Request.php +638 -0
  306. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactory.php +359 -0
  307. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/RequestFactoryInterface.php +105 -0
  308. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/RequestInterface.php +318 -0
  309. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Message/Response.php +968 -0
  310. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Mimetypes.php +962 -0
  311. lib/amazon/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/CommaAggregator.php +20 -0
  312. lib/amazon/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/DuplicateAggregator.php +22 -0
  313. lib/amazon/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/PhpAggregator.php +27 -0
  314. lib/amazon/guzzle/guzzle/src/Guzzle/Http/QueryAggregator/QueryAggregatorInterface.php +22 -0
  315. lib/amazon/guzzle/guzzle/src/Guzzle/Http/QueryString.php +297 -0
  316. lib/amazon/guzzle/guzzle/src/Guzzle/Http/ReadLimitEntityBody.php +122 -0
  317. lib/amazon/guzzle/guzzle/src/Guzzle/Http/RedirectPlugin.php +250 -0
  318. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem +3870 -0
  319. lib/amazon/guzzle/guzzle/src/Guzzle/Http/StaticClient.php +157 -0
  320. lib/amazon/guzzle/guzzle/src/Guzzle/Http/Url.php +554 -0
  321. lib/amazon/guzzle/guzzle/src/Guzzle/Inflection/Inflector.php +38 -0
  322. lib/amazon/guzzle/guzzle/src/Guzzle/Inflection/InflectorInterface.php +27 -0
  323. lib/amazon/guzzle/guzzle/src/Guzzle/Inflection/MemoizingInflector.php +70 -0
  324. lib/amazon/guzzle/guzzle/src/Guzzle/Inflection/PreComputedInflector.php +59 -0
  325. lib/amazon/guzzle/guzzle/src/Guzzle/Iterator/AppendIterator.php +19 -0
  326. lib/amazon/guzzle/guzzle/src/Guzzle/Iterator/ChunkedIterator.php +56 -0
  327. lib/amazon/guzzle/guzzle/src/Guzzle/Iterator/FilterIterator.php +36 -0
  328. lib/amazon/guzzle/guzzle/src/Guzzle/Iterator/MapIterator.php +34 -0
  329. lib/amazon/guzzle/guzzle/src/Guzzle/Iterator/MethodProxyIterator.php +27 -0
  330. lib/amazon/guzzle/guzzle/src/Guzzle/Iterator/README.md +25 -0
  331. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/Cookie/CookieParser.php +131 -0
  332. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/Cookie/CookieParserInterface.php +33 -0
  333. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/Message/AbstractMessageParser.php +58 -0
  334. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParser.php +110 -0
  335. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/Message/MessageParserInterface.php +27 -0
  336. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/Message/PeclHttpMessageParser.php +48 -0
  337. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/ParserRegistry.php +75 -0
  338. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/PeclUriTemplate.php +26 -0
  339. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/UriTemplate.php +254 -0
  340. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/UriTemplate/UriTemplateInterface.php +21 -0
  341. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/Url/UrlParser.php +48 -0
  342. lib/amazon/guzzle/guzzle/src/Guzzle/Parser/Url/UrlParserInterface.php +19 -0
  343. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Async/AsyncPlugin.php +84 -0
  344. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/AbstractBackoffStrategy.php +91 -0
  345. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/AbstractErrorCodeBackoffStrategy.php +40 -0
  346. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffLogger.php +76 -0
  347. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffPlugin.php +126 -0
  348. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/BackoffStrategyInterface.php +30 -0
  349. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/CallbackBackoffStrategy.php +47 -0
  350. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ConstantBackoffStrategy.php +34 -0
  351. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/CurlBackoffStrategy.php +28 -0
  352. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ExponentialBackoffStrategy.php +25 -0
  353. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/HttpBackoffStrategy.php +30 -0
  354. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/LinearBackoffStrategy.php +36 -0
  355. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/ReasonPhraseBackoffStrategy.php +25 -0
  356. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Backoff/TruncatedBackoffStrategy.php +36 -0
  357. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/CacheKeyProviderInterface.php +11 -0
  358. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/CachePlugin.php +353 -0
  359. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/CacheStorageInterface.php +43 -0
  360. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/CallbackCanCacheStrategy.php +53 -0
  361. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/CanCacheStrategyInterface.php +30 -0
  362. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCacheKeyProvider.php +46 -0
  363. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCacheStorage.php +266 -0
  364. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultCanCacheStrategy.php +32 -0
  365. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/DefaultRevalidation.php +174 -0
  366. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/DenyRevalidation.php +19 -0
  367. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/RevalidationInterface.php +32 -0
  368. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cache/SkipRevalidation.php +19 -0
  369. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Cookie.php +538 -0
  370. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/ArrayCookieJar.php +237 -0
  371. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/CookieJarInterface.php +85 -0
  372. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookieJar/FileCookieJar.php +65 -0
  373. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cookie/CookiePlugin.php +70 -0
  374. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Cookie/Exception/InvalidCookieException.php +7 -0
  375. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/CurlAuth/CurlAuthPlugin.php +46 -0
  376. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/ErrorResponseExceptionInterface.php +22 -0
  377. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/ErrorResponsePlugin.php +72 -0
  378. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/ErrorResponse/Exception/ErrorResponseException.php +7 -0
  379. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/History/HistoryPlugin.php +163 -0
  380. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Log/LogPlugin.php +161 -0
  381. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Md5/CommandContentMd5Plugin.php +57 -0
  382. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Md5/Md5ValidatorPlugin.php +88 -0
  383. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Mock/MockPlugin.php +245 -0
  384. lib/amazon/guzzle/guzzle/src/Guzzle/Plugin/Oauth/OauthPlugin.php +306 -0
  385. lib/amazon/guzzle/guzzle/src/Guzzle/Service/AbstractConfigLoader.php +177 -0
  386. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilder.php +189 -0
  387. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilderInterface.php +40 -0
  388. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Builder/ServiceBuilderLoader.php +89 -0
  389. lib/amazon/guzzle/guzzle/src/Guzzle/Service/CachingConfigLoader.php +46 -0
  390. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Client.php +297 -0
  391. lib/amazon/guzzle/guzzle/src/Guzzle/Service/ClientInterface.php +68 -0
  392. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/AbstractCommand.php +390 -0
  393. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/ClosureCommand.php +41 -0
  394. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/CommandInterface.php +128 -0
  395. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/CreateResponseClassEvent.php +32 -0
  396. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/DefaultRequestSerializer.php +169 -0
  397. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/DefaultResponseParser.php +55 -0
  398. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/Factory/AliasFactory.php +39 -0
  399. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/Factory/CompositeFactory.php +154 -0
  400. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/Factory/ConcreteClassFactory.php +47 -0
  401. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/Factory/FactoryInterface.php +21 -0
  402. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/Factory/MapFactory.php +27 -0
  403. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/Factory/ServiceDescriptionFactory.php +71 -0
  404. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/AbstractRequestVisitor.php +69 -0
  405. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/BodyVisitor.php +58 -0
  406. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/HeaderVisitor.php +44 -0
  407. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/JsonVisitor.php +63 -0
  408. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/PostFieldVisitor.php +18 -0
  409. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/PostFileVisitor.php +24 -0
  410. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/QueryVisitor.php +18 -0
  411. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/RequestVisitorInterface.php +31 -0
  412. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/ResponseBodyVisitor.php +18 -0
  413. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Request/XmlVisitor.php +252 -0
  414. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/AbstractResponseVisitor.php +26 -0
  415. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/BodyVisitor.php +23 -0
  416. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/HeaderVisitor.php +50 -0
  417. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/JsonVisitor.php +93 -0
  418. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ReasonPhraseVisitor.php +23 -0
  419. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/ResponseVisitorInterface.php +46 -0
  420. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/StatusCodeVisitor.php +23 -0
  421. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/Response/XmlVisitor.php +151 -0
  422. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/LocationVisitor/VisitorFlyweight.php +138 -0
  423. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/OperationCommand.php +89 -0
  424. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/OperationResponseParser.php +195 -0
  425. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/RequestSerializerInterface.php +21 -0
  426. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/ResponseClassInterface.php +18 -0
  427. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Command/ResponseParserInterface.php +18 -0
  428. lib/amazon/guzzle/guzzle/src/Guzzle/Service/ConfigLoaderInterface.php +22 -0
  429. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/Operation.php +547 -0
  430. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/OperationInterface.php +159 -0
  431. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/Parameter.php +925 -0
  432. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/SchemaFormatter.php +156 -0
  433. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/SchemaValidator.php +291 -0
  434. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescription.php +271 -0
  435. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescriptionInterface.php +106 -0
  436. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/ServiceDescriptionLoader.php +64 -0
  437. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Description/ValidatorInterface.php +28 -0
  438. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Exception/CommandException.php +7 -0
  439. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Exception/CommandTransferException.php +119 -0
  440. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Exception/DescriptionBuilderException.php +7 -0
  441. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Exception/InconsistentClientTransferException.php +38 -0
  442. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Exception/ResponseClassException.php +9 -0
  443. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Exception/ServiceBuilderException.php +7 -0
  444. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Exception/ServiceNotFoundException.php +5 -0
  445. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Exception/ValidationException.php +30 -0
  446. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/AbstractResourceIteratorFactory.php +37 -0
  447. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php +67 -0
  448. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/MapResourceIteratorFactory.php +34 -0
  449. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/Model.php +64 -0
  450. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIterator.php +254 -0
  451. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorApplyBatched.php +111 -0
  452. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorClassFactory.php +60 -0
  453. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorFactoryInterface.php +30 -0
  454. lib/amazon/guzzle/guzzle/src/Guzzle/Service/Resource/ResourceIteratorInterface.php +61 -0
  455. lib/amazon/guzzle/guzzle/src/Guzzle/Stream/PhpStreamRequestFactory.php +284 -0
  456. lib/amazon/guzzle/guzzle/src/Guzzle/Stream/Stream.php +289 -0
  457. lib/amazon/guzzle/guzzle/src/Guzzle/Stream/StreamInterface.php +218 -0
  458. lib/amazon/guzzle/guzzle/src/Guzzle/Stream/StreamRequestFactoryInterface.php +24 -0
  459. lib/amazon/s3IWPBackup.php +763 -0
  460. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php +202 -0
  461. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php +335 -0
  462. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcherInterface.php +34 -0
  463. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Debug/WrappedListener.php +71 -0
  464. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php +110 -0
  465. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/Event.php +130 -0
  466. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php +185 -0
  467. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcherInterface.php +96 -0
  468. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventSubscriberInterface.php +50 -0
  469. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/GenericEvent.php +186 -0
  470. lib/amazon/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ImmutableEventDispatcher.php +93 -0
  471. lib/{amazon_s3 → amazon_s3_bwd_comp}/extensions/dynamodbsessionhandler.class.php +0 -0
  472. lib/{amazon_s3 → amazon_s3_bwd_comp}/extensions/s3browserupload.class.php +0 -0
  473. lib/{amazon_s3 → amazon_s3_bwd_comp}/extensions/s3streamwrapper.class.php +0 -0
  474. lib/{amazon_s3 → amazon_s3_bwd_comp}/lib/requestcore/LICENSE +0 -0
  475. lib/{amazon_s3 → amazon_s3_bwd_comp}/lib/requestcore/README.md +0 -0
  476. lib/{amazon_s3 → amazon_s3_bwd_comp}/lib/requestcore/cacert.pem +0 -0
  477. lib/{amazon_s3 → amazon_s3_bwd_comp}/lib/requestcore/requestcore.class.php +0 -0
  478. lib/{amazon_s3 → amazon_s3_bwd_comp}/sdk.class.php +0 -0
  479. lib/{amazon_s3 → amazon_s3_bwd_comp}/services/s3.class.php +0 -0
  480. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/array.class.php +0 -0
  481. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/batchrequest.class.php +0 -0
  482. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/credential.class.php +0 -0
  483. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/credentials.class.php +0 -0
  484. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/mimetypes.class.php +0 -0
  485. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/request.class.php +0 -0
  486. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/response.class.php +0 -0
  487. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/simplexml.class.php +0 -0
  488. lib/{amazon_s3 → amazon_s3_bwd_comp}/utilities/utilities.class.php +0 -0
  489. lib/cacert.pem +3390 -0
  490. lib/dropbox.php +9 -7
  491. pclzip.class.php +116 -55
  492. readme.txt +14 -2
addons/comments/comments.class.php CHANGED
@@ -51,7 +51,7 @@ class IWP_MMB_Comment extends IWP_MMB_Core
51
52
if(!empty($filter_comments))
53
{
54
- $where.=" AND (c.comment_author LIKE '%".mysql_real_escape_string($filter_comments)."%' OR c.comment_content LIKE '%".mysql_real_escape_string($filter_comments)."%')";
55
}
56
$comment_array = array();
57
$comment_statuses = array('approved', 'pending', 'spam', 'trash');
51
52
if(!empty($filter_comments))
53
{
54
+ $where.=" AND (c.comment_author LIKE '%".esc_sql($filter_comments)."%' OR c.comment_content LIKE '%".esc_sql($filter_comments)."%')";
55
}
56
$comment_array = array();
57
$comment_statuses = array('approved', 'pending', 'spam', 'trash');
addons/google_webmasters/google_webmasters.class.php CHANGED
@@ -21,7 +21,7 @@ if(!function_exists('iwp_mmb_create_webmasters_redirect_table')){
21
`redirectLink` varchar(255) NOT NULL,
22
PRIMARY KEY (`id`),
23
UNIQUE KEY `oldLink` (`oldLink`)
24
- ) ENGINE=InnoDB ;
25
";
26
27
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
21
`redirectLink` varchar(255) NOT NULL,
22
PRIMARY KEY (`id`),
23
UNIQUE KEY `oldLink` (`oldLink`)
24
+ );
25
";
26
27
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
addons/post_links/link.class.php CHANGED
@@ -89,7 +89,7 @@ class IWP_MMB_Link extends IWP_MMB_Core
89
90
if(!empty($filter_links))
91
{
92
- $where.=" AND (link_name LIKE '%".mysql_real_escape_string($filter_links)."%' OR link_url LIKE '%".mysql_real_escape_string($filter_links)."%')";
93
}
94
95
$linkcats = $this->getLinkCats();
@@ -104,9 +104,11 @@ class IWP_MMB_Link extends IWP_MMB_Core
104
{
105
$link_cat = $linkcats[$link_info->link_id];
106
$cats = array();
107
- foreach($link_cat as $catkey=>$catval)
108
- {
109
- $cats[] = $catval;
110
}
111
112
$links[$link_info->link_id] = array(
89
90
if(!empty($filter_links))
91
{
92
+ $where.=" AND (link_name LIKE '%".esc_sql($filter_links)."%' OR link_url LIKE '%".esc_sql($filter_links)."%')";
93
}
94
95
$linkcats = $this->getLinkCats();
104
{
105
$link_cat = $linkcats[$link_info->link_id];
106
$cats = array();
107
+ if (!empty($link_cat)) {
108
+ foreach($link_cat as $catkey=>$catval)
109
+ {
110
+ $cats[] = $catval;
111
+ }
112
}
113
114
$links[$link_info->link_id] = array(
addons/post_links/post.class.php CHANGED
@@ -475,20 +475,20 @@ class IWP_MMB_Post extends IWP_MMB_Core
475
476
if(!empty($filter_posts))
477
{
478
- $where.=" AND post_title LIKE '%".mysql_real_escape_string($filter_posts)."%'";
479
}
480
481
if(!empty($iwp_get_posts_date_from) && !empty($iwp_get_posts_date_to))
482
{
483
- $where.=" AND post_date BETWEEN '".mysql_real_escape_string($iwp_get_posts_date_from)."' AND '".mysql_real_escape_string($iwp_get_posts_date_to)."'";
484
}
485
else if(!empty($iwp_get_posts_date_from) && empty($iwp_get_posts_date_to))
486
{
487
- $where.=" AND post_date >= '".mysql_real_escape_string($iwp_get_posts_date_from)."'";
488
}
489
else if(empty($iwp_get_posts_date_from) && !empty($iwp_get_posts_date_to))
490
{
491
- $where.=" AND post_date <= '".mysql_real_escape_string($iwp_get_posts_date_to)."'";
492
}
493
$post_array=array();
494
$post_statuses = array('publish', 'pending', 'private', 'future', 'draft', 'trash');
@@ -503,7 +503,7 @@ class IWP_MMB_Post extends IWP_MMB_Core
503
$where.=" AND post_status IN (".implode(",",$post_array).")";
504
}
505
506
- $limit = ($iwp_get_posts_range) ? ' LIMIT ' . mysql_real_escape_string($iwp_get_posts_range) : ' LIMIT 500';
507
508
$sql_query = "$wpdb->posts WHERE post_status!='auto-draft' AND post_status!='inherit' AND post_type='post' ".$where." ORDER BY post_date DESC";
509
@@ -516,10 +516,11 @@ class IWP_MMB_Post extends IWP_MMB_Core
516
$total['total_num']=count($posts_info);
517
518
if($iwp_get_posts_range && !empty($iwp_get_posts_date_from) && !empty($iwp_get_posts_date_to) && $total['total_num'] < $iwp_get_posts_range) {
519
$sql_query = "$wpdb->posts
520
- WHERE post_status!='auto-draft' AND post_status!='inherit' AND post_type='post' AND post_date <= '".mysql_real_escape_string($iwp_get_posts_date_to)."'
521
ORDER BY post_date DESC
522
- LIMIT " . mysql_real_escape_string($iwp_get_posts_range);
523
524
$posts_info = $wpdb->get_results("SELECT * FROM ".$sql_query);
525
$total = array();
@@ -530,9 +531,11 @@ class IWP_MMB_Post extends IWP_MMB_Core
530
{
531
532
$cats=array();
533
- foreach($post_cats[$post_info->ID] as $cat_array => $cat_array_val)
534
- {
535
- $cats[] = array('name' => $cat_array_val);
536
}
537
538
$tags=array();
@@ -642,19 +645,25 @@ class IWP_MMB_Post extends IWP_MMB_Core
642
643
if(!empty($filter_pages))
644
{
645
- $where.=" AND post_title LIKE '%".mysql_real_escape_string($filter_pages)."%'";
646
}
647
if(!empty($iwp_get_pages_date_from) && !empty($iwp_get_pages_date_to))
648
{
649
- $where.=" AND post_date BETWEEN '".mysql_real_escape_string($iwp_get_pages_date_from)."' AND '".mysql_real_escape_string($iwp_get_pages_date_to)."'";
650
}
651
else if(!empty($iwp_get_pages_date_from) && empty($iwp_get_pages_date_to))
652
{
653
- $where.=" AND post_date >= '".mysql_real_escape_string($iwp_get_pages_date_from)."'";
654
}
655
else if(empty($iwp_get_pages_date_from) && !empty($iwp_get_pages_date_to))
656
{
657
- $where.=" AND post_date <= '".mysql_real_escape_string($iwp_get_pages_date_to)."'";
658
}
659
660
$post_array=array();
@@ -670,7 +679,8 @@ class IWP_MMB_Post extends IWP_MMB_Core
670
$where.=" AND post_status IN (".implode(",",$post_array).")";
671
}
672
673
- $limit = ($iwp_get_pages_range) ? ' LIMIT ' . mysql_real_escape_string($iwp_get_pages_range) : ' LIMIT 500';
674
675
$sql_query = "$wpdb->posts WHERE post_status!='auto-draft' AND post_status!='inherit' AND post_type='page' ".$where.' ORDER BY post_date DESC';
676
@@ -682,9 +692,12 @@ class IWP_MMB_Post extends IWP_MMB_Core
682
683
if($iwp_get_pages_range && !empty($iwp_get_pages_date_from) && !empty($iwp_get_pages_date_to) && $total['total_num'] < $iwp_get_pages_range) {
684
$sql_query = "$wpdb->posts
685
- WHERE post_status!='auto-draft' AND post_status!='inherit' AND post_type='post' AND post_date <= '".mysql_real_escape_string($iwp_get_pages_date_to)."'
686
ORDER BY post_date DESC
687
- LIMIT " . mysql_real_escape_string($iwp_get_pages_range);
688
689
$posts_info = $wpdb->get_results("SELECT * FROM ".$sql_query);
690
$total = array();
475
476
if(!empty($filter_posts))
477
{
478
+ $where.=" AND post_title LIKE '%".esc_sql($filter_posts)."%'";
479
}
480
481
if(!empty($iwp_get_posts_date_from) && !empty($iwp_get_posts_date_to))
482
{
483
+ $where.=" AND post_date BETWEEN '".esc_sql($iwp_get_posts_date_from)."' AND '".esc_sql($iwp_get_posts_date_to)."'";
484
}
485
else if(!empty($iwp_get_posts_date_from) && empty($iwp_get_posts_date_to))
486
{
487
+ $where.=" AND post_date >= '".esc_sql($iwp_get_posts_date_from)."'";
488
}
489
else if(empty($iwp_get_posts_date_from) && !empty($iwp_get_posts_date_to))
490
{
491
+ $where.=" AND post_date <= '".esc_sql($iwp_get_posts_date_to)."'";
492
}
493
$post_array=array();
494
$post_statuses = array('publish', 'pending', 'private', 'future', 'draft', 'trash');
503
$where.=" AND post_status IN (".implode(",",$post_array).")";
504
}
505
506
+ $limit = ($iwp_get_posts_range) ? ' LIMIT ' . esc_sql($iwp_get_posts_range) : ' LIMIT 500';
507
508
$sql_query = "$wpdb->posts WHERE post_status!='auto-draft' AND post_status!='inherit' AND post_type='post' ".$where." ORDER BY post_date DESC";
509
516
$total['total_num']=count($posts_info);
517
518
if($iwp_get_posts_range && !empty($iwp_get_posts_date_from) && !empty($iwp_get_posts_date_to) && $total['total_num'] < $iwp_get_posts_range) {
519
+
520
$sql_query = "$wpdb->posts
521
+ WHERE post_status!='auto-draft' AND post_status!='inherit' AND post_type='post' AND post_date <= '".esc_sql($iwp_get_posts_date_to)."'
522
ORDER BY post_date DESC
523
+ LIMIT " . esc_sql($iwp_get_posts_range);
524
525
$posts_info = $wpdb->get_results("SELECT * FROM ".$sql_query);
526
$total = array();
531
{
532
533
$cats=array();
534
+ if(!empty($post_cats)){
535
+ foreach($post_cats[$post_info->ID] as $cat_array => $cat_array_val)
536
+ {
537
+ $cats[] = array('name' => $cat_array_val);
538
+ }
539
}
540
541
$tags=array();
645
646
if(!empty($filter_pages))
647
{
648
+
649
+ $where.=" AND post_title LIKE '%".esc_sql($filter_pages)."%'";
650
+
651
}
652
if(!empty($iwp_get_pages_date_from) && !empty($iwp_get_pages_date_to))
653
{
654
+ $where.=" AND post_date BETWEEN '".esc_sql($iwp_get_pages_date_from)."' AND '".esc_sql($iwp_get_pages_date_to)."'";
655
+
656
+
657
}
658
else if(!empty($iwp_get_pages_date_from) && empty($iwp_get_pages_date_to))
659
{
660
+ $where.=" AND post_date >= '".esc_sql($iwp_get_pages_date_from)."'";
661
+
662
+
663
}
664
else if(empty($iwp_get_pages_date_from) && !empty($iwp_get_pages_date_to))
665
{
666
+ $where.=" AND post_date <= '".esc_sql($iwp_get_pages_date_to)."'";
667
}
668
669
$post_array=array();
679
$where.=" AND post_status IN (".implode(",",$post_array).")";
680
}
681
682
+ $limit = ($iwp_get_pages_range) ? ' LIMIT ' . esc_sql($iwp_get_pages_range) : ' LIMIT 500';
683
+
684
685
$sql_query = "$wpdb->posts WHERE post_status!='auto-draft' AND post_status!='inherit' AND post_type='page' ".$where.' ORDER BY post_date DESC';
686
692
693
if($iwp_get_pages_range && !empty($iwp_get_pages_date_from) && !empty($iwp_get_pages_date_to) && $total['total_num'] < $iwp_get_pages_range) {
694
$sql_query = "$wpdb->posts
695
+ WHERE post_status!='auto-draft' AND post_status!='inherit' AND post_type='post' AND post_date <= '".esc_sql($iwp_get_pages_date_to)."'
696
ORDER BY post_date DESC
697
+ LIMIT " . esc_sql($iwp_get_pages_range);
698
+
699
+
700
+
701
702
$posts_info = $wpdb->get_results("SELECT * FROM ".$sql_query);
703
$total = array();
addons/wp_optimize/optimize.class.php CHANGED
@@ -1,4 +1,5 @@
1
<?php
2
if(basename($_SERVER['SCRIPT_FILENAME']) == "optimize.class.php"):
3
exit;
4
endif;
@@ -14,7 +15,7 @@ class IWP_MMB_Optimize extends IWP_MMB_Core
14
$cleanup_values = array();
15
$cleanup_values['value_array'] = array();
16
$text = '';
17
-
18
if (isset($cleanupType["clean-revisions"])) {
19
$values = self::cleanup_type_process('revisions');
20
$text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
@@ -38,6 +39,37 @@ class IWP_MMB_Optimize extends IWP_MMB_Core
38
$text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
39
$cleanup_values['value_array']['unapproved'] = $values['value'];
40
}
41
42
$text .= '<br>';
43
@@ -99,7 +131,50 @@ class IWP_MMB_Optimize extends IWP_MMB_Core
99
//$message_array['del_unapproved_comments']['message'] = $comments.__(' unapproved comments deleted<br>', 'wp-optimize');
100
101
break;
102
-
103
case "optimize-db":
104
self::optimize_tables(true);
105
$message .= "Database ".DB_NAME." Optimized!";
@@ -120,16 +195,16 @@ class IWP_MMB_Optimize extends IWP_MMB_Core
120
} // end of function
121
122
function optimize_tables($Optimize=false){
123
-
124
$db_clean = DB_NAME;
125
126
- $local_query = 'SHOW TABLE STATUS FROM `'. DB_NAME.'`';
127
- $result = mysql_query($local_query);
128
- if (mysql_num_rows($result)){
129
- while ($row = mysql_fetch_array($result))
130
{
131
- $local_query = 'OPTIMIZE TABLE '.$row[0];
132
- $resultat = mysql_query($local_query);
133
}
134
}
135
1
<?php
2
+ global $wpdb;
3
if(basename($_SERVER['SCRIPT_FILENAME']) == "optimize.class.php"):
4
exit;
5
endif;
15
$cleanup_values = array();
16
$cleanup_values['value_array'] = array();
17
$text = '';
18
+
19
if (isset($cleanupType["clean-revisions"])) {
20
$values = self::cleanup_type_process('revisions');
21
$text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
39
$text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
40
$cleanup_values['value_array']['unapproved'] = $values['value'];
41
}
42
+ if (isset($cleanupType["trash-post"])) {
43
+ $values = self::cleanup_type_process('trash-post');
44
+ $text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
45
+ $cleanup_values['value_array']['trash-post'] = $values['value'];
46
+ }
47
+ if (isset($cleanupType["trash-comments"])) {
48
+ $values = self::cleanup_type_process('trash-comments');
49
+ $text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
50
+ $cleanup_values['value_array']['trash-comments'] = $values['value'];
51
+ }
52
+ if (isset($cleanupType["meta-comments"])) {
53
+ $values = self::cleanup_type_process('meta-comments');
54
+ $text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
55
+ $cleanup_values['value_array']['meta-comments'] = $values['value'];
56
+ }
57
+ if (isset($cleanupType["meta-posts"])) {
58
+ $values = self::cleanup_type_process('meta-posts');
59
+ $text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
60
+ $cleanup_values['value_array']['meta-posts'] = $values['value'];
61
+ }
62
+ if (isset($cleanupType["pingbacks"])) {
63
+ $values = self::cleanup_type_process('pingbacks');
64
+ $text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
65
+ $cleanup_values['value_array']['pingbacks'] = $values['value'];
66
+ }
67
+ if (isset($cleanupType["trackbacks"])) {
68
+ $values = self::cleanup_type_process('trackbacks');
69
+ $text .= "<span class='wpm_results'>" . $values['message'] . "</span>";
70
+ $cleanup_values['value_array']['trackbacks'] = $values['value'];
71
+ }
72
+
73
74
$text .= '<br>';
75
131
//$message_array['del_unapproved_comments']['message'] = $comments.__(' unapproved comments deleted<br>', 'wp-optimize');
132
133
break;
134
+
135
+ case "trash-post":
136
+ $clean = "DELETE FROM $wpdb->posts WHERE post_status = 'trash';";
137
+ $comments = $wpdb->query( $clean );
138
+ $message .= __('Trashed posts deleted - ', 'wp-optimize') . $comments;
139
+ $message_array['value'] = $comments;
140
+ //$message_array['del_unapproved_comments']['message'] = $comments.__(' unapproved comments deleted<br>', 'wp-optimize');
141
+
142
+ break;
143
+
144
+ case "trash-comments":
145
+ $clean = "DELETE FROM $wpdb->comments WHERE comment_approved = 'trash';";
146
+ $comments = $wpdb->query( $clean );
147
+ $message .= __('Trashed comments deleted - ', 'wp-optimize') . $comments;
148
+ $message_array['value'] = $comments;
149
+ break;
150
+ case "meta-comments":
151
+ $clean = "DELETE cm FROM $wpdb->commentmeta cm LEFT JOIN $wpdb->comments wp ON wp.comment_ID = cm.comment_id WHERE wp.comment_ID IS NULL";
152
+ $comments = $wpdb->query( $clean );
153
+ $message .= __('Unused comments metadata deleted - ', 'wp-optimize') . $comments;
154
+ $message_array['value'] = $comments;
155
+ break;
156
+
157
+ case "meta-posts":
158
+ $clean = "DELETE pm FROM $wpdb->postmeta pm LEFT JOIN $wpdb->posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;";
159
+ $comments = $wpdb->query( $clean );
160
+ $message .= __('Unused posts metadata deleted - ', 'wp-optimize') . $comments;
161
+ $message_array['value'] = $comments;
162
+ break;
163
+
164
+ case "pingbacks":
165
+ $clean = "DELETE FROM $wpdb->comments WHERE comment_type = 'pingback';";
166
+ $comments = $wpdb->query( $clean );
167
+ $message .= __('Pingbacks deleted - ', 'wp-optimize') . $comments;
168
+ $message_array['value'] = $comments;
169
+ break;
170
+
171
+ case "trackbacks":
172
+ $clean = "DELETE FROM $wpdb->comments WHERE comment_type = 'trackback';";
173
+ $comments = $wpdb->query( $clean );
174
+ $message .= __('Trackbacks deleted - ', 'wp-optimize') . $comments;
175
+ $message_array['value'] = $comments;
176
+
177
+ break;
178
case "optimize-db":
179
self::optimize_tables(true);
180
$message .= "Database ".DB_NAME." Optimized!";
195
} // end of function
196
197
function optimize_tables($Optimize=false){
198
+ global $wpdb;
199
$db_clean = DB_NAME;
200
201
+ $local_query = 'SHOW TABLE STATUS FROM infinite';
202
+ $result = $wpdb->get_results($local_query);
203
+ if ($wpdb->num_rows){
204
+ foreach ($result as $row)
205
{
206
+ $local_query = 'OPTIMIZE TABLE '.$row->Name;
207
+ $resultat = $wpdb->get_results($local_query);
208
}
209
}
210
backup.class.multicall.php CHANGED
@@ -31,7 +31,6 @@ if(!defined('IWP_PCLZIP_TEMPORARY_DIR')){
31
define('IWP_PCLZIP_TEMPORARY_DIR', WP_CONTENT_DIR . '/infinitewp/temp/');
32
}
33
34
-
35
$zip_errors = array(
36
'No error',
37
'No error',
@@ -73,7 +72,6 @@ $unzip_errors = array(
73
82 => 'No files were found due to bad decryption password(s)'
74
);
75
76
-
77
class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
78
{
79
var $site_name;
@@ -87,6 +85,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
87
var $backup_url;
88
var $backup_settings_vals = array();
89
var $iwpScriptStartTime;
90
function __construct()
91
{
92
@@ -146,22 +145,56 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
146
$action = $responseParams['nextFunc'];
147
if(empty($action))
148
{
149
return $this->statusLog($datas['backupParentHID'], array('stage' => 'trigger_check', 'status' => 'error', 'statusMsg' => 'Calling Next Function failed - Error while fetching table data', 'statusCode' => 'calling_next_function_failed_error_while_fetching_table_data'));
150
}
151
152
unset($responseParams);
153
-
154
- if(method_exists('IWP_MMB_Backup_Multicall', $action)){
155
- $result = self::$action($datas['backupParentHID']);
156
return $result;
157
}
158
}
159
}
160
161
function set_backup_task($params)
162
{
163
if(!empty($params))
164
{
165
//darkCode testing purpose static values
166
if((empty($params['args']['file_block_size']))||($params['args']['file_block_size'] < 1))
167
{
@@ -177,7 +210,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
177
}
178
if((empty($params['args']['file_loop_break_time']))||($params['args']['file_loop_break_time'] < 6))
179
{
180
- $params['args']['file_loop_break_time'] = 23;
181
}
182
if((empty($params['args']['db_loop_break_time']))||($params['args']['db_loop_break_time'] < 6))
183
{
@@ -287,32 +320,11 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
287
288
function backup($historyID)
289
{
290
- $zipPartNotOver = true;
291
$this -> hisID = $historyID;
292
- $args = $this->getRequiredData($historyID, "requestParams");
293
- //argsInsideBackup argsFormat
294
- extract($args['args']);
295
- extract($args);
296
- //$task_name = $args['task_name'];
297
- //Prepare .zip file name
298
- $hash = md5(microtime(true).uniqid('',true).substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, rand(20,60)));
299
- $label = $type ? $type : 'manual';
300
- $backup_file_name = $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
301
- $backup_file = IWP_BACKUP_DIR . '/' . $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
302
- $backup_url = content_url() . '/infinitewp/backups/' . $this->site_name . '_' . $label . '_' . $what . '_' . date('Y-m-d') . '_' . $hash . '.zip';
303
- $this -> backup_url = $backup_url;
304
- //$backup_url = $backup_file;
305
-
306
- $backup_file_info = array();
307
- $backup_file_info['backup_file_name'] = $backup_file_name;
308
- $backup_file_info['backup_file'] = $backup_file;
309
- $backup_file_info['backup_url'] = $backup_url;
310
-
311
- if(empty($account_info))
312
- {
313
- $account_info = array();
314
- }
315
316
if($what == 'db')
317
{
318
//DB alone funcion
@@ -330,7 +342,6 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
330
//both files and db.
331
332
$result = $this->backupDB($historyID,$backup_file,$account_info);
333
- //$result = $this->backupFiles($historyID,$backup_file);
334
return $result;
335
}
336
@@ -339,14 +350,11 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
339
340
function backup_uploads($historyID)
341
{
342
-
343
//after creating the backup file dont forget to include it in the account_info array
344
$this -> hisID = $historyID;
345
- $files_to_zip = '';
346
$responseParams = $this -> getRequiredData($historyID,"responseParams");
347
$account_info = $responseParams['response_data']['account_info'];
348
$backup_file = $responseParams['response_data']['backup_file'];
349
-
350
//storing the filesize value into settings array - first get the values and then append the value of filesize to it
351
$this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values');
352
$backup_settings_values = $this -> backup_settings_vals;
@@ -379,19 +387,18 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
379
if (isset($account_info['iwp_amazon_s3']) && !empty($account_info['iwp_amazon_s3'])) {
380
$account_info['iwp_amazon_s3']['backup_file'] = $backup_file;
381
iwp_mmb_print_flush('Amazon S3 upload: Start');
382
- $amazons3_result = $this->amazons3_backup($historyID,$account_info['iwp_amazon_s3']);
383
- iwp_mmb_print_flush('Amazon S3 upload: End');
384
-
385
- if (empty($amazons3_result) && $del_host_file) {
386
- $this->unlinkBackupFiles($backup_file);
387
}
388
if (is_array($amazons3_result) && isset($amazons3_result['error'])) {
389
$this->unlinkBackupFiles($backup_file);
390
}
391
- if($amazons3_result['status'] == 'partiallyCompleted') //darkCode true loop
392
- {
393
- return $amazons3_result;
394
- }
395
return $amazons3_result;
396
397
}
@@ -399,17 +406,13 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
399
if (isset($account_info['iwp_gdrive']) && !empty($account_info['iwp_gdrive'])) {
400
$account_info['iwp_gdrive']['backup_file'] = $backup_file;
401
iwp_mmb_print_flush('google Drive upload: Start');
402
- $gdrive_result = $this->google_drive_backup($historyID, $account_info['iwp_gdrive']);
403
iwp_mmb_print_flush('google Drive upload: End');
404
-
405
if (is_array($gdrive_result) && isset($gdrive_result['error'])){
406
if($del_host_file){
407
$this->unlinkBackupFiles($backup_file);
408
}
409
}
410
- if(empty($gdrive_result) && $del_host_file){
411
- $this->unlinkBackupFiles($backup_file);
412
- }
413
414
return $gdrive_result;
415
@@ -461,6 +464,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
461
462
function backupDB($historyID,$backup_file,$account_info = array())
463
{
464
$this->statusLog($historyID, array('stage' => 'backupDB', 'status' => 'processing', 'statusMsg' => 'backupDBInitiated'));
465
466
if(file_exists(IWP_DB_DIR) && is_dir(IWP_DB_DIR))
@@ -487,8 +491,6 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
487
}
488
}
489
490
- if(true) // if the verification is true go for the DB process
491
- {
492
$db_index_file = '<?php
493
global $old_url, $old_file_path;
494
$old_url = \''.get_option('siteurl').'\';
@@ -516,10 +518,9 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
516
return $db_result;
517
}
518
519
- }
520
-
521
function backupDBZip($historyID)
522
{
523
// if the DB backup is successful do the zip operations
524
$responseParams = $this -> getRequiredData($historyID,"responseParams");
525
$responseParams['category'] = 'dbZip';
@@ -565,11 +566,10 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
565
566
}
567
//$this->statusLog($historyID, array('stage' => 'backupDBZip', 'status' => 'completed', 'statusMsg' => 'backupZipCompleted'));
568
-
569
return $result;
570
}
571
572
-
573
function backupDBPHP($historyID) //file must be db name alone ; $response_array should be table_name and its fields and callCount
574
{
575
//getting the settings first
@@ -665,7 +665,8 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
665
file_put_contents($file, '');//safe to reset any old data
666
} */
667
//$tables = $wpdb->get_results('SHOW TABLES', ARRAY_N);
668
- $tables = $wpdb->get_results('SHOW TABLES LIKE "'.$wpdb->base_prefix.'%"', ARRAY_N);
669
670
foreach ($tables as $table) {
671
$is_continue = '';
@@ -716,6 +717,11 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
716
else{
717
$breakingCount = 0;
718
}
719
if ($count > 100)
720
{
721
$count = ceil($count / 100);
@@ -749,6 +755,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
749
750
if (is_array($rows)) {
751
foreach ($rows as $row) {
752
//insert single row
753
if(($table[0] != $left_out_table))
754
$dump_data = "INSERT INTO $table[0] VALUES(";
@@ -788,7 +795,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
788
$break_flag == '';
789
}
790
}
791
- if(($left_out_table == $table[0])&&($count_field <= $left_out_count-1))
792
{
793
continue;
794
}
@@ -818,6 +825,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
818
{
819
$dump_data = "\n\n\n";
820
file_put_contents($file, $dump_data, FILE_APPEND);
821
}
822
else
823
{
@@ -843,6 +851,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
843
$db_res_array['status'] = $db_final_response['success']['status'];
844
$db_res_array['backupParentHID'] = $db_final_response['success']['backupParentHID'];
845
$db_res_array['parentHID'] = $db_final_response['success']['parentHID'];
846
return $db_res_array;
847
848
break;
@@ -895,8 +904,13 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
895
896
function backupFiles($historyID, $backup_file='', $account_info = array(), $exclude = array(), $include = array())
897
{
898
$this -> hisID = $historyID;
899
900
//for exclude and include
901
$requestParams = $this->getRequiredData($historyID, "requestParams");
902
$exclude = $requestParams['args']['exclude'];
@@ -950,12 +964,21 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
950
trim(basename(WP_CONTENT_DIR)) . "/infinitewp/backups",
951
trim(basename(WP_CONTENT_DIR)) . "/" . md5('iwp_mmb-client') . "/iwp_backups",
952
trim(basename(WP_CONTENT_DIR)) . "/cache",
953
- trim(basename(WP_CONTENT_DIR)) . "/w3tc"
954
);
955
-
956
if((!empty($exclude_file_size))||(!empty($exclude_extensions)))
957
{
958
- //removing files which are larger than the specified size
959
$total_files_array = get_all_files_from_dir(ABSPATH, $remove);
960
$files_excluded_by_size = array();
961
foreach($total_files_array as $key => $value)
@@ -992,10 +1015,10 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
992
}
993
}
994
}
995
- $remove = array_merge($remove, $files_excluded_by_size);
996
}
997
$exclude = array_merge($exclude, $remove);
998
-
999
//Exclude paths
1000
1001
@@ -1050,6 +1073,12 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1050
$result_arr['response_data']['nextCount'] = 0;
1051
$result_arr['status'] = 'processing';
1052
$result_arr['category'] = $category;
1053
$result_arr['response_data']['include_data'] = $include_data;
1054
$result_arr['response_data']['exclude_data'] = $exclude_data;
1055
$result_arr['response_data']['backup_file'] = $backup_file;
@@ -1068,10 +1097,8 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1068
function backupFilesZIP($historyID)
1069
{
1070
$this -> hisID = $historyID;
1071
- $files_to_zip = '';
1072
$files_with_error = array();
1073
$files_excluded_by_size = array();
1074
- $start34 = microtime(true);
1075
//get the backup settings values from options table
1076
$this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values');
1077
$backup_settings_values = $this -> backup_settings_vals;
@@ -1089,7 +1116,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1089
$exclude_file_size = $requestParams['args']['exclude_file_size'];
1090
$exclude_extensions = $requestParams['args']['exclude_extensions'];
1091
$zip_split_size = $requestParams['args']['zip_split_size'];
1092
-
1093
if(isset($backup_settings_values['dbFileHashValue']) && !empty($backup_settings_values['dbFileHashValue'][$historyID]))
1094
{
1095
$dbFileHashValue = $backup_settings_values['dbFileHashValue'][$historyID];
@@ -1117,10 +1144,13 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1117
$p_filedescr_list = isset($responseParams['response_data']['p_filedescr_list']) ? $responseParams['response_data']['p_filedescr_list'] : array();
1118
$zip_split_part = isset($responseParams['response_data']['zip_split_part']) ? $responseParams['response_data']['zip_split_part'] : 0;
1119
$is_new_zip = isset($responseParams['response_data']['is_new_zip']) ? $responseParams['response_data']['is_new_zip'] : 0;
1120
/* if(empty($zip_split_part))
1121
{
1122
$zip_split_part = 1;
1123
} */
1124
if((!empty($zip_split_part))&&(!empty($is_new_zip)))
1125
{
1126
if(strpos($backup_file, '_iwp_part_'))
@@ -1134,43 +1164,23 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1134
$backup_url = substr($backup_url, 0, strpos($backup_url, '.zip')).'_iwp_part_'.$zip_split_part.'.zip';
1135
}
1136
}
1137
- else
1138
{
1139
$zip_split_part = 0;
1140
}
1141
1142
- if(empty($p_filedescr_list))
1143
- {
1144
- $p_filedescr_list = array();
1145
- }
1146
- if(empty($files_with_error))
1147
- {
1148
- $files_with_error = array();
1149
- }
1150
- if(empty($files_excluded_by_size))
1151
- {
1152
- $files_excluded_by_size = array();
1153
- }
1154
-
1155
include_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
1156
- //define('IWP_PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
1157
-
1158
- //include_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.split.php';
1159
$returnArr = array();
1160
- if(!$nextCount)
1161
- {
1162
- $nextCount = 0;
1163
- }
1164
if((($nextCount != 0)||($category == 'fileZipAfterDBZip'))&&(empty($is_new_zip)))
1165
{
1166
unset($responseParams);
1167
$initialFileSize = iwp_mmb_get_file_size($backup_file)/1024/1024;
1168
$returnArr = $this->backupFilesNext($include_data, $exclude_data, $backup_file, $backup_url, $nextCount, $p_filedescr_list, $account_info, $files_with_error, $files_excluded_by_size, $zip_split_part);
1169
$fileNextTimeTaken = microtime(true) - $this->iwpScriptStartTime;
1170
- echo "<br>Total file size".(iwp_mmb_get_file_size($backup_file)/1024/1024);
1171
$file_size_in_this_call = (iwp_mmb_get_file_size($backup_file)/1024/1024) - $initialFileSize;
1172
- echo "<br>file size in this call".$file_size_in_this_call;
1173
- echo "<br>Time taken in this call ".$fileNextTimeTaken."<br>";
1174
if(($file_size_in_this_call == 0) && !(is_array($returnArr) && !empty($returnArr['error'])) && !(is_array($returnArr) && !empty($returnArr['isGetFileList'])))
1175
{
1176
return array( 'error' => 'Zip-error: Unable to zip', 'error_code' => 'zip_error_unable_to_zip');
@@ -1188,20 +1198,24 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1188
$archive = new IWPPclZip($backup_file);
1189
if($category == 'dbZip')
1190
{
1191
- if(empty($p_filedescr_list))
1192
{
1193
//define('IWP_PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
1194
$p_filedescr_list_array = $archive->getFileList(IWP_DB_DIR, IWP_PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR, IWP_PCLZIP_OPT_CHUNK_BLOCK_SIZE, $file_block_size, IWP_PCLZIP_OPT_HISTORY_ID, $historyID); //darkCode set the file block size here .. static values
1195
- $p_filedescr_list = $p_filedescr_list_array['p_filedescr_list'];
1196
- unset($p_filedescr_list_array['p_filedescr_list']);
1197
-
1198
if($p_filedescr_list_array['status'] == 'partiallyCompleted')
1199
{
1200
$result_arr = array();
1201
$result_arr = $responseParams;
1202
$result_arr['nextFunc'] = 'backupFilesZIP';
1203
$result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1204
unset($p_filedescr_list);
1205
$result_arr['response_data']['complete_folder_list'] = $p_filedescr_list_array['complete_folder_list'];
1206
unset($p_filedescr_list_array);
1207
$this->statusLog($this -> hisID, array('stage' => 'gettingFileList', 'status' => 'processing', 'statusMsg' => 'gettingFileListInMultiCall','responseParams' => $result_arr));
@@ -1222,22 +1236,22 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1222
}
1223
else
1224
{
1225
- if(empty($p_filedescr_list))
1226
{
1227
- $p_filedescr_list_array = $archive->getFileList($include_data, IWP_PCLZIP_OPT_REMOVE_PATH, ABSPATH, IWP_PCLZIP_OPT_IWP_EXCLUDE, $exclude_data, IWP_PCLZIP_OPT_CHUNK_BLOCK_SIZE, $file_block_size, IWP_PCLZIP_OPT_HISTORY_ID, $historyID); //testing darkCode set the file block size here .. static values
1228
1229
- $p_filedescr_list = $p_filedescr_list_array['p_filedescr_list'];
1230
- unset($p_filedescr_list_array['p_filedescr_list']);
1231
$next_file_index = $p_filedescr_list_array['next_file_index'];
1232
1233
- /* $resArray = array();
1234
- $resArray['status'] = 'completed';
1235
- //$resArray['backupParentHID'] = $historyID;
1236
- return $resArray;
1237
- exit; */
1238
-
1239
if($p_filedescr_list_array['status'] == 'partiallyCompleted')
1240
{
1241
$result_arr = array();
1242
$result_arr = $responseParams;
1243
$result_arr['nextFunc'] = 'backupFilesZIP';
@@ -1272,17 +1286,25 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1272
);
1273
$v_result = 1;
1274
$v_header = array();
1275
$p_result_list = array();
1276
- $v_nb = sizeof($p_result_list);
1277
- $v_header_list = array();
1278
- $v_comment = '';
1279
//$nextCount = 0;
1280
$archive->privOpenFd('wb');
1281
$p_filedescr_list_omitted = array();
1282
$omitted_flag = '';
1283
- $p_filedescr_list_size = sizeof($p_filedescr_list);
1284
- echo "loopStarted";
1285
for ($j=$nextCount; ($j<$p_filedescr_list_size) && ($v_result==1); $j++) {
1286
// ----- Format the filename
1287
$p_filedescr_list[$j]['filename'] = IWPPclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
1288
@@ -1296,7 +1318,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1296
// ----- Check the filename
1297
if ( ($p_filedescr_list[$j]['type'] != 'virtual_file')
1298
&& (!file_exists($p_filedescr_list[$j]['filename']))) {
1299
- echo 'FILE DOESNT EXIST';
1300
}
1301
1302
// ----- Look if it is a file or a dir with no all path remove option
@@ -1310,41 +1332,42 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1310
|| !$p_options[IWP_PCLZIP_OPT_REMOVE_ALL_PATH]))
1311
) {
1312
1313
- $time = microtime(true);
1314
- $finish_part = $time;
1315
- $total_time_part = $finish_part - $start;
1316
- /* if(($total_time_part > 2)&&($p_filedescr_list[$j]['size'] > 5000000))
1317
- {
1318
- $p_filedescr_list_omitted[$j] = $p_filedescr_list[$j];
1319
- $v_nb++;
1320
- $nextCount = $v_nb;
1321
- $omitted_flag = 'set';
1322
- continue;
1323
-
1324
- }
1325
- */
1326
// ----- Add the file
1327
$v_result = $archive->privAddFile($p_filedescr_list[$j], $v_header, $p_options);
1328
1329
// ----- Store the file infos
1330
- $p_result_list[$v_nb++] = $v_header;
1331
$nextCount = $j+1;
1332
1333
if ($v_result != 1) {
1334
- echo 'Error zipping this file'.$p_filedescr_list[$j]['filename'];
1335
- $files_with_error[] = $p_filedescr_list[$j]['filename'];
1336
if($v_result == -10)
1337
{
1338
- return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Zip-error: Error compressing the file "'.$p_filedescr_list[$j]['filename'].'".Try excluding this file and try again.', 'statusCode' => 'zip_error_while_compressing_file'));
1339
}
1340
continue;
1341
//return $v_result;
1342
}
1343
}
1344
1345
- $time = microtime(true);
1346
- $finish = $time;
1347
- $total_time = $finish - $this->iwpScriptStartTime;
1348
//if(($total_time > $file_loop_break_time)||) //darkCode static Values
1349
$buffer_size = $zip_split_size*1024*1024 - 3*1024*1024*$file_block_size;
1350
$is_new_zip = false;
@@ -1360,13 +1383,22 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1360
//iwp_mmb_print_flush("|");
1361
iwp_mmb_auto_print("multiCallZip");
1362
echo("|");
1363
}
1364
- echo "loopEnded";
1365
$v_offset = @ftell($archive->zip_fd);
1366
- $v_header_list = $p_result_list;
1367
//$nextCount = sizeof($p_result_list);
1368
- for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
1369
{
1370
// ----- Create the file header
1371
if ($v_header_list[$i]['status'] == 'ok') {
1372
if (($v_result = $archive->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
@@ -1379,12 +1411,18 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1379
1380
// ----- Transform the header to a 'usable' info
1381
$archive->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
1382
}
1383
$v_size = @ftell($archive->zip_fd)-$v_offset;
1384
$archive->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment);
1385
$archive->privCloseFd();
1386
- echo 'next Count -'.$nextCount;
1387
- if(($nextCount == sizeof($p_filedescr_list)+1)||($nextCount == sizeof($p_filedescr_list)))
1388
{
1389
$nextCount = "completed";
1390
$status = "completed";
@@ -1393,6 +1431,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1393
{
1394
$status = "partiallyCompleted";
1395
}
1396
$result_arr = array();
1397
1398
//return $p_result_list;
@@ -1408,6 +1447,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1408
$result_arr['response_data']['files_with_error'] = $files_with_error;
1409
$result_arr['response_data']['files_excluded_by_size'] = $files_excluded_by_size;
1410
$result_arr['response_data']['is_new_zip'] = $is_new_zip;
1411
//$result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1412
$result_arr['response_data']['zip_split_part'] = $zip_split_part;
1413
$resArray = array (
@@ -1432,8 +1472,8 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1432
}
1433
if($status == 'partiallyCompleted')
1434
{
1435
- echo 'filesNextCount: '.$nextCount;
1436
- echo 'totalFilesCount: '.count($p_filedescr_list);
1437
$result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1438
unset($p_filedescr_list);
1439
$this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'backupFileSingleCall'.$status,'nextFunc' => 'backupFilesZIP', 'responseParams' => $result_arr));
@@ -1457,6 +1497,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1457
}
1458
else
1459
{
1460
$paths = array();
1461
$tempPaths = array();
1462
@@ -1491,6 +1532,12 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1491
$paths['task_results'][$historyID] = $tempPath;
1492
if(empty($account_info))
1493
{
1494
$result_arr['nextFunc'] = 'backupFilesZIPOver';
1495
}
1496
else
@@ -1539,25 +1586,6 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1539
}
1540
}
1541
1542
-
1543
- function get_exclude_ext_array($exclude_extensions){
1544
- if(empty($exclude_extensions))
1545
- {
1546
- $exclude_extensions = array();
1547
- }
1548
- else if($exclude_extensions == 'eg. .zip,.mp4')
1549
- {
1550
- $exclude_extensions = array();
1551
- }
1552
- else
1553
- {
1554
- $exclude_extensions_array = explode(",",$exclude_extensions);
1555
- $exclude_extensions = array();
1556
- $exclude_extensions = $exclude_extensions_array;
1557
- }
1558
- return $exclude_extensions;
1559
- }
1560
-
1561
function get_total_files_size($backup_files)
1562
{
1563
if(is_array($backup_files))
@@ -1578,7 +1606,6 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1578
function backupFilesNext($include_data, $exclude_data, $backup_file, $backup_url, $nextCount, $p_filedescr_list = array(), $account_info = array(), $files_with_error = array(), $files_excluded_by_size = array(), $zip_split_part = 0)
1579
{
1580
$historyID = $this -> hisID;
1581
- $start34 = microtime(true);
1582
$is_new_zip = false;
1583
$backup_settings_values = $this -> backup_settings_vals;
1584
//$file_block_size = $backup_settings_values['file_block_size'];
@@ -1604,6 +1631,9 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1604
$responseParams = $this -> getRequiredData($historyID,"responseParams");
1605
$category = $responseParams['category']; //Am getting the category to perform the dbZip actions
1606
1607
$this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'processing', 'statusMsg' => 'backupMultiCallInitiated', 'responseParams' => $responseParams));
1608
1609
$time = microtime(true);
@@ -1615,8 +1645,10 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1615
{
1616
if(empty($p_filedescr_list)||($nextCount == 0))
1617
{
1618
$p_filedescr_list_array = $archive->getFileList(IWP_DB_DIR, IWP_PCLZIP_OPT_REMOVE_PATH, IWP_BACKUP_DIR, IWP_PCLZIP_OPT_CHUNK_BLOCK_SIZE, $file_block_size, IWP_PCLZIP_OPT_HISTORY_ID, $historyID);//darkCode set the file block size here .. static values
1619
$p_filedescr_list = $p_filedescr_list_array['p_filedescr_list'];
1620
1621
if($p_filedescr_list_array['status'] == 'partiallyCompleted')
1622
{
@@ -1626,6 +1658,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1626
$result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1627
$result_arr['response_data']['next_file_index'] = $p_filedescr_list_array['next_file_index'];
1628
$result_arr['response_data']['complete_folder_list'] = $p_filedescr_list_array['complete_folder_list'];
1629
$this->statusLog($this -> hisID, array('stage' => 'gettingFileList', 'status' => 'processing', 'statusMsg' => 'gettingFileListInMultiCall','responseParams' => $result_arr));
1630
1631
$resArray = array();
@@ -1643,11 +1676,15 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1643
}
1644
}
1645
}
1646
else
1647
{
1648
if(empty($p_filedescr_list)||($nextCount == 0))
1649
{
1650
- $p_filedescr_list_array = $archive->getFileList($include_data, IWP_PCLZIP_OPT_REMOVE_PATH, ABSPATH, IWP_PCLZIP_OPT_IWP_EXCLUDE, $exclude_data, IWP_PCLZIP_OPT_CHUNK_BLOCK_SIZE, $file_block_size, IWP_PCLZIP_OPT_HISTORY_ID, $historyID); //testing darkCode set the file block size here .. static values
1651
1652
$p_filedescr_list = $p_filedescr_list_array['p_filedescr_list'];
1653
@@ -1663,7 +1700,6 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1663
$result_arr['response_data']['complete_folder_list'] = $p_filedescr_list_array['complete_folder_list'];
1664
1665
$this->statusLog($this -> hisID, array('stage' => 'gettingFileList', 'status' => 'processing', 'statusMsg' => 'gettingFileListInMultiCall','responseParams' => $result_arr));
1666
- $timeTaken34 = microtime(true) - $start34;
1667
unset($p_filedescr_list_array);
1668
$resArray = array();
1669
$resArray['status'] = 'partiallyCompleted';
@@ -1681,6 +1717,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1681
}
1682
}
1683
}
1684
$archive->privDisableMagicQuotes();
1685
if (($v_result=$archive->privOpenFd('rb+')) != 1)
1686
{
@@ -1694,7 +1731,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1694
$v_central_dir = array();
1695
if (($v_result = $archive->privReadEndCentralDir($v_central_dir)) != 1)
1696
{
1697
- echo 'error2';
1698
$archive->privCloseFd();
1699
$archive->privSwapBackMagicQuotes();
1700
if(is_array($v_result) && !empty($v_result['error']))
@@ -1718,7 +1755,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1718
{
1719
$archive->privCloseFd();
1720
$archive->privSwapBackMagicQuotes();
1721
- echo 'error3';
1722
return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Unable to open temporary file', 'statusCode' => 'unable_to_open_temporary_file')); // ----- Return
1723
1724
}
@@ -1762,19 +1799,23 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1762
$v_header = array();
1763
$p_result_list = array();
1764
$v_header_list = array();
1765
- $v_nb = sizeof($v_header_list);
1766
$v_comment = '';
1767
//$nextCount = $_REQUEST['nextCount'];
1768
$omitted_flag = '';
1769
$nextCountHere = 0;
1770
- $p_filedescr_list_size = sizeof($p_filedescr_list);
1771
- $timeBeforeAdd = microtime(true) - $start34;
1772
iwp_mmb_print_flush("loopStarted");
1773
for ($j=($nextCount); ($j<$p_filedescr_list_size) && ($v_result==1); $j++) {
1774
// ----- Format the filename
1775
- $p_filedescr_list[$j]['filename']
1776
- = IWPPclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
1777
-
1778
1779
// ----- Skip empty file names
1780
// TBC : Can this be possible ? not checked in DescrParseAtt ?
@@ -1813,18 +1854,33 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1813
} */
1814
1815
// ----- Add the file
1816
$v_result = $archive->privAddFile($p_filedescr_list[$j], $v_header, $p_options);
1817
// ----- Store the file infos
1818
- $v_header_list[$v_nb++] = $v_header;
1819
1820
if ($v_result != 1) {
1821
//$this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'SomeError1'));
1822
- echo "error zipping this file:".$p_filedescr_list[$j]['filename'];
1823
- echo 'errorCode - '.$v_result;
1824
- $files_with_error[] = $p_filedescr_list[$j]['filename'];
1825
if($v_result == -10)
1826
{
1827
- return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Zip-error: Error compressing the file "'.$p_filedescr_list[$j]['filename'].'".Try excluding this file and try again.', 'statusCode' => 'zip_error_while_compressing_file'));
1828
}
1829
continue;
1830
//return $v_result;
@@ -1841,14 +1897,17 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1841
{
1842
$zip_split_part += 1;
1843
$is_new_zip = true;
1844
}
1845
break;
1846
}
1847
//iwp_mmb_print_flush("|");
1848
iwp_mmb_auto_print("multiCallZip");
1849
//echo "|";
1850
}
1851
- echo "loopEnded";
1852
$v_offset = @ftell($archive->zip_fd);
1853
$v_size = $v_central_dir['size'];
1854
/* while ($v_size != 0)
@@ -1872,17 +1931,22 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1872
$v_buffer = fread($v_zip_temp_fd, $v_central_dir['size']);
1873
$writeResult = fwrite($archive->zip_fd, $v_buffer);
1874
1875
1876
-
1877
//array_pop($v_header_list);
1878
//$v_header_list = $p_result_list;
1879
// ----- Create the Central Dir files header
1880
- for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
1881
{
1882
// ----- Create the file header
1883
if ($v_header_list[$i]['status'] == 'ok') {
1884
if (($v_result = $archive->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
1885
- echo 'error4';
1886
fclose($v_zip_temp_fd);
1887
$archive->privCloseFd();
1888
@unlink($v_zip_temp_name);
@@ -1895,7 +1959,10 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1895
1896
// ----- Transform the header to a 'usable' info
1897
$archive->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
1898
}
1899
// ----- Calculate the size of the central header
1900
$v_size = @ftell($archive->zip_fd)-$v_offset;
1901
@@ -1903,7 +1970,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1903
if (($v_result = $archive->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1)
1904
{
1905
// ----- Reset the file list
1906
- echo 'error5';
1907
unset($v_header_list);
1908
$archive->privSwapBackMagicQuotes();
1909
return $this->statusLog($historyID, array('stage' => 'backupFilesMultiCall', 'status' => 'error', 'statusMsg' => 'Zip-Error: Error while writing footer', 'statusCode' => 'zip_error_while_writing_footer'));
@@ -1935,7 +2002,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1935
1936
$nextCount = $nextCountHere;
1937
1938
- $size_file_des = sizeof($p_filedescr_list);
1939
if($nextCount == $size_file_des)
1940
//if(true)
1941
{
@@ -1946,7 +2013,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1946
else{
1947
$status = "partiallyCompleted";
1948
}
1949
-
1950
$result_arr = array();
1951
$result_arr['response_data']['nextCount'] = $nextCount;
1952
$result_arr['status'] = $status;
@@ -1961,6 +2028,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1961
$result_arr['response_data']['is_new_zip'] = $is_new_zip;
1962
$result_arr['response_data']['files_with_error'] = $files_with_error;
1963
$result_arr['response_data']['files_excluded_by_size'] = $files_excluded_by_size;
1964
1965
//$result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1966
$resArray = array (
@@ -1983,9 +2051,9 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1983
}
1984
if($status == "partiallyCompleted")
1985
{
1986
- echo 'filesNextCount: '.$nextCount;
1987
- echo 'totalFilesCount: '.count($p_filedescr_list);
1988
- $result_arr['response_data']['p_filedescr_list'] = $p_filedescr_list;
1989
unset($p_filedescr_list);
1990
$this->statusLog($this -> hisID, array('stage' => 'backupFilesMultiCall', 'status' => 'completed', 'statusMsg' => 'nextCall'.$status,'nextFunc' => 'backupFilesZIP', 'responseParams' => $result_arr));
1991
unset($result_arr);
@@ -2005,14 +2073,15 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
2005
$resArray['status'] = 'partiallyCompleted';
2006
$result_arr['nextFunc'] = 'backupFiles';
2007
$result_arr['status'] = 'partiallyCompleted';
2008
$this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'nextCall'.$status,'nextFunc' => 'backupFiles', 'responseParams' => $result_arr));
2009
}
2010
else
2011
{
2012
2013
//$this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'nextCall'.$status, 'responseParams' => $result_arr));
2014
-
2015
- $paths = array();
2016
$tempPaths = array();
2017
2018
$backup_files_array = $this->get_files_array_from_iwp_part($backup_file);
@@ -2050,6 +2119,14 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
2050
{
2051
//this is where the call goes to upload after backup zip completion ..
2052
$resArray['status'] = 'completed';
2053
$result_arr['nextFunc'] = 'backupFilesZIPOver';
2054
$result_arr['status'] = 'completed';
2055
}
@@ -2060,7 +2137,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
2060
$result_arr['nextFunc'] = 'backup_uploads';
2061
$result_arr['status'] = 'partiallyCompleted';
2062
$result_arr['actual_file_size'] = $size;
2063
- $result_arr['backup_file'] = $backup_file;
2064
}
2065
2066
$this->statusLog($this -> hisID, array('stage' => 'backupFiles', 'status' => 'completed', 'statusMsg' => 'nextCall'.$status, 'responseParams' => $result_arr,'task_result' => $paths));
@@ -2094,8 +2171,6 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
2094
2095
}
2096
}
2097
- $fileNextTimeTaken = microtime(true) - $start34;
2098
-
2099
return $resArray;
2100
2101
}
@@ -2149,8 +2224,6 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
2149
}
2150
}
2151
2152
-
2153
-
2154
function getHashValuesArray($p_filedescr_list)
2155
{
2156
$hashValues = array();
@@ -2341,6 +2414,8 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
2341
{
2342
if($statusArray['status'] == 'error')
2343
{
2344
$returnParams = array();
2345
$returnParams['parentHID'] = $historyID;
2346
$returnParams['backupRowID'] = $insertID;
@@ -2606,7 +2681,14 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
2606
{
2607
$args['backup_file'] = $value;
2608
iwp_mmb_print_flush('Amazon S3 download: Start '.$key);
2609
- $backup_file[] = $this->get_amazons3_backup($args);
2610
iwp_mmb_print_flush('Amazon S3 download: End '.$key);
2611
if ($backup_file[$key] == false) {
2612
return array(
@@ -2867,20 +2949,6 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
2867
2868
}
2869
2870
-
2871
- /*if(!empty($clone_options['iwp_client_backup_tasks'])){
2872
-
2873
- if(mysql_num_rows(mysql_query("SHOW TABLES LIKE '".$table."'")) == 1){
2874
- echo "Table exists";
2875
-
2876
- $delete = $wpdb->query("DELETE TABLE wp_iwp_backup_status");
2877
- }
2878
- iwp_mmb_create_backup_table();
2879
-
2880
- insertBackupStatusContens($clone_options['iwp_client_backup_tasks']);
2881
-
2882
- }*/
2883
-
2884
//Backup file will be extracted to a temporary path
2885
if(!is_array($backup_file))
2886
{
@@ -3109,9 +3177,8 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
3109
global $wpdb;
3110
3111
$table = $GLOBALS['table_prefix'].'iwp_backup_status';
3112
-
3113
- if(mysql_num_rows(mysql_query("SHOW TABLES LIKE '".$table."'")) == 1){
3114
-
3115
$delete = $wpdb->query("DROP TABLE '".$table."' ");
3116
}
3117
@@ -3278,7 +3345,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
3278
function restore_db($new_temp_folder)
3279
{
3280
global $wpdb;
3281
- $paths = $this->check_mysql_paths();
3282
$file_path = $new_temp_folder . '/iwp_db';
3283
@chmod($file_path,0755);
3284
$file_name = glob($file_path . '/*.sql');
@@ -3389,7 +3456,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
3389
}
3390
3391
### Function: Auto Detect MYSQL and MYSQL Dump Paths
3392
- function check_mysql_paths()
3393
{
3394
global $wpdb;
3395
$paths = array(
@@ -3542,7 +3609,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
3542
3543
$reqs['Unzip']['pass'] = true;
3544
3545
- $paths = $this->check_mysql_paths();
3546
3547
if (!empty($paths['mysqldump'])) {
3548
$reqs['MySQL Dump']['status'] = $paths['mysqldump'];
@@ -3854,7 +3921,7 @@ function ftp_backup($historyID,$args = '')
3854
return $backup_files_base_name;
3855
}
3856
3857
- function postUploadVerification(&$obj, $backup_file, $destFile, $type = "", $as3_bucket = "")
3858
{
3859
$actual_file_size = iwp_mmb_get_file_size($backup_file);
3860
$size1 = $actual_file_size-((0.1) * $actual_file_size);
@@ -3874,26 +3941,13 @@ function ftp_backup($historyID,$args = '')
3874
}
3875
else if($type == "amazons3")
3876
{
3877
- $response = $obj -> if_object_exists($as3_bucket, $destFile);
3878
- if($response == true)
3879
- {
3880
- $meta = $obj -> get_object_headers($as3_bucket, $destFile);
3881
- $cfu_obj = new CFUtilities;
3882
- $meta_response_array = $cfu_obj->convert_response_to_array($meta);
3883
- $s3_filesize = $meta_response_array['header']['content-length'];
3884
- echo "S3 fileszie during verification - ".$s3_filesize;
3885
- if((($s3_filesize >= $size1 && $s3_filesize <= $actual_file_size) || ($s3_filesize <= $size2 && $s3_filesize >= $actual_file_size) || ($s3_filesize == $actual_file_size)) && ($s3_filesize != 0))
3886
- {
3887
- return true;
3888
- }
3889
- else
3890
- {
3891
- return false;
3892
- }
3893
}
3894
- else
3895
- {
3896
- return false;
3897
}
3898
}
3899
else if($type == "ftp")
@@ -3918,6 +3972,29 @@ function ftp_backup($historyID,$args = '')
3918
}
3919
}
3920
3921
3922
function remove_ftp_backup($args)
3923
{
@@ -4376,8 +4453,7 @@ function ftp_backup($historyID,$args = '')
4376
4377
*/
4378
4379
-
4380
- function amazons3_backup($historyID , $args='' )
4381
{
4382
$s3StartTime = $this->iwpScriptStartTime;
4383
$this -> backup_settings_vals = get_option('iwp_client_multi_backup_temp_values');
@@ -4390,9 +4466,6 @@ function ftp_backup($historyID,$args = '')
4390
{
4391
$s3_retrace_count = 0;
4392
}
4393
- //$upload_file_block_size = $backup_settings_values['upload_file_block_size'];
4394
- //$del_host_file = $backup_settings_values['del_host_file'];
4395
-
4396
//get the settings by other method
4397
$requestParams = $this -> getRequiredData($historyID,"requestParams");
4398
$upload_loop_break_time = $requestParams['account_info']['upload_loop_break_time']; //darkcode changed
@@ -4408,12 +4481,6 @@ function ftp_backup($historyID,$args = '')
4408
@set_time_limit(0);
4409
$this -> hisID = $historyID;
4410
4411
-
4412
- //the multiCall arguments
4413
- /* $uploadLoopCount = 0;
4414
- $upload_id = false;
4415
- $partsArray = array(); */
4416
-
4417
$uploadLoopCount = 0;
4418
$upload_id = 'start';
4419
$partsArray = array();
@@ -4421,7 +4488,6 @@ function ftp_backup($historyID,$args = '')
4421
$retrace = 'notSet';
4422
$doComplete = false;
4423
4424
-
4425
if($args == '')
4426
{
4427
//on the next call $args would be ''
@@ -4467,8 +4533,6 @@ function ftp_backup($historyID,$args = '')
4467
$backup_settings_values['s3_retrace_count'][$historyID] = $s3_retrace_count;
4468
update_option('iwp_client_multi_backup_temp_values', $backup_settings_values);
4469
4470
- //$partsArray = $s3->list_parts($as3_bucket, $as3_file, $upload_id);//commenting this line because of fatal error $s3 object is not created, looks like these lines not required here
4471
- //$nextPart = (count($partsArray) + 1);//commenting this line because of fatal error $s3 object is not created, looks like these lines not required here
4472
}
4473
else
4474
{
@@ -4476,26 +4540,13 @@ function ftp_backup($historyID,$args = '')
4476
}
4477
}
4478
4479
- //tracback ends
4480
-
4481
- /* $upload_id = 'myAQl0R72GE2s6qqlCWnQrIl9NQcPS8rm_GSICHAuon58n9z9M9qjpkUOFiT1G9tj966VLb6WqsxRI7rB9CCPg--';
4482
- $partsArray = array (
4483
- 1 =>
4484
- array (
4485
- 'PartNumber' => 1,
4486
- 'ETag' => '"84658f71569196e8a3e249c48186e166"',
4487
- ),
4488
- ); */
4489
-
4490
- //$this->statusLog($this -> hisID, array('stage' => 'uploadingFilesAmazon', 'status' => 'partiallyCompleted', 'statusMsg' => 's3SingleCall'));
4491
-
4492
if (!$this->iwp_mmb_function_exists('curl_init')) {
4493
return array(
4494
'error' => 'You cannot use Amazon S3 on your server. Please enable curl first.',
4495
'partial' => 1, 'error_code' => 'cannot_use_s3_enable_curl_first'
4496
);
4497
}
4498
- require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
4499
4500
$tempArgs = $args;
4501
extract($args);
@@ -4644,6 +4695,7 @@ function ftp_backup($historyID,$args = '')
4644
$s3ChunkCount = 0;
4645
$reloop = false;
4646
$reloopCount = 0;
4647
do
4648
{
4649
$uploadLoopCount = 0;
@@ -4774,7 +4826,7 @@ function ftp_backup($historyID,$args = '')
4774
else
4775
{
4776
//to continue zip split parts
4777
-
4778
$chunkResult = array();
4779
$chunkResult['partsArray'] = array();
4780
$chunkResult['nextPart'] = 1;
@@ -4879,12 +4931,10 @@ function ftp_backup($historyID,$args = '')
4879
}
4880
}
4881
4882
-
4883
-
4884
- function remove_amazons3_backup($args)
4885
{
4886
if ($this->iwp_mmb_function_exists('curl_init')) {
4887
- require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
4888
extract($args);
4889
4890
if(!is_array($backup_file))
@@ -4927,10 +4977,10 @@ function ftp_backup($historyID,$args = '')
4927
}
4928
}
4929
4930
- function get_amazons3_backup($args)
4931
{
4932
if ($this->iwp_mmb_function_exists('curl_init')) {
4933
- require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/amazon_s3/sdk.class.php');
4934
extract($args);
4935
$temp = '';
4936
try{
@@ -5010,7 +5060,6 @@ function ftp_backup($historyID,$args = '')
5010
$downloadUrl = $file->getDownloadUrl();
5011
5012
$temp = wp_tempnam('iwp_temp_backup.zip');
5013
- //$temp = WP_CONTENT_DIR .'/DE_clientPluginSIde.zip';
5014
5015
try
5016
{
@@ -5049,8 +5098,7 @@ function ftp_backup($historyID,$args = '')
5049
5050
*/
5051
5052
- function google_drive_backup($historyID = 0, $args = '', $uploadid = null, $offset = 0)
5053
- {
5054
require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Client.php');
5055
require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Http/MediaFileUpload.php');
5056
require_once($GLOBALS['iwp_mmb_plugin_dir'].'/lib/Google/Service/Drive.php');
@@ -5072,8 +5120,7 @@ function ftp_backup($historyID,$args = '')
5072
$resumeURI = false;
5073
$current_file_num = 0;
5074
5075
- if($args == '')
5076
- {
5077
//on the next call $args would be ''
5078
//set $args, $uploadid, $offset from the DB
5079
$responseParams = $this -> getRequiredData($historyID,"responseParams");
@@ -5105,25 +5152,21 @@ function ftp_backup($historyID,$args = '')
5105
$refreshToken = $accessToken['refresh_token'];
5106
$backup_file = $args['backup_file'];
5107
5108
- if(!is_array($backup_file))
5109
- {
5110
$temp_backup_file = $backup_file;
5111
$backup_file = array();
5112
$backup_file[] = $temp_backup_file;
5113
}
5114
5115
- if(is_array($backup_file))
5116
- {
5117
$backup_files_count = count($backup_file);
5118
$backup_file = $backup_file[$current_file_num];
5119
}
5120
5121
- try
5122
- {
5123
$client->refreshToken($refreshToken);
5124
}
5125
- catch(Exception $e)
5126
- {
5127
echo 'google Error ', $e->getMessage(), "\n";
5128
return array("error" => $e->getMessage(), "error_code" => "google_error_backup_refresh_token");
5129
}
@@ -5135,17 +5178,15 @@ function ftp_backup($historyID,$args = '')
5135
$service = new IWP_google_Service_Drive($client);
5136
5137
//create iwp folder folder if it is not present
5138
- try
5139
- {
5140
$parameters = array();
5141
- $parameters['q'] = "title = 'infinitewp' and trashed = false and 'root' in parents and 'me' in owners and mimeType= 'application/vnd.google-apps.folder'";
5142
$files = $service->files->listFiles($parameters);
5143
$list_result = array();
5144
$list_result = array_merge($list_result, $files->getItems());
5145
$list_result = (array)$list_result;
5146
5147
- if(empty($list_result))
5148
- {
5149
$file = new IWP_google_Service_Drive_DriveFile();
5150
$file->setTitle('infinitewp');
5151
$file->setMimeType('application/vnd.google-apps.folder');
@@ -5153,14 +5194,12 @@ function ftp_backup($historyID,$args = '')
5153
$createdFolder = $service->files->insert($file, array(
5154
'mimeType' => 'application/vnd.google-apps.folder',
5155
));
5156
- if($createdFolder)
5157
- {
5158
$createdFolder = (array)$createdFolder;
5159
$iwp_folder_id = $createdFolder['id'];
5160
}
5161
}
5162
- else
5163
- {
5164
foreach($list_result as $k => $v){
5165
$iwp_folder_id = $v->id;
5166
}
@@ -5171,18 +5210,16 @@ function ftp_backup($historyID,$args = '')
5171
}
5172
5173
//create sub folder by site name
5174
- if($create_sub_folder)
5175
- {
5176
$parameters = array();
5177
- $parameters['q'] = "title = '$sub_folder_name' and trashed = false and '$iwp_folder_id' in parents and 'me' in owners and mimeType = 'application/vnd.google-apps.folder'";
5178
- //$parameters['corpus'] = "DEFAULT";
5179
$files = $service->files->listFiles($parameters);
5180
$list_result = array();
5181
$list_result = array_merge($list_result, $files->getItems());
5182
$list_result = (array)$list_result;
5183
5184
- if(empty($list_result))
5185
- {
5186
$file = new IWP_google_Service_Drive_DriveFile();
5187
$file->setTitle($sub_folder_name);
5188
$file->setMimeType('application/vnd.google-apps.folder');
@@ -5201,11 +5238,10 @@ function ftp_backup($historyID,$args = '')
5201
$sub_folder_id = $createdFolder['id'];
5202
}
5203
}
5204
- else
5205
- {
5206
- foreach($list_result as $k => $v){
5207
- $sub_folder_id = $v->id;
5208
- }
5209
}
5210
}
5211
@@ -5216,21 +5252,17 @@ function ftp_backup($historyID,$args = '')
5216
5217
// Set the Parent Folder on Google Drive
5218
$parent = new IWP_google_Service_Drive_ParentReference();
5219
- if(empty($sub_folder_id))
5220
- {
5221
$parent->setId($iwp_folder_id);
5222
}
5223
- else
5224
- {
5225
$parent->setId($sub_folder_id);
5226
}
5227
$file->setParents(array($parent));
5228
5229
$gDriveID = '';
5230
- try
5231
- {
5232
- if(false)
5233
- {
5234
//single upload
5235
$data = file_get_contents($backup_file);
5236
$createdFile = (array)$service->files->insert($file, array(
@@ -5242,8 +5274,7 @@ function ftp_backup($historyID,$args = '')
5242
5243
//multipart upload
5244
5245
- if(true)
5246
- {
5247
// Call the API with the media upload, defer so it doesn't immediately return.
5248
$client->setDefer(true);
5249
$request = $service->files->insert($file);
@@ -5262,8 +5293,7 @@ function ftp_backup($historyID,$args = '')
5262
'backupParentHID' => $historyID,
5263
);
5264
5265
- while (!$status && !feof($handle))
5266
- {
5267
iwp_mmb_auto_print('gdrive_chucked_upload');
5268
$chunk = fread($handle, $upload_file_block_size);
5269
$statusArray = $media->nextChunk($chunk, $resumeURI, $fileSizeUploaded);
@@ -5273,8 +5303,7 @@ function ftp_backup($historyID,$args = '')
5273
$fileSizeUploaded = $statusArray['progress'];
5274
5275
$googleTimeTaken = microtime(1) - $GLOBALS['IWP_MMB_PROFILING']['ACTION_START'];
5276
- if(($googleTimeTaken > 10)&&($status != true))
5277
- {
5278
$chunkResult['resumeURI'] = $resumeURI;
5279
$chunkResult['fileSizeUploaded'] = $fileSizeUploaded;
5280
@@ -5300,7 +5329,7 @@ function ftp_backup($historyID,$args = '')
5300
}
5301
5302
$result = false;
5303
- if($status != false) {
5304
$result = $status;
5305
}
5306
@@ -5312,8 +5341,7 @@ function ftp_backup($historyID,$args = '')
5312
//$gDriveID = $createdFile['id'];
5313
$gDriveID = $completeBackupResult['id'];
5314
}
5315
- }catch (Exception $e)
5316
- {
5317
echo "An error occurred: " . $e->getMessage();
5318
return array("error" => "gDrive Error".$e->getMessage(), "error_code" => "google_error_multipart_upload");
5319
}
@@ -5337,21 +5365,19 @@ function ftp_backup($historyID,$args = '')
5337
//$task_result['gDrive'] = basename($backup_file);
5338
$task_result['gDrive'][] = $gDriveID;
5339
5340
- if($current_file_num == $backup_files_count)
5341
- {
5342
$result_arr['nextFunc'] = 'google_drive_completed';
5343
iwp_mmb_print_flush('Google Drive upload: End');
5344
unset($task_result['task_results'][$historyID]['server']);
5345
}
5346
- else
5347
- {
5348
$result_arr['status'] = "partiallyCompleted";
5349
$result_arr['nextFunc'] = 'google_drive_backup';
5350
$resArray['status'] = 'partiallyCompleted';
5351
}
5352
5353
- if($del_host_file)
5354
- {
5355
@unlink($backup_file);
5356
}
5357
@@ -5602,7 +5628,14 @@ function ftp_backup($historyID,$args = '')
5602
$amazons3_file = $task_result['task_results'][$backup_data['historyID']]['amazons3'];
5603
$args = $thisRequestParams['account_info']['iwp_amazon_s3'];
5604
$args['backup_file'] = $amazons3_file;
5605
- $this->remove_amazons3_backup($args);
5606
}
5607
5608
if (isset($task_result['task_results'][$backup_data['historyID']]['dropbox']) && isset($thisRequestParams['account_info']['iwp_dropbox'])) {
@@ -5765,7 +5798,14 @@ function ftp_backup($historyID,$args = '')
5765
$amazons3_file = $backup['amazons3'];
5766
$args = $args['iwp_amazon_s3'];
5767
$args['backup_file'] = $amazons3_file;
5768
- $this->remove_amazons3_backup($args);
5769
}
5770
5771
if (isset($backup['dropbox'])) {
@@ -5795,7 +5835,13 @@ function ftp_backup($historyID,$args = '')
5795
$old_wpdb = $wpdb;
5796
//Reconnect to avoid timeout problem after ZIP files
5797
if(class_exists('wpdb') && function_exists('wp_set_wpdb_vars')){
5798
- @mysql_close($wpdb->dbh);
5799
$wpdb = new wpdb( DB_USER, DB_PASSWORD, DB_NAME, DB_HOST );
5800
wp_set_wpdb_vars();
5801
$wpdb->options = $old_wpdb->options;//fix for multi site full backup
@@ -5879,8 +5925,342 @@ function ftp_backup($historyID,$args = '')
5879
else
5880
return true;
5881
}
5882
}
5883