## Patch: Index on GotoBar sub GetIndexLink { return &ScriptLink("action=index", T('Index')); } # End patch sub GetPrefsLink { return &ScriptLink("action=editprefs", T('Preferences')); } ... sub GetGotoBar { ... $bartext .= " | " . &GetPageLink($RCName); if (&GetParam("linkindex", 1)) { $bartext .= " | " . &GetIndexLink(); ## Patch: Index in GotoBar } $bartext .= " | " . &GetPrefsLink(); ... } ... sub DoEditPrefs { ... print '<br>', &GetFormCheck('toplinkbar', 1, T('Show link bar on top')); print '<br>', &GetFormCheck('linkindex', 1, T('Add "Index" link to link bar')); ## Patch: Index in GotoBar print '<br>', &GetFormCheck('linkrandom', 0, T('Add "Random Page" link to link bar')); ... } .... sub DoUpdatePrefs { ... &UpdatePrefCheckbox("toplinkbar"); &UpdatePrefCheckbox("linkindex"); ## Patch: Index in GotoBar &UpdatePrefCheckbox("linkrandom"); ... }
diff -ru usemod10.orig/wiki.pl usemod10/wiki.pl --- usemod10.orig/wiki.pl Thu Sep 11 05:21:02 2003 +++ usemod10/wiki.pl Wed Oct 1 16:06:20 2003 @@ -1480,6 +1480,9 @@ $bartext .= " | " . &GetPageLink($main); } $bartext .= " | " . &GetPageLink($RCName); + if (&GetParam("linkindex", 1)) { + $bartext .= " | " . &GetIndexLink(); ## Patch: Index in GotoBar + } $bartext .= " | " . &GetPrefsLink(); if ($UseUpload && &UserCanUpload()) { $bartext .= " | " . &GetUploadLink(); @@ -3398,6 +3401,8 @@ print '<br>', &GetFormCheck('toplinkbar', 1, T('Show link bar on top')); + print '<br>', &GetFormCheck('linkindex', 1, + T('Add "Index" link to link bar')); print '<br>', &GetFormCheck('linkrandom', 0, T('Add "Random Page" link to link bar')); print '<br>' . T('StyleSheet URL:') . ' ', @@ -3433,6 +3438,7 @@ # All link bar settings should be updated before printing the header &UpdatePrefCheckbox("toplinkbar"); + &UpdatePrefCheckbox("linkindex"); &UpdatePrefCheckbox("linkrandom"); print &GetHeader('',T('Saving Preferences'), ''); print '<br>'; @@ -4842,6 +4848,14 @@ return &ScriptLink("action=pagelock&set=$status&id=$id", $name); } +sub GetIndexLink { + return &ScriptLink("action=index", T('Index')); +} # End patch + +sub GetPrefsLink { + return &ScriptLink("action=editprefs", T('Preferences')); +} + sub GetAdminBar { my ($id) = @_; my ($result);