Talk:IMC-Drupal/Development/Hiddens

From Aktivix
Jump to navigation Jump to search

Fixed:

  • reply link on hidden comments to go
  • Changes to _hidden_log so that user that is 'doing' the automatic hiding is correct, and change auto hide e-mail to by: (author) hidden by: who ever is 'doing' the hiding
ekes@meuse:/var/www/indymedia-drupal/drupal-5.2/sites/all/modules/hidden$ diff hidden.module.old hidden.module
529c529
<       _hidden_log(HIDDEN_LOG_HIDE, t('Hidden node.'), 'node', $hidden->nid, $hidden->rid, $hidden->publicnote, $hidden->privatenote);
---
>       _hidden_log(HIDDEN_LOG_HIDE, t('Hidden node'), 'node', $hidden->nid, $hidden->rid, $hidden->publicnote, $hidden->privatenote, $hidden->uid);
532c532
<       _hidden_log(HIDDEN_LOG_HIDE, t('Hidden comment.'), 'comment', $hidden->cid, $hidden->rid, $hidden->publicnote, $hidden->privatenote);
---
>       _hidden_log(HIDDEN_LOG_HIDE, t('Hidden comment.'), 'comment', $hidden->cid, $hidden->rid, $hidden->publicnote, $hidden->privatenote, $hidden->uid);
1629c1629
<     $links = array_merge(comment_link('comment', $comment), hidden_link('comment', $comment));
---
>     $links = hidden_link('comment', $comment);
1709d1708
<   global $user;
1710a1710,1715
>   if ($edit->uid && user_access('administer hidden')) {
>     $user = user_load(array('uid'=>$uid));
>   }
>   else {
>     global $user;
>   }
2936,2937c2941,2948
< function _hidden_log($action, $description, $type='', $id=0, $rid=0, $public='') {
<   global $user;
---
> function _hidden_log($action, $description, $type='', $id=0, $rid=0, $public='', $uid='') {
>   if ($uid=='') {
>     global $user;
>   } 
>   else {
>     // only the case when called from a cron
>     $user = user_load(array('uid' => $uid));
>   }