WordPress.org

Plugin Directory

Changeset 1758150


Ignore:
Timestamp:
11/03/17 17:37:54 (4 months ago)
Author:
DBAR Productions
Message:

Version 2.2.3

Location:
pta-volunteer-sign-up-sheets/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pta-volunteer-sign-up-sheets/trunk/classes/data.php

    r1749580 r1758150  
    115115            ORDER BY $order_by $order, id DESC 
    116116        "; 
    117         $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $trash, $this->now)); 
     117        if($active_only) { 
     118            $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $trash, $this->now)); 
     119        } else { 
     120            $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $trash)); 
     121        } 
     122         
    118123        $results = $this->stripslashes_full($results); 
    119124        // Hide incomplete sheets (no tasks) from public 
     
    282287        } 
    283288        $SQL .= "ORDER BY position, id"; 
    284         $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $sheet_id, $date)); 
     289        if ('' != $date ) { 
     290            $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $sheet_id, $date)); 
     291        } else { 
     292            $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $sheet_id)); 
     293        } 
     294         
    285295        $results = $this->stripslashes_full($results); 
    286296        return $results; 
     
    329339        } 
    330340        $SQL .= " ORDER by id"; 
    331         $results = $this->wpdb->get_results($this->wpdb->prepare($SQL , $task_id, $date)); 
     341        if ('' != $date) { 
     342            $results = $this->wpdb->get_results($this->wpdb->prepare($SQL , $task_id, $date)); 
     343        } else { 
     344            $results = $this->wpdb->get_results($this->wpdb->prepare($SQL , $task_id)); 
     345        } 
     346         
    332347        $results = $this->stripslashes_full($results); 
    333348        return $results; 
     
    552567            $SQL .= " AND $signup_table.date = %s "; 
    553568        } 
    554         $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $id, $this->now, $date)); 
     569        if( '' != $date ) { 
     570            $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $id, $this->now, $date)); 
     571        } else { 
     572            $results = $this->wpdb->get_results($this->wpdb->prepare($SQL, $id, $this->now)); 
     573        } 
     574         
    555575        $count = 0; 
    556576        foreach ($results as $result) { 
     
    625645        } 
    626646        $sql .= " ORDER BY signup_date, time_start"; 
    627         $safe_sql = $this->wpdb->prepare($sql, $user_id, $this->now); 
     647        if(!$show_expired) { 
     648            $safe_sql = $this->wpdb->prepare($sql, $user_id, $this->now); 
     649        } else { 
     650            $safe_sql = $this->wpdb->prepare($sql, $user_id); 
     651        } 
    628652        $results = $this->wpdb->get_results($safe_sql); 
    629653        $results = $this->stripslashes_full($results); 
     
    658682        } 
    659683        $sql .= " ORDER BY signup_date, time_start"; 
    660         $safe_sql = $this->wpdb->prepare($sql, $firstname, $lastname, $sheet_id, $date); 
     684        if($date) { 
     685            $safe_sql = $this->wpdb->prepare($sql, $firstname, $lastname, $sheet_id, $date); 
     686        } else { 
     687            $safe_sql = $this->wpdb->prepare($sql, $firstname, $lastname, $sheet_id); 
     688        } 
    661689        $results = $this->wpdb->get_results($safe_sql); 
    662690        $results = $this->stripslashes_full($results); 
     
    691719        } 
    692720        $sql .= " ORDER BY signup_date, time_start"; 
    693         $safe_sql = $this->wpdb->prepare($sql, $firstname, $lastname, $date); 
     721        if($date) { 
     722            $safe_sql = $this->wpdb->prepare($sql, $firstname, $lastname, $date); 
     723        } else { 
     724            $safe_sql = $this->wpdb->prepare($sql, $firstname, $lastname); 
     725        } 
     726         
    694727        $results = $this->wpdb->get_results($safe_sql); 
    695728        $results = $this->stripslashes_full($results); 
  • pta-volunteer-sign-up-sheets/trunk/pta-volunteer-sign-up-sheets.php

    r1749580 r1758150  
    44Plugin URI: http://wordpress.org/plugins/pta-volunteer-sign-up-sheets 
    55Description: Volunteer sign-up sheet manager 
    6 Version: 2.2.2 
     6Version: 2.2.3 
    77Author: Stephen Sherrard 
    88Author URI: https://stephensherrardplugins.com 
     
    1919 
    2020if (!defined('PTA_VOLUNTEER_SUS_VERSION_NUM')) 
    21     define('PTA_VOLUNTEER_SUS_VERSION_NUM', '2.2.2'); 
     21    define('PTA_VOLUNTEER_SUS_VERSION_NUM', '2.2.3'); 
    2222 
    2323add_option(PTA_VOLUNTEER_SUS_VERSION_KEY, PTA_VOLUNTEER_SUS_VERSION_NUM); 
  • pta-volunteer-sign-up-sheets/trunk/readme.txt

    r1749580 r1758150  
    44Tags: Volunteer,Sign Up, Events 
    55Requires at least: 3.3 
    6 Tested up to: 4.8.2 
     6Tested up to: 4.8.3 
    77Stable tag: trunk 
    88 
     
    114114 
    115115== Changelog == 
     116**Version 2.2.3** 
     117*   Updated database prepare queries to eliminate new WordPress notices in WP 4.8.3 when passing in a date value that may not be used in the SQL query. 
     118 
    116119**Version 2.2.2** 
    117120*   Added "Prevent Global Overlapping Signups" option to prevent users from signing up for tasks on the same date with overlapping times. As opposed to the per sheet option, this will check ALL user signups across ALL sheets and, when enabled, will always check for overlaps, regardless of the per sheet setting. 
Note: See TracChangeset for help on using the changeset viewer.