* Output the information for the external editor
*/
public function edit() {
- global $wgOut, $wgScript, $wgScriptPath, $wgServer, $wgLang;
+ global $wgOut, $wgScript, $wgScriptPath, $wgCanonicalServer, $wgLang;
$wgOut->disable();
header( 'Content-type: application/x-external-editor; charset=utf-8' );
header( 'Cache-control: no-cache' );
if( $this->mode == "file" ) {
$type = "Edit file";
$image = wfLocalFile( $this->title );
- $url = $image->getFullURL();
+ $url = $image->getCanonicalURL();
$extension = $image->getExtension();
} else {
$type = "Edit text";
- $url = $this->title->getFullURL(
+ $url = $this->title->getCanonicalURL(
array( 'action' => 'edit', 'internaledit' => 'true' ) );
# *.wiki file extension is used by some editors for syntax
# highlighting, so we follow that convention
[Process]
Type=$type
Engine=MediaWiki
-Script={$wgServer}{$wgScript}
-Server={$wgServer}
+Script={$wgCanonicalServer}{$wgScript}
+Server={$wgCanonicalServer}
Path={$wgScriptPath}
Special namespace=$special
# we'll use the application/x-external-editor interface to call
# an external diff tool like kompare, kdiff3, etc.
if ( $wgUseExternalEditor && $wgUser->getOption( 'externaldiff' ) ) {
- global $wgServer, $wgScript, $wgLang;
+ global $wgCanonicalServer, $wgScript, $wgLang;
$wgOut->disable();
header ( "Content-type: application/x-external-editor; charset=UTF-8" );
- $url1 = $this->mTitle->getFullURL( array(
+ $url1 = $this->mTitle->getCanonical( array(
'action' => 'raw',
'oldid' => $this->mOldid
) );
- $url2 = $this->mTitle->getFullURL( array(
+ $url2 = $this->mTitle->getCanonical( array(
'action' => 'raw',
'oldid' => $this->mNewid
) );
[Process]
Type=Diff text
Engine=MediaWiki
- Script={$wgServer}{$wgScript}
+ Script={$wgCanonicalServer}{$wgScript}
Special namespace={$special}
[File]
}
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
$date = wfTimestamp( TS_ISO_8601, $row->page_touched );
- $entry = $this->fileEntry( $title->getFullURL(), $date, $this->priority( $namespace ) );
+ $entry = $this->fileEntry( $title->getCanonicalURL(), $date, $this->priority( $namespace ) );
$length += strlen( $entry );
$this->write( $this->file, $entry );
// generate pages for language variants
$variants = $wgContLang->getVariants();
foreach ( $variants as $vCode ) {
if ( $vCode == $wgContLang->getCode() ) continue; // we don't want default variant
- $entry = $this->fileEntry( $title->getFullURL( '', $vCode ), $date, $this->priority( $namespace ) );
+ $entry = $this->fileEntry( $title->getCanonicalURL( '', $vCode ), $date, $this->priority( $namespace ) );
$length += strlen( $entry );
$this->write( $this->file, $entry );
}
$this->limit = array(
strlen( $this->openFile() ),
- strlen( $this->fileEntry( $title->getFullUrl(), wfTimestamp( TS_ISO_8601, wfTimestamp() ), $this->priority( $namespace ) ) ),
+ strlen( $this->fileEntry( $title->getCanonicalURL(), wfTimestamp( TS_ISO_8601, wfTimestamp() ), $this->priority( $namespace ) ) ),
strlen( $this->closeFile() )
);
}