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
Fix LocalFile::move
[lhc/web/wiklou.git]
/
includes
/
Linker.php
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
ae50c66
..
01f695a
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-89,12
+89,6
@@
class Linker {
return "<!-- ERROR -->$html";
}
return "<!-- ERROR -->$html";
}
- if ( is_string( $query ) ) {
- // some functions withing core using this still hand over query strings
- wfDeprecated( __METHOD__ . ' with parameter $query as string (should be array)', '1.20' );
- $query = wfCgiToArray( $query );
- }
-
$services = MediaWikiServices::getInstance();
$options = (array)$options;
if ( $options ) {
$services = MediaWikiServices::getInstance();
$options = (array)$options;
if ( $options ) {
@@
-555,7
+549,8
@@
class Linker {
# Use manually specified thumbnail
$manual_title = Title::makeTitleSafe( NS_FILE, $frameParams['manualthumb'] );
if ( $manual_title ) {
# Use manually specified thumbnail
$manual_title = Title::makeTitleSafe( NS_FILE, $frameParams['manualthumb'] );
if ( $manual_title ) {
- $manual_img = wfFindFile( $manual_title );
+ $manual_img = MediaWikiServices::getInstance()->getRepoGroup()
+ ->findFile( $manual_title );
if ( $manual_img ) {
$thumb = $manual_img->getUnscaledThumb( $handlerParams );
$manualthumb = true;
if ( $manual_img ) {
$thumb = $manual_img->getUnscaledThumb( $handlerParams );
$manualthumb = true;
@@
-693,7
+688,8
@@
class Linker {
$label = $title->getPrefixedText();
}
$encLabel = htmlspecialchars( $label );
$label = $title->getPrefixedText();
}
$encLabel = htmlspecialchars( $label );
- $currentExists = $time ? ( wfFindFile( $title ) != false ) : false;
+ $currentExists = $time
+ && MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title ) !== false;
if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads )
&& !$currentExists
if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads )
&& !$currentExists
@@
-756,11
+752,13
@@
class Linker {
* @since 1.16.3
* @param LinkTarget $title
* @param string $html Pre-sanitized HTML
* @since 1.16.3
* @param LinkTarget $title
* @param string $html Pre-sanitized HTML
- * @param string $time MW timestamp of file creation time
+ * @param string
|false
$time MW timestamp of file creation time
* @return string HTML
*/
public static function makeMediaLinkObj( $title, $html = '', $time = false ) {
* @return string HTML
*/
public static function makeMediaLinkObj( $title, $html = '', $time = false ) {
- $img = wfFindFile( $title, [ 'time' => $time ] );
+ $img = MediaWikiServices::getInstance()->getRepoGroup()->findFile(
+ $title, [ 'time' => $time ]
+ );
return self::makeMediaLinkFile( $title, $img, $html );
}
return self::makeMediaLinkFile( $title, $img, $html );
}