From d4692d569cd923f777dd6b12b84d4df7b74382de Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 23 Nov 2005 16:18:28 +0000 Subject: - Patch #35644 by webchick: fixed the sizes of the textareas on the node edit forms. --- modules/node/node.module | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'modules/node/node.module') diff --git a/modules/node/node.module b/modules/node/node.module index d9b725ee4..4983b11af 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -729,7 +729,7 @@ function node_search($op = 'search', $keys = null) { $form = array(); // Keyword boxes - $form['advanced'] = array('#type' => 'fieldset', '#title' => t('Advanced search'), '#collapsible' => true, '#collapsed' => true, '#attributes' => array('class' => 'search-advanced')); + $form['advanced'] = array('#type' => 'fieldset', '#title' => t('Advanced search'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#attributes' => array('class' => 'search-advanced')); $form['advanced']['keywords'] = array('#type' => 'markup', '#prefix' => '
', '#suffix' => '
'); $form['advanced']['keywords']['or'] = array('#type' => 'textfield', '#title' => t('Containing any of the words'), '#size' => 30, '#maxlength' => 255); @@ -1325,12 +1325,18 @@ function node_revision_rollback($nid, $revision) { * Delete the revision with specified revision number. */ function node_revision_delete($nid, $revision) { + if (user_access('administer nodes')) { $count_revisions = db_result(db_query('SELECT COUNT(vid) FROM {node_revisions} WHERE nid = %d', $nid)); // Don't delete the last revision of the node or the current revision if ($count_revisions > 1) { + $node = node_load($nid, $revision); + db_query("DELETE FROM {node_revisions} WHERE nid = %d AND vid = %d", $nid, $revision); - drupal_set_message(t('Deleted revision with the ID %revision.', array('%revision' => theme('placeholder', $revision)))); + + node_invoke_nodeapi($node, 'delete revision'); + drupal_set_message(t('Deleted %title revision %revision.', array('%title' => theme('placeholder', $node->title), '%revision' => theme('placeholder', $revision)))); + watchdog('content', t('%type: deleted %title revision %revision.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title), '%revision' => theme('placeholder', $revision)))); } else { drupal_set_message(t('Deletion failed. You tried to delete the current revision.')); -- cgit v1.2.3