Making WordPress.org

Changeset 4348


Ignore:
Timestamp:
11/11/2016 10:48:25 AM (8 years ago)
Author:
ocean90
Message:

Translate: Store current time when a language pack is built.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-customizations/inc/cli/class-language-pack.php

    r4325 r4348  
    6363     *
    6464     * Examples:
    65      *   wp --url=translate.wordpress.org wporg-translate language-pack generate plugin nothing-much
    66      *   wp --url=translate.wordpress.org wporg-translate language-pack generate plugin nothing-much --locale=de
     65     *   wp @translate wporg-translate language-pack generate plugin nothing-much
     66     *   wp @translate wporg-translate language-pack generate plugin nothing-much --locale=de
    6767     *
    6868     * @param string $slug Slug of the plugin.
     
    141141     *
    142142     * Examples:
    143      *   wp --url=translate.wordpress.org wporg-translate language-pack generate theme twentyeleven
    144      *   wp --url=translate.wordpress.org wporg-translate language-pack generate theme twentyeleven --locale=de
     143     *   wp @translate wporg-translate language-pack generate theme twentyeleven
     144     *   wp @translate wporg-translate language-pack generate theme twentyeleven --locale=de
    145145     *
    146146     * @param string $slug Slug of the theme.
     
    439439        }
    440440
     441        $now = current_time( 'mysql', 1 );
    441442        $inserted = $wpdb->insert( 'language_packs', [
    442             'type'     => $type,
    443             'domain'   => $domain,
    444             'language' => $language,
    445             'version'  => $version,
    446             'updated'  => $updated,
    447             'active'   => 1,
     443            'type'          => $type,
     444            'domain'        => $domain,
     445            'language'      => $language,
     446            'version'       => $version,
     447            'updated'       => $updated,
     448            'active'        => 1,
     449            'date_added'    => $now,
     450            'date_modified' => $now,
    448451        ] );
    449452
     
    452455        }
    453456
    454         // Set old language packs for the same version as inactive.
     457        // Mark old language packs for the same version as inactive.
    455458        $wpdb->query( $wpdb->prepare(
    456             'UPDATE language_packs SET active = 0 WHERE type = %s AND domain = %s AND language = %s AND version = %s AND id <> %d',
     459            'UPDATE language_packs SET active = 0, date_modified = %s WHERE type = %s AND domain = %s AND language = %s AND version = %s AND id <> %d',
     460            $now,
    457461            $type,
    458462            $domain,
Note: See TracChangeset for help on using the changeset viewer.