Commit cb1eb520 authored by Jamie Carl's avatar Jamie Carl

Merge remote-tracking branch 'origin/master'

parents 3c1246e3 ea00f549
Pipeline #1504 passed with stage
in 42 seconds
......@@ -109,7 +109,7 @@ abstract class REST extends \Hazaar\Controller {
foreach($doc->tag('route') as $tag){
if(!preg_match('/\(\"([\w\<\>\:\/]+)\"\s*,?\s*(.+)*\)/', $tag, $matches))
if(!preg_match('/\([\'\"]([\w\<\>\:\/]+)[\'\"]\s*,?\s*(.+)*\)/', $tag, $matches))
continue;
$versions = preg_split('/\s*,\s*/', ($doc->hasTag('version') ? $doc->tag('version')[0] : 1));
......@@ -180,6 +180,9 @@ abstract class REST extends \Hazaar\Controller {
$version = intval($matches);
if(!array_key_exists($version, $this->endpoints))
throw new \Exception('API version(' . $version . ') does not exist!', 404);
if(!($path = $matches[2]))
$path = '/';
......
......@@ -357,7 +357,7 @@ function array_build_html($array, $root = true){
*
* @return array
*/
function array_to_dot_notation($array) {
function array_to_dot_notation($array, $separator = '.') {
if(!is_array($array))
return false;
......@@ -372,7 +372,7 @@ function array_to_dot_notation($array) {
foreach($children as $childkey => $child) {
$new_key = $key . '.' . $childkey;
$new_key = $key . $separator . $childkey;
$rows[$new_key] = $child;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment