Plugin Directory


Ignore:
Timestamp:
06/08/2023 11:19:05 PM (23 months ago)
Author:
levelfourstorefront
Message:

Committing version 5.4.11, check the change log for more info.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-easycart/trunk/admin/inc/wp_easycart_admin_table.php

    r2917958 r2923668  
    7676
    7777            if ( isset( $_GET['orderby'] ) && $_GET['orderby'] != '' ) {
    78                 $this->current_sort_column = sanitize_text_field( $_GET['orderby'] );
    79             }
    80             if ( isset( $_GET['order'] ) && $_GET['order'] != '' ) {
    81                 $this->current_sort_direction = sanitize_key( $_GET['order'] );
     78                $this->current_sort_column = sanitize_text_field( preg_replace( '/[^a-zA-Z0-9\_]/', $_GET['orderby'] ) );
     79            }
     80            if ( isset( $_GET['order'] ) && 'desc' == strtolower( $_GET['order'] ) ) {
     81                $this->current_sort_direction = 'desc';
     82            } else {
     83                $this->current_sort_direction = 'asc';
    8284            }
    8385            if ( isset( $_GET['pagenum'] ) && $_GET['pagenum'] != '' ) {
Note: See TracChangeset for help on using the changeset viewer.