From 6dd05bcd14cb96990209c8c9e35428835df091c0 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Thu, 23 Sep 2004 12:15:42 +0000 Subject: [PATCH] allow specifying alternative image upload base url (like external servers) --- includes/DefaultSettings.php | 6 ++++++ includes/Image.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 0319147327..0b0d67ca32 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -107,6 +107,7 @@ $wgLogo = "{$wgUploadPath}/wiki.png"; $wgMathPath = "{$wgUploadPath}/math"; $wgMathDirectory = "{$wgUploadDirectory}/math"; $wgTmpDirectory = "{$wgUploadDirectory}/tmp"; +$wgUploadBaseUrl = ""; /**#@-*/ @@ -161,6 +162,11 @@ $wgDBuser = 'wikiuser'; * "mysql" for working code and "PostgreSQL" for development/broken code */ $wgDBtype = "mysql"; +/** Search type + * "MyISAM" for MySQL native full text search, "Tsearch2" for PostgreSQL + * based search engine + */ +$wgSearchType = "MyISAM"; /** Table name prefix */ $wgDBprefix = ''; /** Database schema diff --git a/includes/Image.php b/includes/Image.php index 4eb161386c..7f6b83971b 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -114,10 +114,10 @@ class Image function wfImageUrl( $name ) { - global $wgUploadPath; + global $wgUploadPath,$wgUploadBaseUrl; $hash = md5( $name ); - $url = "{$wgUploadPath}/" . $hash{0} . "/" . + $url = "{$wgUploadBaseUrl}{$wgUploadPath}/" . $hash{0} . "/" . substr( $hash, 0, 2 ) . "/{$name}"; return wfUrlencode( $url ); } -- 2.20.1