Plugin Directory

Changeset 2346122


Ignore:
Timestamp:
07/24/2020 02:11:29 PM (6 years ago)
Author:
chuhpl
Message:

BUGFIX: Check out list was in reverse order!
BUGFIX: Made it so that if you draft a ticket with a bad entry, you can still edit the waiting date and time, if applicable.

Location:
lendingq
Files:
23 added
4 edited

Legend:

Unmodified
Added
Removed
  • lendingq/trunk/lendingq.php

    r2334348 r2346122  
    44Plugin URI: https://wordpress.org/plugins/lendingq/
    55Description: A simple system to manage the lending of items (like hotspots) with an integrated waiting list.
    6 Version: 0.96.3
     6Version: 0.97
    77License: GPLv2 or later
    88Text Domain: lendingq
     
    956956                        $temp['w_date_nice']            = date_i18n( get_option('date_format'), $waiting_date ) . '<br>' . date_i18n( get_option('time_format'), $waiting_date );
    957957                        $temp['waiting_date']           = $waiting_date;
     958                        $hold_list['dates_nice'][$val->ID] = $waiting_date;
    958959                        $hold_list['dates'][$val->ID]   = $waiting_date;
     960                       
    959961                        $hold_list['all'][$val->ID]             = $temp;
    960962                        $hold_list[$val->post_status][$temp_it[0]->slug][$temp_loc[0]->slug][$val->ID] = $temp;
    961963                    } // END if( empty( $meta['waiting_date']) )
    962964                }
    963                 asort( $hold_list['dates'] );
    964             }
     965                arsort( $hold_list['dates'] );
     966               
     967                foreach( $hold_list['dates'] as $key => $val ) {
     968                    $waiting_date = $val;
     969                    $hold_list['dates_nice'][$key] = date_i18n( get_option('date_format'), $waiting_date ) . '<br>' . date_i18n( get_option('time_format'), $waiting_date );
     970                }
     971            }
     972           
    965973            return $hold_list;
    966974        }
     
    13231331                // date on form
    13241332                if( !is_array( $post_meta['form_date'] ) and empty( current( array_filter( $post_meta['form_date'] ) ) ) ) {
    1325                     $post_meta['form_date'] = null;
     1333                    #$post_meta['form_date'] = null;
    13261334                    $error = $error | 2**LENDINGQ_DATE_NONE;
    13271335                } else {
     
    13341342                // time on form
    13351343                if( !is_array( $post_meta['form_time'] ) and empty( current( array_filter( $post_meta['form_time'] ) ) ) ) {
    1336                     $post_meta['form_time'] = null;
     1344                    #$post_meta['form_time'] = null;
    13371345                    $error = $error | 2**LENDINGQ_TIME_NONE;
    13381346                } else {
     
    17451753                $form[$val] = ( !isset( $meta[$val] ) ) ? null : htmlspecialchars( current( array_filter( $meta[$val] ) ) );
    17461754            } // END foreach( [ 'name', 'card' ] as $val )
     1755           
    17471756            $item_list = $this::get_items();
    17481757            if( ( isset( $meta['item_id'] ) and !empty( current( array_filter( $meta['item_id'] ) ) ) ) and
  • lendingq/trunk/readme.txt

    r2334348 r2346122  
    3333
    3434== Changelog ==
     35= 0.97 =
     36* BUGFIX: Check out list was in reverse order!
     37* BUGFIX: Made it so that if you draft a ticket with a bad entry, you can still edit the waiting date and time, if applicable.
     38
    3539= 0.96.3 =
    3640* Added in Bulk Delete in stock to make pagination reset work again.
    37 * Changed how I pull meta data. Big change to the code that shouldn't do anything to the user side except make imports work.
    3841
    3942= 0.96.2 =
  • lendingq/trunk/template_check_out_list.php

    r2334348 r2346122  
    4343            #echo '<article style="-webkit-column-width: 250px; -moz-column-width: 250px; column-width: 250px;">';
    4444            echo "<div style=\"display:flex; flex-flow: row wrap;\">";
     45           
    4546            foreach( $locations as $lkey => $loc ) {
    4647                if( !empty( $filter) ) {
     
    5354                        continue;
    5455                    }
     56                   
    5557                    if( !empty( $hold_list['waiting_list'][$type_key][$lkey] ) ) {
    5658                        if( !empty( $stock['available'][$type_key][$lkey] ) ) {
     59                           
    5760                            $holds = array_slice( $hold_list['dates'], 0, count( $stock['available'][$type_key][$lkey] ), true );
    5861                        }
  • lendingq/trunk/template_post_hold.php

    r2325180 r2346122  
    9999            </tr>
    100100            <?php
    101             } elseif( $post->post_status == 'waiting_list' ) {
     101            } elseif( $post->post_status == 'waiting_list' or !empty( $form['form_date'] ) or !empty( $form['form_time'] ) ) {
    102102            ?>
    103103            <tr>
Note: See TracChangeset for help on using the changeset viewer.