BUGFIX: changed $request to not return a null spaced array. Updated docs to reflect that

This commit is contained in:
Will Rossiter 2010-06-26 04:49:20 +00:00
parent a07855109f
commit 3a94574ef6

View File

@ -108,26 +108,26 @@ class DocumentationViewer extends Controller {
// count the number of parameters after the language, version are taken
// into account. This automatically includes ' ' so all the counts
// are 1 more than what you would expect
if($this->Remaining) {
$params = count(array_unique($this->Remaining));
switch($params) {
case '1':
return parent::getViewer('home');
case '2':
$paramCount = count($this->Remaining);
if($paramCount == 1) {
return parent::getViewer('folder');
default:
if($module = $this->getModule()) {
}
else if($module = $this->getModule()) {
$params = $this->Remaining;
array_shift($params);
array_shift($params); // module name
$path = implode('/', array_unique($params));
}
if(is_dir($module->getPath() . $path)) return parent::getViewer('folder');
}
}
else {
return parent::getViewer('home');
}
return parent::getViewer($action);
}