function _hosting_task_log_table in Hosting 6.2
Same name and namespace in other branches
- 5 task/hosting_task.module \_hosting_task_log_table()
- 7.4 task/hosting_task.module \_hosting_task_log_table()
- 7.3 task/hosting_task.module \_hosting_task_log_table()
Display table containing the logged information for this task
1 call to _hosting_task_log_table()
- hosting_task_view in task/
hosting_task.module - Implementation of hook_view().
File
- task/
hosting_task.module, line 809 - Web server node type is defined here.
Code
function _hosting_task_log_table($vid) {
$result = db_query("SELECT * FROM {hosting_task_log} WHERE vid = %d ORDER BY lid", $vid);
if ($result) {
$header = array(
'data' => 'Log message',
);
while ($entry = db_fetch_object($result)) {
if (strlen($entry->message) > 300) {
$summary = "<span class='hosting-task-summary'>" . filter_xss(substr($entry->message, 0, 75), array()) . "... <a href='javascript:void(0)' class='hosting-summary-expand modalframe-exclude'>(" . t('Expand') . ')</a></span>';
$message = $summary . "<span class='hosting-task-full'>" . filter_xss($entry->message) . '</span>';
}
else {
$message = filter_xss($entry->message);
}
$row = array(
array(
'data' => $message,
'class' => 'hosting-status',
),
);
$rows[] = array(
'data' => $row,
'class' => _hosting_task_log_class($entry->type),
);
}
return theme("table", $header, (array) $rows, array(
'id' => 'hosting-task-log',
'class' => 'hosting-table',
));
}
return false;
}