- Timestamp:
- 03/30/2015 10:44:22 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/api.wordpress.org/public_html/translations/lib.php
r1218 r1466 23 23 $cache_time = 900; // 15 min 24 24 $cache_key = "$type:$domain:$version"; 25 25 26 26 $translations = wp_cache_get( $cache_key, $cache_group ); 27 27 if ( '_empty_' === $translations ) { … … 101 101 $key .= ++$i; 102 102 } 103 103 104 104 $_translations[ $key ] = $translation; 105 105 $_translations[ $key ]->english_name = $locale->english_name; … … 150 150 if ( ! $results ) { 151 151 $query = $wpdb->prepare( 152 "SELECT `version`, `updated` FROM `language_packs` WHERE `type` = %s AND `domain` = %s AND `language` = %s ",152 "SELECT `version`, `updated` FROM `language_packs` WHERE `type` = %s AND `domain` = %s AND `language` = %s AND `active` = 1", 153 153 $type, $domain, $language ); 154 154 $results = $wpdb->get_results( $query, ARRAY_A ); … … 162 162 usort( $results, 'version_compare_version_key_desc' ); 163 163 if ( $version ) { 164 $found = false; 164 $found = false; 165 165 foreach ( $results as $result ) { 166 166 if ( version_compare( $result['version'], $version, '<=' ) ) {
Note: See TracChangeset
for help on using the changeset viewer.