From 5a1a46ba4aae76c6cdbb4afe3bb3acaa85f3cd06 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Fri, 3 Jul 2015 11:48:58 +0200 Subject: [PATCH] Remove README and $ReadMe I don't think anybody ever relied on this feature. --- modules/load-lang.pl | 9 +-------- wiki.pl | 12 ++---------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/modules/load-lang.pl b/modules/load-lang.pl index aac5dc4a..06852a35 100644 --- a/modules/load-lang.pl +++ b/modules/load-lang.pl @@ -17,7 +17,7 @@ use strict; AddModuleDescription('load-lang.pl', 'Language Browser Preferences'); -our ($q, %CookieParameters, $ConfigFile, $DataDir, $ReadMe, $NamespaceCurrent, @MyInitVariables); +our ($q, %CookieParameters, $ConfigFile, $DataDir, $NamespaceCurrent, @MyInitVariables); our ($CurrentLanguage, $LoadLanguageDir); $CookieParameters{interface} = ''; @@ -70,13 +70,6 @@ sub LoadLanguage { do $file; do "$ConfigFile-$Lang{$_}" if -r "$ConfigFile-$Lang{$_}"; $CurrentLanguage = $Lang{$_}; - my $f; - if ($NamespaceCurrent) { - $f = "$DataDir/../README.$Lang{$_}"; - } else { - $f = "$DataDir/README.$Lang{$_}"; - } - $ReadMe = $f if -r $f; last; } } diff --git a/wiki.pl b/wiki.pl index dabdde80..57014fc0 100755 --- a/wiki.pl +++ b/wiki.pl @@ -40,7 +40,7 @@ local $| = 1; # Do not buffer output (localized for mod_perl) # Options: our ($ScriptName, $FullUrl, $ModuleDir, $PageDir, $TempDir, $LockDir, $KeepDir, $RssDir, $ConfigFile, $RcFile, $RcOldFile, $IndexFile, $NoEditFile, $VisitorFile, $DeleteFile, - $RssLicense, $ReadMe, + $RssLicense, $FreeLinkPattern, $LinkPattern, $FreeInterLinkPattern, $InterLinkPattern, $UrlPattern, $FullUrlPattern, $InterSitePattern, $UrlProtocols, $ImageExtensions, $LastUpdate, @@ -256,7 +256,6 @@ sub InitDirConfig { $VisitorFile = "$DataDir/visitors.log"; # List of recent visitors $DeleteFile = "$DataDir/delete.log"; # Deletion logfile $RssDir = "$DataDir/rss"; # For rss feed cache - $ReadMe = "$DataDir/README"; # file with default content for the HomePage $ConfigFile ||= "$DataDir/config"; # Config file with Perl code to execute $ModuleDir ||= "$DataDir/modules"; # For extensions (ending in .pm or .pl) } @@ -2689,14 +2688,7 @@ sub OpenPage { # Sets global variables %Page = (); $Page{ts} = $Now; $Page{revision} = 0; - if ($id eq $HomePage) { - my $F; - if (open($F, '<:encoding(UTF-8)', $ReadMe) or open($F, '<:encoding(UTF-8)', 'README')) { - local $/ = undef; - $Page{text} = <$F>; - close $F; - } - } + $Page{text} = T('Welcome!') if $id eq $HomePage; } $OpenPageName = $id; }