diff options
author | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2020-06-20 21:39:39 +0000 |
---|---|---|
committer | yehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664> | 2020-06-20 21:39:39 +0000 |
commit | 53b2035def91dc0fe6d8f68e4a34aca2acc79ec8 (patch) | |
tree | 03e818494b3390d3e7ed4aedac0a50f0b722f0a3 /Postman/Postman-Email-Log/PostmanEmailLogController.php | |
parent | 67430a4a94c041c57cb4043fcd05c85365ee17f5 (diff) | |
download | Post-SMTP-53b2035def91dc0fe6d8f68e4a34aca2acc79ec8.zip |
Email log improvements: Solution column, filter.
Some text clarify.
Diffstat (limited to 'Postman/Postman-Email-Log/PostmanEmailLogController.php')
-rw-r--r-- | Postman/Postman-Email-Log/PostmanEmailLogController.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Postman/Postman-Email-Log/PostmanEmailLogController.php b/Postman/Postman-Email-Log/PostmanEmailLogController.php index dd8f650..a6e5179 100644 --- a/Postman/Postman-Email-Log/PostmanEmailLogController.php +++ b/Postman/Postman-Email-Log/PostmanEmailLogController.php @@ -76,10 +76,10 @@ class PostmanEmailLogController { } function handleCsvExport() { - if ( ! empty( $_POST ) && ! wp_verify_nonce( $_REQUEST['post-smtp-log'], 'post-smtp' ) ) + if ( isset( $_REQUEST['post-smtp-log-nonce'] ) && ! wp_verify_nonce( $_REQUEST['post-smtp-log-nonce'], 'post-smtp' ) ) die( 'Security check' ); - if ( isset( $_POST['postman_export_csv'] ) && current_user_can( Postman::MANAGE_POSTMAN_CAPABILITY_LOGS ) ) { + if ( isset( $_GET['postman_export_csv'] ) && current_user_can( Postman::MANAGE_POSTMAN_CAPABILITY_LOGS ) ) { $args = array( 'post_type' => PostmanEmailLogPostType::POSTMAN_CUSTOM_POST_TYPE_SLUG, 'post_status' => PostmanEmailLogService::POSTMAN_CUSTOM_POST_STATUS_PRIVATE, @@ -411,16 +411,17 @@ class PostmanEmailLogController { </div> <?php - $from_date = isset( $_POST['from_date'] ) ? sanitize_text_field( $_POST['from_date'] ) : ''; - $to_date = isset( $_POST['to_date'] ) ? sanitize_text_field( $_POST['to_date'] ) : ''; - $search = isset( $_POST['search'] ) ? sanitize_text_field( $_POST['search'] ) : ''; + $from_date = isset( $_GET['from_date'] ) ? sanitize_text_field( $_GET['from_date'] ) : ''; + $to_date = isset( $_GET['to_date'] ) ? sanitize_text_field( $_GET['to_date'] ) : ''; + $search = isset( $_GET['search'] ) ? sanitize_text_field( $_GET['search'] ) : ''; $page_records = apply_filters( 'postman_log_per_page', array( 10, 15, 25, 50, 75, 100 ) ); - $postman_page_records = isset( $_POST['postman_page_records'] ) ? absint( $_POST['postman_page_records'] ) : ''; + $postman_page_records = isset( $_GET['postman_page_records'] ) ? absint( $_GET['postman_page_records'] ) : ''; ?> - <form id="postman-email-log-filter" method="post"> - <input type="hidden" action="post-smtp-filter" value="1"> - <?php wp_nonce_field('post-smtp', 'post-smtp-log'); ?> + <form id="postman-email-log-filter" action="<?php echo admin_url( PostmanUtils::POSTMAN_EMAIL_LOG_PAGE_RELATIVE_URL ); ?>" method="get"> + <input type="hidden" name="page" value="postman_email_log"> + <input type="hidden" name="post-smtp-filter" value="1"> + <?php wp_nonce_field('post-smtp', 'post-smtp-log-nonce'); ?> <div id="email-log-filter" class="postman-log-row"> <div class="form-control"> @@ -447,13 +448,13 @@ class PostmanEmailLogController { </select> </div> - <div class="form-control"> - <button type="submit" id="postman_export_csv" name="postman_export_csv" class="button button-primary"><?php _e( 'Export To CSV', 'post-smtp' ); ?></button> + <div class="form-control" style="padding: 0 5px 0 5px;"> + <button type="submit" name="filter" class="button button-primary"><?php _e( 'Filter/Search', 'post-smtp' ); ?></button> </div> - <div class="form-control" style="padding: 0 5px 0 5px; margin-right: 50px;"> - <button type="submit" name="filter" class="button button-primary"><?php _e( 'Filter/Search', 'post-smtp' ); ?></button> - </div> + <div class="form-control" style="padding: 0 5px 0 0px;"> + <button type="submit" id="postman_export_csv" name="postman_export_csv" class="button button-primary"><?php _e( 'Export To CSV', 'post-smtp' ); ?></button> + </div> <div class="form-control"> <button type="submit" id="postman_trash_all" name="postman_trash_all" class="button button-primary"><?php _e( 'Trash All', 'post-smtp' ); ?></button> |