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:
Alex Schroeder
2013-11-17 23:32:00 +01:00
parent 06881768c3
commit deec99c353

View File

@@ -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(<html xmlns="http://www.w3.org/1999/xhtml">);
# 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
# Example: %SpecialDays = ('1-1' => 'New Year', '1-2' => 'Next Day');
%SpecialDays = ();
@@ -306,6 +306,7 @@ sub InitVariables { # Init global session variables for mod_perl!
@MyRules = sort {$RuleOrder{$a} <=> $RuleOrder{$b}} @MyRules; # default is 0
ReportError(Ts('Cannot create %s', $DataDir) . ": $!", '500 INTERNAL SERVER ERROR')
unless -d $DataDir;
@IndexOptions = (['pages', T('Include normal pages'), 1, \&AllPagesList]);
foreach my $sub (@MyInitVariables) {
my $result = &$sub;
$Message .= $q->p($@) if $@;