Changeset 1820
- Timestamp:
- 08/10/2015 08:16:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments/classes/payment-request.php
r1819 r1820 637 637 public function update_request_status( $post_data, $post_data_raw ) { 638 638 if ( $this->post_edit_is_actionable( $post_data ) ) { 639 640 if ( isset( $_POST['wcp_mark_incomplete_checkbox'] ) && 'on' == $_POST['wcp_mark_incomplete_checkbox'] && ! empty( $_POST['wcp_mark_incomplete_notes'] ) ) { 639 if ( $this->should_mark_request_incomplete() ) { 641 640 $post_data['post_status'] = 'incomplete'; 642 641 $this->notify_requester_request_incomplete( $post_data_raw['ID'], $post_data, $post_data_raw ); … … 655 654 656 655 /** 656 * Determine if the user wants to mark a payment request as incomplete, and if that is valid 657 * 658 * @return bool 659 */ 660 protected function should_mark_request_incomplete() { 661 $mark_incomplete = false; 662 663 if ( isset( $_POST['wcp_mark_incomplete_checkbox'] ) && 'on' == $_POST['wcp_mark_incomplete_checkbox'] && ! empty( $_POST['wcp_mark_incomplete_notes'] ) ) { 664 if ( isset( $_POST['mark_incomplete_nonce'] ) && wp_verify_nonce( $_POST['mark_incomplete_nonce'], 'mark_incomplete' ) ) { 665 if ( current_user_can( 'manage_network' ) ) { 666 $mark_incomplete = true; 667 } 668 } 669 } 670 671 return $mark_incomplete; 672 } 673 674 /** 657 675 * Notify the payment requester that it has been marked as paid. 658 676 * … … 730 748 731 749 // Verify nonces 732 $nonces = array( 'status_nonce', ' mark_incomplete_nonce', 'general_info_nonce', 'payment_details_nonce', 'vendor_details_nonce' ); // todo add prefix to all of these750 $nonces = array( 'status_nonce', 'general_info_nonce', 'payment_details_nonce', 'vendor_details_nonce' ); // todo add prefix to all of these 733 751 734 752 foreach ( $nonces as $nonce ) {
Note: See TracChangeset
for help on using the changeset viewer.