Module: nagvis
Branch: nagvis-1.4
Commit: 543d6fc26daacdfe248830ba936a6987d59f9ab8
URL:    
http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis;a=commit;h=543d6fc26daacdfe248830ba936a6987d59f9ab8

Author: Lars Michelsen <[email protected]>
Date:   Sun Aug  8 02:21:43 2010 +0200

Applied rotation patch (Fixes duplicate elements in rotation pools) from Ítalo 
Rossi - thanks!

---

 nagvis/nagvis/includes/classes/NagVisRotation.php |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/nagvis/nagvis/includes/classes/NagVisRotation.php 
b/nagvis/nagvis/includes/classes/NagVisRotation.php
index 863883f..b960a24 100644
--- a/nagvis/nagvis/includes/classes/NagVisRotation.php
+++ b/nagvis/nagvis/includes/classes/NagVisRotation.php
@@ -139,9 +139,10 @@ class NagVisRotation {
                        $strCurrentStep = $_GET['map'];
                        $strType = 'map';
                }
-               
-               // Set position of actual map in the array
-               if($strCurrentStep != '') {
+               if(isset($_GET['step_id'])) {
+                       $this->intCurrentStep = $_GET['step_id'];
+               } elseif($strCurrentStep != '') {
+                       // Set position of actual map in the array
                        foreach($this->arrSteps AS $intId => $arrStep) {
                                if($strCurrentStep == $arrStep[$strType]) {
                                        $this->intCurrentStep = $intId;
@@ -161,9 +162,9 @@ class NagVisRotation {
        private function setStepUrls() {
                foreach ($this->arrSteps AS $intId => $arrStep) {
                        if(isset($arrStep['url']) && $arrStep['url'] != '') {
-                               $this->arrSteps[$intId]['target'] = 
'index.php?rotation='.$this->getPoolName().'&url='.$arrStep['url'];
+                               $this->arrSteps[$intId]['target'] = 
'index.php?rotation='.$this->getPoolName().'&url='.$arrStep['url'].'&step_ip='.$intId;
                        } else {
-                               $this->arrSteps[$intId]['target'] = 
'index.php?rotation='.$this->getPoolName().'&map='.$arrStep['map'];
+                               $this->arrSteps[$intId]['target'] = 
'index.php?rotation='.$this->getPoolName().'&map='.$arrStep['map'].'&step_id='.$intId;
                        }
                }
        }


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to