Skip to content

Commit

Permalink
add first regex for enabling dashes (-)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzenz Hersche committed Jun 6, 2018
1 parent 7d500ee commit a5428ac
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,27 +150,34 @@
SimpleRouter::get($basePath."channel/{channelName?}", function ($channelName = '') {
$_GET['channelName'] = $channelName;
require_once 'view/channel.php';
});
},['defaultParameterRegex' => '[\w\-]+']);
SimpleRouter::get($basePath."cat/{catName?}", function ($catName = '') {
$_GET['catName'] = $catName;
require_once 'view/index.php';
});
},['defaultParameterRegex' => '[\w\-]+']);
SimpleRouter::get($basePath."upload", function () {
require_once 'view/mini-upload-form/index.php';
});


SimpleRouter::get($basePath."cat/{catName}/video/{videoName?}", function ($catName,$videoName = '') {
$_GET['catName'] = $catName;
$_GET['videoName'] = $videoName;
require_once 'view/index.php';
},['defaultParameterRegex' => '[\w\-]+']);

SimpleRouter::get($basePath."cat/{catName?}", function ($catName = '') {
$_GET['catName'] = $catName;
require_once 'view/index.php';
});
},['defaultParameterRegex' => '[\w\-]+']);
SimpleRouter::get($basePath."video/{videoName?}", function ($videoName = '') {
$_GET['videoName'] = $videoName;
require_once 'view/index.php';
});
},['defaultParameterRegex' => '[\w\-]+']);
SimpleRouter::get($basePath."v/{videoName?}", function ($videoName = '') {
$_GET['v'] = $videoName;
require_once 'view/index.php';
});
},['defaultParameterRegex' => '[\w\-]+']);

// if it's used external, by encoder or so
SimpleRouter::post($basePath."login", function() {
Expand Down

0 comments on commit a5428ac

Please sign in to comment.