Author: Lars Michelsen <[email protected]>
Date: Wed Dec 21 18:29:22 2011 +0100
Committer: Lars Michelsen <[email protected]>
Commit-Date: Wed Dec 21 18:29:22 2011 +0100
Bugfix: Fixed problem with form based login when opened via link from another
webpage
---
ChangeLog | 1 +
.../frontend/nagvis-js/classes/NagVisLoginView.php | 14 +++++---------
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 54b2ee3..10759ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
Core
* Switched CRITICAL and UNREACHABLE state weights. CRITICAL now overlaps the
UNREACHABLE states
+ * Bugfix: Fixed problem with form based login when opened via link from
another webpage
1.6.1
Core
diff --git a/share/frontend/nagvis-js/classes/NagVisLoginView.php
b/share/frontend/nagvis-js/classes/NagVisLoginView.php
index c8fee2a..30ba029 100644
--- a/share/frontend/nagvis-js/classes/NagVisLoginView.php
+++ b/share/frontend/nagvis-js/classes/NagVisLoginView.php
@@ -50,19 +50,15 @@ class NagVisLoginView {
$TMPL = New FrontendTemplateSystem($this->CORE);
$TMPLSYS = $TMPL->getTmplSys();
- $defaultTarget = cfg('paths', 'htmlbase')
- .'/frontend/nagvis-js/index.php?Mod='
- .cfg('global', 'startmodule')
- .'&act='.cfg('global', 'startaction')
- .'&show='.cfg('global', 'startshow');
- $target = CoreRequestHandler::getReferer($defaultTarget);
+ $target = CoreRequestHandler::getRequestUri('');
// Add the language to the target url when the user requested a
specific language
- if(isset($_GET['lang']) && strpos($target, 'lang=') === false) {
- if(strpos($target, '?') === false)
+ if(isset($_GET['lang']) && $_GET['lang'] != '' && strpos($target,
'lang=') === false) {
+ if(strpos($target, '?') === false) {
$target .= '?lang='.$_GET['lang'];
- else
+ } else {
$target .= '&lang='.$_GET['lang'];
+ }
}
$aData = Array(
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins