| 1 |
<?php |
<?php |
| 2 |
// $Id: node.module,v 1.641.2.30 2007/01/04 19:50:28 killes Exp $ |
// $Id: node.module,v 1.641.2.31 2007/01/04 20:50:02 killes Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 1724 |
|
|
| 1725 |
$op = isset($_POST['op']) ? $_POST['op'] : ''; |
$op = isset($_POST['op']) ? $_POST['op'] : ''; |
| 1726 |
if ($op == t('Preview')) { |
if ($op == t('Preview')) { |
| 1727 |
|
// Invoke full validation for the form, to protect against cross site |
| 1728 |
|
// request forgeries (CSRF) and setting arbitrary values for fields such as |
| 1729 |
|
// the input format. Preview the node only when form validation does not |
| 1730 |
|
// set any errors. |
| 1731 |
drupal_validate_form($form['form_id']['#value'], $form); |
drupal_validate_form($form['form_id']['#value'], $form); |
| 1732 |
if (!form_get_errors()) { |
if (!form_get_errors()) { |
| 1733 |
// Because the node preview may display a form, we must render it |
// Because the node preview may display a form, we must render it |