Changeset 3002 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-wp-directory.php
- Timestamp:
- 04/25/2016 03:38:34 PM (8 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc
- Files:
-
- 1 added
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-wp-directory.php
r2999 r3002 1 1 <?php 2 2 3 class WPorg_GP_Route_WP_Directory extends GP_Route { 3 namespace WordPressdotorg\GlotPress\Routes\Routes; 4 5 use DateInterval; 6 use DatePeriod; 7 use DateTime; 8 use GP_Route; 9 10 class WP_Directory extends GP_Route { 4 11 5 12 /** … … 46 53 unset( $translation_editors ); 47 54 48 foreach ( $this->get_translation_contributors_by_locale( $project->id ) as $row ) {55 foreach ( $this->get_translation_contributors_by_locale( $project->id ) as $row ) { 49 56 if ( ! isset( $contributors_by_locale[ $row->locale ] ) ) { 50 57 $contributors_by_locale[ $row->locale ] = $default_value; … … 79 86 80 87 foreach ( $sub_projects as $sub_project ) { 81 foreach ( $this->get_translation_contributors_by_locale( $sub_project ) as $row ) {88 foreach ( $this->get_translation_contributors_by_locale( $sub_project ) as $row ) { 82 89 if ( ! isset( $contributors_by_locale[ $row->locale ] ) ) { 83 90 $contributors_by_locale[ $row->locale ] = $default_value; … … 112 119 * Generates the chart data for contributors activity. 113 120 * 114 * @param GP_Project $project_idThe project.121 * @param \GP_Project $project The project. 115 122 * @return array The data to build a chart via Chartist.js. 116 123 */ … … 126 133 $project_ids = array_merge( array( $project->id ), $sub_projects ); 127 134 $translation_set_ids = $wpdb->get_col( " 128 SELECT `id` FROM {$wpdb->gp_translation_sets} WHERE `project_id` IN ( " . implode( ',', $project_ids ) . ")135 SELECT `id` FROM {$wpdb->gp_translation_sets} WHERE `project_id` IN ( " . implode( ',', $project_ids ) . ") 129 136 " ); 130 137 … … 139 146 140 147 $days = array(); 141 foreach ( $date_range as $date ) {148 foreach ( $date_range as $date ) { 142 149 $days[] = $date->format( 'Y-m-d' ); 143 150 }
Note: See TracChangeset
for help on using the changeset viewer.