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
* Fixed unclosed <p> tag
[lhc/web/wiklou.git]
/
includes
/
SpecialMovepage.php
diff --git
a/includes/SpecialMovepage.php
b/includes/SpecialMovepage.php
index
447eaf8
..
70c8a4f
100644
(file)
--- a/
includes/SpecialMovepage.php
+++ b/
includes/SpecialMovepage.php
@@
-63,19
+63,18
@@
class MovePageForm {
$wgOut->setPagetitle( wfMsg( 'movepage' ) );
$wgOut->setPagetitle( wfMsg( 'movepage' ) );
- if ( $this->oldTitle == '' ) {
+ $ot = Title::newFromURL( $this->oldTitle );
+ if( is_null( $ot ) ) {
$wgOut->errorpage( 'notargettitle', 'notargettext' );
return;
}
$wgOut->errorpage( 'notargettitle', 'notargettext' );
return;
}
-
- $ot = Title::newFromURL( $this->oldTitle );
$oldTitle = $ot->getPrefixedText();
$oldTitle = $ot->getPrefixedText();
- $encOldTitle = htmlspecialchars( $
this->
oldTitle );
+ $encOldTitle = htmlspecialchars( $oldTitle );
if( $this->newTitle == '' ) {
# Show the current title as a default
# when the form is first opened.
if( $this->newTitle == '' ) {
# Show the current title as a default
# when the form is first opened.
- $encNewTitle = $
o
ldTitle;
+ $encNewTitle = $
encO
ldTitle;
} else {
if( $err == '' ) {
$nt = Title::newFromURL( $this->newTitle );
} else {
if( $err == '' ) {
$nt = Title::newFromURL( $this->newTitle );
@@
-207,17
+206,11
@@
class MovePageForm {
# (2) the namespaces are not themselves talk namespaces, and of course
# (3) it exists.
if ( ( $wgRequest->getVal('wpMovetalk') == 1 ) &&
# (2) the namespaces are not themselves talk namespaces, and of course
# (3) it exists.
if ( ( $wgRequest->getVal('wpMovetalk') == 1 ) &&
- ( ! Namespace::isTalk( $ons ) ) &&
- ( ! Namespace::isTalk( $nns ) ) ) {
-
- # get old talk page namespace
- $ons = Namespace::getTalk( $ons );
- # get new talk page namespace
- $nns = Namespace::getTalk( $nns );
+ !$ot->isTalkPage() &&
+ !$nt->isTalkPage() ) {
- # make talk page title objects
- $ott = Title::makeTitle( $ons, $ot->getDBkey() );
- $ntt = Title::makeTitle( $nns, $nt->getDBkey() );
+ $ott = $ot->getTalkPage();
+ $ntt = $nt->getTalkPage();
# Attempt the move
$error = $ott->moveTo( $ntt, true, $this->reason );
# Attempt the move
$error = $ott->moveTo( $ntt, true, $this->reason );