Fixed PHP3 compatibility (foreach-loops).
This commit is contained in:
@@ -37,7 +37,8 @@ if (!defined('PMA_DBG_PROFILING_INCLUDED')) {
|
|||||||
'<td>' . $GLOBALS['strDBGContext'] . '</td>' . "\n" .
|
'<td>' . $GLOBALS['strDBGContext'] . '</td>' . "\n" .
|
||||||
'</tr></thead>' . "\n" .
|
'</tr></thead>' . "\n" .
|
||||||
'<tbody style="vertical-align: top">' . "\n";
|
'<tbody style="vertical-align: top">' . "\n";
|
||||||
foreach ($dbg_prof_results['line_no'] as $idx => $line_no) {
|
@reset($dbg_prof_results['line_no']);
|
||||||
|
while(list($idx, $line_no) = each($dbg_prof_results['line_no'])) {
|
||||||
$mod_no = $dbg_prof_results['mod_no'][$idx];
|
$mod_no = $dbg_prof_results['mod_no'][$idx];
|
||||||
dbg_get_module_name($mod_no, &$mod_name);
|
dbg_get_module_name($mod_no, &$mod_name);
|
||||||
|
|
||||||
|
@@ -216,7 +216,8 @@ class XPath {
|
|||||||
$aExistingAttributes = $this->getAttributes($absoluteXPath);
|
$aExistingAttributes = $this->getAttributes($absoluteXPath);
|
||||||
$aExistingAttributes = array_intersect($aExistingAttributes, $attributes);
|
$aExistingAttributes = array_intersect($aExistingAttributes, $attributes);
|
||||||
$aNewAttributes = $attributes;
|
$aNewAttributes = $attributes;
|
||||||
foreach($aExistingAttributes as $name => $value)
|
@reset($aExistingAttributes);
|
||||||
|
while(list($name, $value) = each($aExistingAttributes)) {
|
||||||
unset($aNewAttributes[$name]);
|
unset($aNewAttributes[$name]);
|
||||||
return $this->setAttributes($absoluteXPath, $aNewAttributes);
|
return $this->setAttributes($absoluteXPath, $aNewAttributes);
|
||||||
} else {
|
} else {
|
||||||
@@ -982,7 +983,8 @@ class XPath {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove all the elements in the array then.
|
// Remove all the elements in the array then.
|
||||||
foreach($attribute as $name) {
|
@reset($attribute);
|
||||||
|
while(list(, $name) = each($attribute)) {
|
||||||
unset($this->nodes[$absoluteXPath]['attributes'][$name]);
|
unset($this->nodes[$absoluteXPath]['attributes'][$name]);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -1052,8 +1054,8 @@ class XPath {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Return the cdata of the node.
|
// Return the cdata of the node.
|
||||||
foreach($this->nodes[$absoluteXPath]["text"] as $textNode)
|
@reset($this->nodes[$absoluteXPath]['text']);
|
||||||
{
|
while(list(, $textNode) = each($this->nodes[$absoluteXPath]['text'])) {
|
||||||
$text[] = $textNode;
|
$text[] = $textNode;
|
||||||
}
|
}
|
||||||
return $text;
|
return $text;
|
||||||
@@ -3446,7 +3448,8 @@ class XPath {
|
|||||||
|
|
||||||
if ( $axis["node-test"] == "cdata" ) {
|
if ( $axis["node-test"] == "cdata" ) {
|
||||||
if ( !isSet($this->nodes[$context]["text"]) ) return "";
|
if ( !isSet($this->nodes[$context]["text"]) ) return "";
|
||||||
foreach ($this->nodes[$context]['text'] as $index => $text) {
|
@reset($this->nodes[$context]['text']);
|
||||||
|
while(list($index, $text) = each($this->nodes[$context]['text'])) {
|
||||||
$nodes[] = $context . "/text()[".($index + 1)."]";
|
$nodes[] = $context . "/text()[".($index + 1)."]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user