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:
16e540e
)
Make the PROTO_ parameter to wfExpandUrl() explicit in all calls. There are now no...
author
Roan Kattouw
<catrope@users.mediawiki.org>
Fri, 19 Aug 2011 15:46:08 +0000
(15:46 +0000)
committer
Roan Kattouw
<catrope@users.mediawiki.org>
Fri, 19 Aug 2011 15:46:08 +0000
(15:46 +0000)
includes/FileDeleteForm.php
patch
|
blob
|
history
includes/OutputPage.php
patch
|
blob
|
history
includes/actions/RevertAction.php
patch
|
blob
|
history
includes/api/ApiParse.php
patch
|
blob
|
history
includes/api/ApiQuery.php
patch
|
blob
|
history
includes/api/ApiQueryIWLinks.php
patch
|
blob
|
history
includes/api/ApiQueryImageInfo.php
patch
|
blob
|
history
includes/api/ApiQueryInfo.php
patch
|
blob
|
history
includes/api/ApiQueryLangLinks.php
patch
|
blob
|
history
includes/api/ApiQuerySiteinfo.php
patch
|
blob
|
history
includes/api/ApiRsd.php
patch
|
blob
|
history
diff --git
a/includes/FileDeleteForm.php
b/includes/FileDeleteForm.php
index
54c19f0
..
515768f
100644
(file)
--- a/
includes/FileDeleteForm.php
+++ b/
includes/FileDeleteForm.php
@@
-256,7
+256,7
@@
class FileDeleteForm {
wfEscapeWikiText( $this->title->getText() ),
$wgLang->date( $this->getTimestamp(), true ),
$wgLang->time( $this->getTimestamp(), true ),
wfEscapeWikiText( $this->title->getText() ),
$wgLang->date( $this->getTimestamp(), true ),
$wgLang->time( $this->getTimestamp(), true ),
- wfExpandUrl( $this->file->getArchiveUrl( $this->oldimage ) ) );
+ wfExpandUrl( $this->file->getArchiveUrl( $this->oldimage )
, PROTO_CURRENT
) );
} else {
return wfMsgExt(
$message,
} else {
return wfMsgExt(
$message,
diff --git
a/includes/OutputPage.php
b/includes/OutputPage.php
index
33e4bbd
..
0a6af95
100644
(file)
--- a/
includes/OutputPage.php
+++ b/
includes/OutputPage.php
@@
-1812,7
+1812,7
@@
class OutputPage extends ContextSource {
if ( $this->mRedirect != '' ) {
# Standards require redirect URLs to be absolute
if ( $this->mRedirect != '' ) {
# Standards require redirect URLs to be absolute
- $this->mRedirect = wfExpandUrl( $this->mRedirect );
+ $this->mRedirect = wfExpandUrl( $this->mRedirect
, PROTO_CURRENT
);
if( $this->mRedirectCode == '301' || $this->mRedirectCode == '303' ) {
if( !$wgDebugRedirects ) {
$message = HttpStatus::getMessage( $this->mRedirectCode );
if( $this->mRedirectCode == '301' || $this->mRedirectCode == '303' ) {
if( !$wgDebugRedirects ) {
$message = HttpStatus::getMessage( $this->mRedirectCode );
@@
-2822,8
+2822,8
@@
$templates
} else {
$tags[] = Html::element( 'link', array(
'rel' => 'canonical',
} else {
$tags[] = Html::element( 'link', array(
'rel' => 'canonical',
- 'href' =>
wfExpandUrl( $this->getTitle()->getFullURL(), PROTO_HTTP )
)
- );
+ 'href' =>
$this->getTitle()->getCanonicalUrl(
)
+ )
)
;
}
}
}
}
diff --git
a/includes/actions/RevertAction.php
b/includes/actions/RevertAction.php
index
815606d
..
bcb8cd8
100644
(file)
--- a/
includes/actions/RevertAction.php
+++ b/
includes/actions/RevertAction.php
@@
-96,7
+96,9
@@
class RevertFileAction extends FormAction {
'raw' => true,
'default' => wfMsgExt( 'filerevert-intro', 'parse', $this->getTitle()->getText(),
$this->getLang()->date( $timestamp, true ), $this->getLang()->time( $timestamp, true ),
'raw' => true,
'default' => wfMsgExt( 'filerevert-intro', 'parse', $this->getTitle()->getText(),
$this->getLang()->date( $timestamp, true ), $this->getLang()->time( $timestamp, true ),
- wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ) ) )
+ wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
+ PROTO_CURRENT
+ ) )
),
'comment' => array(
'type' => 'text',
),
'comment' => array(
'type' => 'text',
@@
-119,7
+121,9
@@
class RevertFileAction extends FormAction {
$this->getOutput()->addHTML( wfMsgExt( 'filerevert-success', 'parse', $this->getTitle()->getText(),
$this->getLang()->date( $timestamp, true ),
$this->getLang()->time( $timestamp, true ),
$this->getOutput()->addHTML( wfMsgExt( 'filerevert-success', 'parse', $this->getTitle()->getText(),
$this->getLang()->date( $timestamp, true ),
$this->getLang()->time( $timestamp, true ),
- wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ) ) ) );
+ wfExpandUrl( $this->page->getFile()->getArchiveUrl( $this->getRequest()->getText( 'oldimage' ) ),
+ PROTO_CURRENT
+ ) ) );
$this->getOutput()->returnToMain( false, $this->getTitle() );
}
$this->getOutput()->returnToMain( false, $this->getTitle() );
}
diff --git
a/includes/api/ApiParse.php
b/includes/api/ApiParse.php
index
8f95d2e
..
d963f8c
100644
(file)
--- a/
includes/api/ApiParse.php
+++ b/
includes/api/ApiParse.php
@@
-361,7
+361,7
@@
class ApiParse extends ApiBase {
$entry['lang'] = $bits[0];
if ( $title ) {
$entry['lang'] = $bits[0];
if ( $title ) {
- $entry['url'] = wfExpandUrl( $title->getFullURL() );
+ $entry['url'] = wfExpandUrl( $title->getFullURL()
, PROTO_CURRENT
);
}
$this->getResult()->setContent( $entry, $bits[1] );
$result[] = $entry;
}
$this->getResult()->setContent( $entry, $bits[1] );
$result[] = $entry;
@@
-443,7
+443,7
@@
class ApiParse extends ApiBase {
$title = Title::newFromText( "{$prefix}:{$title}" );
if ( $title ) {
$title = Title::newFromText( "{$prefix}:{$title}" );
if ( $title ) {
- $entry['url'] = wfExpandUrl( $title->getFullURL() );
+ $entry['url'] = wfExpandUrl( $title->getFullURL()
, PROTO_CURRENT
);
}
$this->getResult()->setContent( $entry, $title->getFullText() );
}
$this->getResult()->setContent( $entry, $title->getFullText() );
diff --git
a/includes/api/ApiQuery.php
b/includes/api/ApiQuery.php
index
696b516
..
5279db9
100644
(file)
--- a/
includes/api/ApiQuery.php
+++ b/
includes/api/ApiQuery.php
@@
-374,7
+374,7
@@
class ApiQuery extends ApiBase {
);
if ( $this->iwUrl ) {
$title = Title::newFromText( $rawTitleStr );
);
if ( $this->iwUrl ) {
$title = Title::newFromText( $rawTitleStr );
- $item['url'] = wfExpandUrl( $title->getFullURL() );
+ $item['url'] = wfExpandUrl( $title->getFullURL()
, PROTO_CURRENT
);
}
$intrwValues[] = $item;
}
}
$intrwValues[] = $item;
}
diff --git
a/includes/api/ApiQueryIWLinks.php
b/includes/api/ApiQueryIWLinks.php
index
9a18e30
..
569f36f
100644
(file)
--- a/
includes/api/ApiQueryIWLinks.php
+++ b/
includes/api/ApiQueryIWLinks.php
@@
-112,7
+112,7
@@
class ApiQueryIWLinks extends ApiQueryBase {
if ( $params['url'] ) {
$title = Title::newFromText( "{$row->iwl_prefix}:{$row->iwl_title}" );
if ( $title ) {
if ( $params['url'] ) {
$title = Title::newFromText( "{$row->iwl_prefix}:{$row->iwl_title}" );
if ( $title ) {
- $entry['url'] = wfExpandUrl( $title->getFullURL() );
+ $entry['url'] = wfExpandUrl( $title->getFullURL()
, PROTO_CURRENT
);
}
}
}
}
diff --git
a/includes/api/ApiQueryImageInfo.php
b/includes/api/ApiQueryImageInfo.php
index
1f91156
..
03e11b7
100644
(file)
--- a/
includes/api/ApiQueryImageInfo.php
+++ b/
includes/api/ApiQueryImageInfo.php
@@
-348,7
+348,7
@@
class ApiQueryImageInfo extends ApiQueryBase {
if ( !is_null( $thumbParams ) ) {
$mto = $file->transform( $thumbParams );
if ( $mto && !$mto->isError() ) {
if ( !is_null( $thumbParams ) ) {
$mto = $file->transform( $thumbParams );
if ( $mto && !$mto->isError() ) {
- $vals['thumburl'] = wfExpandUrl( $mto->getUrl() );
+ $vals['thumburl'] = wfExpandUrl( $mto->getUrl()
, PROTO_CURRENT
);
// bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
// thumbnail sizes for the thumbnail actual size
// bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
// thumbnail sizes for the thumbnail actual size
@@
-370,8
+370,8
@@
class ApiQueryImageInfo extends ApiQueryBase {
$vals['thumberror'] = $mto->toText();
}
}
$vals['thumberror'] = $mto->toText();
}
}
- $vals['url'] = wfExpandUrl( $file->getFullURL() );
- $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl() );
+ $vals['url'] = wfExpandUrl( $file->getFullURL()
, PROTO_CURRENT
);
+ $vals['descriptionurl'] = wfExpandUrl( $file->getDescriptionUrl()
, PROTO_CURRENT
);
}
if ( $sha1 ) {
}
if ( $sha1 ) {
diff --git
a/includes/api/ApiQueryInfo.php
b/includes/api/ApiQueryInfo.php
index
5d22527
..
9170b73
100644
(file)
--- a/
includes/api/ApiQueryInfo.php
+++ b/
includes/api/ApiQueryInfo.php
@@
-380,8
+380,8
@@
class ApiQueryInfo extends ApiQueryBase {
}
if ( $this->fld_url ) {
}
if ( $this->fld_url ) {
- $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL() );
- $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' ) );
+ $pageInfo['fullurl'] = wfExpandUrl( $title->getFullURL()
, PROTO_CURRENT
);
+ $pageInfo['editurl'] = wfExpandUrl( $title->getFullURL( 'action=edit' )
, PROTO_CURRENT
);
}
if ( $this->fld_readable && $title->userCanRead() ) {
$pageInfo['readable'] = '';
}
if ( $this->fld_readable && $title->userCanRead() ) {
$pageInfo['readable'] = '';
diff --git
a/includes/api/ApiQueryLangLinks.php
b/includes/api/ApiQueryLangLinks.php
index
2583790
..
b0880bb
100644
(file)
--- a/
includes/api/ApiQueryLangLinks.php
+++ b/
includes/api/ApiQueryLangLinks.php
@@
-106,7
+106,7
@@
class ApiQueryLangLinks extends ApiQueryBase {
if ( $params['url'] ) {
$title = Title::newFromText( "{$row->ll_lang}:{$row->ll_title}" );
if ( $title ) {
if ( $params['url'] ) {
$title = Title::newFromText( "{$row->ll_lang}:{$row->ll_title}" );
if ( $title ) {
- $entry['url'] = wfExpandUrl( $title->getFullURL() );
+ $entry['url'] = wfExpandUrl( $title->getFullURL()
, PROTO_CURRENT
);
}
}
ApiResult::setContent( $entry, $row->ll_title );
}
}
ApiResult::setContent( $entry, $row->ll_title );
diff --git
a/includes/api/ApiQuerySiteinfo.php
b/includes/api/ApiQuerySiteinfo.php
index
3c61824
..
4f22f53
100644
(file)
--- a/
includes/api/ApiQuerySiteinfo.php
+++ b/
includes/api/ApiQuerySiteinfo.php
@@
-118,7
+118,7
@@
class ApiQuerySiteinfo extends ApiQueryBase {
$data = array();
$mainPage = Title::newMainPage();
$data['mainpage'] = $mainPage->getPrefixedText();
$data = array();
$mainPage = Title::newMainPage();
$data['mainpage'] = $mainPage->getPrefixedText();
- $data['base'] = wfExpandUrl( $mainPage->getFullUrl() );
+ $data['base'] = wfExpandUrl( $mainPage->getFullUrl()
, PROTO_CURRENT
);
$data['sitename'] = $GLOBALS['wgSitename'];
$data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
$data['phpversion'] = phpversion();
$data['sitename'] = $GLOBALS['wgSitename'];
$data['generator'] = "MediaWiki {$GLOBALS['wgVersion']}";
$data['phpversion'] = phpversion();
@@
-297,7
+297,7
@@
class ApiQuerySiteinfo extends ApiQueryBase {
if ( isset( $langNames[$prefix] ) ) {
$val['language'] = $langNames[$prefix];
}
if ( isset( $langNames[$prefix] ) ) {
$val['language'] = $langNames[$prefix];
}
- $val['url'] = wfExpandUrl( $row['iw_url'] );
+ $val['url'] = wfExpandUrl( $row['iw_url']
, PROTO_CURRENT
);
if( isset( $row['iw_wikiid'] ) ) {
$val['wikiid'] = $row['iw_wikiid'];
}
if( isset( $row['iw_wikiid'] ) ) {
$val['wikiid'] = $row['iw_wikiid'];
}
@@
-465,7
+465,7
@@
class ApiQuerySiteinfo extends ApiQueryBase {
protected function appendRightsInfo( $property ) {
global $wgRightsPage, $wgRightsUrl, $wgRightsText;
$title = Title::newFromText( $wgRightsPage );
protected function appendRightsInfo( $property ) {
global $wgRightsPage, $wgRightsUrl, $wgRightsText;
$title = Title::newFromText( $wgRightsPage );
- $url = $title ? wfExpandUrl( $title->getFullURL() ) : $wgRightsUrl;
+ $url = $title ? wfExpandUrl( $title->getFullURL()
, PROTO_CURRENT
) : $wgRightsUrl;
$text = $wgRightsText;
if ( !$text && $title ) {
$text = $title->getPrefixedText();
$text = $wgRightsText;
if ( !$text && $title ) {
$text = $title->getPrefixedText();
diff --git
a/includes/api/ApiRsd.php
b/includes/api/ApiRsd.php
index
a806c3a
..
3bca725
100644
(file)
--- a/
includes/api/ApiRsd.php
+++ b/
includes/api/ApiRsd.php
@@
-48,7
+48,7
@@
class ApiRsd extends ApiBase {
$service = array( 'apis' => $this->formatRsdApiList() );
ApiResult::setContent( $service, 'MediaWiki', 'engineName' );
ApiResult::setContent( $service, 'http://www.mediawiki.org/', 'engineLink' );
$service = array( 'apis' => $this->formatRsdApiList() );
ApiResult::setContent( $service, 'MediaWiki', 'engineName' );
ApiResult::setContent( $service, 'http://www.mediawiki.org/', 'engineLink' );
- ApiResult::setContent( $service,
wfExpandUrl( Title::newMainPage()->getFullURL()
), 'homePageLink' );
+ ApiResult::setContent( $service,
Title::newMainPage()->getCanonicalUrl(
), 'homePageLink' );
$result->setIndexedTagName( $service['apis'], 'api' );
$result->setIndexedTagName( $service['apis'], 'api' );
@@
-98,7
+98,7
@@
class ApiRsd extends ApiBase {
$apis = array(
'MediaWiki' => array(
// The API link is required for all RSD API entries.
$apis = array(
'MediaWiki' => array(
// The API link is required for all RSD API entries.
- 'apiLink' => wfExpandUrl( wfScript( 'api' ) ),
+ 'apiLink' => wfExpandUrl( wfScript( 'api' )
, PROTO_CURRENT
),
// Docs link is optional, but recommended.
'docs' => 'http://www.mediawiki.org/wiki/API',
// Docs link is optional, but recommended.
'docs' => 'http://www.mediawiki.org/wiki/API',