dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add check for page existence
[lhc/web/wiklou.git]
/
maintenance
/
view.php
diff --git
a/maintenance/view.php
b/maintenance/view.php
index
952b825
..
b75fe5b
100644
(file)
--- a/
maintenance/view.php
+++ b/
maintenance/view.php
@@
-39,6
+39,10
@@
class ViewCLI extends Maintenance {
$title = Title::newFromText( $this->getArg() );
if ( !$title ) {
$this->fatalError( "Invalid title" );
$title = Title::newFromText( $this->getArg() );
if ( !$title ) {
$this->fatalError( "Invalid title" );
+ } elseif ( $title->isSpecialPage() ) {
+ $this->fatalError( "Special Pages not supported" );
+ } elseif ( !$title->exists() ) {
+ $this->fatalError( "Page does not exist" );
}
$page = WikiPage::factory( $title );
}
$page = WikiPage::factory( $title );