Module: nagvis
Branch: master
Commit: 69b2b14ae01283748ba945dc940a062cbc9e717f
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=69b2b14ae01283748ba945dc940a062cbc9e717f

Author: Lars Michelsen <[email protected]>
Date:   Sat May  1 19:20:10 2010 +0200

Added redirection for old style rotation call; Fixed direct rotation call 
without specific step

---

 etc/apache2-nagvis.conf-sample                     |    6 ++++++
 .../nagvis-js/classes/FrontendModRotation.php      |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/etc/apache2-nagvis.conf-sample b/etc/apache2-nagvis.conf-sample
index b353821..a38d73d 100644
--- a/etc/apache2-nagvis.conf-sample
+++ b/etc/apache2-nagvis.conf-sample
@@ -46,6 +46,12 @@ Alias @NAGVIS_WEB@ "@NAGVIS_PATH@/share"
     RewriteCond %{REQUEST_URI} ^...@nagvis_web@/frontend/wui
     RewriteCond %{QUERY_STRING} map=(.*)
     RewriteRule ^(.*)$ 
@NAGVIS_WEB@/frontend/wui/index.php?mod=Map&act=edit&show=%1 [R=301,L]
+
+    # Redirect old rotation calls
+    RewriteCond %{REQUEST_URI} ^...@nagvis_web@/frontend/nagvis-js
+    RewriteCond %{QUERY_STRING} !mod
+    RewriteCond %{QUERY_STRING} rotation=(.*)
+    RewriteRule ^(.*)$ 
@NAGVIS_WEB@/frontend/nagvis-js/index.php?mod=Rotation&act=view&show=%1 
[R=301,L]
   </IfModule>
 </Directory>
 
diff --git a/share/frontend/nagvis-js/classes/FrontendModRotation.php 
b/share/frontend/nagvis-js/classes/FrontendModRotation.php
index 97b3a32..20c5895 100644
--- a/share/frontend/nagvis-js/classes/FrontendModRotation.php
+++ b/share/frontend/nagvis-js/classes/FrontendModRotation.php
@@ -75,7 +75,8 @@ class FrontendModRotation extends FrontendModule {
                $ROTATION = new FrontendRotation($this->CORE, $this->name);
                
                // Set the requested step
-               $ROTATION->setStep($this->type, $this->step);
+               if($this->type != '' && $this->step != '')
+                       $ROTATION->setStep($this->type, $this->step);
                
                switch($this->type) {
                        case '':


------------------------------------------------------------------------------
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to