| 1 |
<?php |
<?php |
| 2 |
// $Id: content_refresh.module,v 1.7 2008/09/10 21:06:52 yaph Exp $ |
// $Id: content_refresh.module,v 1.8 2008/10/15 09:53:45 yaph Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 102 |
*/ |
*/ |
| 103 |
function content_refresh_comment($a1, $op) { |
function content_refresh_comment($a1, $op) { |
| 104 |
global $user; |
global $user; |
| 105 |
// check wheter user is anonymous and is allowed to post comments without approval |
// check wheter user is anonymous |
| 106 |
if (0 == $user->uid && user_access('post comments without approval')) { |
if (0 == $user->uid) { |
| 107 |
switch ($op) { |
switch ($op) { |
| 108 |
case 'insert': |
case 'insert': |
| 109 |
case 'update': |
case 'update': |
| 110 |
$nid = $a1['nid']; |
$nid = $a1['nid']; |
| 111 |
break; |
break; |
| 112 |
|
case 'publish': |
| 113 |
case 'unpublish': |
case 'unpublish': |
| 114 |
case 'delete': |
case 'delete': |
| 115 |
$nid = $a1->nid; |
$nid = $a1->nid; |