Skip to content

Commit

Permalink
Fix using alias for wiki article
Browse files Browse the repository at this point in the history
  • Loading branch information
itismadness committed Aug 15, 2021
1 parent 9b577e3 commit da55641
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sections/wiki/article.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$ArticleID = false;
if (!empty($_GET['id']) && is_number($_GET['id'])) { //Visiting article via ID
$ArticleID = (int)$_GET['id'];
} elseif ($_GET['name'] != '') { //Retrieve article ID via alias.
} elseif ($_GET['name'] !== '') { //Retrieve article ID via alias.
$ArticleID = $wikiMan->alias($_GET['name']);
} else { //No ID, No Name
error('Unknown article ['.display_str($_GET['id']).']');
Expand Down
2 changes: 1 addition & 1 deletion sections/wiki/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function class_list($Selected = 0) {
require_once('wiki_browse.php');
break;
case 'article':
if (!isset($_GET['id'])) {
if (!isset($_GET['id']) && !isset($_GET['name'])) {
$_GET['id'] = INDEX_WIKI_PAGE_ID;
}
require_once('article.php');
Expand Down

0 comments on commit da55641

Please sign in to comment.