Changeset 6287 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-svn-watcher.php
- Timestamp:
- 12/19/2017 04:22:37 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-svn-watcher.php
r5449 r6287 13 13 class SVN_Watcher { 14 14 15 const SVN_URL 16 const PHP 15 const SVN_URL = 'https://plugins.svn.wordpress.org/'; 16 const PHP = '/usr/local/bin/php'; 17 17 18 18 /** … … 77 77 wp_schedule_single_event( time() + 30, 'plugin_directory_check_cronjobs' ); 78 78 79 throw new Exception( "Could not fetch plugins.svn logs: ". implode( ', ', $logs['errors'] ) );79 throw new Exception( 'Could not fetch plugins.svn logs: ' . implode( ', ', $logs['errors'] ) ); 80 80 } else { 81 81 // If the job fails again within the next minute, throw an exception (as above) … … 104 104 if ( ! isset( $plugins[ $plugin_slug ] ) ) { 105 105 $plugins[ $plugin_slug ] = array( 106 'tags_touched' => array(), // trunk is a tag too!106 'tags_touched' => array(), // trunk is a tag too! 107 107 'readme_touched' => false, // minor optimization, only parse readme i18n on readme-related commits 108 'code_touched' => false,108 'code_touched' => false, 109 109 'assets_touched' => false, 110 'revisions' => array(),110 'revisions' => array(), 111 111 ); 112 112 } … … 116 116 $plugin['revisions'][] = $log['revision']; 117 117 foreach ( $log['paths'] as $path ) { 118 $path_parts = explode( '/', trim( $path, '/' ) );118 $path_parts = explode( '/', trim( $path, '/' ) ); 119 119 120 120 if ( ! isset( $path_parts[1] ) ) { … … 140 140 $plugin['code_touched'] = true; 141 141 } 142 143 142 } 144 143 $plugin['tags_touched'] = array_unique( $plugin['tags_touched'] ); … … 168 167 wp_schedule_single_event( time() + 30, 'plugin_directory_check_cronjobs' ); 169 168 170 throw new Exception( "Unable to determine HEAD revision");169 throw new Exception( 'Unable to determine HEAD revision' ); 171 170 } 172 171 return array_keys( $log['log'] )[0]; … … 182 181 protected function get_option( $option_name ) { 183 182 global $wpdb; 183 184 184 return maybe_unserialize( $wpdb->get_var( $wpdb->prepare( 185 185 "SELECT option_value FROM $wpdb->options WHERE option_name = %s",
Note: See TracChangeset
for help on using the changeset viewer.