Changeset 2530
- Timestamp:
- 02/18/2016 11:13:56 PM (9 years ago)
- Location:
- sites/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/routes/redirector.php
r1721 r2530 14 14 } 15 15 } 16 17 function redirect_index() { 18 $this->redirect( '/' ); 19 } 16 20 } -
sites/trunk/translate.wordpress.org/includes/gp-plugins/wporg-routes/wporg-routes.php
r2132 r2530 27 27 if ( gp_startswith( $request_uri, '/' . GP::$router->api_prefix . '/' ) ) { // API requests. 28 28 // Delete default routes. 29 GP::$router->remove( "/languages/$locale");29 GP::$router->remove( "/languages/$locale" ); 30 30 } else { 31 31 // Delete default routes. 32 GP::$router->remove( "/languages/$locale");33 GP::$router->remove( "/languages/$locale/$path");32 GP::$router->remove( "/languages/$locale" ); 33 GP::$router->remove( "/languages/$locale/$path" ); 34 34 35 35 // Redirect routes. 36 36 GP::$router->prepend( '/languages', array( 'GP_WPorg_Route_Redirector', 'redirect_languages' ) ); 37 37 GP::$router->prepend( "/languages/$path", array( 'GP_WPorg_Route_Redirector', 'redirect_languages' ) ); 38 GP::$router->prepend( '/projects/wp-plugins', array( 'GP_WPorg_Route_Redirector', 'redirect_index' ) ); 39 GP::$router->prepend( '/projects/wp-themes', array( 'GP_WPorg_Route_Redirector', 'redirect_index' ) ); 38 40 39 41 // Register custom routes. -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/redirector.php
r2109 r2530 7 7 class WPorg_GP_Route_Redirector extends GP_Route { 8 8 9 function redirect_languages( $path = '' ) {9 public function redirect_languages( $path = '' ) { 10 10 if ( empty( $path ) ) { 11 11 $this->redirect( '/' ); … … 14 14 } 15 15 } 16 17 public function redirect_index() { 18 $this->redirect( '/' ); 19 } 16 20 } -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/routes/wp-plugins.php
r2439 r2530 254 254 $data = []; 255 255 foreach ( $days as $day ) { 256 $data[ $day ] = array ( 'current' => 0, 'waiting' => 0, 'rejected' =>0 );256 $data[ $day ] = array_fill_keys( $status, 0 ); 257 257 foreach ( $counts as $count ) { 258 258 if ( $count->day !== $day || ! in_array( $count->status, $status ) ) { -
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/wporg-gp-routes.php
r2439 r2530 63 63 GP::$router->prepend( '/languages', array( 'WPorg_GP_Route_Redirector', 'redirect_languages' ) ); 64 64 GP::$router->prepend( "/languages/$path", array( 'WPorg_GP_Route_Redirector', 'redirect_languages' ) ); 65 GP::$router->prepend( '/projects/wp-plugins', array( 'GP_WPorg_Route_Redirector', 'redirect_index' ) ); 66 GP::$router->prepend( '/projects/wp-themes', array( 'GP_WPorg_Route_Redirector', 'redirect_index' ) ); 65 67 66 68 // Register custom routes.
Note: See TracChangeset
for help on using the changeset viewer.