Making WordPress.org

Changeset 2028


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

Trac Notifications type fixes.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications
Files:
2 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;
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/trac-notifications/trac-notifications-http-server.php

    r2027 r2028  
    1616    function serve( $method, $secret, $arguments ) {
    1717        if ( ! method_exists( 'Trac_Notifications_DB', $method ) || $method[0] === '_' ) {
    18             exit( 'null' );
     18            exit;
    1919        }
    2020
    2121        if ( $secret !== $this->secret ) {
    22             exit( 'null' );
     22            exit;
    2323        }
    2424
     
    3030
    3131        echo json_encode( $result );
    32         die;
     32        exit;
    3333    }
    3434}
Note: See TracChangeset for help on using the changeset viewer.