Plugin Directory

Changeset 2860478


Ignore:
Timestamp:
02/05/2023 06:28:24 PM (3 years ago)
Author:
era404
Message:

Fixed issue with sorts (1:firstname,2:lastname,3:phone,4:email,5:department,...) discovered by @mskwarwsd (thank you);

Location:
stafflist/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stafflist/trunk/readme.txt

    r2847574 r2860478  
    103103
    104104== Changelog ==
     105= 3.2.1 =
     106* Fixed issue with sorts (1:firstname,2:lastname,3:phone,4:email,5:department,...) discovered by @mskwarwsd (thank you);
     107
    105108= 3.2.0 =
    106109* Fixed bug with >PHP7.4:parse_str() for Custom Labels & Messages, discovered by @eddieatwp (thank you);
  • stafflist/trunk/stafflist.php

    r2847574 r2860478  
    44Plugin URI: http://wordpress.org/plugins/stafflist/
    55Description: A super simplified staff directory tool
    6 Version: 3.2.0
     6Version: 3.2.1
    77Author: era404
    88Author URI: http://www.era404.com
     
    298298    echo "<thead id='stafflisthead'><tr>
    299299            <th><a href='{$stafflisturl}&s=last' title='Sort by Last Name A-Z' class='sort_a ".($s=='last'?'selected':'')."'><span>Ascending</span></a>
    300                 <a title='For initial sort by Last Name, use &quot;sort=1&quot; in your shortcode.'>Last Name</a>
     300                <a title='For initial sort by Last Name, use &quot;sort=2&quot; in your shortcode.'>Last Name</a>
    301301                <a href='{$stafflisturl}&s=last-' title='Sort by Last Name Z-A' class='sort_d ".($s=='last-'?'selected':'')."'><span>Descending</span></a>
    302302            </th><th>&nbsp;</th>
    303303            <th><a href='{$stafflisturl}&s=first' title='Sort by First Name Ascending' class='sort_a ".($s=='first'?'selected':'')."'><span>Ascending</span></a>
    304                 <a title='For initial sort by First Name, use &quot;sort=2&quot; in your shortcode.'>First Name</a>
     304                <a title='For initial sort by First Name, use &quot;sort=1&quot; in your shortcode.'>First Name</a>
    305305                <a href='{$stafflisturl}&s=first-' title='Sort by First Name Descending' class='sort_d ".($s=='first-'?'selected':'')."'><span>Descending</span></a>
    306306            </th><th>&nbsp;</th>
    307307            <th><a href='{$stafflisturl}&s=dept' title='Sort by Department Ascending' class='sort_a ".($s=='dept'?'selected':'')."'><span>Ascending</span></a>
    308                 <a title='For initial sort by Department, use &quot;sort=3&quot; in your shortcode.'>Department</a>
     308                <a title='For initial sort by Department, use &quot;sort=5&quot; in your shortcode.'>Department</a>
    309309                <a href='{$stafflisturl}&s=dept-' title='Sort by Department Descending' class='sort_d ".($s=='dept-'?'selected':'')."'><span>Descending</span></a>
    310310            </th><th>&nbsp;</th>
     
    630630        }
    631631        if(!$sort) $sort = $default;
     632
    632633        //check sorting for numeric
    633634        $isnumeric = ( $wpdb->get_var( "SELECT COUNT(*) FROM {$staffdb} WHERE {$sort} REGEXP '[^0-9]'" ) > 0 ? false : true);
Note: See TracChangeset for help on using the changeset viewer.