Making WordPress.org


Ignore:
Timestamp:
11/02/2015 05:34:45 AM (9 years ago)
Author:
nacin
Message:

Trac Notifications type fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications-db.php

    r2024 r2028  
    129129    function get_trac_ticket_subscriptions( $ticket_id ) {
    130130        $by_status = array( 'blocked' => array(), 'starred' => array() );
    131         $subscriptions = $this->db->get_results( $this->db->prepare( "SELECT username, status FROM _ticket_subs WHERE ticket = %s", $ticket_id ) );
     131        $subscriptions = $this->db->get_results( $this->db->prepare( "SELECT username, status FROM _ticket_subs WHERE ticket = %d", $ticket_id ) );
    132132        foreach ( $subscriptions as $subscription ) {
    133133            $by_status[ $subscription->status ? 'starred' : 'blocked' ][] = $subscription->username;
     
    137137
    138138    function get_trac_ticket_subscription_status_for_user( $ticket_id, $username ) {
    139         $status = $this->db->get_var( $this->db->prepare( "SELECT status FROM _ticket_subs WHERE username = %s AND ticket = %s", $username, $ticket_id ) );
     139        $status = $this->db->get_var( $this->db->prepare( "SELECT status FROM _ticket_subs WHERE username = %s AND ticket = %d", $username, $ticket_id ) );
    140140        if ( null !== $status ) {
    141141            $status = (int) $status;
Note: See TracChangeset for help on using the changeset viewer.