datastore['product'])) { $message->error(_('There are no products set up.')); } foreach ($bugsys->datastore['product'] AS $product) { if ($product['parentid']) { $components["$product[componentmother]"]["$product[productid]"] = $product; } else { $products["$product[productid]"] = $product; } } foreach ($bugsys->datastore['version'] AS $version) { $versions["$version[productid]"]["$version[versionid]"] = $version; } // global versions if (is_array($versions['0'])) { foreach ($versions['0'] AS $version) { $left = $version['version']; $right = null; eval('$globalversions .= "' . $template->fetch('explain_row') . '";'); } } foreach ($products AS $product) { $left = $product['title']; $right = $product['description']; $trextra = ' class="altcolor"'; eval('$productlist .= "' . $template->fetch('explain_row') . '";'); if (is_array($components["$product[productid]"])) { foreach ($components["$product[productid]"] AS $component) { $left = '  ›   ' . $component['title']; $right = $component['description']; $trextra = ''; eval('$productlist .= "' . $template->fetch('explain_row') . '";'); } } } eval('$template->flush("' . $template->fetch('explain_product') . '");'); } // ################################################################### if ($_REQUEST['do'] == 'automations') { $fields_fetch = $bugsys->db->query(" SELECT bugfield.*, MAX(permission.mask) AS mask FROM " . TABLE_PREFIX . "bugfield AS bugfield LEFT JOIN " . TABLE_PREFIX . "bugfieldpermission AS permission ON (bugfield.fieldid = permission.fieldid) WHERE (permission.mask = 2 OR permission.mask = 1) AND permission.usergroupid IN ({$bugsys->userinfo['usergroupid']}" . (sizeof($bugsys->userinfo['groupids']) != 0 ? ',' . implode(',', $bugsys->userinfo['groupids']) : '') . ") GROUP BY (bugfield.fieldid) "); while ($field = $bugsys->db->fetch_array($fields_fetch)) { $fields["$field[fieldid]"] = $field; } if (is_array($bugsys->datastore['automation'])) { foreach ($bugsys->datastore['automation'] AS $automation) { $automation['fieldchanges'] = unserialize($automation['fieldchanges']); $left = $automation['name']; $right = $automation['description']; $trextra = ' class="listinghead"'; eval('$automations .= "' . $template->fetch('explain_row') . '";'); if ($automation['comment']) { $left = _('Add Comment'); $right = $automation['comment']; $trextra = ' class="altcolor"'; eval('$automations .= "' . $template->fetch('explain_row') . '";'); } $trextra = ''; if (is_array($automation['fieldchanges']['builtin'])) { foreach ($automation['fieldchanges']['builtin'] AS $name => $value) { $left = $name; $right = $bugsys->datastore["$left"]["$value"]["$left"]; eval('$automations .= "' . $template->fetch('explain_row') . '";'); } } if (is_array($automation['fieldchanges']['custom'])) { foreach ($automation['fieldchanges']['custom'] AS $id => $value) { if (!$fields["$id"]) { continue; } $left = $fields["$id"]['name'] . ' ' . sprintf(_('(Custom #%1$d, type: %2$s)'), $id, $fields["$id"]['type']); $right = $value; eval('$automations .= "' . $template->fetch('explain_row') . '";'); } } } } eval('$template->flush("' . $template->fetch('explain_automation') . '");'); } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>