From 464656129998d8cce4f96eaed14d907ac3a05e8d Mon Sep 17 00:00:00 2001
From: JT Smith
Date: Mon, 25 Feb 2008 20:20:25 +0000
Subject: [PATCH] Moved the Wiki Help link into i18n so it can be pointed to
other sites for other lanugages.
---
docs/changelog/7.x.x.txt | 2 ++
lib/WebGUI/Operation/Help.pm | 23 ++---------------------
lib/WebGUI/i18n/English/WebGUI.pm | 11 +++--------
3 files changed, 7 insertions(+), 29 deletions(-)
diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt
index ed7b05ac4..9ca17c94f 100644
--- a/docs/changelog/7.x.x.txt
+++ b/docs/changelog/7.x.x.txt
@@ -1,4 +1,6 @@
7.5.4
+ - Moved the Wiki Help link into i18n so it can be pointed to other sites for
+ other lanugages.
7.5.3
- prevent HTML and Macro injection in usernames
diff --git a/lib/WebGUI/Operation/Help.pm b/lib/WebGUI/Operation/Help.pm
index 2e755082d..b6353e74d 100644
--- a/lib/WebGUI/Operation/Help.pm
+++ b/lib/WebGUI/Operation/Help.pm
@@ -362,7 +362,7 @@ sub www_viewHelp {
WebGUI::Macro::process($session,\$body);
- return $ac->render(wikiHelpLink($session).$body, $i18n->get(93, 'WebGUI').': '.$i18n->get($help->{title}));
+ return $ac->render($i18n->get("external help", "WebGUI").$body, $i18n->get(93, 'WebGUI').': '.$i18n->get($help->{title}));
}
#-------------------------------------------------------------------
@@ -434,26 +434,7 @@ sub www_viewHelpIndex {
}
$output .= '';
my $ac = WebGUI::AdminConsole->new($session,"help");
- return $ac->render(wikiHelpLink($session).$output, join ': ',$i18n->get(93), $i18n->get('help index'));
-}
-
-#-------------------------------------------------------------------
-
-=head2 wikiHelpLink ( $session )
-
-Utility method that returns link to the WebGUI Community Wiki with i18n'ed text.
-
-=cut
-
-sub wikiHelpLink {
- my $session = shift;
- return $session->privilege->insufficient() unless canView($session);
- my $i18n = WebGUI::International->new($session);
- return sprintf q!%s %s
!,
- $i18n->get('wiki help label leadin'),
- 'http://www.webgui.org/community-wiki',
- $i18n->get('wiki help target'),
- ;
+ return $ac->render($i18n->get("external help", "WebGUI").$output, join ': ',$i18n->get(93), $i18n->get('help index'));
}
1;
diff --git a/lib/WebGUI/i18n/English/WebGUI.pm b/lib/WebGUI/i18n/English/WebGUI.pm
index f93626a9d..0e5c2a3b1 100644
--- a/lib/WebGUI/i18n/English/WebGUI.pm
+++ b/lib/WebGUI/i18n/English/WebGUI.pm
@@ -3886,14 +3886,9 @@ LongTruncOk=1
lastUpdated => 0,
},
- 'wiki help label leadin' => {
- message => q{For more help, visit the},
- lastUpdated => 1185162265,
- },
-
- 'wiki help target' => {
- message => q{WebGUI Community Wiki},
- lastUpdated => 1185162267,
+ 'external help' => {
+ message => q{For more help, visit the WebGUI Community Wiki.
},
+ lastUpdated => 0,
},
'user profile field friend availability' => {