diff options
author | Mario <mario@mariovavti.com> | 2019-03-05 09:40:45 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-03-05 09:40:45 +0100 |
commit | ccdbec619c5ca26b255797465ce4d0da50a66df9 (patch) | |
tree | 44c905caea3cb9f2e7f5454e4ff5b189a79b0b4c /Zotlabs/Lib/Api_router.php | |
parent | e074d02714db4722384431e68bb8c26d3b3caf99 (diff) | |
parent | 47001c33039e6915f12b95a3e948caae6cf21d41 (diff) | |
download | volse-hubzilla-ccdbec619c5ca26b255797465ce4d0da50a66df9.tar.gz volse-hubzilla-ccdbec619c5ca26b255797465ce4d0da50a66df9.tar.bz2 volse-hubzilla-ccdbec619c5ca26b255797465ce4d0da50a66df9.zip |
Merge branch 'dev' into 'dev'
assorted minor fixes from downstream
See merge request hubzilla/core!1540
Diffstat (limited to 'Zotlabs/Lib/Api_router.php')
-rw-r--r-- | Zotlabs/Lib/Api_router.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Api_router.php b/Zotlabs/Lib/Api_router.php index 404678bd9..6e3f231a9 100644 --- a/Zotlabs/Lib/Api_router.php +++ b/Zotlabs/Lib/Api_router.php @@ -12,8 +12,16 @@ class Api_router { } static function find($path) { - if(array_key_exists($path,self::$routes)) + if (array_key_exists($path,self::$routes)) { return self::$routes[$path]; + } + + $with_params = dirname($path) . '/[id]'; + + if (array_key_exists($with_params,self::$routes)) { + return self::$routes[$with_params]; + } + return null; } |