Index: node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node.module,v retrieving revision 1.601 diff -u -F^f -r1.601 node.module --- node.module 14 Feb 2006 21:12:09 -0000 1.601 +++ node.module 20 Feb 2006 18:59:43 -0000 @@ -983,7 +983,7 @@ function node_build_filter_query() { $join = ''; foreach ($_SESSION['node_overview_filter'] as $index => $filter) { list($key, $value) = $filter; - switch($key) { + switch ($key) { case 'status': // Note: no exploitable hole as $key/$value have already been checked when submitted list($key, $value) = explode('-', $value, 2); @@ -1270,7 +1270,7 @@ function node_types_configure($type = NU if (isset($type)) { $node = new stdClass(); $node->type = $type; - $form['submission'] = array('#type' => 'fieldset', '#title' =>t('Submission form') ); + $form['submission'] = array('#type' => 'fieldset', '#title' =>t('Submission form')); $form['submission'][$type . '_help'] = array( '#type' => 'textarea', '#title' => t('Explanation or submission guidelines'), '#default_value' => variable_get($type .'_help', ''), '#description' => t('This text will be displayed at the top of the %type submission form. It is useful for helping or instructing your users.', array('%type' => node_get_name($type))) @@ -1886,15 +1886,19 @@ function node_form_submit($form_id, $edi node_save($node); watchdog('content', t('%type: updated %title.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), 'node/'. $node->nid)); drupal_set_message(t('The %post was updated.', array ('%post' => node_get_name($node)))); + // Give modules a chance to work after all insert/update hooks have completed + node_invoke_nodeapi($node, 'update post'); } } else { // Check whether the current user has the proper access rights to // perform this operation: if (node_access('create', $node)) { - node_save($node); + // Give modules a chance to modify node before saving watchdog('content', t('%type: added %title.', array('%type' => theme('placeholder', t($node->type)), '%title' => theme('placeholder', $node->title))), WATCHDOG_NOTICE, l(t('view'), "node/$node->nid")); drupal_set_message(t('Your %post was created.', array ('%post' => node_get_name($node)))); + // Give modules a chance to work after all insert/update hooks have completed + node_invoke_nodeapi($node, 'insert post'); } } if ($node->nid && node_access('view', $node)) { @@ -2021,7 +2025,6 @@ function node_page_default() {

Themes handle the presentation of your website. You can use one of the existing themes, modify them or create your own from scratch.

We suggest you look around the administration section and explore the various options Drupal offers you. For more information, you can refer to the Drupal handbooks online.

", array('%drupal' => 'http://www.drupal.org/', '%register' => url('user/register'), '%admin' => url('admin'), '%config' => url('admin/settings'), '%modules' => url('admin/modules'), '%themes' => url('admin/themes'), '%handbook' => 'http://www.drupal.org/handbooks')); } - return $output; } @@ -2372,5 +2375,3 @@ function node_db_rewrite_sql($query, $pr /** * @} End of "defgroup node_access". */ - -