Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -17,6 +17,9 @@ |
18 | 18 | cache is used. |
19 | 19 | |
20 | 20 | === Bug fixes in 1.19 === |
| 21 | +* $wgUploadNavigationUrl should be used for file redlinks if |
| 22 | + $wgUploadMissingFileUrl is not set. The first was used for this |
| 23 | + until the second was introduced in 1.17. |
21 | 24 | |
22 | 25 | === API changes in 1.19 === |
23 | 26 | * (bug 19838) siprop=interwikimap can now use the interwiki cache. |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -768,7 +768,7 @@ |
769 | 769 | * @return String |
770 | 770 | */ |
771 | 771 | public static function makeBrokenImageLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '', $time = false ) { |
772 | | - global $wgEnableUploads, $wgUploadMissingFileUrl; |
| 772 | + global $wgEnableUploads, $wgUploadMissingFileUrl, $wgUploadNavigationUrl; |
773 | 773 | if ( ! $title instanceof Title ) { |
774 | 774 | return "<!-- ERROR -->{$prefix}{$text}{$trail}"; |
775 | 775 | } |
— | — | @@ -779,7 +779,7 @@ |
780 | 780 | if ( $text == '' ) |
781 | 781 | $text = htmlspecialchars( $title->getPrefixedText() ); |
782 | 782 | |
783 | | - if ( ( $wgUploadMissingFileUrl || $wgEnableUploads ) && !$currentExists ) { |
| 783 | + if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads ) && !$currentExists ) { |
784 | 784 | $redir = RepoGroup::singleton()->getLocalRepo()->checkRedirect( $title ); |
785 | 785 | |
786 | 786 | if ( $redir ) { |
— | — | @@ -807,13 +807,15 @@ |
808 | 808 | * @return String: urlencoded URL |
809 | 809 | */ |
810 | 810 | protected static function getUploadUrl( $destFile, $query = '' ) { |
811 | | - global $wgUploadMissingFileUrl; |
| 811 | + global $wgUploadMissingFileUrl, $wgUploadNavigationUrl; |
812 | 812 | $q = 'wpDestFile=' . $destFile->getPartialUrl(); |
813 | 813 | if ( $query != '' ) |
814 | 814 | $q .= '&' . $query; |
815 | 815 | |
816 | 816 | if ( $wgUploadMissingFileUrl ) { |
817 | 817 | return wfAppendQuery( $wgUploadMissingFileUrl, $q ); |
| 818 | + } elseif( $wgUploadNavigationUrl ) { |
| 819 | + return wfAppendQuery( $wgUploadNavigationUrl, $q ); |
818 | 820 | } else { |
819 | 821 | $upload = SpecialPage::getTitleFor( 'Upload' ); |
820 | 822 | return $upload->getLocalUrl( $q ); |