Changeset 5132
- Timestamp:
- 03/08/2017 07:59:57 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/global.wordpress.org/public_html/wp-content/mu-plugins/roles/cross-locale-pte.php
r4929 r5132 300 300 301 301 if ( GP::$permission->current_user_can( 'cross-pte', 'translation-set', $old_translation->translation_set_id ) ) { 302 // Set to waiting if a current translation exists by another user. 303 if ( intval( $old_translation->user_id ) !== intval( get_current_user_id() ) ) { 302 // Set to waiting if a current translation exists that was approved by another user. 303 $translation_owner_id = $old_translation->user_id_last_modified ?: $old_translation->user_id; 304 if ( intval( $translation_owner_id ) !== intval( get_current_user_id() ) ) { 304 305 return 'waiting'; 305 306 } … … 402 403 if ( GP::$permission->user_can( $args['user'], 'cross-pte', 'translation-set', $translation->translation_set_id ) ) { 403 404 $current_translation = GP::$translation->find_one( array( 'translation_set_id' => $translation->translation_set_id, 'original_id' => $translation->original_id, 'status' => 'current' ) ); 404 if ( $current_translation && intval( $current_translation->user_id ) !== $args['user']->ID ) { 405 // Current translation was authored by someone else. Disallow setting to current. 406 return $current_translation_by_user[ $cache_key ] = false; 405 if ( $current_translation ) { 406 $translation_owner_id = $current_translation->user_id_last_modified ?: $current_translation->user_id; 407 if ( intval( $translation_owner_id ) !== $args['user']->ID ) { 408 // Current translation was approved by someone else. Disallow setting to current. 409 return $current_translation_by_user[ $cache_key ] = false; 410 } 407 411 } 408 412
Note: See TracChangeset
for help on using the changeset viewer.