function initializeGui(&$dbHandler, $argsObj)
{
    $issueTrackerMgr = new tlIssueTracker($dbHandler);
    $gui = new stdClass();
    $gui->items = $issueTrackerMgr->getAll(array('output' => 'add_link_count', 'checkEnv' => true));
    $gui->user_feedback = $argsObj->user_feedback;
    $gui->canManage = $argsObj->canManage;
    $gui->tproject_id = $argsObj->tproject_id;
    $gui->body_onload = '';
    return $gui;
}
 *
 * @filesource  issueTrackerView.php
 *
 * @author   francisco.mancardi@gmail.com
 * @internal revisions
 * 
 *
**/
require_once dirname(__FILE__) . "/../../config.inc.php";
require_once "common.php";
testlinkInitPage($db, false, false, "checkRights");
$templateCfg = templateConfiguration();
$issueTrackerMgr = new tlIssueTracker($db);
$gui = new stdClass();
$args = init_args();
$gui->items = $issueTrackerMgr->getAll(array('output' => 'add_link_count', 'checkEnv' => true));
$gui->canManage = $args->currentUser->hasRight($db, "issuetracker_management");
$gui->user_feedback = $args->user_feedback;
if ($args->id > 0) {
    $gui->items[$args->id]['connection_status'] = $issueTrackerMgr->checkConnection($args->id) ? 'ok' : 'ko';
}
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
/**
 * @return object returns the arguments for the page
 */
function init_args()
{
    $args = new stdClass();
    $args->tproject_id = isset($_SESSION['testprojectID']) ? intval($_SESSION['testprojectID']) : 0;
Beispiel #3
0
/**
 * initialize page ENVironment
 *
 * @return array
 * @internal revisions
 */
function initializeEnv(&$dbHandler)
{
    $tprojectMgr = new testproject($dbHandler);
    $argsObj = init_args($tprojectMgr);
    // Gui
    $guiObj = $argsObj;
    $guiObj->canManage = $guiObj->user->hasRight($dbHandler, "mgt_modify_product");
    $guiObj->mgt_view_events = $guiObj->user->hasRight($dbHandler, "mgt_view_events");
    $guiObj->found = 'yes';
    $guiObj->cfg = config_get('gui');
    $guiObj->user_feedback = '';
    $guiObj->feedback_type = 'ultrasoft';
    $guiObj->main_descr = lang_get('title_testproject_management');
    $itMgr = new tlIssueTracker($dbHandler);
    $guiObj->issueTrackers = $itMgr->getAll();
    unset($itMgr);
    // UI
    $uiObj = new stdClass();
    $uiObj->doActionValue = $uiObj->buttonValue = $uiObj->caption = '';
    return array($tprojectMgr, $argsObj, $guiObj, $uiObj);
}