diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-06-15 07:30:44 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-06-15 07:30:44 +0000 |
commit | 96576a6ef748f960b1f8318aa5d425627627d851 (patch) | |
tree | d82d09706ffd230df5acc00d48c7963b519707d1 /includes/node.inc | |
parent | 8f241243f0cd0e50a94f61aa7e918649b35ebf8d (diff) | |
download | brdo-96576a6ef748f960b1f8318aa5d425627627d851.tar.gz brdo-96576a6ef748f960b1f8318aa5d425627627d851.tar.bz2 |
- 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.
Diffstat (limited to 'includes/node.inc')
-rw-r--r-- | includes/node.inc | 15 |
1 files changed, 5 insertions, 10 deletions
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[] = "<a href=\"?$entry[0]=$entry[1]\">$entry[1]</a>"; } } |