Changeset 11175 for sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/rest-api/class-themes-auto-review.php
- Timestamp:
- 08/12/2021 06:54:30 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/rest-api/class-themes-auto-review.php
r10843 r11175 124 124 */ 125 125 public function update_item( $request ) { 126 if ( ! defined( 'THEME_TRACBOT_PASSWORD' ) || ! THEME_TRACBOT_PASSWORD ) { 127 return new \WP_Error( 128 'rest_error_updating_ticket', 129 __( 'Unable to locate ticket.', 'wporg-themes' ), 130 array( 'status' => \WP_Http::INTERNAL_SERVER_ERROR ) 131 ); 132 } 133 126 134 if ( ! class_exists( 'Trac' ) ) { 127 135 require_once ABSPATH . WPINC . '/class-IXR.php'; … … 137 145 $ticket = $trac_instance->ticket_get( $ticket_id ); 138 146 139 if ( ! $ticket ){147 if ( ! $ticket ) { 140 148 return new \WP_Error( 141 149 'rest_invalid_ticket', … … 147 155 $body = $request->get_body(); 148 156 149 if ( empty( $body ) ) {157 if ( empty( $body ) ) { 150 158 return new \WP_Error( 151 159 'rest_error_updating_ticket', … … 159 167 $updated_ticket = $trac_instance->ticket_update( $ticket_id, $content, [], false ); 160 168 161 if ( ! $updated_ticket ) {169 if ( ! $updated_ticket ) { 162 170 return new \WP_Error( 163 171 'rest_error_updating_ticket',
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)