Exemplo n.º 1
0
echo "<pre> tree - get_subtree_list(\$node_id)";
echo "</pre>";
echo "<pre> get_subtree_list({$node_id})";
echo "</pre>";
$subtree_list = $tree_mgr->get_subtree_list($node_id);
new dBug($subtree_list);
$path_begin_node_id = 285;
$path_end_node_id = 2;
define('TREE_ROOT', null);
define('FORMAT_FULL', 'full');
define('FORMAT_SIMPLE', 'simple');
echo "<pre> tree - get_path(\$node_id,\$to_node_id = null,\$format = 'full') ";
echo "</pre>";
echo "<pre> tree - get_path({$path_begin_node_id}) ";
echo "</pre>";
$path = $tree_mgr->get_path($path_begin_node_id);
new dBug($path);
echo "<pre> tree - get_path(\$node_id,\$to_node_id = null,\$format = 'full') ";
echo "</pre>";
echo "<pre> tree - get_path({$path_begin_node_id},TREE_ROOT,FORMAT_FULL) ";
echo "</pre>";
$path = $tree_mgr->get_path($path_begin_node_id, TREE_ROOT, FORMAT_FULL);
new dBug($path);
echo "<pre> tree - get_path({$path_begin_node_id},TREE_ROOT,FORMAT_SIMPLE) ";
echo "</pre>";
$path = $tree_mgr->get_path($path_begin_node_id, TREE_ROOT, FORMAT_SIMPLE);
new dBug($path);
echo "<pre> tree - get_path({$path_begin_node_id},{$path_end_node_id},FORMAT_FULL) ";
echo "</pre>";
$path = $tree_mgr->get_path($path_begin_node_id, $path_end_node_id, FORMAT_FULL);
new dBug($path);
Exemplo n.º 2
0
     $identity->tproject_id = $args->tproject_id;
     $identity->id = $args->old_container_id;
     $tsuite_mgr->show($smarty, $gui, $identity);
 } else {
     if ($args->do_copy) {
         $user_feedback = '';
         $msg = '';
         $options = array('check_duplicate_name' => config_get('check_names_for_duplicates'), 'action_on_duplicate_name' => config_get('action_on_duplicate_name'), 'copy_also' => $args->copy);
         $result = $tcase_mgr->copy_to($args->tcase_id, $args->new_container_id, $args->user_id, $options);
         $msg = $result['msg'];
         if ($result['status_ok']) {
             $tree_mgr->change_child_order($args->new_container_id, $result['id'], $args->target_position, $cfg->exclude_node_types);
             $ts_sep = config_get('testsuite_sep');
             $tc_info = $tcase_mgr->get_by_id($args->tcase_id);
             $container_info = $tree_mgr->get_node_hierarchy_info($args->new_container_id);
             $container_path = $tree_mgr->get_path($args->new_container_id);
             $path = '';
             foreach ($container_path as $key => $value) {
                 $path .= $value['name'] . $ts_sep;
             }
             $path = trim($path, $ts_sep);
             $user_feedback = sprintf(lang_get('tc_copied'), $tc_info[0]['name'], $path);
         }
         $gui->refreshTree = $args->refreshTree;
         $viewer_args['action'] = 'copied';
         $viewer_args['refreshTree'] = $args->refreshTree ? 1 : 0;
         $viewer_args['msg_result'] = $msg;
         $viewer_args['user_feedback'] = $user_feedback;
         $identity = new stdClass();
         $identity->tproject_id = $args->tproject_id;
         $identity->id = $args->tcase_id;
Exemplo n.º 3
0
/**
 * 
 *
 */
function buildCookie(&$dbHandler, $itemID, $tprojectID, $cookiePrefix)
{
    $tree_mgr = new tree($dbHandler);
    $path = $tree_mgr->get_path($itemID);
    $parents = array();
    $parents[] = $tprojectID;
    foreach ($path as $node) {
        $parents[] = $node['id'];
    }
    array_pop($parents);
    $cookieInfo['path'] = 'a:s%3A/' . implode("/", $parents);
    $cookieInfo['value'] = $cookiePrefix . $tprojectID . '_ext-comp-1001';
    return $cookieInfo;
}