Commit 51d2ac2b authored by Dries's avatar Dries
Browse files

- Critical feature #40670: made the form array accessible.

parent e1458662
...@@ -1611,6 +1611,14 @@ function node_object_prepare(&$node) { ...@@ -1611,6 +1611,14 @@ function node_object_prepare(&$node) {
* Generate the node editing form. * Generate the node editing form.
*/ */
function node_form($node) { function node_form($node) {
$form = node_form_array($node);
return drupal_get_form($node->type . '_node_form', $form, 'node_form');
}
/**
* Generate the node editing form array.
*/
function node_form_array($node) {
$op = isset($_POST['op']) ? $_POST['op'] : ''; $op = isset($_POST['op']) ? $_POST['op'] : '';
$node = (object)$node; $node = (object)$node;
...@@ -1691,7 +1699,7 @@ function node_form($node) { ...@@ -1691,7 +1699,7 @@ function node_form($node) {
$form['#after_build'] = 'node_form_add_preview'; $form['#after_build'] = 'node_form_add_preview';
return drupal_get_form($node->type . '_node_form', $form, 'node_form'); return $form;
} }
function node_form_add_preview($form, $edit) { function node_form_add_preview($form, $edit) {
......
...@@ -1611,6 +1611,14 @@ function node_object_prepare(&$node) { ...@@ -1611,6 +1611,14 @@ function node_object_prepare(&$node) {
* Generate the node editing form. * Generate the node editing form.
*/ */
function node_form($node) { function node_form($node) {
$form = node_form_array($node);
return drupal_get_form($node->type . '_node_form', $form, 'node_form');
}
/**
* Generate the node editing form array.
*/
function node_form_array($node) {
$op = isset($_POST['op']) ? $_POST['op'] : ''; $op = isset($_POST['op']) ? $_POST['op'] : '';
$node = (object)$node; $node = (object)$node;
...@@ -1691,7 +1699,7 @@ function node_form($node) { ...@@ -1691,7 +1699,7 @@ function node_form($node) {
$form['#after_build'] = 'node_form_add_preview'; $form['#after_build'] = 'node_form_add_preview';
return drupal_get_form($node->type . '_node_form', $form, 'node_form'); return $form;
} }
function node_form_add_preview($form, $edit) { function node_form_add_preview($form, $edit) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment