Ticket #999: results_php.patch

File results_php.patch, 1.1 KB (added by Thyme Lawn, 14 years ago)

Patch applied on CPDN to display host id in user task list (SVN trunk)

  • results.php

     
    4646    if (!$host) error_page(tra("No computer with ID %1 found", $hostid));
    4747    $clause = "hostid=$hostid";
    4848    page_head(tra("$s tasks for computer %1", $host->id));
     49    $show_host = false;
    4950} else if ($userid){
    5051    $user = get_logged_in_user();
    5152    if ($userid != $user->id) {
     
    5354    }
    5455    $clause = "userid=$userid";
    5556    page_head(tra("$s tasks for $user->name"));
     57    $show_host = true;
    5658} else {
    5759    error_page(tra("Missing user ID or host ID"));
    5860}
     
    7274
    7375if (count($results)) {
    7476    echo show_result_navigation($info);
    75     result_table_start(true, false, $info);
     77    result_table_start(true, $show_host, $info);
    7678    $i = 0;
    7779    foreach ($results as $result) {
    7880        if ($i >= $results_per_page) break;
    79         show_result_row($result, true, false, $show_names, $i);
     81        show_result_row($result, true, $show_host, $show_names, $i);
    8082        $i++;
    8183    }
    8284    echo "</table>\n";