cache is used.
=== Bug fixes in 1.19 ===
+* $wgUploadNavigationUrl should be used for file redlinks if
+ $wgUploadMissingFileUrl is not set. The first was used for this
+ until the second was introduced in 1.17.
=== API changes in 1.19 ===
* (bug 19838) siprop=interwikimap can now use the interwiki cache.
* @return String
*/
public static function makeBrokenImageLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '', $time = false ) {
- global $wgEnableUploads, $wgUploadMissingFileUrl;
+ global $wgEnableUploads, $wgUploadMissingFileUrl, $wgUploadNavigationUrl;
if ( ! $title instanceof Title ) {
return "<!-- ERROR -->{$prefix}{$text}{$trail}";
}
if ( $text == '' )
$text = htmlspecialchars( $title->getPrefixedText() );
- if ( ( $wgUploadMissingFileUrl || $wgEnableUploads ) && !$currentExists ) {
+ if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads ) && !$currentExists ) {
$redir = RepoGroup::singleton()->getLocalRepo()->checkRedirect( $title );
if ( $redir ) {
* @return String: urlencoded URL
*/
protected static function getUploadUrl( $destFile, $query = '' ) {
- global $wgUploadMissingFileUrl;
+ global $wgUploadMissingFileUrl, $wgUploadNavigationUrl;
$q = 'wpDestFile=' . $destFile->getPartialUrl();
if ( $query != '' )
$q .= '&' . $query;
if ( $wgUploadMissingFileUrl ) {
return wfAppendQuery( $wgUploadMissingFileUrl, $q );
+ } elseif( $wgUploadNavigationUrl ) {
+ return wfAppendQuery( $wgUploadNavigationUrl, $q );
} else {
$upload = SpecialPage::getTitleFor( 'Upload' );
return $upload->getLocalUrl( $q );