WordPress.org

Plugin Directory

Changeset 1597911


Ignore:
Timestamp:
02/17/17 10:57:07 (5 months ago)
Author:
anmari
Message:

alpha navigation fix

Location:
amr-users/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • amr-users/trunk/amr-users.php

    r1586440 r1597911  
    66Description: Configurable users listings by meta keys and values, comment count and post count. Includes  display, inclusion, exclusion, sorting configuration and an option to export to CSV. If you found this useful, please <a href="http://wordpress.org/extend/plugins/amr-users/">  or rate it</a>, or write a post. 
    77Author: anmari 
    8 Version: 4.2 
     8Version: 4.3 
    99Text Domain: amr-users 
    1010Domain Path: /languages 
     
    5252        [headings]  (in html) 
    5353*/ 
    54 define ('AUSERS_VERSION', '4.2'); 
     54define ('AUSERS_VERSION', '4.3'); 
    5555define( 'AUSERS_URL', plugin_dir_url( __FILE__ ) ); 
    5656define ('AUSERS_DIR', plugin_dir_path( __FILE__ )  ); 
  • amr-users/trunk/includes/ameta-building.php

    r1586440 r1597911  
    884884        else return false; 
    885885} 
    886 /* -----------------------------------------------------------------------------------*/ 
     886 
  • amr-users/trunk/includes/ameta-includes.php

    r1586440 r1597911  
    174174        else $iline[$colno] = $is; 
    175175    } 
    176     if (! empty($aopt['list'][$amr_current_list]['grouping'] )) {// if we are doing grouping 
    177         $grouping_field = $aopt['list'][$amr_current_list]['grouping'][1]; 
    178         $iline [99999] = $grouping_field; 
    179     } 
     176 
     177    // 20170217 index must come before grouping, not just numerically                                                            
    180178    if (! empty($amain['customnav'][$amr_current_list] )) {// if we are doing custom navigation, need to record the index 
    181179        //if (!isset($aopt['list'][$amr_current_list]['selected']['index'])) { 
     
    184182    }    
    185183     
     184    if (! empty($aopt['list'][$amr_current_list]['grouping'] )) {// if we are doing grouping 
     185        $grouping_field = $aopt['list'][$amr_current_list]['grouping'][1]; 
     186        $iline [99999] = $grouping_field; 
     187    }    
    186188    //$iline = array_unique($iline);    // why do we need this ? 
    187189    // what happens if grouping field also in use ? #20150106 
    188190    // this is messing up the use of ID #20170201 
     191    // Not anymore #2017017 ID seems to be ok now 
    189192 
    190193    return ($iline); 
  • amr-users/trunk/includes/ameta-list.php

    r1586440 r1597911  
    141141function amr_convert_indices ($lineitems, $icols) { 
    142142 
    143         //if (WP_DEBUG) {echo '<br/>before convert csv:'; var_dump($icols);} 
     143        //if (WP_DEBUG) {echo '<br/>before convert csv:<br />'; var_dump($icols);} 
    144144 
    145145        foreach ($icols as $ic => $c) {  
     
    540540                $cols = str_getcsv( $headinglines[1]['csvcontent'], ',','"','\\'); 
    541541 
    542         //  var_dump($icols); 
     542            //var_dump($icols); 
    543543        // 20170201  
    544544            //$icols = array_unique($icols);    //since may end up with two indices, eg if filtering and grouping by same value  
    545             // but loses the id if is being shown, so do the count comparision below, if cols has more, then they are the extra indices on the end 
     545            // but loses the id if is being shown, so do the count comparision below, if cols has more, then they are the extra indices on the end. 
     546            //20170217 BUT WE still need them ? so why did we do this? 
    546547            $ic = count($icols); 
    547548            $cc = count($cols); 
    548549            if ($cc < $ic) {  // we have indices in icols 
    549                 $icols = array_slice ($icols, 0, $cc); 
    550             } 
    551  
    552         //  IF (WP_DEBUG) {echo '<br />'; var_dump($icols);} 
     550                //$icols = array_slice ($icols, 0, $cc); 
     551            } 
    553552             
    554553            $fetch_amount = $rowsperpage;  // default 
     
    681680                            else { 
    682681                                //if (WP_DEBUG) {echo '<br />Filter: '; 
    683                                 //  var_dump($line[$fcol]);var_dump($value);} 
     682                                    //var_dump($line[$fcol]);var_dump($value);} 
    684683                                if (!amr_does_filter_match ($value, $line[$fcol]) ) { 
    685684                                // 20140305 - GET RID OF Fuzzy matching, testted both comma separated and comma space separated - working!! 
  • amr-users/trunk/includes/ausers-pluggable.php

    r1586440 r1597911  
    764764            unset ($cols[0]); 
    765765        } 
    766              
     766         
     767        //20170217 we still need these for situation when someone has chosen to display index and we have alpha navigation 
    767768        $icols = array_unique($icols);  // since may end up with two indices, eg if filtering and grouping by same value     
    768769                 
    769770        foreach ($icols as $i=> $col) {    
    770             if (($col == 'index')) {  // we only saved the index so that we can access extra info on display - we don't want to display it   
     771            if (($col == 'index')) {  // we only saved the index so that we can access extra info on display - we don't want to display it , unless we do ;)  
    771772                if (!isset($aopt['list'][$amr_current_list]['selected']['index'])) { 
    772773                    unset ($icols[$i]); 
    773774                    unset ($cols[$i]); 
    774                 }    
     775                } 
    775776            } 
    776777            else { 
  • amr-users/trunk/readme.txt

    r1586440 r1597911  
    44Tags: user, users, reports, lists, members, membership, authors, csv, export, search 
    55 
    6 Version: 4.2 
     6Version: 4.3 
    77 
    88Requires at least: 2.7  
     
    5050 
    5151== Changelog == 
     52= 4.3 = 
     53*  Fixed: a recent fix broke alpha navigation querying.  Tricky to debug and still keep possibility to have alpha nav and grouping working at same time as possibly also displaying the fields being used. Various combinations of settings tested and I believe the combinations work now.  Thanks to klaus_hh for flagging this. 
     54 
    5255= 4.2 = 
    5356*  Fixed: small bug where if using 'direct query' in network admin with amr-users-multisite, then only main site users were selected instead of all users in multisite.  If not in network admin then only the 'site' users are selected. 
Note: See TracChangeset for help on using the changeset viewer.