Commit be2cf371 authored by Varun Sridharan's avatar Varun Sridharan

Merge pull request #68 from Negative-Network/pull_requests

Fix filtering donations by project
parents 8cd3b3b2 04cb2be3
...@@ -124,9 +124,9 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table { ...@@ -124,9 +124,9 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table {
} }
$doaction = $this->current_action(); $doaction = $this->current_action();
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'locked', 'ids', 'dproj'), wp_get_referer() );
if($doaction){ if($doaction){
$pagenum = $this->get_pagenum(); $pagenum = $this->get_pagenum();
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'locked', 'ids'), wp_get_referer() );
if ( ! $sendback ) if ( ! $sendback )
$sendback = admin_url( $parent_file ); $sendback = admin_url( $parent_file );
$sendback = add_query_arg( 'paged', $pagenum, $sendback ); $sendback = add_query_arg( 'paged', $pagenum, $sendback );
...@@ -246,6 +246,10 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table { ...@@ -246,6 +246,10 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table {
} }
} }
break; break;
case 'dproj':
$sendback = add_query_arg( array('dproj'=>$_REQUEST['dproj']), $sendback );
break;
} }
} }
...@@ -540,6 +544,9 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table { ...@@ -540,6 +544,9 @@ class WC_Quick_Donation_Listing_Table extends WP_List_Table {
if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )
return 'delete_all'; return 'delete_all';
if ( isset( $_REQUEST['dproj'] ) and $_REQUEST['dproj'] != '' )
return 'dproj';
return parent::current_action(); return parent::current_action();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment