forked from github/kensanata.oddmuse
Remove README and $ReadMe
I don't think anybody ever relied on this feature.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
12
wiki.pl
12
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user