uploads in.
* IBM DB2 database no longer uses the db specific $wgDBport_db2 variable but the
normal $wgDBport.
+* The upload link for missing files can now be set separately from the
+ navigation link with $wgUploadMissingFileUrl.
=== New features in 1.17 ===
* (bug 10183) Users can now add personal styles and scripts to all skins via
* Useful if you want to use a shared repository by default
* without disabling local uploads (use $wgEnableUploads = false for that)
* e.g. $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload';
- *
- * This also affects images inline images that do not exist. In that case the URL will get
- * (?|&)wpDestFile=<filename> appended to it as appropriate.
*/
$wgUploadNavigationUrl = false;
+/**
+ * Point the upload link for missing files to an external URL, as with
+ * $wgUploadNavigationUrl. The URL will get (?|&)wpDestFile=<filename>
+ * appended to it as appropriate.
+ */
+$wgUploadMissingFileUrl = false;
+
/**
* Give a path here to use thumb.php for thumbnail generation on client request, instead of
* generating them on render and outputting a static URL. This is necessary if some of your
* @return String
*/
public function makeBrokenImageLinkObj( $title, $text = '', $query = '', $trail = '', $prefix = '', $time = false ) {
- global $wgEnableUploads, $wgUploadNavigationUrl;
+ global $wgEnableUploads, $wgUploadMissingFileUrl;
if( $title instanceof Title ) {
wfProfileIn( __METHOD__ );
$currentExists = $time ? ( wfFindFile( $title ) != false ) : false;
- if( ( $wgUploadNavigationUrl || $wgEnableUploads ) && !$currentExists ) {
+ if( ( $wgUploadMissingFileUrl || $wgEnableUploads ) && !$currentExists ) {
if( $text == '' )
$text = htmlspecialchars( $title->getPrefixedText() );
* @return String: urlencoded URL
*/
protected function getUploadUrl( $destFile, $query = '' ) {
- global $wgUploadNavigationUrl;
+ global $wgUploadMissingFileUrl;
$q = 'wpDestFile=' . $destFile->getPartialUrl();
if( $query != '' )
$q .= '&' . $query;
- if( $wgUploadNavigationUrl ) {
- return wfAppendQuery( $wgUploadNavigationUrl, $q );
+ if( $wgUploadMissingFileUrl ) {
+ return wfAppendQuery( $wgUploadMissingFileUrl, $q );
} else {
$upload = SpecialPage::getTitleFor( 'Upload' );
return $upload->getLocalUrl( $q );