From 96576a6ef748f960b1f8318aa5d425627627d851 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 15 Jun 2001 07:30:44 +0000 Subject: - Added meta.module, an improved index.module that allows you to associate different collections - think "combobox" here - with different content types, all hardcoded references to "section" have been removed and the admin-friendliness of the meta admin section has been slightly improved. I'll keep working on it during the weekend - if time allows me to. Moreover, I'll focus on the usability/user-friendlines of the meta admin section as well as graceful input-checking, and error-handling. Requires an SQL update, see updates/2.00-to-x.xx.sql! Index.module will be removed, or meta.module will be renamed as soon we can ditch one of them. For now, having both coexist is not going to harm your setup and is useful to make a comparison and / or to migrate from index.module to meta.module. Index.module is de-coupled form the rest of the system so you will have to use meta.module after having upgraded. You have been warned. - Updated CHANGELOG. --- includes/node.inc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'includes') diff --git a/includes/node.inc b/includes/node.inc index 94972461f..ec88c662c 100644 --- a/includes/node.inc +++ b/includes/node.inc @@ -213,23 +213,18 @@ function node_preview($node) { } -function node_attributes_edit($edit) { - return index_collection_form("section", ($edit[section] ? $edit[section] : "section:". field_get($edit[attributes], "section") .";")); +function node_attributes_edit($type, $edit) { + return meta_form($type, $edit); } -function node_attributes_save($edit) { - if ($edit[nid] && $node = node_get_array(array("nid" => $edit[nid]))) { - return field_merge($node[attributes], $edit[section]); - } - else { - return $edit[section]; - } +function node_attributes_save($type, $edit) { + return meta_save($type, $edit); } function node_attributes_view($string) { foreach (explode(",", $string) as $data) { $entry = explode("=", $data); - if (in_array($entry[0], array("section"))) { + if ($entry[0] && $entry[1]) { $array[] = "$entry[1]"; } } -- cgit v1.2.3