dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b548c98
)
Converted WikiError to MWException so at least users can see the problem (nothing...
author
Alexandre Emsenhuber
<ialex@users.mediawiki.org>
Sun, 5 Dec 2010 13:57:07 +0000
(13:57 +0000)
committer
Alexandre Emsenhuber
<ialex@users.mediawiki.org>
Sun, 5 Dec 2010 13:57:07 +0000
(13:57 +0000)
includes/Export.php
patch
|
blob
|
history
diff --git
a/includes/Export.php
b/includes/Export.php
index
bdb9d4a
..
22d6a1f
100644
(file)
--- a/
includes/Export.php
+++ b/
includes/Export.php
@@
-130,7
+130,7
@@
class WikiExporter {
public function pageByName( $name ) {
$title = Title::newFromText( $name );
if( is_null( $title ) ) {
public function pageByName( $name ) {
$title = Title::newFromText( $name );
if( is_null( $title ) ) {
-
return new WikiError
( "Can't export invalid title" );
+
throw new MWException
( "Can't export invalid title" );
} else {
return $this->pageByTitle( $title );
}
} else {
return $this->pageByTitle( $title );
}
@@
-251,12
+251,12
@@
class WikiExporter {
# One, and only one hook should set this, and return false
if( wfRunHooks( 'WikiExporter::dumpStableQuery', array(&$tables,&$opts,&$join) ) ) {
wfProfileOut( __METHOD__ );
# One, and only one hook should set this, and return false
if( wfRunHooks( 'WikiExporter::dumpStableQuery', array(&$tables,&$opts,&$join) ) ) {
wfProfileOut( __METHOD__ );
-
return new WikiError
( __METHOD__." given invalid history dump type." );
+
throw new MWException
( __METHOD__." given invalid history dump type." );
}
} else {
# Uknown history specification parameter?
wfProfileOut( __METHOD__ );
}
} else {
# Uknown history specification parameter?
wfProfileOut( __METHOD__ );
-
return new WikiError
( __METHOD__." given invalid history dump type." );
+
throw new MWException
( __METHOD__." given invalid history dump type." );
}
# Query optimization hacks
if( $cond == '' ) {
}
# Query optimization hacks
if( $cond == '' ) {