comment_update_7001

Versions
7
comment_update_7001()

Change comment status from published being 0 to being 1

Related topics

Code

modules/comment/comment.install, line 66

<?php
function comment_update_7001() {
  $changes = array(
    3 => 0,
    0 => 1,
    1 => 3,
  );

  foreach ($changes as $old => $new) {
  db_update('comments')
    ->fields(array('status' => $new))
    ->condition('status', $old)
    ->execute();
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.