Making WordPress.org


Ignore:
Timestamp:
11/22/2015 08:01:41 PM (9 years ago)
Author:
ocean90
Message:

Translate: Convert the GP plugin "wporg-routes" to a WP plugin.

See #1352.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes
Files:
2 copied

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/stats-overview.php

    r2108 r2109  
    55 * Provides the route for translate.wordpress.org/stats.
    66 */
    7 class GP_WPorg_Route_Stats extends GP_Route {
     7class WPorg_GP_Route_Stats extends GP_Route {
    88
    99    public function get_stats_overview() {
    10         global $gpdb;
     10        global $wpdb;
    1111
    1212        $projects = array(
     
    4141                (100 * stats.current/stats.all) as percent_complete,
    4242                stats.waiting+stats.fuzzy as waiting_strings
    43             FROM {$gpdb->prefix}project_translation_status stats
    44                 LEFT JOIN {$gpdb->prefix}projects p ON stats.project_id = p.id
     43            FROM {$wpdb->prefix}project_translation_status stats
     44                LEFT JOIN {$wpdb->prefix}projects p ON stats.project_id = p.id
    4545            WHERE
    4646                p.path IN ( $all_project_paths_sql )
    4747                AND p.active = 1";
    4848
    49         $rows = $gpdb->get_results( $sql );
     49        $rows = $wpdb->get_results( $sql );
    5050
    5151        // Split out into $[Locale][Project] = %
     
    8080                locale, locale_slug,
    8181                SUM( stats.waiting ) + SUM( stats.fuzzy ) as waiting_strings
    82             FROM {$gpdb->prefix}project_translation_status stats
    83                 LEFT JOIN {$gpdb->prefix}projects p ON stats.project_id = p.id
     82            FROM {$wpdb->prefix}project_translation_status stats
     83                LEFT JOIN {$wpdb->prefix}projects p ON stats.project_id = p.id
    8484            WHERE
    8585                p.parent_project_id IN ( $parent_project_ids )
     
    8787            GROUP BY locale, locale_slug";
    8888
    89         $rows = $gpdb->get_results( $sql );
     89        $rows = $wpdb->get_results( $sql );
    9090        foreach ( $rows as $set ) {
    9191            $locale_key = $set->locale;
Note: See TracChangeset for help on using the changeset viewer.