Commit Graph

14 Commits

Author SHA1 Message Date
Miguel Dantas
6d81848f25 [URLMAPPER] Fix small bug in URLMapper: a dynamic route might not exist even if a static one does 2019-09-03 03:26:35 +01:00
Diogo Cordeiro
92388e1734 [SamplePlugin] Review and update with the latest GNU social best practices 2019-08-24 01:59:40 +01:00
tenma
0716605e94 [CORE][ROUTES] Update urlmapper to search dynamic routes before static ones when generating URLs.
This solves the problem of routes that differ only in having
or not $_GET params. The ones not having params (static) were
being matched first during URL generation.

The way this problem was solved was by separating the $reverse
array in both $reverse_statics and $reverse_dynamics and explicitly
traversing this last one first in the generation function. Note that
maintaining the $reverse array and unshifting dynamic routes to its
head ( and therefore to the front of the static ones ) doesn't work
since even among dynamic routes the order of arrival should be kept.
2019-08-22 03:13:58 +01:00
brunoccast
5c0a3102ff [ROUTES] Allow accept-header specification during router creation
Router:
- Fix calls to connect, most of them were misusing the function's params

URLMapper:
- Minor fixes
- Documentation
- Add support for accept-header specification

Plugins/*:
- Fix calls to connect
2019-08-03 17:47:16 +01:00
brunoccast
2032c7c1f7 [ROUTES] PSR2-format 2019-08-03 17:31:44 +01:00
Mikael Nordfeldth
338df7e35b Fix Nickname::isSystemPath() work properly for routes 2016-02-12 02:21:11 +01:00
Mikael Nordfeldth
6834f355f2 Making ClientExceptions turn into ClientErrorAction
Got some 404s which were presented as 500
2016-01-14 02:47:28 +01:00
Mikael Nordfeldth
a03249dd99 No reason to have makeRegex protected 2015-06-12 17:15:39 +02:00
Zach Copley
0bd26ed3f0 Store a list of all paths the router knows about (backward compatibility with Net_URL_Mapper) 2011-09-15 16:58:12 -07:00
Evan Prodromou
7c03a50947 exact match for paths 2011-09-15 09:54:25 -04:00
Evan Prodromou
7c57aab44e change category on urlmapper.php 2011-09-15 09:51:33 -04:00
Evan Prodromou
601573a8a9 don't forget to add qstring to static paths 2011-09-14 16:13:54 -04:00
Evan Prodromou
a4240db48f Deal with default param patterns more effectively 2011-09-14 12:27:20 -04:00
Evan Prodromou
40924842f4 new URLMapper without Net_URL_Mapper 2011-09-14 12:15:56 -04:00