GlotPress

Changeset 504


Ignore:
Timestamp:
06/07/2010 08:44:50 AM (16 years ago)
Author:
nbachiyski
Message:

Move more general project URL matches to the bottom, because if the slug of a translation set is a valid locale they catch more specific URLs like export-translations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gp-includes/routes.php

    r487 r504  
    7373
    7474                        "post:/$project/$locale/$dir/-bulk" => array('GP_Route_Translation', 'bulk_post'),
    75                         "get:/$project/$locale/$dir" => array('GP_Route_Translation', 'translations_get'),
    76                         "post:/$project/$locale/$dir" => array('GP_Route_Translation', 'translations_post'),
    7775                        "get:/$project/$locale/$dir/import-translations" => array('GP_Route_Translation', 'import_translations_get'),
    7876                        "post:/$project/$locale/$dir/import-translations" => array('GP_Route_Translation', 'import_translations_post'),
    7977                        "post:/$project/$locale/$dir/-discard-warning" => array('GP_Route_Translation', 'discard_warning'),
    8078                        "/$project/$locale/$dir/export-translations" => array('GP_Route_Translation', 'export_translations_get'),
    81                         // keep this one at the bottom of the project, because it will catch anything starting with project
     79                        // keep this below all URLs ending with a literal string, because it may catch one of them
     80                        "get:/$project/$locale/$dir" => array('GP_Route_Translation', 'translations_get'),
     81                        "post:/$project/$locale/$dir" => array('GP_Route_Translation', 'translations_post'),
     82                        // keep this one at the bottom of the project, because it will catch anything starting with project                     
    8283                        "/$project" => array('GP_Route_Project', 'single'),
    8384
Note: See TracChangeset for help on using the changeset viewer.