When user will translate button default names from "Hide" and "Report"
to their own language, it will NOT work at all, see below what should be changed,
I believe it is too simple mistake/typo to submit patch.

function hidden_hide_submit($form_id, $form_values) {
  $op = (string)$form_values['op'];
  //if ($op == 'Hide') {
  if ($op == t('Hide')) {
    if (! user_access('mark as hidden')) {
      drupal_access_denied();
    }
  }
  //elseif ($op == 'Report') {
  elseif ($op == t('Report')) {
    if (! user_access('report for hiding')) {
      drupal_access_denied();
    }
  }

HTH
Bartek

Comments

lmoccozet’s picture

You need also to change it again in the same function (line 1857):

  if ($op == t('Hide')) {
    if (_hidden_hidden_hide($nid, $cid, $uid, $rid, $public, $private)) {
      $msg = t('Hidden %type.', $t_args); 
      _hidden_log(HIDDEN_LOG_HIDE, $msg, $type, $id, $rid, $public, $private);
      drupal_set_message($msg);
    }

L.M.

ekes’s picture

Status: Active » Fixed

Cheers, committed these so they're in CVS and checked this is the only place $op contains $form_values.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.