2007-10-31 17:50:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2012-01-03 04:36:15 +00:00
|
|
|
* Admin page callbacks for the Comment module.
|
2007-10-31 17:50:47 +00:00
|
|
|
*/
|
|
|
|
|
2013-08-18 21:16:19 +00:00
|
|
|
use Drupal\comment\Entity\Comment;
|
Issue #1668866 by ParisLiakos, aspilicious, tim.plunkett, pdrake, g.oechsler, dawehner, Berdir, corvus_ch, damiankloip, disasm, marcingy, neclimdul: Replace drupal_goto() with RedirectResponse.
2013-06-19 16:07:30 +00:00
|
|
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
2012-06-02 19:41:40 +00:00
|
|
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
2012-05-03 05:49:41 +00:00
|
|
|
|
2007-10-31 17:50:47 +00:00
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Page callback: Presents an administrative comment listing.
|
|
|
|
*
|
|
|
|
* @param $type
|
|
|
|
* The type of the overview form ('approval' or 'new'). See
|
|
|
|
* comment_admin_overview() for details.
|
|
|
|
*
|
|
|
|
* @see comment_menu()
|
|
|
|
* @see comment_multiple_delete_confirm()
|
2007-10-31 17:50:47 +00:00
|
|
|
*/
|
|
|
|
function comment_admin($type = 'new') {
|
2013-06-20 18:35:44 +00:00
|
|
|
$edit = Drupal::request()->request->all();
|
2007-10-31 17:50:47 +00:00
|
|
|
|
|
|
|
if (isset($edit['operation']) && ($edit['operation'] == 'delete') && isset($edit['comments']) && $edit['comments']) {
|
2009-05-25 10:43:54 +00:00
|
|
|
return drupal_get_form('comment_multiple_delete_confirm');
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
|
|
|
else {
|
2010-06-25 21:24:35 +00:00
|
|
|
return drupal_get_form('comment_admin_overview', $type);
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Form constructor for the comment overview administration form.
|
2007-10-31 17:50:47 +00:00
|
|
|
*
|
2007-12-16 21:01:45 +00:00
|
|
|
* @param $arg
|
2012-01-03 04:36:15 +00:00
|
|
|
* The type of overview form ('approval' or 'new').
|
2010-06-25 21:24:35 +00:00
|
|
|
*
|
2007-10-31 17:50:47 +00:00
|
|
|
* @ingroup forms
|
2012-01-03 04:36:15 +00:00
|
|
|
* @see comment_admin()
|
2008-01-08 10:35:43 +00:00
|
|
|
* @see comment_admin_overview_validate()
|
|
|
|
* @see comment_admin_overview_submit()
|
|
|
|
* @see theme_comment_admin_overview()
|
2007-10-31 17:50:47 +00:00
|
|
|
*/
|
2009-09-18 00:12:48 +00:00
|
|
|
function comment_admin_overview($form, &$form_state, $arg) {
|
2008-05-14 13:12:41 +00:00
|
|
|
// Build an 'Update options' form.
|
2007-10-31 17:50:47 +00:00
|
|
|
$form['options'] = array(
|
2012-11-27 07:06:47 +00:00
|
|
|
'#type' => 'details',
|
2008-05-14 13:12:41 +00:00
|
|
|
'#title' => t('Update options'),
|
2010-03-03 19:46:26 +00:00
|
|
|
'#attributes' => array('class' => array('container-inline')),
|
2007-10-31 17:50:47 +00:00
|
|
|
);
|
2010-03-07 07:15:28 +00:00
|
|
|
|
|
|
|
if ($arg == 'approval') {
|
|
|
|
$options['publish'] = t('Publish the selected comments');
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$options['unpublish'] = t('Unpublish the selected comments');
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
2010-03-07 07:15:28 +00:00
|
|
|
$options['delete'] = t('Delete the selected comments');
|
|
|
|
|
2008-05-14 13:12:41 +00:00
|
|
|
$form['options']['operation'] = array(
|
|
|
|
'#type' => 'select',
|
2013-06-06 19:10:20 +00:00
|
|
|
'#title' => t('Action'),
|
2010-10-20 01:31:07 +00:00
|
|
|
'#title_display' => 'invisible',
|
2008-05-14 13:12:41 +00:00
|
|
|
'#options' => $options,
|
|
|
|
'#default_value' => 'publish',
|
|
|
|
);
|
|
|
|
$form['options']['submit'] = array(
|
|
|
|
'#type' => 'submit',
|
|
|
|
'#value' => t('Update'),
|
|
|
|
);
|
2007-10-31 17:50:47 +00:00
|
|
|
|
2008-05-14 13:12:41 +00:00
|
|
|
// Load the comments that need to be displayed.
|
2007-10-31 17:50:47 +00:00
|
|
|
$status = ($arg == 'approval') ? COMMENT_NOT_PUBLISHED : COMMENT_PUBLISHED;
|
2009-01-28 07:43:26 +00:00
|
|
|
$header = array(
|
|
|
|
'subject' => array('data' => t('Subject'), 'field' => 'subject'),
|
2012-09-26 18:26:15 +00:00
|
|
|
'author' => array('data' => t('Author'), 'field' => 'name', 'class' => array(RESPONSIVE_PRIORITY_MEDIUM)),
|
|
|
|
'posted_in' => array('data' => t('Posted in'), 'field' => 'node_title', 'class' => array(RESPONSIVE_PRIORITY_LOW)),
|
|
|
|
'changed' => array('data' => t('Updated'), 'field' => 'c.changed', 'sort' => 'desc', 'class' => array(RESPONSIVE_PRIORITY_LOW)),
|
2012-10-09 19:49:07 +00:00
|
|
|
'operations' => t('Operations'),
|
2009-01-28 07:43:26 +00:00
|
|
|
);
|
|
|
|
|
2012-06-05 05:42:19 +00:00
|
|
|
$query = db_select('comment', 'c')
|
|
|
|
->extend('Drupal\Core\Database\Query\PagerSelectExtender')
|
2012-06-08 12:26:56 +00:00
|
|
|
->extend('Drupal\Core\Database\Query\TableSortExtender');
|
2013-05-26 20:18:10 +00:00
|
|
|
$query->join('node_field_data', 'n', 'n.nid = c.nid');
|
2011-01-03 05:18:42 +00:00
|
|
|
$query->addTag('node_access');
|
2009-06-06 10:27:42 +00:00
|
|
|
$result = $query
|
2013-05-26 20:18:10 +00:00
|
|
|
->fields('c', array('cid', 'nid', 'subject', 'name', 'changed'))
|
2009-02-22 16:53:41 +00:00
|
|
|
->condition('c.status', $status)
|
|
|
|
->limit(50)
|
2009-06-06 10:27:42 +00:00
|
|
|
->orderByHeader($header)
|
|
|
|
->execute();
|
2010-01-30 07:59:26 +00:00
|
|
|
|
2013-05-26 20:18:10 +00:00
|
|
|
$nids = array();
|
2010-01-11 00:17:02 +00:00
|
|
|
$cids = array();
|
2009-02-22 16:53:41 +00:00
|
|
|
|
2010-01-07 05:23:52 +00:00
|
|
|
// We collect a sorted list of node_titles during the query to attach to the
|
|
|
|
// comments later.
|
|
|
|
foreach ($result as $row) {
|
2013-05-26 20:18:10 +00:00
|
|
|
$nids[] = $row->nid;
|
2010-01-07 05:23:52 +00:00
|
|
|
$cids[] = $row->cid;
|
|
|
|
}
|
2013-05-26 20:18:10 +00:00
|
|
|
// Ensure all nodes are statically cached so that we do not have to load them
|
|
|
|
// individually when getting their labels below.
|
|
|
|
node_load_multiple($nids);
|
2010-01-07 05:23:52 +00:00
|
|
|
$comments = comment_load_multiple($cids);
|
2007-10-31 17:50:47 +00:00
|
|
|
|
2008-05-14 13:12:41 +00:00
|
|
|
// Build a table listing the appropriate comments.
|
2009-01-28 07:43:26 +00:00
|
|
|
$options = array();
|
2007-10-31 17:50:47 +00:00
|
|
|
$destination = drupal_get_destination();
|
2009-01-28 07:43:26 +00:00
|
|
|
|
2010-01-07 05:23:52 +00:00
|
|
|
foreach ($comments as $comment) {
|
2010-01-11 00:17:02 +00:00
|
|
|
// Remove the first node title from the node_titles array and attach to
|
2010-01-07 05:23:52 +00:00
|
|
|
// the comment.
|
2013-05-26 20:18:10 +00:00
|
|
|
$node_title = $comment->nid->entity->label();
|
2013-06-29 13:43:09 +00:00
|
|
|
$username = array(
|
|
|
|
'#theme' => 'username',
|
|
|
|
'#account' => comment_prepare_author($comment),
|
|
|
|
);
|
2013-01-14 10:59:47 +00:00
|
|
|
$options[$comment->id()] = array(
|
2009-11-03 05:27:18 +00:00
|
|
|
'subject' => array(
|
|
|
|
'data' => array(
|
|
|
|
'#type' => 'link',
|
2013-01-14 10:59:47 +00:00
|
|
|
'#title' => $comment->subject->value,
|
|
|
|
'#href' => 'comment/' . $comment->id(),
|
|
|
|
'#options' => array('attributes' => array('title' => truncate_utf8($comment->comment_body->value, 128)), 'fragment' => 'comment-' . $comment->id()),
|
2009-11-03 05:27:18 +00:00
|
|
|
),
|
|
|
|
),
|
2013-06-29 13:43:09 +00:00
|
|
|
'author' => drupal_render($username),
|
2009-11-03 05:27:18 +00:00
|
|
|
'posted_in' => array(
|
|
|
|
'data' => array(
|
|
|
|
'#type' => 'link',
|
2013-01-14 10:59:47 +00:00
|
|
|
'#title' => $node_title,
|
2013-02-01 16:08:58 +00:00
|
|
|
'#href' => 'node/' . $comment->nid->target_id,
|
2009-11-03 05:27:18 +00:00
|
|
|
),
|
|
|
|
),
|
2013-01-14 10:59:47 +00:00
|
|
|
'changed' => format_date($comment->changed->value, 'short'),
|
2012-10-09 19:49:07 +00:00
|
|
|
);
|
|
|
|
$links = array();
|
|
|
|
$links['edit'] = array(
|
|
|
|
'title' => t('edit'),
|
2013-01-14 10:59:47 +00:00
|
|
|
'href' => 'comment/' . $comment->id() . '/edit',
|
2012-10-09 19:49:07 +00:00
|
|
|
'query' => $destination,
|
|
|
|
);
|
2013-06-25 19:16:20 +00:00
|
|
|
if (module_invoke('content_translation', 'translate_access', $comment)) {
|
2012-11-22 16:03:57 +00:00
|
|
|
$links['translate'] = array(
|
|
|
|
'title' => t('translate'),
|
2013-01-14 10:59:47 +00:00
|
|
|
'href' => 'comment/' . $comment->id() . '/translations',
|
2012-11-22 16:03:57 +00:00
|
|
|
'query' => $destination,
|
|
|
|
);
|
|
|
|
}
|
2013-01-14 10:59:47 +00:00
|
|
|
$options[$comment->id()]['operations']['data'] = array(
|
2012-10-09 19:49:07 +00:00
|
|
|
'#type' => 'operations',
|
|
|
|
'#links' => $links,
|
2008-05-14 13:12:41 +00:00
|
|
|
);
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
2009-01-28 07:43:26 +00:00
|
|
|
|
2008-05-14 13:12:41 +00:00
|
|
|
$form['comments'] = array(
|
2009-01-28 07:43:26 +00:00
|
|
|
'#type' => 'tableselect',
|
|
|
|
'#header' => $header,
|
|
|
|
'#options' => $options,
|
|
|
|
'#empty' => t('No comments available.'),
|
2008-05-14 13:12:41 +00:00
|
|
|
);
|
2009-01-28 07:43:26 +00:00
|
|
|
|
2009-07-29 06:39:35 +00:00
|
|
|
$form['pager'] = array('#theme' => 'pager');
|
2008-05-14 13:12:41 +00:00
|
|
|
|
2007-10-31 17:50:47 +00:00
|
|
|
return $form;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Form validation handler for comment_admin_overview().
|
|
|
|
*
|
|
|
|
* @see comment_admin_overview_submit()
|
2007-10-31 17:50:47 +00:00
|
|
|
*/
|
|
|
|
function comment_admin_overview_validate($form, &$form_state) {
|
|
|
|
$form_state['values']['comments'] = array_diff($form_state['values']['comments'], array(0));
|
2008-05-14 13:12:41 +00:00
|
|
|
// We can't execute any 'Update options' if no comments were selected.
|
2007-10-31 17:50:47 +00:00
|
|
|
if (count($form_state['values']['comments']) == 0) {
|
2010-01-09 23:03:22 +00:00
|
|
|
form_set_error('', t('Select one or more comments to perform the update on.'));
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Form submission handler for comment_admin_overview().
|
2007-12-16 21:01:45 +00:00
|
|
|
*
|
2012-01-03 04:36:15 +00:00
|
|
|
* Executes the chosen 'Update option' on the selected comments, such as
|
2007-10-31 17:50:47 +00:00
|
|
|
* publishing, unpublishing or deleting.
|
2012-01-03 04:36:15 +00:00
|
|
|
*
|
|
|
|
* @see comment_admin_overview_validate()
|
2007-10-31 17:50:47 +00:00
|
|
|
*/
|
|
|
|
function comment_admin_overview_submit($form, &$form_state) {
|
2010-03-07 07:15:28 +00:00
|
|
|
$operation = $form_state['values']['operation'];
|
|
|
|
$cids = $form_state['values']['comments'];
|
|
|
|
|
|
|
|
if ($operation == 'delete') {
|
2013-06-11 16:38:12 +00:00
|
|
|
entity_delete_multiple('comment', $cids);
|
2010-03-07 07:15:28 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
foreach ($cids as $cid => $value) {
|
|
|
|
$comment = comment_load($value);
|
|
|
|
|
|
|
|
if ($operation == 'unpublish') {
|
2013-01-14 10:59:47 +00:00
|
|
|
$comment->status->value = COMMENT_NOT_PUBLISHED;
|
2010-03-07 07:15:28 +00:00
|
|
|
}
|
2010-07-24 17:28:27 +00:00
|
|
|
elseif ($operation == 'publish') {
|
2013-01-14 10:59:47 +00:00
|
|
|
$comment->status->value = COMMENT_PUBLISHED;
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
2013-06-11 16:38:12 +00:00
|
|
|
$comment->save();
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
|
|
|
}
|
2010-03-07 07:15:28 +00:00
|
|
|
drupal_set_message(t('The update has been performed.'));
|
|
|
|
$form_state['redirect'] = 'admin/content/comment';
|
2012-11-28 21:36:29 +00:00
|
|
|
cache_invalidate_tags(array('content' => TRUE));
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Form constructor for the confirmation form for bulk comment deletion.
|
2007-10-31 17:50:47 +00:00
|
|
|
*
|
|
|
|
* @ingroup forms
|
2012-01-03 04:36:15 +00:00
|
|
|
* @see comment_admin()
|
2008-01-08 10:35:43 +00:00
|
|
|
* @see comment_multiple_delete_confirm_submit()
|
2007-10-31 17:50:47 +00:00
|
|
|
*/
|
2009-09-18 00:12:48 +00:00
|
|
|
function comment_multiple_delete_confirm($form, &$form_state) {
|
2009-03-14 20:13:27 +00:00
|
|
|
$edit = $form_state['input'];
|
2007-10-31 17:50:47 +00:00
|
|
|
|
2008-05-14 13:12:41 +00:00
|
|
|
$form['comments'] = array(
|
|
|
|
'#prefix' => '<ul>',
|
|
|
|
'#suffix' => '</ul>',
|
|
|
|
'#tree' => TRUE,
|
|
|
|
);
|
|
|
|
// array_filter() returns only elements with actual values.
|
2007-10-31 17:50:47 +00:00
|
|
|
$comment_counter = 0;
|
|
|
|
foreach (array_filter($edit['comments']) as $cid => $value) {
|
2008-04-10 10:13:57 +00:00
|
|
|
$comment = comment_load($cid);
|
2013-01-14 10:59:47 +00:00
|
|
|
if (is_object($comment) && is_numeric($comment->id())) {
|
2009-07-28 19:18:08 +00:00
|
|
|
$subject = db_query('SELECT subject FROM {comment} WHERE cid = :cid', array(':cid' => $cid))->fetchField();
|
2008-04-14 17:48:46 +00:00
|
|
|
$form['comments'][$cid] = array('#type' => 'hidden', '#value' => $cid, '#prefix' => '<li>', '#suffix' => check_plain($subject) . '</li>');
|
2007-10-31 17:50:47 +00:00
|
|
|
$comment_counter++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$form['operation'] = array('#type' => 'hidden', '#value' => 'delete');
|
|
|
|
|
|
|
|
if (!$comment_counter) {
|
2008-05-14 13:12:41 +00:00
|
|
|
drupal_set_message(t('There do not appear to be any comments to delete, or your selected comment was deleted by another administrator.'));
|
Issue #1668866 by ParisLiakos, aspilicious, tim.plunkett, pdrake, g.oechsler, dawehner, Berdir, corvus_ch, damiankloip, disasm, marcingy, neclimdul: Replace drupal_goto() with RedirectResponse.
2013-06-19 16:07:30 +00:00
|
|
|
return new RedirectResponse(url('admin/content/comment', array('absolute' => TRUE)));
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
return confirm_form($form,
|
|
|
|
t('Are you sure you want to delete these comments and all their children?'),
|
2009-07-30 19:24:21 +00:00
|
|
|
'admin/content/comment', t('This action cannot be undone.'),
|
2007-10-31 17:50:47 +00:00
|
|
|
t('Delete comments'), t('Cancel'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Form submission handler for comment_multiple_delete_confirm().
|
2007-10-31 17:50:47 +00:00
|
|
|
*/
|
|
|
|
function comment_multiple_delete_confirm_submit($form, &$form_state) {
|
|
|
|
if ($form_state['values']['confirm']) {
|
2013-06-11 16:38:12 +00:00
|
|
|
entity_delete_multiple('comment', array_keys($form_state['values']['comments']));
|
2012-11-28 21:36:29 +00:00
|
|
|
cache_invalidate_tags(array('content' => TRUE));
|
2009-07-31 19:44:21 +00:00
|
|
|
$count = count($form_state['values']['comments']);
|
|
|
|
watchdog('content', 'Deleted @count comments.', array('@count' => $count));
|
2010-12-09 02:16:21 +00:00
|
|
|
drupal_set_message(format_plural($count, 'Deleted 1 comment.', 'Deleted @count comments.'));
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
2009-07-30 19:24:21 +00:00
|
|
|
$form_state['redirect'] = 'admin/content/comment';
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|
|
|
|
|
2010-02-22 15:38:52 +00:00
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Page callback: Shows a confirmation page for comment deletions.
|
|
|
|
*
|
2013-08-18 21:16:19 +00:00
|
|
|
* @param \Drupal\comment\Entity\Comment $comment
|
2013-04-15 21:14:39 +00:00
|
|
|
* The comment entity that is about to be deleted.
|
2012-01-03 04:36:15 +00:00
|
|
|
*
|
|
|
|
* @see comment_menu()
|
|
|
|
* @see comment_confirm_delete()
|
2010-02-22 15:38:52 +00:00
|
|
|
*/
|
2013-04-15 21:14:39 +00:00
|
|
|
function comment_confirm_delete_page(Comment $comment) {
|
|
|
|
return drupal_get_form('comment_confirm_delete', $comment);
|
2010-02-22 15:38:52 +00:00
|
|
|
}
|
|
|
|
|
2007-10-31 17:50:47 +00:00
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Form constructor for the confirmation form for comment deletion.
|
|
|
|
*
|
2012-05-03 05:49:41 +00:00
|
|
|
* @param Drupal\comment\Comment $comment
|
2012-01-03 04:36:15 +00:00
|
|
|
* The comment that is about to be deleted.
|
2007-10-31 17:50:47 +00:00
|
|
|
*
|
|
|
|
* @ingroup forms
|
2012-01-03 04:36:15 +00:00
|
|
|
* @see comment_confirm_delete_page()
|
2008-01-08 10:35:43 +00:00
|
|
|
* @see comment_confirm_delete_submit()
|
2012-01-03 04:36:15 +00:00
|
|
|
* @see confirm_form()
|
2007-10-31 17:50:47 +00:00
|
|
|
*/
|
2012-04-13 08:01:13 +00:00
|
|
|
function comment_confirm_delete($form, &$form_state, Comment $comment) {
|
2012-08-16 11:30:43 +00:00
|
|
|
$form_state['comment'] = $comment;
|
2010-02-17 05:42:42 +00:00
|
|
|
// Always provide entity id in the same form key as in the entity edit form.
|
2013-01-14 10:59:47 +00:00
|
|
|
$form['cid'] = array('#type' => 'value', '#value' => $comment->id());
|
2007-10-31 17:50:47 +00:00
|
|
|
return confirm_form(
|
|
|
|
$form,
|
2013-01-14 10:59:47 +00:00
|
|
|
t('Are you sure you want to delete the comment %title?', array('%title' => $comment->subject->value)),
|
2013-02-01 16:08:58 +00:00
|
|
|
'node/' . $comment->nid->target_id,
|
2007-10-31 17:50:47 +00:00
|
|
|
t('Any replies to this comment will be lost. This action cannot be undone.'),
|
|
|
|
t('Delete'),
|
|
|
|
t('Cancel'),
|
|
|
|
'comment_confirm_delete');
|
|
|
|
}
|
|
|
|
|
2007-12-16 21:01:45 +00:00
|
|
|
/**
|
2012-01-03 04:36:15 +00:00
|
|
|
* Form submission handler for comment_confirm_delete().
|
2007-12-16 21:01:45 +00:00
|
|
|
*/
|
2007-10-31 17:50:47 +00:00
|
|
|
function comment_confirm_delete_submit($form, &$form_state) {
|
2012-08-16 11:30:43 +00:00
|
|
|
$comment = $form_state['comment'];
|
2008-05-14 13:12:41 +00:00
|
|
|
// Delete the comment and its replies.
|
2013-01-14 10:59:47 +00:00
|
|
|
$comment->delete();
|
2009-07-31 19:44:21 +00:00
|
|
|
drupal_set_message(t('The comment and all its replies have been deleted.'));
|
2013-01-14 10:59:47 +00:00
|
|
|
watchdog('content', 'Deleted comment @cid and its replies.', array('@cid' => $comment->id()));
|
2007-10-31 17:50:47 +00:00
|
|
|
// Clear the cache so an anonymous user sees that his comment was deleted.
|
2012-11-28 21:36:29 +00:00
|
|
|
cache_invalidate_tags(array('content' => TRUE));
|
2007-10-31 17:50:47 +00:00
|
|
|
|
2013-02-01 16:08:58 +00:00
|
|
|
$form_state['redirect'] = "node/{$comment->nid->target_id}";
|
2007-10-31 17:50:47 +00:00
|
|
|
}
|