forked from github/kensanata.oddmuse
Delaying the setting of @IndexOptions.
This change was suggested by toomas on the wiki because the %Translations hash was not set at the time that @IndexOptions was set. It is now set in InitVariables.
This commit is contained in:
3
wiki.pl
3
wiki.pl
@@ -159,7 +159,7 @@ $DocumentHeader = qq(<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN")
|
|||||||
. qq( "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n)
|
. qq( "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n)
|
||||||
. qq(<html xmlns="http://www.w3.org/1999/xhtml">);
|
. qq(<html xmlns="http://www.w3.org/1999/xhtml">);
|
||||||
# Checkboxes at the end of the index.
|
# Checkboxes at the end of the index.
|
||||||
@IndexOptions = (['pages', T('Include normal pages'), 1, \&AllPagesList]);
|
@IndexOptions = ();
|
||||||
# Display short comments below the GotoBar for special days
|
# Display short comments below the GotoBar for special days
|
||||||
# Example: %SpecialDays = ('1-1' => 'New Year', '1-2' => 'Next Day');
|
# Example: %SpecialDays = ('1-1' => 'New Year', '1-2' => 'Next Day');
|
||||||
%SpecialDays = ();
|
%SpecialDays = ();
|
||||||
@@ -306,6 +306,7 @@ sub InitVariables { # Init global session variables for mod_perl!
|
|||||||
@MyRules = sort {$RuleOrder{$a} <=> $RuleOrder{$b}} @MyRules; # default is 0
|
@MyRules = sort {$RuleOrder{$a} <=> $RuleOrder{$b}} @MyRules; # default is 0
|
||||||
ReportError(Ts('Cannot create %s', $DataDir) . ": $!", '500 INTERNAL SERVER ERROR')
|
ReportError(Ts('Cannot create %s', $DataDir) . ": $!", '500 INTERNAL SERVER ERROR')
|
||||||
unless -d $DataDir;
|
unless -d $DataDir;
|
||||||
|
@IndexOptions = (['pages', T('Include normal pages'), 1, \&AllPagesList]);
|
||||||
foreach my $sub (@MyInitVariables) {
|
foreach my $sub (@MyInitVariables) {
|
||||||
my $result = &$sub;
|
my $result = &$sub;
|
||||||
$Message .= $q->p($@) if $@;
|
$Message .= $q->p($@) if $@;
|
||||||
|
|||||||
Reference in New Issue
Block a user