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

- Fixed bug in page.module:
   + PHP-pages were rendered invalid under certain criteria.

- Fixed bug in meta.module:
   + When editing an existing node, the meta-field was not properly set
     in the forms.
parent 5077cafd
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
......@@ -25,6 +25,9 @@ function meta_form($type, $edit = array()) {
unset($array);
$t = db_query("SELECT * FROM tag WHERE collections LIKE '%$collection->name%'");
while ($tag = db_fetch_object($t)) {
if (strstr($edit[attributes], $tag->attributes)) {
$edit[$collection->name] = $tag->attributes;
}
$array[$tag->attributes] = $tag->name;
}
$form .= form_select($collection->name, $collection->name, $edit[$collection->name], $array);
......
......@@ -32,7 +32,11 @@ function page_status() {
}
function page_form($edit = array()) {
global $REQUEST_URI, $format;
global $REQUEST_URI, $format, $op;
if ($op != "Preview" && $format[$edit[format]] == "PHP") {
$edit[body] = addslashes($edit[body]);
}
if ($edit[title]) {
$form = page_view(new Page(node_preview($edit)));
......@@ -44,11 +48,11 @@ function page_form($edit = array()) {
$form .= form_hidden("nid", $edit[nid]);
if ($edit[title]) {
$form .= form_submit(t("Preview"));
$form .= form_submit("Preview");
$form .= form_submit("Submit");
}
else {
$form .= form_submit(t("Preview"));
$form .= form_submit("Preview");
}
return form($REQUEST_URI, $form);
......
......@@ -32,7 +32,11 @@ function page_status() {
}
function page_form($edit = array()) {
global $REQUEST_URI, $format;
global $REQUEST_URI, $format, $op;
if ($op != "Preview" && $format[$edit[format]] == "PHP") {
$edit[body] = addslashes($edit[body]);
}
if ($edit[title]) {
$form = page_view(new Page(node_preview($edit)));
......@@ -44,11 +48,11 @@ function page_form($edit = array()) {
$form .= form_hidden("nid", $edit[nid]);
if ($edit[title]) {
$form .= form_submit(t("Preview"));
$form .= form_submit("Preview");
$form .= form_submit("Submit");
}
else {
$form .= form_submit(t("Preview"));
$form .= form_submit("Preview");
}
return form($REQUEST_URI, $form);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment