Changeset 3037701
- Timestamp:
- 02/19/2024 07:35:10 AM (2 years ago)
- Location:
- dashamail
- Files:
-
- 21 added
- 5 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/README.txt (added)
-
tags/1.0.4/assets (added)
-
tags/1.0.4/assets/css (added)
-
tags/1.0.4/assets/css/style.css (added)
-
tags/1.0.4/assets/img (added)
-
tags/1.0.4/assets/img/logo.png (added)
-
tags/1.0.4/assets/img/logo_big.png (added)
-
tags/1.0.4/assets/img/logo_dasha.png (added)
-
tags/1.0.4/assets/js (added)
-
tags/1.0.4/assets/js/script.js (added)
-
tags/1.0.4/assets/screenshot-1.png (added)
-
tags/1.0.4/assets/screenshot-2.png (added)
-
tags/1.0.4/assets/screenshot-3.png (added)
-
tags/1.0.4/dashamail.php (added)
-
tags/1.0.4/dshm_app (added)
-
tags/1.0.4/dshm_app/Infrastructure (added)
-
tags/1.0.4/dshm_app/Infrastructure/dshm_DashaMailAPI.php (added)
-
tags/1.0.4/dshm_app/Infrastructure/dshm_PluginActivator.php (added)
-
tags/1.0.4/dshm_app/Infrastructure/dshm_SettingsPage.php (added)
-
tags/1.0.4/dshm_app/Infrastructure/dshm_WordPressFacade.php (added)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/dashamail.php (modified) (1 diff)
-
trunk/dshm_app/Infrastructure/dshm_DashaMailAPI.php (modified) (3 diffs)
-
trunk/dshm_app/Infrastructure/dshm_PluginActivator.php (modified) (3 diffs)
-
trunk/dshm_app/Infrastructure/dshm_SettingsPage.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dashamail/trunk/README.txt
r3029241 r3037701 7 7 Tested up to: 6.4.3 8 8 Requires PHP: 7.4 9 Stable tag: 1.0. 39 Stable tag: 1.0.4 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 46 46 47 47 == Changelog == 48 = 1.0.4 - 2024-02-19 = 49 Fix corner case bug: использование защитных проверочных ключей 50 48 51 = 1.0.3 - 2024-01-31 = 49 52 Исправлена ошибка отсутствия ответа от API DashaMail -
dashamail/trunk/dashamail.php
r3029241 r3037701 3 3 * Plugin Name: DashaMail 4 4 * Description: Плагин интеграции с DashaMail 5 * Version: 1.0. 35 * Version: 1.0.4 6 6 * Requires at least: 6.2.2 7 7 * Requires PHP: 7.4 -
dashamail/trunk/dshm_app/Infrastructure/dshm_DashaMailAPI.php
r3029240 r3037701 19 19 } 20 20 21 public static function dshm_getResponseDashaMailLists($apiKey, $param = []):array{ 21 public static function dshm_getResponseDashaMailLists($apiKey, $param = []): ?array 22 { 22 23 $url = self::dshm_getURL('lists.get', $apiKey, $param); 23 24 24 25 $response = \wp_remote_get($url); 26 25 27 if (!is_wp_error($response) && is_array($response) && isset($response['body'])){ 26 28 $json = json_decode($response['body'], true); … … 28 30 } 29 31 30 return false;32 return null; 31 33 } 32 34 … … 136 138 137 139 $responceLists = self::dshm_getResponseDashaMailLists($apiKey, ['list_id' => $list]); 140 if (!$responceLists) { 141 return false; 142 } 138 143 139 144 if ($responceLists['msg']['err_code'] !== 0 || !isset($responceLists['data'][0])) { -
dashamail/trunk/dshm_app/Infrastructure/dshm_PluginActivator.php
r3012800 r3037701 113 113 $this->dshm_PrintShortcode($post->ID); 114 114 115 $html .= \wp_nonce_field('save-post-'.$post->ID, 'dshm_nonce_sp', false); 116 115 117 $userCanDeletePost = \current_user_can("delete_post", $post->ID); 116 118 $delete_text = (!\EMPTY_TRASH_DAYS) ? 'Удалить' : 'В корзину'; … … 129 131 130 132 $html .= '<div id="publishing-action"> 131 <span class="spinner"></span> 132 '.\wp_nonce_field('save-post-'.$post->ID, 'dshm_nonce_sp', false).'133 <input name="original_publish" type="hidden" id="original_publish" value="Сохранить" /> ' . \get_submit_button('Сохранить', 'primary large', 'publish', false) . '134 </div>133 <span class="spinner"></span>' 134 .'<input name="original_publish" type="hidden" id="original_publish" value="Сохранить" /> ' 135 .\get_submit_button('Сохранить', 'primary large', 'publish', false) 136 .'</div> 135 137 <div class="clear"></div>'; 136 138 … … 179 181 public function dshm_SavePostMeta($postId) 180 182 { 181 if ( !\wp_verify_nonce(\sanitize_text_field($_POST['dshm_nonce_sp']), 'save-post-'.$postId )){183 if (isset($_POST['dshm_nonce_sp']) && !\wp_verify_nonce(\sanitize_text_field($_POST['dshm_nonce_sp']), 'save-post-'.$postId )){ 182 184 return false; 183 185 } -
dashamail/trunk/dshm_app/Infrastructure/dshm_SettingsPage.php
r3012800 r3037701 267 267 268 268 function dshm_AfterSectionExportRole(){ 269 $nonce = \wp_nonce_url( $bare_url, 'dashamail_export_mass', 'dshm_nonce' );269 $nonce = \wp_nonce_url('', 'dashamail_export_mass', 'dshm_nonce' ); 270 270 return '<br/> 271 271 <a class="button button-primary button-large" href="#" id="start_export" data-nonce="' . $nonce .'">
Note: See TracChangeset
for help on using the changeset viewer.