Skip to content

Commit

Permalink
New feature : use shortest url with urlFormat path
Browse files Browse the repository at this point in the history
Dev: this replace array('survey/index', 'sid' => $survey->sid, 'lang' => App()->lang->langcode) by /$sid/lang/language
Dev: same behaviour than 2.0 or 1.92 with modrewrite=1
Dev: maybe some other default rules to add : actually surveyurl + statistics_ur + optout url (maybe partially)
Dev: need more testing ? urlFormat get not changed
  • Loading branch information
Shnoulle committed Jun 23, 2014
1 parent a93fdae commit bdfad82
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions application/config/routes.php
Expand Up @@ -18,6 +18,7 @@
$route['<_sid:\d+>/lang-<_lang:\w+[-\w]+>/*'] = "survey/index/sid/<_sid>/lang/<_lang>";
$route['<_sid:\d+>/tk-<_token:\w+>/*'] = "survey/index/sid/<_sid>/token/<_token>";
$route['<_sid:\d+>/*'] = "survey/index/sid/<_sid>";
$route['<sid:\d+>/*'] = 'survey/index';

//Admin Routes
$route['admin/index'] = "admin";
Expand All @@ -28,12 +29,16 @@
$route['admin/labels/<_action:\w+>'] = "admin/labels/index/<_action>";
$route['admin/labels/<_action:\w+>/<_lid:\d+>'] = "admin/labels/index/<_action>/<_lid>";

$route['<_controller:\w+>/<_action:\w+>'] = '<_controller>/<_action>';

//Expression Manager tests
$route['admin/expressions'] = "admin/expressions/index";

//optout
$route['optout/<_sid:\d+>/(:any)/(:any)'] = "optout/index/<_sid>/$2/$3";
$route['optout/<surveyid:\d+>/*'] = "optout/index";

//Public statitics
$route['statistics_user/<surveyid:\d+>/*'] = "statistics_user/action";

$route['<_controller:\w+>/<_action:\w+>'] = '<_controller>/<_action>';

return $route;
return $route;

0 comments on commit bdfad82

Please sign in to comment.