Skip to content
Snippets Groups Projects
Commit eb803411 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #24003 by Steven: fix problems with node attribute checking (and improve defaults).

parent 8436082f
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -822,3 +822,5 @@ INSERT INTO variable (name,value) VALUES ('filter_html_1','i:1;');
INSERT INTO locales_meta (locale, name, enabled, isdefault) VALUES ('en', 'English', '1', '1');
INSERT INTO url_alias (src, dst) VALUES ('node/feed', 'rss.xml');
INSERT INTO variable (name, value) VALUES ('node_options_forum', 'a:1:{i:0;s:6:"status";}');
......@@ -817,6 +817,8 @@ INSERT INTO locales_meta (locale, name, enabled, isdefault) VALUES ('en', 'Engli
INSERT INTO url_alias (src, dst) VALUES ('node/feed', 'rss.xml');
INSERT INTO variable (name, value) VALUES ('node_options_forum', 'a:1:{i:0;s:6:"status";}');
---
--- Alter some sequences
---
......
......@@ -118,13 +118,13 @@ function blogapi_new_post($req_params) {
$edit = array();
$edit['type'] = _blogapi_blogid($params[0]);
// get the node type defaults
$node_type_default = variable_get('node_options_'. $edit['type'], array());
$node_type_default = variable_get('node_options_'. $edit['type'], array('status', 'promote'));
$edit['uid'] = $user->uid;
$edit['name'] = $user->name;
$edit['promote'] = $node_type_default['promote'];
$edit['promote'] = in_array('promote', $node_type_default);
$edit['comment'] = variable_get('comment_'. $edit['type'], 2);
$edit['moderate'] = $node_type_default['moderate'];
$edit['revision'] = $node_type_default['revision'];
$edit['moderate'] = in_array('moderate', $node_type_default);
$edit['revision'] = in_array('revision', $node_type_default);
$edit['format'] = FILTER_FORMAT_DEFAULT;
$edit['status'] = $params[4];
......
......@@ -118,13 +118,13 @@ function blogapi_new_post($req_params) {
$edit = array();
$edit['type'] = _blogapi_blogid($params[0]);
// get the node type defaults
$node_type_default = variable_get('node_options_'. $edit['type'], array());
$node_type_default = variable_get('node_options_'. $edit['type'], array('status', 'promote'));
$edit['uid'] = $user->uid;
$edit['name'] = $user->name;
$edit['promote'] = $node_type_default['promote'];
$edit['promote'] = in_array('promote', $node_type_default);
$edit['comment'] = variable_get('comment_'. $edit['type'], 2);
$edit['moderate'] = $node_type_default['moderate'];
$edit['revision'] = $node_type_default['revision'];
$edit['moderate'] = in_array('moderate', $node_type_default);
$edit['revision'] = in_array('revision', $node_type_default);
$edit['format'] = FILTER_FORMAT_DEFAULT;
$edit['status'] = $params[4];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment