WordPress.org

Making WordPress.org

Changeset 909


Ignore:
Timestamp:
10/15/2014 12:58:28 PM (7 years ago)
Author:
nacin
Message:

Translate: Update Rosetta bridge to reflect new network setup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-rosetta-roles/wporg-rosetta-roles.php

    r14 r909  
    2626        $user = new BP_User( $args['user_id'] );
    2727
    28         // 78 = global.wordpress.org. Administrators on this site are considered global admins in GlotPress.
    29         if ( ! empty( $user->ros_78_capabilities ) && is_array( $user->ros_78_capabilities ) && ! empty( $user->ros_78_capabilities['administrator'] ) )
     28        // 115 = global.wordpress.org. Administrators on this site are considered global admins in GlotPress.
     29        if ( ! empty( $user->wporg_115_capabilities ) && is_array( $user->wporg_115_capabilities ) && ! empty( $user->wporg_115_capabilities['administrator'] ) )
    3030            return true;
    3131
     
    7676        if ( ! isset( $ros_blogs ) ) {
    7777            $ros_locale_assoc = $gpdb->get_results( "SELECT locale, subdomain FROM locales", OBJECT_K );
    78             $ros_blogs = $gpdb->get_results( "SELECT domain, blog_id FROM ros_blogs", OBJECT_K );
     78            // 6 = Rosetta sites
     79            $ros_blogs = $gpdb->get_results( "SELECT domain, blog_id FROM wporg_blogs WHERE site_id = 6", OBJECT_K );
    7980        }
    8081
     
    8586
    8687        if ( isset( $ros_blogs[ "$subdomain.wordpress.org" ] ) )
    87             return 'ros_' . $ros_blogs[ "$subdomain.wordpress.org" ]->blog_id . '_capabilities';
     88            return 'wporg_' . $ros_blogs[ "$subdomain.wordpress.org" ]->blog_id . '_capabilities';
    8889
    8990        return false;
Note: See TracChangeset for help on using the changeset viewer.