From be7077be33deb67e8c59af2cb21f55f4191772d9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 11 Jun 2001 20:33:35 +0000 Subject: - More updates to index.module. --- modules/index.module | 16 +++++----------- modules/node.module | 2 +- modules/node/node.module | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) (limited to 'modules') diff --git a/modules/index.module b/modules/index.module index 673e00d69..fe8d564a4 100644 --- a/modules/index.module +++ b/modules/index.module @@ -1,8 +1,5 @@ attributess - function index_get_array($id) { return db_fetch_array(db_query("SELECT * FROM entry WHERE eid = '". check_input($id) ."'")); } @@ -10,15 +7,12 @@ function index_get_array($id) { function index_collection_form($name, $selected = "") { $result = db_query("SELECT * FROM entry WHERE collection = '$name'"); while ($entry = db_fetch_object($result)) { - $options[$entry->keyword] = $entry->name; + $options[$entry->attributes] = $entry->name; } return form_select(ucfirst($name), $name, $selected, $options); } -function index_collection_link($name) { -} - // -------------------------------- function index_help() { @@ -34,7 +28,7 @@ function index_form($edit = array()) { $form .= form_textfield(t("Entry name"), "name", $edit[name], 55, 64, t("The name of this entry. Example: 'Apache'.")); $form .= form_textfield(t("Collection"), "collection", $edit[collection], 55, 64, t("The collection or group this entry belgons to. Example: 'Software'.")); - $form .= form_textfield(t("Keywords"), "keyword", $edit[keyword], 55, 64, htmlentities("Format: :;:;. Example: 'software:apache;type:webserver;os:linux;'.")); + $form .= form_textfield(t("Attributes"), "attributes", $edit[attributes], 55, 64, htmlentities("Format: :;:;. Example: 'software=apache,type=webserver,os=linux,'.")); $form .= form_submit(t("Submit")); if ($edit[eid]) { @@ -47,10 +41,10 @@ function index_form($edit = array()) { function index_save($edit) { if ($edit[eid]) { - db_query("UPDATE entry SET name = '". check_input($edit[name]) ."', collection = '". check_input($edit[collection]) ."', keyword = '". check_input($edit[keyword]) ."' WHERE eid = '$edit[eid]'"); + db_query("UPDATE entry SET name = '". check_input($edit[name]) ."', collection = '". check_input($edit[collection]) ."', attributes = '". check_input($edit[attributes]) ."' WHERE eid = '$edit[eid]'"); } else { - db_query("INSERT INTO entry (name, collection, keyword) VALUES ('". check_input($edit[name]) ."', '". check_input($edit[collection]) ."', '". check_input($edit[keyword]) ."')"); + db_query("INSERT INTO entry (name, collection, attributes) VALUES ('". check_input($edit[name]) ."', '". check_input($edit[collection]) ."', '". check_input($edit[attributes]) ."')"); } } @@ -116,7 +110,7 @@ function index_entry() { $output .= "\n"; $output .= " \n"; while ($entry = db_fetch_object($result)) { - $output .= "\n"; + $output .= "\n"; } $output .= "
namecollectionmeta attributesoparations
". check_output($entry->name) ."". check_output($entry->collection) ."". check_output($entry->keyword) ."eid\">edit entry
". check_output($entry->name) ."". check_output($entry->collection) ."". check_output($entry->attributes) ."eid\">edit entry
\n"; diff --git a/modules/node.module b/modules/node.module index ffbca0d0c..6e60289d7 100644 --- a/modules/node.module +++ b/modules/node.module @@ -112,7 +112,7 @@ function node_edit_attribute($id) { $node = node_get_object(array("nid" => $id)); $form .= form_item("Document title", check_output($node->title)); - $form .= form_textfield("Attributes", "attributes", $node->attributes, 50, 128, htmlentities("A list meta attributes. Format: :;:;. Example: 'software:apache;type:webserver;os:linux;'.")); + $form .= form_textfield("Attributes", "attributes", $node->attributes, 50, 128, htmlentities("A list meta attributes. Format: :;:;. Example: 'software=apache,type=webserver,os=linux,'.")); $form .= form_hidden("nid", $node->nid); $form .= form_submit("Save node"); diff --git a/modules/node/node.module b/modules/node/node.module index ffbca0d0c..6e60289d7 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -112,7 +112,7 @@ function node_edit_attribute($id) { $node = node_get_object(array("nid" => $id)); $form .= form_item("Document title", check_output($node->title)); - $form .= form_textfield("Attributes", "attributes", $node->attributes, 50, 128, htmlentities("A list meta attributes. Format: :;:;. Example: 'software:apache;type:webserver;os:linux;'.")); + $form .= form_textfield("Attributes", "attributes", $node->attributes, 50, 128, htmlentities("A list meta attributes. Format: :;:;. Example: 'software=apache,type=webserver,os=linux,'.")); $form .= form_hidden("nid", $node->nid); $form .= form_submit("Save node"); -- cgit v1.2.3