Changeset 10479
- Timestamp:
- 12/01/2020 05:59:22 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/dotorg/trac/mentions-handler.php
r10478 r10479 13 13 14 14 $payload = json_decode( wp_unslash( $_POST['payload'] ) ); 15 16 // Debug to figure out why the incoming JSON is sometimes not able to be parsed, despite appearing to be valid.17 if ( ! $payload ) {18 slack_dm( var_export( $_POST, true ), 'dd32' );19 }20 15 21 16 require_once WP_PLUGIN_DIR . '/wporg-notifications.php'; … … 51 46 52 47 function wporg_get_trac_ticket_subscription_status( $username, $ticket ) { 48 /* 49 * TODO: This no longer works. 50 * 51 * The _ticket_subs table is no longer accessible from PHP, as Trac doesn't use MySQL accessible via HyperDB. 52 * 53 * The replacement is a HTTP API call via Trac_Notifications_API::get_trac_ticket_subscription_status_for_user( $ticket, $username ) 54 */ 55 /* 53 56 global $wpdb; 54 57 add_db_table( 'trac_core', '_ticket_subs' ); // HyperDB … … 61 64 return (int) $status; 62 65 } 66 */ 63 67 return false; 64 68 } … … 112 116 // If on Core Trac, a user is not a reporter, owner, or subscriber, subscribe them. 113 117 if ( isset( $status ) && false === $status ) { 118 /* 119 * TODO: This no longer works. 120 * 121 * The _ticket_subs table is no longer accessible from PHP, as Trac doesn't use MySQL accessible via HyperDB. 122 * 123 * Trac_Notifications_API does not have a replacement function. 124 */ 125 /* 114 126 $wpdb->insert( '_ticket_subs', array( 115 127 'username' => $username, … … 117 129 'status' => MENTIONED, 118 130 ) ); 131 */ 119 132 } 120 133
Note: See TracChangeset
for help on using the changeset viewer.