Commit 85341253 authored by Dries's avatar Dries

- Various updates, mostly related to our RDF/RSS backend.
parent f959b1ba
......@@ -162,7 +162,10 @@ function blog_form($edit = array()) {
$form .= form_hidden("nid", $edit["nid"]);
}
if ($edit && !$edit["title"]) {
if (!$edit) {
$form .= form_submit(t("Preview"));
}
else if ($edit && !$edit["title"]) {
$form .= "<font color=\"red\">". t("Warning: you did not supply a subject.") ."</font><p>\n";
$form .= form_submit(t("Preview"));
}
......
......@@ -162,7 +162,10 @@ function blog_form($edit = array()) {
$form .= form_hidden("nid", $edit["nid"]);
}
if ($edit && !$edit["title"]) {
if (!$edit) {
$form .= form_submit(t("Preview"));
}
else if ($edit && !$edit["title"]) {
$form .= "<font color=\"red\">". t("Warning: you did not supply a subject.") ."</font><p>\n";
$form .= form_submit(t("Preview"));
}
......
......@@ -149,7 +149,10 @@ function book_form($edit = array()) {
$form .= form_hidden("pid", $edit[pid]);
}
if ($edit && !$edit[title]) {
if (!$edit) {
$form .= form_submit(t("Preview"));
}
else if ($edit && !$edit[title]) {
$form .= "<FONT COLOR=\"red\">". t("Warning: you did not supply a title.") ."</FONT><P>\n";
$form .= form_submit(t("Preview"));
}
......@@ -227,19 +230,32 @@ function book_admin() {
}
}
function book_page() {
function book_render() {
global $status, $theme;
$result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE b.parent = 0 AND n.status = $status[posted] ORDER BY b.weight");
while ($node = db_fetch_object($result)) {
$output .= "<DT><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></DT><DD>". check_output($node->body, 1) ."<BR><BR></DD>";
}
$theme->header();
$theme->box(t("Handbook"), "<DL>$output</DL>");
$theme->footer();
}
function book_page() {
global $op, $id, $theme;
if (user_access("access content")) {
$result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE b.parent = 0 AND n.status = $status[posted] ORDER BY b.weight");
while ($node = db_fetch_object($result)) {
$output .= "<DT><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></DT><DD>". check_output($node->body, 1) ."<BR><BR></DD>";
switch ($op) {
case "feed":
print book_export_html($i, $depth = 1);
break;
default:
book_render();
}
$theme->header();
$theme->box(t("Handbook"), "<DL>$output</DL>");
$theme->footer();
}
else {
$theme->header();
......@@ -300,12 +316,4 @@ function book_export_html($parent = "", $depth = 0) {
return $output;
}
function book_export($query) {
global $book;
if ($book) {
print book_export_html($book, $depth = 1);
}
}
?>
......@@ -149,7 +149,10 @@ function book_form($edit = array()) {
$form .= form_hidden("pid", $edit[pid]);
}
if ($edit && !$edit[title]) {
if (!$edit) {
$form .= form_submit(t("Preview"));
}
else if ($edit && !$edit[title]) {
$form .= "<FONT COLOR=\"red\">". t("Warning: you did not supply a title.") ."</FONT><P>\n";
$form .= form_submit(t("Preview"));
}
......@@ -227,19 +230,32 @@ function book_admin() {
}
}
function book_page() {
function book_render() {
global $status, $theme;
$result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE b.parent = 0 AND n.status = $status[posted] ORDER BY b.weight");
while ($node = db_fetch_object($result)) {
$output .= "<DT><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></DT><DD>". check_output($node->body, 1) ."<BR><BR></DD>";
}
$theme->header();
$theme->box(t("Handbook"), "<DL>$output</DL>");
$theme->footer();
}
function book_page() {
global $op, $id, $theme;
if (user_access("access content")) {
$result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE b.parent = 0 AND n.status = $status[posted] ORDER BY b.weight");
while ($node = db_fetch_object($result)) {
$output .= "<DT><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></DT><DD>". check_output($node->body, 1) ."<BR><BR></DD>";
switch ($op) {
case "feed":
print book_export_html($i, $depth = 1);
break;
default:
book_render();
}
$theme->header();
$theme->box(t("Handbook"), "<DL>$output</DL>");
$theme->footer();
}
else {
$theme->header();
......@@ -300,12 +316,4 @@ function book_export_html($parent = "", $depth = 0) {
return $output;
}
function book_export($query) {
global $book;
if ($book) {
print book_export_html($book, $depth = 1);
}
}
?>
......@@ -57,7 +57,10 @@ function story_form($edit = array()) {
$form .= form_hidden("nid", $edit[nid]);
}
if ($edit && !$edit[title]) {
if (!$edit) {
$form .= form_submit(t("Preview"));
}
else if ($edit && !$edit[title]) {
$form .= "<FONT COLOR=\"red\">". t("Warning: you did not supply a subject.") ."</FONT><P>\n";
$form .= form_submit(t("Preview"));
}
......
......@@ -57,7 +57,10 @@ function story_form($edit = array()) {
$form .= form_hidden("nid", $edit[nid]);
}
if ($edit && !$edit[title]) {
if (!$edit) {
$form .= form_submit(t("Preview"));
}
else if ($edit && !$edit[title]) {
$form .= "<FONT COLOR=\"red\">". t("Warning: you did not supply a subject.") ."</FONT><P>\n";
$form .= form_submit(t("Preview"));
}
......
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