[Mapbender-commits] r2808 - branches/2.5/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Aug 15 04:11:26 EDT 2008
Author: christoph
Date: 2008-08-15 04:11:25 -0400 (Fri, 15 Aug 2008)
New Revision: 2808
Modified:
branches/2.5/http/php/nestedSets.php
Log:
bug fix http://trac.osgeo.org/mapbender/ticket/179
Modified: branches/2.5/http/php/nestedSets.php
===================================================================
--- branches/2.5/http/php/nestedSets.php 2008-08-15 08:05:40 UTC (rev 2807)
+++ branches/2.5/http/php/nestedSets.php 2008-08-15 08:11:25 UTC (rev 2808)
@@ -165,14 +165,14 @@
$t = array("i", "i", "s");
db_prep_query($sql, $v, $t);
- $sql = "UPDATE gui_treegde SET lft=lft-(($1 - $2 + 1)) WHERE lft > $3 AND fkey_gui_id = $4";
- $v = array($right, $left, $right, $guiList);
- $t = array("i", "i", "i", "s");
+ $sql = "UPDATE gui_treegde SET lft=lft-$1 WHERE lft > $2 AND fkey_gui_id = $3";
+ $v = array($right-$left+1, $right, $guiList);
+ $t = array("i", "i", "s");
db_prep_query($sql, $v, $t);
#echo $sql . " r:".$right." l:".$left." 2:".$guiList."<br>";
- $sql = "UPDATE gui_treegde SET rgt=rgt-(($1 - $2 + 1)) WHERE rgt > $3 AND fkey_gui_id = $4";
- $v = array($right, $left, $right, $guiList);
- $t = array("i", "i", "i", "s");
+ $sql = "UPDATE gui_treegde SET rgt=rgt-$1 WHERE rgt > $2 AND fkey_gui_id = $3";
+ $v = array($right-$left+1, $right, $guiList);
+ $t = array("i", "i", "s");
#echo $sql . " r:".$right." l:".$left." 2:".$guiList."<br>";
db_prep_query($sql, $v, $t);
}
More information about the Mapbender_commits
mailing list