summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-23 16:18:28 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-23 16:18:28 +0000
commitd4692d569cd923f777dd6b12b84d4df7b74382de (patch)
treef0524b8af9178934c020676afa878695d3c8cc70 /modules/node/node.module
parent86db338c64bc8da4673500ce60ef1f1075b34df3 (diff)
downloadbrdo-d4692d569cd923f777dd6b12b84d4df7b74382de.tar.gz
brdo-d4692d569cd923f777dd6b12b84d4df7b74382de.tar.bz2
- Patch #35644 by webchick: fixed the sizes of the textareas on the node edit forms.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module10
1 files changed, 8 insertions, 2 deletions
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' => '<div class="criterium">', '#suffix' => '</div>');
$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.'));