diff --git a/trunk/gosa-core/include/class_gosaSupportDaemon.inc b/trunk/gosa-core/include/class_gosaSupportDaemon.inc
index cd776aa59e0f75be04709a367889b75433ac79f4..e887252354804d877b9db9c3db12564feb2f2715 100644 (file)
}
- public function FAI_get_packages($release,$attrs,$package,$from=-1,$to=-1)
+ public function FAI_get_packages($release,$attrs,$package,$from=-1,$to=-1, $exclude_sections=array())
{
$ret = array();
/* If no package is given, search for all */
if(!count($package)) $package = array("%");
+ /* If no section is given, search for all */
+ $section_filter = "";
+ if(count($exclude_sections)) {
+ $section_filter = '<clause><connector>AND</connector>';
+ foreach ($exclude_sections as $section => $value) {
+ $section_filter .= "<phrase><operator>ne</operator><section>"
+ .$section
+ ."</section></phrase>";
+ }
+ $section_filter .= "</clause>";
+ }
+
/* Create limit tag */
if($from == -1){
$limit ="";
<clause><connector>OR</connector>
".$pkgs."
</clause>
+ ".$section_filter."
</where>".
$limit.
"</xml>";
/* Append an entry for each target
*/
foreach($targets as $target){
+ if (is_array($target)) {
+ $target = $target['mac'];
+ }
+
if(!$skip_add_mac){
$data['macaddress'] = $target;
}