function dashboard_log_event($message, $ident = 'misc', $priority = DASHBOARD_LOG_NOTICE) { /* BC. Order of parameters was swapped in 0.4.0. */ if (is_integer($ident)) { $warning = __('Message below from <b>:ident</b> uses old Dashboard API.', array(':ident' => $priority)); dashboard_log_event($warning, 'dashboard', DASHBOARD_LOG_WARNING); $data['ident'] = $priority; $data['priority'] = $ident; } else { $data['ident'] = $ident; $data['priority'] = $priority; } $data['message'] = $message; $entry = new DashboardLogEntry($data); $entry->save(); }
public static function logEvent($message, $ident = "misc", $priority = DASHBOARD_LOG_NOTICE) { /* BC. Order of parameters was swapped in 0.4.0. */ if (is_int($ident)) { $warning = __("Message below from <b>:ident</b> uses old Dashboard API.", array(":ident" => $priority)); self::logEvent($warning, "dashboard", DASHBOARD_LOG_WARNING); $data["ident"] = $priority; $data["priority"] = $ident; } else { $data["ident"] = $ident; $data["priority"] = $priority; } $data["message"] = $message; $entry = new DashboardLogEntry($data); $entry->save(); }
function dashboard_log_snippet_edit($snippet) { $linked_title = sprintf('<a href="%s">%s</a>', get_url('snippet/edit/' . $snippet->id), $snippet->name); $data['ident'] = 'core'; $data['priority'] = DASHBOARD_LOG_NOTICE; $data['message'] = __('Snippet <b>:title</b> was revised by :name', array(':title' => $linked_title, ':name' => AuthUser::getRecord()->name)); $entry = new DashboardLogEntry($data); $entry->save(); }