Fix #145 broken redirect from admin folder to admin module

This commit is contained in:
Kijin Sung 2016-01-22 11:53:39 +09:00
parent 0b24509356
commit 676f17fb71
2 changed files with 6 additions and 0 deletions

View file

@ -31,6 +31,7 @@ RewriteRule ^([0-9]+)$ ./index.php?document_srl=$1 [L,QSA]
# mid link
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^admin/?$ ./index.php?module=admin [L,QSA]
RewriteRule ^([a-zA-Z0-9_]+)/?$ ./index.php?mid=$1 [L,QSA]
# mid + document link
RewriteRule ^([a-zA-Z0-9_]+)/([0-9]+)$ ./index.php?mid=$1&document_srl=$2 [L,QSA]

View file

@ -63,6 +63,11 @@ class ModuleHandler extends Handler
{
$this->entry = Context::convertEncodingStr($entry);
}
if(!$this->module && $this->mid === 'admin')
{
Context::set('module', $this->module = 'admin');
Context::set('mid', $this->mid = null);
}
// Validate variables to prevent XSS
$isInvalid = NULL;