function theme_dblog_message

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 dblog.admin.inc theme_dblog_message($variables)
cle7 dblog.admin.inc theme_dblog_message($variables)
elmsmedia7 dblog.admin.inc theme_dblog_message($variables)
icor7 dblog.admin.inc theme_dblog_message($variables)
meedjum_blog7 dblog.admin.inc theme_dblog_message($variables)
mooc7 dblog.admin.inc theme_dblog_message($variables)

Returns HTML for a log message.

Parameters

array $variables: An associative array containing:

  • event: An object with at least the message and variables properties.
  • link: (optional) Format message as link, event->wid is required.

Related topics

3 theme calls to theme_dblog_message()
dblog_event in modules/dblog/dblog.admin.inc
Page callback: Displays details about a specific database log message.
dblog_overview in modules/dblog/dblog.admin.inc
Page callback: Displays a listing of database log messages.
dblog_top in modules/dblog/dblog.admin.inc
Page callback: Shows the most frequent log messages of a given event type.
4 string references to the theme hook from theme_dblog_message()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

dblog_event in modules/dblog/dblog.admin.inc
Page callback: Displays details about a specific database log message.
dblog_overview in modules/dblog/dblog.admin.inc
Page callback: Displays a listing of database log messages.
dblog_theme in modules/dblog/dblog.module
Implements hook_theme().
dblog_top in modules/dblog/dblog.admin.inc
Page callback: Shows the most frequent log messages of a given event type.

File

modules/dblog/dblog.admin.inc, line 284
Administrative page callbacks for the Database Logging module.

Code

function theme_dblog_message($variables) {
  $output = '';
  $event = $variables['event'];
  // Check for required properties.
  if (isset($event->message) && isset($event->variables)) {
    // Messages without variables or user specified text.
    if ($event->variables === 'N;') {
      $output = $event->message;
    }
    // Message to translate with injected variables.
    else {
      $output = t($event->message, unserialize($event->variables));
    }
    if ($variables['link'] && isset($event->wid)) {
      // Truncate message to 56 chars.
      $output = truncate_utf8(filter_xss($output, array()), 56, TRUE, TRUE);
      $output = l($output, 'admin/reports/event/' . $event->wid, array('html' => TRUE));
    }
  }
  return $output;
}