Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
Merge pull request #1670 from okonomiyaki3000/JForm-change-xpath
Browse files Browse the repository at this point in the history
JForm::findFieldsByFieldset
  • Loading branch information
LouisLandry committed Nov 9, 2012
2 parents 20bb5ce + c334a43 commit 3d21b02
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions libraries/joomla/form/form.php
Expand Up @@ -1489,10 +1489,11 @@ protected function &findFieldsByFieldset($name)

/*
* Get an array of <field /> elements that are underneath a <fieldset /> element
* with the appropriate name attribute, and also any <field /> elements with
* the appropriate fieldset attribute.
* with the appropriate name attribute (unless they are the decendents
* of another <field /> element for some reaon), and also any <field /> elements
* with the appropriate fieldset attribute.
*/
$fields = $this->xml->xpath('//fieldset[@name="' . $name . '"]//field | //field[@fieldset="' . $name . '"]');
$fields = $this->xml->xpath('//fieldset[@name="' . $name . '"]//field[not(ancestor::field)] | //field[@fieldset="' . $name . '"]');

return $fields;
}
Expand Down

0 comments on commit 3d21b02

Please sign in to comment.