- 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.
3-00
Dries Buytaert 2001-07-07 22:02:34 +00:00
parent 5077cafd38
commit a382d9ea4a
3 changed files with 17 additions and 6 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);