* * Get inventory data * * @package TestLink * @author Martin Havlat * @copyright 2009, TestLink community * @version CVS: $Id: getInventory.php,v 1.2 2010/02/20 09:27:29 franciscom Exp $ * * @internal Revisions: * None * **/ require_once '../../config.inc.php'; require_once 'common.php'; testlinkInitPage($db); $tlIs = new tlInventory($_SESSION['testprojectID'], $db); $data = $tlIs->getAll(); $tlUser = new tlUser($_SESSION['userID']); $users = $tlUser->getNames($db); // fill login instead of user ID if (!is_null($data)) { foreach ($data as $k => $v) { if ($v['owner_id'] != '0') { $data[$k]['owner'] = $users[$v['owner_id']]['login']; } else { $data[$k]['owner'] = ''; } } } //new dBug($data); echo json_encode($data);
* 20100825 - Julian - make table collapsible if more than 1 table is shown * 20100825 - eloff - BUGID 3711 - Hide platform if not used * 20100823 - asimon - refactoring: $table_id * 20100822 - franciscom - refactoring - getColumnsDefinition() * 20100816 - asimon - if priority is enabled, enable default sorting by that column * 20100802 - asimon - BUGID 3647, filtering by build * 20100731 - asimon - heavy refactoring, modified to include more parameters and flexibility, * changed table to ExtJS format */ require_once "../../config.inc.php"; require_once "common.php"; require_once "exttable.class.php"; testlinkInitPage($db); $templateCfg = templateConfiguration(); $user = new tlUser($db); $names = $user->getNames($db); $urgencyImportance = config_get('urgencyImportance'); $results_config = config_get('results'); $args = init_args(); if ($args->user_id > 0) { $args->user_name = $names[$args->user_id]['login']; } $tcase_mgr = new testcase($db); $tproject_mgr = new testproject($db); $tproject_info = $tproject_mgr->get_by_id($args->tproject_id); unset($tproject_mgr); $gui = new stdClass(); $gui->glueChar = config_get('testcase_cfg')->glue_character; $gui->tproject_name = $tproject_info['name']; $gui->warning_msg = ''; $gui->tableSet = null;