From 75d00a04d73b8e025d1095067d0d4e1e008d4800 Mon Sep 17 00:00:00 2001 From: yehudah Date: Tue, 17 Oct 2017 19:09:18 +0000 Subject: = 1.7.6 - 2017-10-17 * Missing sendgrid files * Fixed: Localization slug * Fixed: Error sending files with sendgrid git-svn-id: https://plugins.svn.wordpress.org/post-smtp/trunk@1748221 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- .../PostmanConfigurationController.php | 694 ++++++----- .../PostmanConnectivityTestController.php | 296 +++-- .../PostmanDiagnosticTestController.php | 268 ++-- Postman/Postman-Mail/PostmanMandrillMailEngine.php | 269 ++-- Postman/Postman-Mail/PostmanMessage.php | 435 ++++--- Postman/Postman-Mail/PostmanSendGridMailEngine.php | 222 ++-- .../Postman-Mail/PostmanSmtpModuleTransport.php | 465 ++++--- Postman/Postman-Mail/PostmanZendMailEngine.php | 242 ++-- .../sendgrid-php-3.2.0/lib/SendGrid/Email.php | 1289 ++++++++++---------- .../Guzzle/Http/Message/EntityEnclosingRequest.php | 449 ++++--- .../src/Guzzle/Http/Message/RequestFactory.php | 663 +++++----- .../PostmanSendTestEmailController.php | 292 +++-- Postman/Postman.php | 2 +- Postman/PostmanConfigTextHelper.php | 124 +- Postman/PostmanViewController.php | 294 +++-- Postman/PostmanWpMail.php | 351 +++--- readme.txt | 1 + 17 files changed, 3120 insertions(+), 3236 deletions(-) diff --git a/Postman/Postman-Configuration/PostmanConfigurationController.php b/Postman/Postman-Configuration/PostmanConfigurationController.php index 58d26d7..db63f6b 100644 --- a/Postman/Postman-Configuration/PostmanConfigurationController.php +++ b/Postman/Postman-Configuration/PostmanConfigurationController.php @@ -1,48 +1,48 @@ logger = new PostmanLogger ( get_class ( $this ) ); + public function __construct( $rootPluginFilenameAndPath ) { + assert( ! empty( $rootPluginFilenameAndPath ) ); + assert( PostmanUtils::isAdmin() ); + assert( is_admin() ); + + $this->logger = new PostmanLogger( get_class( $this ) ); $this->rootPluginFilenameAndPath = $rootPluginFilenameAndPath; - $this->options = PostmanOptions::getInstance (); - $this->settingsRegistry = new PostmanSettingsRegistry (); - - PostmanUtils::registerAdminMenu ( $this, 'addConfigurationSubmenu' ); - PostmanUtils::registerAdminMenu ( $this, 'addSetupWizardSubmenu' ); - + $this->options = PostmanOptions::getInstance(); + $this->settingsRegistry = new PostmanSettingsRegistry(); + + PostmanUtils::registerAdminMenu( $this, 'addConfigurationSubmenu' ); + PostmanUtils::registerAdminMenu( $this, 'addSetupWizardSubmenu' ); + // hook on the init event - add_action ( 'init', array ( + add_action( 'init', array( $this, - 'on_init' + 'on_init', ) ); - + // initialize the scripts, stylesheets and form fields - add_action ( 'admin_init', array ( + add_action( 'admin_init', array( $this, - 'on_admin_init' + 'on_admin_init', ) ); } - + /** * Functions to execute on the init event * @@ -51,189 +51,187 @@ class PostmanConfigurationController { */ public function on_init() { // register Ajax handlers - new PostmanGetHostnameByEmailAjaxController (); - new PostmanManageConfigurationAjaxHandler (); - new PostmanImportConfigurationAjaxController ( $this->options ); + new PostmanGetHostnameByEmailAjaxController(); + new PostmanManageConfigurationAjaxHandler(); + new PostmanImportConfigurationAjaxController( $this->options ); } - + /** * Fires on the admin_init method */ public function on_admin_init() { - // - $this->registerStylesAndScripts (); - $this->settingsRegistry->on_admin_init (); + $this->registerStylesAndScripts(); + $this->settingsRegistry->on_admin_init(); } - + /** * Register and add settings */ private function registerStylesAndScripts() { - if ($this->logger->isTrace ()) { - $this->logger->trace ( 'registerStylesAndScripts()' ); + if ( $this->logger->isTrace() ) { + $this->logger->trace( 'registerStylesAndScripts()' ); } // register the stylesheet and javascript external resources - $pluginData = apply_filters ( 'postman_get_plugin_metadata', null ); - wp_register_script ( 'postman_manual_config_script', plugins_url ( 'Postman/Postman-Configuration/postman_manual_config.js', $this->rootPluginFilenameAndPath ), array ( + $pluginData = apply_filters( 'postman_get_plugin_metadata', null ); + wp_register_script( 'postman_manual_config_script', plugins_url( 'Postman/Postman-Configuration/postman_manual_config.js', $this->rootPluginFilenameAndPath ), array( PostmanViewController::JQUERY_SCRIPT, 'jquery_validation', - PostmanViewController::POSTMAN_SCRIPT + PostmanViewController::POSTMAN_SCRIPT, ), $pluginData ['version'] ); - wp_register_script ( 'postman_wizard_script', plugins_url ( 'Postman/Postman-Configuration/postman_wizard.js', $this->rootPluginFilenameAndPath ), array ( + wp_register_script( 'postman_wizard_script', plugins_url( 'Postman/Postman-Configuration/postman_wizard.js', $this->rootPluginFilenameAndPath ), array( PostmanViewController::JQUERY_SCRIPT, 'jquery_validation', 'jquery_steps_script', PostmanViewController::POSTMAN_SCRIPT, - 'sprintf' + 'sprintf', ), $pluginData ['version'] ); } - + /** */ private function addLocalizeScriptsToPage() { - $warning = __ ( 'Warning', Postman::TEXT_DOMAIN ); + $warning = __( 'Warning', Postman::TEXT_DOMAIN ); /* translators: where %s is the name of the SMTP server */ - wp_localize_script ( 'postman_wizard_script', 'postman_smtp_mitm', sprintf ( '%s: %s', $warning, __ ( 'connected to %1$s instead of %2$s.', Postman::TEXT_DOMAIN ) ) ); + wp_localize_script( 'postman_wizard_script', 'postman_smtp_mitm', sprintf( '%s: %s', $warning, __( 'connected to %1$s instead of %2$s.', Postman::TEXT_DOMAIN ) ) ); /* translators: where %d is a port number */ - wp_localize_script ( 'postman_wizard_script', 'postman_wizard_bad_redirect_url', __ ( 'You are about to configure OAuth 2.0 with an IP address instead of a domain name. This is not permitted. Either assign a real domain name to your site or add a fake one in your local host file.', Postman::TEXT_DOMAIN ) ); - + wp_localize_script( 'postman_wizard_script', 'postman_wizard_bad_redirect_url', __( 'You are about to configure OAuth 2.0 with an IP address instead of a domain name. This is not permitted. Either assign a real domain name to your site or add a fake one in your local host file.', Postman::TEXT_DOMAIN ) ); + // user input - wp_localize_script ( PostmanViewController::POSTMAN_SCRIPT, 'postman_input_sender_email', '#input_' . PostmanOptions::MESSAGE_SENDER_EMAIL ); - wp_localize_script ( PostmanViewController::POSTMAN_SCRIPT, 'postman_input_sender_name', '#input_' . PostmanOptions::MESSAGE_SENDER_NAME ); - wp_localize_script ( PostmanViewController::POSTMAN_SCRIPT, 'postman_port_element_name', '#input_' . PostmanOptions::PORT ); - wp_localize_script ( PostmanViewController::POSTMAN_SCRIPT, 'postman_hostname_element_name', '#input_' . PostmanOptions::HOSTNAME ); - + wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_input_sender_email', '#input_' . PostmanOptions::MESSAGE_SENDER_EMAIL ); + wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_input_sender_name', '#input_' . PostmanOptions::MESSAGE_SENDER_NAME ); + wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_port_element_name', '#input_' . PostmanOptions::PORT ); + wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_hostname_element_name', '#input_' . PostmanOptions::HOSTNAME ); + // the enc input - wp_localize_script ( PostmanViewController::POSTMAN_SCRIPT, 'postman_enc_for_password_el', '#input_enc_type_password' ); + wp_localize_script( PostmanViewController::POSTMAN_SCRIPT, 'postman_enc_for_password_el', '#input_enc_type_password' ); // these are the ids for the