[Commits] r636 - in trunk/webinterface: core mods/super/vservers mods/user/control
new-commit at lists.openvcp.org
new-commit at lists.openvcp.org
Sat Dec 20 17:16:46 UTC 2008
Author: ftx
Date: 2008-12-20 17:16:46 +0000 (Sat, 20 Dec 2008)
New Revision: 636
Modified:
trunk/webinterface/core/XML.php
trunk/webinterface/mods/super/vservers/limits.php
trunk/webinterface/mods/user/control/main.php
Log:
small fixes
Closes: #232
Modified: trunk/webinterface/core/XML.php
===================================================================
--- trunk/webinterface/core/XML.php 2008-12-20 17:14:53 UTC (rev 635)
+++ trunk/webinterface/core/XML.php 2008-12-20 17:16:46 UTC (rev 636)
@@ -101,23 +101,30 @@
$this->objectElements[$objectId]["struct"]["counter"] = 0;
$structNum = count($this->objectElements[$objectId]["struct"])-1;
$i++;
- while($vals[$i]['tag'] != "STRUCT") {
- $i++;
- if($vals[$i]['tag'] == "NAME")
- $memberName = $vals[$i]['value'];
- else if($vals[$i]['type'] == "complete")
- $this->objectElements[$objectId]["struct"][$structNum][$memberName] = $vals[$i]['value'];
+ if($vals[$i]['type'] != 'close')
+ {
+ while($vals[$i]['tag'] != "STRUCT") {
+ $i++;
+ if($vals[$i]['tag'] == "NAME")
+ $memberName = $vals[$i]['value'];
+ else if($vals[$i]['type'] == "complete")
+ $this->objectElements[$objectId]["struct"][$structNum][$memberName] = $vals[$i]['value'];
+ }
}
break;
case "ARRAY" :
$this->objectElements[$objectId]["array"]["counter"] = 0;
$arrayNum = count($this->objectElements[$objectId]["array"]);
$i++;
- while($vals[$i]['tag'] != "ARRAY")
+
+ if($vals[$i]['type'] != 'close')
{
- $i++;
- if($vals[$i]['type'] == "complete")
- $this->objectElements[$objectId]["array"][$arrayNum][] = $vals[$i]['value'];
+ while($vals[$i]['tag'] != "ARRAY")
+ {
+ $i++;
+ if($vals[$i]['type'] == "complete")
+ $this->objectElements[$objectId]["array"][$arrayNum][] = $vals[$i]['value'];
+ }
}
break;
}
Modified: trunk/webinterface/mods/super/vservers/limits.php
===================================================================
--- trunk/webinterface/mods/super/vservers/limits.php 2008-12-20 17:14:53 UTC (rev 635)
+++ trunk/webinterface/mods/super/vservers/limits.php 2008-12-20 17:16:46 UTC (rev 636)
@@ -149,7 +149,7 @@
$GUI->tableAddCol($row, _($rlimit['name']));
$GUI->formAddInputElement($GUI->tableAddCol($row, ""), "text", "rlimit[".$rlimit['name']."][min]", ((($rlimit['name'] == "rss" || $rlimit['name'] == "as") && $rlimit['min'] != "")? ($rlimit['min'] / 1024 * 4) : $rlimit['min']));
$GUI->formAddInputElement($GUI->tableAddCol($row, ""), "text", "rlimit[".$rlimit['name']."][soft]", ((($rlimit['name'] == "rss" || $rlimit['name'] == "as") && $rlimit['soft']!= "") ? ($rlimit['soft'] / 1024 * 4) : $rlimit['soft']));
- $GUI->formAddInputElement($GUI->tableAddCol($row, ""), "text", "rlimit[".$rlimit['name']."][hard]", ((($rlimit['name'] == "rss" || $rlimit['name'] == "as") && $rlimit['soft'] != "") ? ($rlimit['hard'] / 1024 * 4) : $rlimit['hard']));
+ $GUI->formAddInputElement($GUI->tableAddCol($row, ""), "text", "rlimit[".$rlimit['name']."][hard]", ((($rlimit['name'] == "rss" || $rlimit['name'] == "as") && $rlimit['hard'] != "") ? ($rlimit['hard'] / 1024 * 4) : $rlimit['hard']));
}
$trafficlimits = $vserver->getTrafficLimit();
Modified: trunk/webinterface/mods/user/control/main.php
===================================================================
--- trunk/webinterface/mods/user/control/main.php 2008-12-20 17:14:53 UTC (rev 635)
+++ trunk/webinterface/mods/user/control/main.php 2008-12-20 17:16:46 UTC (rev 636)
@@ -283,8 +283,11 @@
$osDD[$key] = $os;
}
}
- $osDD = array_flip($osDD);
+ foreach($osDD as $key=>$value) $osDDn[htmlentities($key)] = htmlentities($value);
+ $osDD = $osDDn;
+
+
if($PARAMS[2] == "submit" && $vserver != null && isset($_POST['submit']) && in_array($_POST['image'], $osDD) && md5($_POST['currentuserpass']) == $USERINFO['password'])
{
More information about the Commits
mailing list