You are here

function modr8_log_view in modr8 5

Same name and namespace in other branches
  1. 6 modr8_admin.inc \modr8_log_view()
  2. 7 modr8_admin.inc \modr8_log_view()

menu callback for moderation log.

1 string reference to 'modr8_log_view'
modr8_menu in ./modr8.module
Implementation of hook_menu().

File

./modr8.module, line 122
Easy dedicated content moderation

Code

function modr8_log_view($op = '', $id = 0) {
  require_once drupal_get_path('module', 'modr8') . '/modr8_admin.inc';
  switch ($op) {
    case '':
      return modr8_log_overview();
    case 'event':
      if (is_numeric($id)) {
        drupal_set_title(t('Moderation log event'));
        return modr8_log_event($id);
      }
      break;
    case 'node':
      if (is_numeric($id)) {
        $node = node_load($id);
        if ($node->nid) {
          drupal_set_title(check_plain($node->title));
        }
        return modr8_log_overview($id);
      }
      break;
  }
  drupal_not_found();
}