Plugin Directory

Changeset 3063834


Ignore:
Timestamp:
04/03/2024 02:42:25 PM (23 months ago)
Author:
glotpress
Message:

Update to version 4.0.1 from GitHub

Location:
glotpress
Files:
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • glotpress/tags/4.0.1/CHANGELOG.md

    r3047175 r3063834  
    11All notable changes to this project will be documented in this file.
    22This project adheres to [Semantic Versioning](http://semver.org/).
     3
     4## [4.0.1] (April 3, 2024)
     5
     6**Bugfixes**
     7* Fix errors when URL parameters like "filter[status]" aren't strings ([#1814])
    38
    49## [4.0.0] (March 7, 2024)
     
    650655* Initial release.
    651656
    652 [Unreleased]: https://github.com/GlotPress/GlotPress/compare/4.0.0...HEAD
     657[Unreleased]: https://github.com/GlotPress/GlotPress/compare/4.0.1...HEAD
     658[4.0.1]: https://github.com/GlotPress/GlotPress/compare/4.0.0...4.0.1
    653659[4.0.0]: https://github.com/GlotPress/GlotPress/compare/4.0.0-rc.1...4.0.0
    654660[4.0.0-rc.1]: https://github.com/GlotPress/GlotPress/compare/4.0.0-beta.3...4.0.0-rc.1
     
    828834[#1786]: https://github.com/GlotPress/GlotPress/pull/1786
    829835[#1792]: https://github.com/GlotPress/GlotPress/pull/1792
     836[#1803]: https://github.com/GlotPress/GlotPress/pull/1803
     837[#1814]: https://github.com/GlotPress/GlotPress/pull/1814
     838[#1815]: https://github.com/GlotPress/GlotPress/pull/1815
     839[#1820]: https://github.com/GlotPress/GlotPress/pull/1820
     840[#1821]: https://github.com/GlotPress/GlotPress/pull/1821
     841[#1819]: https://github.com/GlotPress/GlotPress/pull/1819
     842[#1818]: https://github.com/GlotPress/GlotPress/pull/1818
     843[#1809]: https://github.com/GlotPress/GlotPress/pull/1809
     844[#1807]: https://github.com/GlotPress/GlotPress/pull/1807
     845[#1773]: https://github.com/GlotPress/GlotPress/pull/1773
  • glotpress/tags/4.0.1/glotpress.php

    r3047175 r3063834  
    44 * Plugin URI: https://wordpress.org/plugins/glotpress/
    55 * Description: GlotPress is a tool to help translators collaborate.
    6  * Version: 4.0.0
     6 * Version: 4.0.1
    77 * Requires at least: 4.6
    8  * Tested up to: 6.4
     8 * Tested up to: 6.5
    99 * Requires PHP: 7.4
    1010 * Author: the GlotPress team
     
    3030 */
    3131
    32 define( 'GP_VERSION', '4.0.0' );
     32define( 'GP_VERSION', '4.0.1' );
    3333define( 'GP_DB_VERSION', '980' );
    3434define( 'GP_CACHE_VERSION', '3.0' );
  • glotpress/tags/4.0.1/gp-includes/routes/glossary.php

    r2290426 r3063834  
    1616
    1717    public function new_get() {
    18         $glossary                     = new GP_Glossary();
    19         $glossary->translation_set_id = gp_get( 'translation_set_id' );
     18        $glossary = new GP_Glossary();
     19
     20        $translation_set_id = gp_get( 'translation_set_id' );
     21
     22        // Make sure 'translation_set_id' is a numeric string and convert to int ID. Defaults to null.
     23        $translation_set_id = is_numeric( $translation_set_id ) ? intval( $translation_set_id ) : null;
     24
     25        if ( is_null( $translation_set_id ) ) {
     26            $this->redirect_with_error( __( 'Couldn’t find translation set with this ID.', 'glotpress' ) );
     27            return;
     28        }
     29
     30        $glossary->translation_set_id = $translation_set_id;
    2031
    2132        $translation_set = $glossary->translation_set_id ? GP::$translation_set->get( $glossary->translation_set_id ) : null;
  • glotpress/tags/4.0.1/gp-includes/routes/project.php

    r2872254 r3063834  
    289289
    290290    public function new_get() {
    291         $project                    = new GP_Project();
    292         $project->active            = 1;
    293         $project->parent_project_id = gp_get( 'parent_project_id', null );
     291        $project         = new GP_Project();
     292        $project->active = 1;
     293
     294        $parent_project_id = gp_get( 'parent_project_id' );
     295
     296        // Make sure 'parent_project_id' is a numeric string and convert to int ID. Defaults to null.
     297        $project->parent_project_id = is_numeric( $parent_project_id ) ? intval( $parent_project_id ) : null;
    294298
    295299        if ( $this->cannot_and_redirect( 'write', 'project', $project->parent_project_id ) ) {
  • glotpress/tags/4.0.1/gp-includes/routes/translation-set.php

    r2290426 r3063834  
    1515class GP_Route_Translation_Set extends GP_Route_Main {
    1616    public function new_get() {
    17         $set             = new GP_Translation_Set();
    18         $set->project_id = gp_get( 'project_id' );
    19         $project         = $set->project_id ? GP::$project->get( $set->project_id ) : null;
     17        $set        = new GP_Translation_Set();
     18        $project_id = gp_get( 'project_id' );
     19
     20        // Make sure 'project_id' is a numeric string and convert to int ID. Defaults to null.
     21        $set->project_id = is_numeric( $project_id ) ? intval( $project_id ) : null;
     22
     23        $project = $set->project_id ? GP::$project->get( $set->project_id ) : null;
    2024        if ( $this->cannot_edit_set_and_redirect( $set ) ) {
    2125            return;
  • glotpress/tags/4.0.1/gp-includes/routes/translation.php

    r2943118 r3063834  
    162162        $filename = apply_filters( 'gp_export_translations_filename', $filename, $format, $locale, $project, $translation_set );
    163163
    164         $entries = GP::$translation->for_export( $project, $translation_set, gp_get( 'filters' ) );
     164        $filters = gp_get( 'filters', array() );
     165        $filters = array_filter( $filters, 'is_scalar' );
     166
     167        $entries = GP::$translation->for_export( $project, $translation_set, $filters );
    165168
    166169        if ( gp_has_translation_been_updated( $translation_set ) ) {
     
    193196
    194197        $page    = gp_get( 'page', 1 );
     198        $page    = is_numeric( $page ) ? intval( $page ) : 1;
    195199        $filters = gp_get( 'filters', array() );
     200        $filters = array_filter( $filters, 'is_scalar' );
    196201        $sort    = gp_get( 'sort', array() );
     202        $sort    = array_filter( $sort, 'is_scalar' );
    197203
    198204        if ( is_array( $sort ) && 'random' === gp_array_get( $sort, 'by' ) ) {
  • glotpress/tags/4.0.1/readme.txt

    r3047216 r3063834  
    33Tags: translation
    44Requires at least: 4.6
    5 Tested up to: 6.4.2
     5Tested up to: 6.5
    66Requires PHP: 7.4
    7 Stable tag: 4.0.0
     7Stable tag: 4.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • glotpress/trunk/CHANGELOG.md

    r3047175 r3063834  
    11All notable changes to this project will be documented in this file.
    22This project adheres to [Semantic Versioning](http://semver.org/).
     3
     4## [4.0.1] (April 3, 2024)
     5
     6**Bugfixes**
     7* Fix errors when URL parameters like "filter[status]" aren't strings ([#1814])
    38
    49## [4.0.0] (March 7, 2024)
     
    650655* Initial release.
    651656
    652 [Unreleased]: https://github.com/GlotPress/GlotPress/compare/4.0.0...HEAD
     657[Unreleased]: https://github.com/GlotPress/GlotPress/compare/4.0.1...HEAD
     658[4.0.1]: https://github.com/GlotPress/GlotPress/compare/4.0.0...4.0.1
    653659[4.0.0]: https://github.com/GlotPress/GlotPress/compare/4.0.0-rc.1...4.0.0
    654660[4.0.0-rc.1]: https://github.com/GlotPress/GlotPress/compare/4.0.0-beta.3...4.0.0-rc.1
     
    828834[#1786]: https://github.com/GlotPress/GlotPress/pull/1786
    829835[#1792]: https://github.com/GlotPress/GlotPress/pull/1792
     836[#1803]: https://github.com/GlotPress/GlotPress/pull/1803
     837[#1814]: https://github.com/GlotPress/GlotPress/pull/1814
     838[#1815]: https://github.com/GlotPress/GlotPress/pull/1815
     839[#1820]: https://github.com/GlotPress/GlotPress/pull/1820
     840[#1821]: https://github.com/GlotPress/GlotPress/pull/1821
     841[#1819]: https://github.com/GlotPress/GlotPress/pull/1819
     842[#1818]: https://github.com/GlotPress/GlotPress/pull/1818
     843[#1809]: https://github.com/GlotPress/GlotPress/pull/1809
     844[#1807]: https://github.com/GlotPress/GlotPress/pull/1807
     845[#1773]: https://github.com/GlotPress/GlotPress/pull/1773
  • glotpress/trunk/glotpress.php

    r3047175 r3063834  
    44 * Plugin URI: https://wordpress.org/plugins/glotpress/
    55 * Description: GlotPress is a tool to help translators collaborate.
    6  * Version: 4.0.0
     6 * Version: 4.0.1
    77 * Requires at least: 4.6
    8  * Tested up to: 6.4
     8 * Tested up to: 6.5
    99 * Requires PHP: 7.4
    1010 * Author: the GlotPress team
     
    3030 */
    3131
    32 define( 'GP_VERSION', '4.0.0' );
     32define( 'GP_VERSION', '4.0.1' );
    3333define( 'GP_DB_VERSION', '980' );
    3434define( 'GP_CACHE_VERSION', '3.0' );
  • glotpress/trunk/gp-includes/routes/glossary.php

    r2290426 r3063834  
    1616
    1717    public function new_get() {
    18         $glossary                     = new GP_Glossary();
    19         $glossary->translation_set_id = gp_get( 'translation_set_id' );
     18        $glossary = new GP_Glossary();
     19
     20        $translation_set_id = gp_get( 'translation_set_id' );
     21
     22        // Make sure 'translation_set_id' is a numeric string and convert to int ID. Defaults to null.
     23        $translation_set_id = is_numeric( $translation_set_id ) ? intval( $translation_set_id ) : null;
     24
     25        if ( is_null( $translation_set_id ) ) {
     26            $this->redirect_with_error( __( 'Couldn’t find translation set with this ID.', 'glotpress' ) );
     27            return;
     28        }
     29
     30        $glossary->translation_set_id = $translation_set_id;
    2031
    2132        $translation_set = $glossary->translation_set_id ? GP::$translation_set->get( $glossary->translation_set_id ) : null;
  • glotpress/trunk/gp-includes/routes/project.php

    r2872254 r3063834  
    289289
    290290    public function new_get() {
    291         $project                    = new GP_Project();
    292         $project->active            = 1;
    293         $project->parent_project_id = gp_get( 'parent_project_id', null );
     291        $project         = new GP_Project();
     292        $project->active = 1;
     293
     294        $parent_project_id = gp_get( 'parent_project_id' );
     295
     296        // Make sure 'parent_project_id' is a numeric string and convert to int ID. Defaults to null.
     297        $project->parent_project_id = is_numeric( $parent_project_id ) ? intval( $parent_project_id ) : null;
    294298
    295299        if ( $this->cannot_and_redirect( 'write', 'project', $project->parent_project_id ) ) {
  • glotpress/trunk/gp-includes/routes/translation-set.php

    r2290426 r3063834  
    1515class GP_Route_Translation_Set extends GP_Route_Main {
    1616    public function new_get() {
    17         $set             = new GP_Translation_Set();
    18         $set->project_id = gp_get( 'project_id' );
    19         $project         = $set->project_id ? GP::$project->get( $set->project_id ) : null;
     17        $set        = new GP_Translation_Set();
     18        $project_id = gp_get( 'project_id' );
     19
     20        // Make sure 'project_id' is a numeric string and convert to int ID. Defaults to null.
     21        $set->project_id = is_numeric( $project_id ) ? intval( $project_id ) : null;
     22
     23        $project = $set->project_id ? GP::$project->get( $set->project_id ) : null;
    2024        if ( $this->cannot_edit_set_and_redirect( $set ) ) {
    2125            return;
  • glotpress/trunk/gp-includes/routes/translation.php

    r2943118 r3063834  
    162162        $filename = apply_filters( 'gp_export_translations_filename', $filename, $format, $locale, $project, $translation_set );
    163163
    164         $entries = GP::$translation->for_export( $project, $translation_set, gp_get( 'filters' ) );
     164        $filters = gp_get( 'filters', array() );
     165        $filters = array_filter( $filters, 'is_scalar' );
     166
     167        $entries = GP::$translation->for_export( $project, $translation_set, $filters );
    165168
    166169        if ( gp_has_translation_been_updated( $translation_set ) ) {
     
    193196
    194197        $page    = gp_get( 'page', 1 );
     198        $page    = is_numeric( $page ) ? intval( $page ) : 1;
    195199        $filters = gp_get( 'filters', array() );
     200        $filters = array_filter( $filters, 'is_scalar' );
    196201        $sort    = gp_get( 'sort', array() );
     202        $sort    = array_filter( $sort, 'is_scalar' );
    197203
    198204        if ( is_array( $sort ) && 'random' === gp_array_get( $sort, 'by' ) ) {
  • glotpress/trunk/readme.txt

    r3047216 r3063834  
    33Tags: translation
    44Requires at least: 4.6
    5 Tested up to: 6.4.2
     5Tested up to: 6.5
    66Requires PHP: 7.4
    7 Stable tag: 4.0.0
     7Stable tag: 4.0.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.