Index: category.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/category.inc,v retrieving revision 1.57 diff -u -r1.57 category.inc --- category.inc 17 Sep 2006 14:57:02 -0000 1.57 +++ category.inc 20 Sep 2006 21:19:19 -0000 @@ -175,8 +175,8 @@ } /** - * Given a new or existing node, and a type of either 'category-cat' or - * 'category-cont' (or undefined), determine if a category node is a category + * Given a new or existing node, and a type of either 'category_cat' or + * 'category_cont' (or undefined), determine if a category node is a category * or a container, and return its type. This function assumes that the * node is either a category or a container - it will not return the correct * value if the node is neither (this is by design). @@ -187,23 +187,23 @@ * @param $node * The node being tested. Does not have to be fully populated. * @param $type - * The type of category being used. Either 'category-cat', 'category-cont', + * The type of category being used. Either 'category_cat', 'category_cont', * or an empty value (such as NULL). * * @return - * Either 'category-cat' or 'category-cont' (never ANYTHING else). + * Either 'category_cat' or 'category_cont' (never ANYTHING else). */ function category_node_get_type($node, $type = NULL) { if (empty($type)) { $type = $node->type; } - if (empty($type) || !($type == 'category-cat' || $type == 'category-cont')) { + if (empty($type) || !($type == 'category_cat' || $type == 'category_cont')) { $category = category_get_category($node->nid); if ($category->cnid) { - $type = 'category-cat'; + $type = 'category_cat'; } else { - $type = 'category-cont'; + $type = 'category_cont'; } } @@ -546,7 +546,7 @@ // Load the node: $node = node_load($page->nid); $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if ($node) { if (!$is_cat && $node->hidden_cont) { @@ -751,7 +751,7 @@ $tag_node = new stdClass(); $tag_node->title = $typed_cat; $tag_node->cnid = $cnid; - $tag_node->type = 'category-cat'; + $tag_node->type = 'category_cat'; $tag_node->parents[0] = $tag_node->parent = $cnid; $node_options = variable_get('node_options_'. $tag_node->type, array('status', 'promote')); $tag_node->status = in_array('status', $node_options); @@ -1085,7 +1085,7 @@ $body_text = ''; if (isset($node->body)) { - if (!(module_exist('category_display') && $node->body_is_desc)) { + if (!(module_exists('category_display') && $node->body_is_desc)) { $body_text = $node->body; } } @@ -1120,7 +1120,7 @@ '#description' => ($is_cat ? t('A description of the category. Generally seen by users as title text, when hovering over a link to the category.') : t('A description of the container; can be used by modules.')), ); - $activeselect = module_exist('activeselect'); + $activeselect = module_exists('activeselect'); $activeselect_type = ($activeselect ? 'activeselect' : 'select'); if ($is_cat) { @@ -1180,7 +1180,7 @@ '#type' => 'checkboxes', '#title' => t('Types'), '#default_value' => $node->nodes ? $node->nodes : array(), - '#options' => node_get_types(), + '#options' => node_get_types('names'), '#description' => t('A list of node types you want to associate with categories in this container.'), ); $form['catinfo']['hierarchy'] = array( @@ -1271,7 +1271,7 @@ if ($hierarchy == 1 || $activeselect) { $form['catinfo']['parents'] = _category_category_select(t('Parent'), $parents, $default_parent, t('Parent category or container. Containers are marked with an asterisk (*).'), 0, $blank, $exclude); } - elseif ($hierarchy == 2) { + elseif ($hierarchy == 2) { $form['catinfo']['parents'] = _category_category_select(t('Parents'), $parents, $default_parent, t('Parent categories or containers. Containers are marked with an asterisk (*).'), ($activeselect ? 0 : 1), $blank, $exclude); } @@ -1380,13 +1380,13 @@ static $taxonomy_status, $book_status; if (!isset($taxonomy_status)) { - $taxonomy_status = module_exist('taxonomy') && !menu_get_item(NULL, 'admin/taxonomy'); + $taxonomy_status = module_exists('taxonomy') && !menu_get_item(NULL, 'admin/taxonomy'); if ($check_db) { $taxonomy_status = $taxonomy_status && variable_get('taxonomy_maintain_db', 1); } } if (!isset($book_status)) { - $book_status = module_exist('book') && !menu_get_item(NULL, 'admin/node/book'); + $book_status = module_exists('book') && !menu_get_item(NULL, 'admin/node/book'); if ($check_db) { $book_status = $book_status && variable_get('book_maintain_db', 1); } Index: category.install =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/category.install,v retrieving revision 1.10 diff -u -r1.10 category.install --- category.install 14 Apr 2006 13:52:03 -0000 1.10 +++ category.install 20 Sep 2006 21:13:54 -0000 @@ -204,3 +204,10 @@ return $ret; } + +function category_update_9() { + $ret[] = update_sql("UPDATE {node} n SET n.type = 'category_cat' WHERE n.type = 'category-cat'"); + $ret[] = update_sql("UPDATE {node} n SET n.type = 'category_cont' WHERE n.type = 'category-cont'"); + + return $ret; +} \ No newline at end of file Index: category.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/category.module,v retrieving revision 1.118 diff -u -r1.118 category.module --- category.module 17 Sep 2006 14:57:02 -0000 1.118 +++ category.module 20 Sep 2006 20:57:56 -0000 @@ -11,18 +11,12 @@ */ function category_help($section) { switch ($section) { - case 'admin/modules#description': - return t('Allows you to structure your site and categorize content.'); case 'admin/category': return t('

The category module allows you to structure your site and to categorize content: you can create multiple containers (types of categorizations) that contain a tree of categories; you can assign content to your categories; and you can give your categories their own content (such as a description).

'); case 'admin/help#category': return t('

The category module allows you to structure your site and to categorize content: you can create multiple containers (types of categorizations) that contain a tree of categories; you can assign content to your categories; and you can give your categories their own content (such as a description).

'); - case 'node/add#category-cat': - return t("Categories are used to structure your site, and to categorize content. You can create a category as the child of a container, or of another category. You can assign content to one or more categories."); - case 'node/add#category-cont': - return t("A container is usually the root of a category tree, but can also be created as the child of another container, or of a category. Containers are used for describing a particular way of classifying content."); case 'admin/settings/category': - return t('

Settings controlling the behaviour of categories and containers on this site. As well as settings for the category module itself, settings for other modules in the category package can also be configured here. Only global settings are controlled here: most settings are controlled on a per-container or per-category basis, and are instead configured on the add/edit category/container pages. See the categories page for actual categories and containers.

', array('%category' => url('admin/category'))); + return t('

Settings controlling the behaviour of categories and containers on this site. As well as settings for the category module itself, settings for other modules in the category package can also be configured here. Only global settings are controlled here: most settings are controlled on a per-container or per-category basis, and are instead configured on the add/edit category/container pages. See the categories page for actual categories and containers.

', array('!category' => url('admin/category'))); } } @@ -30,14 +24,22 @@ * Implementation of hook_node_info(). */ function category_node_info() { - $base_types = variable_get('category_base_nodetypes', array('category-cat' => 'category-cat', 'category-cont' => 'category-cont')); + $base_types = variable_get('category_base_nodetypes', array('category_cat' => 'category_cat', 'category_cont' => 'category_cont')); $types_list = array(); - if ($base_types['category-cont']) { - $types_list['category-cont'] = array('name' => t('container'), 'base' => 'category'); + if ($base_types['category_cont']) { + $types_list['category_cont'] = array( + 'name' => t('container'), + 'module' => 'category', + 'description' => t("A container is usually the root of a category tree, but can also be created as the child of another container, or of a category. Containers are used for describing a particular way of classifying content."), + ); } - if ($base_types['category-cat']) { - $types_list['category-cat'] = array('name' => t('category'), 'base' => 'category'); + if ($base_types['category_cat']) { + $types_list['category_cat'] = array( + 'name' => t('category'), + 'module' => 'category', + 'description' => t("Categories are used to structure your site, and to categorize content. You can create a category as the child of a container, or of another category. You can assign content to one or more categories."), + ); } return $types_list; @@ -47,16 +49,16 @@ * Implementation of hook_perm(). */ function category_perm() { - $base_types = variable_get('category_base_nodetypes', array('category-cat' => 'category-cat', 'category-cont' => 'category-cont')); + $base_types = variable_get('category_base_nodetypes', array('category_cat' => 'category_cat', 'category_cont' => 'category_cont')); $perms_list = array(); - if ($base_types['category-cat']) { + if ($base_types['category_cat']) { $perms_list[] = 'create categories'; } - if ($base_types['category-cont']) { + if ($base_types['category_cont']) { $perms_list[] = 'create containers'; } - if ($base_types['category-cat'] || $base_types['category-cont']) { + if ($base_types['category_cat'] || $base_types['category_cont']) { $perms_list[] = 'edit all categories'; $perms_list[] = 'edit own categories'; } @@ -78,7 +80,7 @@ */ function category_menu($may_cache) { $items = array(); - $base_types = variable_get('category_base_nodetypes', array('category-cat' => 'category-cat', 'category-cont' => 'category-cont')); + $base_types = variable_get('category_base_nodetypes', array('category_cat' => 'category_cat', 'category_cont' => 'category_cont')); if ($may_cache) { $items[] = array( @@ -119,16 +121,24 @@ 'type' => MENU_LOCAL_TASK, 'weight' => -6, ); - if ($base_types['category-cat']) { + $items[] = array( + 'path' => 'admin/settings/category', + 'title' => t('category settings'), + 'callback' => 'drupal_get_form', + 'callback arguments' => 'category_admin_settings', + 'access' => user_access('administer site configuration'), + 'type' => MENU_NORMAL_ITEM, + ); + if ($base_types['category_cat']) { $items[] = array( - 'path' => 'node/add/category-cat', + 'path' => 'node/add/category_cat', 'title' => t('category'), 'access' => _category_privileged('create categories'), ); } - if ($base_types['category-cont']) { + if ($base_types['category_cont']) { $items[] = array( - 'path' => 'node/add/category-cont', + 'path' => 'node/add/category_cont', 'title' => t('container'), 'access' => _category_privileged('create containers'), ); @@ -213,7 +223,7 @@ if ($op == 'create') { $type = $node; - if ($type == 'category-cont') { + if ($type == 'category_cont') { return _category_privileged('create containers'); } else { @@ -244,7 +254,7 @@ * print lists of categories associated with a node. Themes can print category * links with: * - * if (module_exist('category')) { + * if (module_exists('category')) { * $this->links(category_link('categories', $node)); * } */ @@ -252,12 +262,18 @@ $links = array(); if ($type == 'node' && isset($node->parents)) { - if (!$main && ($node->type != 'category-cat' || $node->hierarchy)) { + if (!$main && ($node->type != 'category_cat' || $node->hierarchy)) { if (_category_privileged('create categories')) { - $links[] = l(t('add child category'), "node/add/category-cat/parent/$node->nid"); + $links['category_add_category'] = array( + 'title' => t('add child category'), + 'href' => "node/add/category_cat/parent/$node->nid", + ); } if (_category_privileged('create containers')) { - $links[] = l(t('add child container'), "node/add/category-cont/parent/$node->nid"); + $links['category_add_container'] = array( + 'title' => t('add child container'), + 'href' => "node/add/category_cont/parent/$node->nid", + ); } } } @@ -266,8 +282,12 @@ $links = array(); if (isset($node->category) && is_array($node->category)) { foreach ($node->category as $category) { - if (!module_exist('category_display') || ($category->cid && ($cat_node = node_load($category->cid)) && $cat_node->nodelinks)) { - $links[] = l($category->title, category_category_path($category), array('rel' => 'tag', 'title' => strip_tags($category->description))); + if (!module_exists('category_display') || ($category->cid && ($cat_node = node_load($category->cid)) && $cat_node->nodelinks)) { + $links['category_add_child'] = array( + 'title' => $category->title, + 'href' => category_category_path($category), + 'attributes' => array('rel' => 'tag', 'title' => strip_tags($category->description)), + ); } } } @@ -277,9 +297,9 @@ } /** - * Implementation of hook_settings(). + * Settings form. */ -function category_settings() { +function category_admin_settings() { $form = array(); // select options $distant = array( @@ -306,7 +326,9 @@ '#type' => 'item', '#title' => t('Taxonomy wrapper status'), '#value' => theme('category_wrapper_status', 'taxonomy', $taxonomy_status), - '#description' => '

'. t('You can install and uninstall the taxonomy and book wrapper modules using the links below. It is very important that you have taxonomy or book (original or wrapper, whichever is installed) enabled on the %module-admin-page before performing an install or uninstall. Additionally, you should make sure that your web server has write permission on the file system, or the scripts may be denied access to copy and rename the necessary files.', array('%module-admin-page' => l(t('module administration page'), 'admin/modules'))). '

'. t('When performing an install, the scripts will rename your existing taxonomy or book module file to modulename.module.old. It will then copy the appropriate modulename.module.copyme file from the wrappers/ directory (in your category package) to the location where the old module file was, and will rename the copied file to modulename.module. The reverse will happen when performing an uninstall. The script will determine the correct location of all necessary files automatically, based on the existing locations of those files.'). '

'. t('After the operation that you invoke is completed, you will be returned to this page.'). '

', + '#description' => '

'. t('You can install and uninstall the taxonomy and book wrapper modules using the links below. It is very important that you have taxonomy or book (original or wrapper, whichever is installed) enabled on the module administration page before performing an install or uninstall. Additionally, you should make sure that your web server has write permission on the file system, or the scripts may be denied access to copy and rename the necessary files.', array('%module-admin-page' => url('admin/modules'))) .'

' + .'

'. t('When performing an install, the scripts will rename your existing taxonomy or book module file to modulename.module.old. It will then copy the appropriate modulename.module.copyme file from the wrappers/ directory (in your category package) to the location where the old module file was, and will rename the copied file to modulename.module. The reverse will happen when performing an uninstall. The script will determine the correct location of all necessary files automatically, based on the existing locations of those files.') .'

' + .'

'. t('After the operation that you invoke is completed, you will be returned to this page.') .'

', ); // Node type settings @@ -319,15 +341,15 @@ $form['nodetype']['category_allow_nodetypes'] = array( '#type' => 'checkboxes', '#title' => t('Allow other content types to be'), - '#default_value' => variable_get('category_allow_nodetypes', array('category-cat' => 0, 'category-cont' => 0)), - '#options' => array('category-cat' => t('Categories'), 'category-cont' => t('Containers')), + '#default_value' => variable_get('category_allow_nodetypes', array('category_cat' => 0, 'category_cont' => 0)), + '#options' => array('category_cat' => t('Categories'), 'category_cont' => t('Containers')), '#description' => t('Allows category or container behavior to be assigned to other content types. When enabled, each content type (except for category and container) receives a new setting allowing it to be a category or a container. When switched on for a particular content type, all nodes of that type receive the new behavior.') ); $form['nodetype']['category_base_nodetypes'] = array( '#type' => 'checkboxes', '#title' => t('Provide these content types'), - '#default_value' => variable_get('category_base_nodetypes', array('category-cat' => 'category-cat', 'category-cont' => 'category-cont')), - '#options' => array('category-cat' => t('Category'), 'category-cont' => t('Container')), + '#default_value' => variable_get('category_base_nodetypes', array('category_cat' => 'category_cat', 'category_cont' => 'category_cont')), + '#options' => array('category_cat' => t('Category'), 'category_cont' => t('Container')), '#description' => t('Provides a built-in content type for creating categories, and a built-in content type for creating containers. Do not disable either of these unless you have allowed other content types to be categories or containers, and you have set other content types to have category or container behavior; otherwise, you will have not be able to create categories or containers.') ); @@ -356,7 +378,7 @@ $form['buttons']['#weight'] = 10; - return $form; + return system_settings_form($form); } /** @@ -366,7 +388,7 @@ global $user; $type = category_node_get_type($node, $type); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; $category = category_get_category($node->nid); unset($category->cid); @@ -435,7 +457,7 @@ $node->module = $node->module ? $node->module : 'category'; $type = category_node_get_type($node, $type); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; $data_exists = (db_num_rows(db_query('SELECT * FROM {category} WHERE cid = %d', $node->nid)) > 0); if ($data_exists) { @@ -526,7 +548,7 @@ */ function category_delete(&$node, $type = NULL) { $type = category_node_get_type($node, $type); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; db_query('DELETE FROM {category} WHERE cid = %d', $node->nid); db_query('DELETE FROM {category_hierarchy} WHERE cid = %d', $node->nid); @@ -549,7 +571,7 @@ */ function category_form(&$node) { $parent_cont = arg(4); - $is_cat = $node->type == 'category-cat'; + $is_cat = $node->type == 'category_cat'; if (is_numeric($parent_cont)) { $category = category_get_category($parent_cont); @@ -577,7 +599,7 @@ $form = category_get_form($is_cat, $node); - if (strpos($_GET['q'], 'node/add/category-cat/parent') !== FALSE) { + if (strpos($_GET['q'], 'node/add/category_cat/parent') !== FALSE) { $form['destination'] = array( '#type' => 'hidden', '#value' => $_GET['q'], @@ -696,7 +718,7 @@ $node->parents = array($node->parents); } if (!isset($node->parents[0])) { - if ($node->type == 'category-cat') { + if ($node->type == 'category_cat') { $node->parents[0] = $node->parent = $node->cnid; } else { @@ -723,12 +745,12 @@ // Special case for our "add category" menu localtask. this covers // the use of the "add category" LOCAL_TASK on a "view categories" page. if (is_numeric(arg(2)) && arg(3) == 'add') { - drupal_goto('node/add/category-cat/parent/'. arg(2)); + drupal_goto('node/add/category_cat/parent/'. arg(2)); } // Another special case for the "add container" menu localtask. elseif (arg(2) == 'add') { $destination = 'destination=admin/category'; - drupal_goto('node/add/category-cont', $destination); + drupal_goto('node/add/category_cont', $destination); } return category_overview(); @@ -886,7 +908,7 @@ switch ($op) { case 'load': $node->category = category_node_get_categories($node->nid); - if ($node->type != 'category-cat' && $node->type != 'category-cont' && category_is_cat_or_cont($node->nid)) { + if ($node->type != 'category_cat' && $node->type != 'category_cont' && category_is_cat_or_cont($node->nid)) { $extra = category_load($node); foreach ($extra as $key => $value) { $node->$key = $value; @@ -994,16 +1016,16 @@ switch ($form_id) { // node settings form case $type .'_node_settings': - if ($type != 'category-cont') { - $allow_types = variable_get('category_allow_nodetypes', array('category-cat' => 0, 'category-cont' => 0)); - if ($allow_types['category-cat'] || $allow_types['category-cont']) { - if ($type != 'category-cat') { + if ($type != 'category_cont') { + $allow_types = variable_get('category_allow_nodetypes', array('category_cat' => 0, 'category_cont' => 0)); + if ($allow_types['category_cat'] || $allow_types['category_cont']) { + if ($type != 'category_cat') { $types_list = array(); - if ($allow_types['category-cat']) { - $types_list['category-cat'] = t('Category'); + if ($allow_types['category_cat']) { + $types_list['category_cat'] = t('Category'); } - if ($allow_types['category-cont']) { - $types_list['category-cont'] = t('Container'); + if ($allow_types['category_cont']) { + $types_list['category_cont'] = t('Container'); } $types_list['none'] = t('None'); $form['workflow']['category_nodeapi_'. $type] = array( @@ -1014,7 +1036,7 @@ '#description' => t('Adds category or container behaviour to this content type. Setting this to a value other than \'none\' will add additional settings to any content of this type that you create or edit.') ); } - if ($allow_types['category-cat']) { + if ($allow_types['category_cat']) { $containers = array(); foreach (category_get_containers() as $key => $value) { $containers[$key] = $value->admin_title; @@ -1036,10 +1058,10 @@ case $type .'_node_form': $cat_type = variable_get('category_nodeapi_'. $type, 'none'); if ($cat_type != 'none') { - $form += category_get_form(($cat_type == 'category-cat'), $node, FALSE); + $form += category_get_form(($cat_type == 'category_cat'), $node, FALSE); } - $activeselect = module_exist('activeselect'); + $activeselect = module_exists('activeselect'); $cats = $node->category; if (!isset($cats)) { @@ -1263,7 +1285,7 @@ $output = array(); foreach ($node->category as $cat) { $is_included = TRUE; - if (module_exist('category_display')) { + if (module_exists('category_display')) { $cont = category_display_cont_load($cat->cnid); if (!$cont->nodelinks) { $is_included = FALSE; @@ -1493,7 +1515,7 @@ drupal_set_message(t('Invalid parameters supplied to wrapper install / uninstall script.'). $generic_error, 'error'); drupal_goto($goto); } - if (!module_exist($type)) { + if (!module_exists($type)) { drupal_set_message(t('The %type module is not currently enabled. You must enable it before performing an install or uninstall.', array('%type' => $type)), 'error'); drupal_goto($goto); } @@ -1560,13 +1582,13 @@ $show_nodes = FALSE; if (db_num_rows($nodes) > 0) { - if (!module_exist('category_display') || $node->show_listing) { + if (!module_exists('category_display') || $node->show_listing) { $show_nodes = TRUE; } } else { - if (!module_exist('category_display')) { - if ($type == 'category-cont') { + if (!module_exists('category_display')) { + if ($type == 'category_cont') { if ($node->depth) { $show_nodes = TRUE; } @@ -1577,7 +1599,7 @@ } else { if ($node->show_listing) { - if ($type == 'category-cont') { + if ($type == 'category_cont') { if ($node->depth && $node->emptymsg) { $show_nodes = TRUE; } @@ -1606,7 +1628,7 @@ 'href' => url('node/'. $node->nid .'/feed'))); $use_views = FALSE; - if (module_exist('category_views')) { + if (module_exists('category_views')) { $use_views = category_views_is_visible($node, $type); } @@ -1635,22 +1657,23 @@ * Themed output. */ function theme_category_wrapper_status($type, $status) { - theme_add_style(drupal_get_path('module', 'category'). '/category.css'); - $output = ''; + drupal_add_css(drupal_get_path('module', 'category'). '/category.css'); + $output = '

'; - if (module_exist($type)) { - $status_string = $status ? (''. t('installed'). '') : (''. t('not installed'). ''); - $output .= '

'. t('The %type wrapper is currently %status-string.', array('%type' => $type, '%status-string' => $status_string)). "\n"; - - $install_string = $status ? t('Uninstall now') : t('Install now'); - $op = $status ? 'uninstall' : 'install'; - $output .= '
'. (l($install_string, t('category/wrapper/%type/%op', array('%type' => $type, '%op' => $op)))). ".

\n"; + if (module_exists($type)) { + if ($status) { + $output .= t('The %type wrapper is currently installed.', array('%type' => $type)). "\n"; + $output .= '
'. l(t('Uninstall now'), "category/wrapper/$type/uninstall"); + } + else { + $output .= '

'. t('The %type wrapper is currently not installed.', array('%type' => $type)). "\n"; + $output .= '
'. l(t('Install now'), "category/wrapper/$type/install"); + } } else { - $status_string = ''. t('not enabled'). ''; - $output .= '

'. t('The %type module (original or wrapper) is currently %status-string. You must enable it on the %module-admin-page before you can perform an install or an uninstall.', array('%type' => $type, '%status-string' => $status_string, '%module-admin-page' => l(t('module administration page'), 'admin/modules'))). "

\n"; + $output .= t('The !type module (original or wrapper) is currently not enabled. You must enable it on the module administration page before you can perform an install or an uninstall.', array('!type' => $type, '!module-admin-page' => url('admin/modules'))). "\n"; } - + $output .= '

'; return $output; } Index: category_display/category_display.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/category_display/category_display.module,v retrieving revision 1.30 diff -u -r1.30 category_display.module --- category_display/category_display.module 9 Sep 2006 16:17:59 -0000 1.30 +++ category_display/category_display.module 20 Sep 2006 20:55:10 -0000 @@ -12,8 +12,6 @@ */ function category_display_help($section) { switch ($section) { - case 'admin/modules#description': - return t('Allows additional output to be displayed and toggled for category and container nodes. Requires the category module.'); case 'admin/help#category_display': return t('

The category display module allows additional output to be displayed and toggled for category and container nodes.

This module requires the category module.

'); } @@ -27,7 +25,7 @@ case 'load': if (category_is_cat_or_cont($node->nid)) { $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { return (array)category_display_cont_load($node->nid, $node); } @@ -57,7 +55,7 @@ } elseif (category_is_cat_or_cont($node->nid, TRUE)) { $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { category_display_cont_update($node); } @@ -66,7 +64,7 @@ case 'delete': if (category_is_cat_or_cont($node->nid)) { $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { category_display_cont_delete($node->nid); } @@ -333,7 +331,7 @@ $navlinks = FALSE; $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if ($node->toc_for_cats && ($is_cat || !$node->hidden_cont)) { $show_toc = TRUE; } @@ -378,7 +376,7 @@ } if (isset($toc) || isset($links)) { - theme_add_style(drupal_get_path('module', 'category_display'). '/category_display.css'); + drupal_add_css(drupal_get_path('module', 'category_display'). '/category_display.css'); $output .= '
'; if (isset($toc)) { $output .= $toc; @@ -421,7 +419,7 @@ if ($nid) { $node = node_load($nid); $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if ($node->navlinks) { if ($is_cat || !$node->hidden_cont) { $dist_check = FALSE; Index: category_export/category_export.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/category_export/category_export.module,v retrieving revision 1.9 diff -u -r1.9 category_export.module --- category_export/category_export.module 13 May 2006 14:28:36 -0000 1.9 +++ category_export/category_export.module 20 Sep 2006 20:55:32 -0000 @@ -11,8 +11,6 @@ */ function category_export_help($section) { switch ($section) { - case 'admin/modules#description': - return t('Allows category trees to be exported as printer-friendly HTML. Requires the category module.'); case 'admin/help#category_menu': return t('

The category export module allows category trees to be exported as printer-friendly HTML. Users with the \'view printer-friendly categories\' permission will see a \'view printer-friendly version\' link on category pages, which they can click to access the printer-friendly HTML. This module requires the category module.

'); } @@ -26,7 +24,7 @@ case 'load': if (category_is_cat_or_cont($node->nid)) { $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { return (array)category_export_cont_load($node->nid); } @@ -56,7 +54,7 @@ } elseif (category_is_cat_or_cont($node->nid, TRUE)) { $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { category_export_cont_update($node); } @@ -64,7 +62,7 @@ break; case 'delete': $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { category_export_cont_delete($node->nid); } Index: category_legacy/category_legacy.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/category_legacy/category_legacy.module,v retrieving revision 1.27 diff -u -r1.27 category_legacy.module --- category_legacy/category_legacy.module 17 Sep 2006 14:57:02 -0000 1.27 +++ category_legacy/category_legacy.module 20 Sep 2006 20:58:24 -0000 @@ -12,8 +12,6 @@ */ function category_legacy_help($section) { switch ($section) { - case 'admin/modules#description': - return t('Allows you to convert your taxonomy and book data into category data, and vice versa. Requires the category module.'); case 'admin/help#category_menu': return t('

The category legacy module lets you import vocabularies and terms from the taxonomy module, and books from the book module. These are then converted into containers and categories. You can also export containers and categories back to the taxonomy and book modules. It is strongly recommended that you back up all existing taxonomy and book data on your site, before performing any operations using this module.

This module requires the category module.

'); case 'admin/category/legacy': @@ -119,7 +117,7 @@ case 'delete': if (category_is_cat_or_cont($node->nid)) { $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if ($is_cat) { category_legacy_map_delete($node->nid); } @@ -175,7 +173,7 @@ } } - if (module_exist('path')) { + if (module_exists('path')) { if ($edit['change_old_aliases']) { $paths = category_legacy_get_path_cache(); foreach ($paths as $path) { @@ -213,7 +211,7 @@ } } - if (module_exist('path')) { + if (module_exists('path')) { if ($edit['change_old_aliases']) { $paths = category_legacy_get_path_cache(); foreach ($paths as $path) { @@ -308,7 +306,7 @@ '#required' => TRUE, ); - if (module_exist('path')) { + if (module_exists('path')) { $form['category_legacy']['change_old_aliases'] = array( '#type' => 'radios', '#title' => t('Change existing legacy path aliases'), @@ -608,7 +606,7 @@ '#required' => TRUE, ); - if (module_exist('path')) { + if (module_exists('path')) { $alias_paths = array( '%taxonomy-path' => theme('placeholder', 'taxonomy/term/x'), '%category-path' => theme('placeholder', 'node/y'), @@ -1192,7 +1190,7 @@ $node->title = $node->name; unset($node->name); - $node->type = 'category-cont'; + $node->type = 'category_cont'; $node->has_relations = $node->relations; unset($node->relations); if ($node->module == 'taxonomy') { @@ -1217,7 +1215,7 @@ function category_legacy_build_container_from_book($book) { $node = (object) $book; - $node->type = 'category-cont'; + $node->type = 'category_cont'; $node->module = 'category'; $node->help = ''; $node->description = ''; @@ -1301,7 +1299,7 @@ $node->title = $node->name; unset($node->name); - $node->type = 'category-cat'; + $node->type = 'category_cat'; $node->cnid = $cnid; db_query('UPDATE {node} SET type = \'%s\' WHERE nid = %d', $node->type, $node->nid); @@ -1343,7 +1341,7 @@ function category_legacy_build_category_from_book($book, $cnid) { $node = (object) $book; - $node->type = 'category-cat'; + $node->type = 'category_cat'; $node->cnid = $cnid; $node->parents = array($node->parent); Index: category_menu/category_menu.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/category_menu/category_menu.module,v retrieving revision 1.36 diff -u -r1.36 category_menu.module --- category_menu/category_menu.module 17 Sep 2006 14:57:02 -0000 1.36 +++ category_menu/category_menu.module 20 Sep 2006 20:27:24 -0000 @@ -11,8 +11,6 @@ */ function category_menu_help($section) { switch ($section) { - case 'admin/modules#description': - return t('Creates and manages a set of menu items that correspond to your site\'s category hierarchy. Requires the category module.'); case 'admin/help#category_menu': return t('

The category menu module creates and manages a set of menu items that correspond to your site\'s category hierarchy. These menu items are static rather than dynamic, so that you can add other menu items (such as module index pages) as children using the menu module. Breadcrumbs for category and container pages (and, optionally, assigned node pages) will reflect the managed menu items. You can also display the menu as a block on your site.

This module requires the category module.

'); } Index: contrib/category_bulkedit/category_bulkedit.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/contrib/category_bulkedit/category_bulkedit.module,v retrieving revision 1.9 diff -u -r1.9 category_bulkedit.module --- contrib/category_bulkedit/category_bulkedit.module 10 Jul 2006 05:44:58 -0000 1.9 +++ contrib/category_bulkedit/category_bulkedit.module 20 Sep 2006 20:57:29 -0000 @@ -49,7 +49,7 @@ 'path' => 'admin/category/'. $nid .'/bulkedit', 'title' => t('bulk edit'), 'callback' => 'category_bulkedit_form', - 'callback arguments' => array('category-cat', $nid), + 'callback arguments' => array('category_cat', $nid), 'access' => user_access('administer categories'), 'type' => MENU_LOCAL_TASK, 'weight' => 8, @@ -65,7 +65,7 @@ * We set the 'real' #required attribute values here, but the final value of * #required attributes is handled by category_bulkedit_pre_render(). */ -function category_bulkedit_form($type = 'category-cont', $cnid = NULL) { +function category_bulkedit_form($type = 'category_cont', $cnid = NULL) { global $form_values; $form = array(); $is_cat = is_numeric(arg(2)); @@ -76,7 +76,7 @@ // Category / container selection, page 1 $list_items = array(); - if ($type == 'category-cont') { + if ($type == 'category_cont') { $containers = category_get_containers(); foreach ($containers as $value) { $list_items[$value->cid] = $value->admin_title; @@ -212,7 +212,7 @@ $content .= theme('table', $header, $rows); } elseif (in_array($form['page']['#value'], array(4))) { - theme_add_style(drupal_get_path('module', 'category_bulkedit'). '/category_bulkedit.css'); + drupal_add_css(drupal_get_path('module', 'category_bulkedit'). '/category_bulkedit.css'); // Nodes to be edited - display $rows = array(); Index: contrib/category_transform/category_transform.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/contrib/category_transform/category_transform.module,v retrieving revision 1.4 diff -u -r1.4 category_transform.module --- contrib/category_transform/category_transform.module 17 May 2006 11:32:12 -0000 1.4 +++ contrib/category_transform/category_transform.module 20 Sep 2006 20:56:58 -0000 @@ -44,7 +44,7 @@ if (isset($cat_types[$node->type])) { if (empty($category) || $category->cnid) { $items[] = array( - 'path' => "node/$nid/category-cat", + 'path' => "node/$nid/category_cat", 'title' => t('category'), 'callback' => 'category_transform_outline', 'callback arguments' => array(arg(1)), @@ -57,7 +57,7 @@ if (isset($cont_types[$node->type])) { if (empty($category) || !$category->cnid) { $items[] = array( - 'path' => "node/$nid/category-cont", + 'path' => "node/$nid/category_cont", 'title' => t('container'), 'callback' => 'category_transform_outline', 'callback arguments' => array(arg(1)), @@ -87,8 +87,8 @@ '#collapsed' => TRUE, ); $options = node_get_types(); - unset($options['category-cat']); - unset($options['category-cont']); + unset($options['category_cat']); + unset($options['category_cont']); $form['category_transform']['category_transform_node_types_cat'] = array( '#type' => 'checkboxes', '#title' => t('Node types that can be transformed into categories'), @@ -117,14 +117,14 @@ * @param $node * The node being outlined. * @param $type - * The category type the node is being transformed into (either category-cat - * or category-cont). + * The category type the node is being transformed into (either category_cat + * or category_cont). * * @return * The form as rendered by drupal_get_form(). */ function category_transform_outline_form($node, $type) { - $form = category_get_form(($type == 'category-cat'), $node, FALSE); + $form = category_get_form(($type == 'category_cat'), $node, FALSE); if (category_is_cat_or_cont($node->nid)) { $form['update'] = array('#type' => 'submit', '#value' => t('Update category outline')); @@ -173,7 +173,7 @@ $form_values['parents'] = array($form_values['parents']); } if (empty($form_values['parents'][0])) { - if ($type == 'category-cat') { + if ($type == 'category_cat') { $form_values['parents'][0] = $form_values['parent'] = $form_values['cnid']; } else { Index: contrib/category_views/category_views.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/contrib/category_views/category_views.module,v retrieving revision 1.5 diff -u -r1.5 category_views.module --- contrib/category_views/category_views.module 13 May 2006 14:28:36 -0000 1.5 +++ contrib/category_views/category_views.module 20 Sep 2006 20:56:52 -0000 @@ -25,7 +25,7 @@ case 'load': if (category_is_cat_or_cont($node->nid)) { $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { return (array)category_views_cont_load($node->nid); } @@ -55,7 +55,7 @@ } elseif (category_is_cat_or_cont($node->nid, TRUE)) { $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { category_views_cont_update($node); } @@ -63,7 +63,7 @@ break; case 'delete': $type = category_node_get_type($node); - $is_cat = $type == 'category-cat'; + $is_cat = $type == 'category_cat'; if (!$is_cat) { category_views_cont_delete($node->nid); } @@ -229,10 +229,10 @@ } if ($node->view_for_cats) { - if ($type == 'category-cont' && $node->view_display['cont']) { + if ($type == 'category_cont' && $node->view_display['cont']) { return TRUE; } - elseif ($type == 'category-cat' && $node->view_display['cat']) { + elseif ($type == 'category_cat' && $node->view_display['cat']) { return TRUE; } } Index: wrappers/book.module.copyme =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/wrappers/book.module.copyme,v retrieving revision 1.5 diff -u -r1.5 book.module.copyme --- wrappers/book.module.copyme 31 May 2006 13:24:34 -0000 1.5 +++ wrappers/book.module.copyme 20 Sep 2006 20:58:09 -0000 @@ -254,13 +254,13 @@ while (!$cnid && ($parent_node = node_load($parent))) { if (category_is_cat_or_cont($parent_node->nid)) { $type = category_node_get_type($parent_node); - if ($type == 'category-cont') { + if ($type == 'category_cont') { $cnid = $parent_node->nid; } } } $node->cnid = $cnid; - $node->type = $cnid ? 'category-cat' : 'category-cont'; + $node->type = $cnid ? 'category-cat' : 'category_cont'; $node->parents = $node->parent ? array($node->parent) : array(); } Index: wrappers/taxonomy.module.copyme =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/category/wrappers/taxonomy.module.copyme,v retrieving revision 1.24 diff -u -r1.24 taxonomy.module.copyme --- wrappers/taxonomy.module.copyme 18 Sep 2006 02:16:06 -0000 1.24 +++ wrappers/taxonomy.module.copyme 20 Sep 2006 20:58:21 -0000 @@ -14,7 +14,7 @@ * print lists of terms associated with a node. Themes can print taxonomy * links with: * - * if (module_exist('taxonomy')) { + * if (module_exists('taxonomy')) { * $this->links(taxonomy_link('taxonomy terms', $node)); * } */ @@ -49,7 +49,7 @@ $items = array(); if ($may_cache) { - if (!module_exist('category_legacy')) { + if (!module_exists('category_legacy')) { $items[] = array('path' => 'taxonomy/term', 'title' => t('taxonomy term'), 'callback' => 'taxonomy_term_page', 'access' => user_access('access content'), @@ -132,7 +132,7 @@ if (!$only_legacy) { $node->title = $edit['name']; $node->nid = $edit['vid']; - $node->type = 'category-cont'; + $node->type = 'category_cont'; $node->description = $edit['description']; $node->help = $edit['help'] ? $edit['help'] : ''; $node->multiple = $edit['multiple']; --- D:/drupal/drupal_head/sites/all/modules/category/category.info +++ D:/drupal/drupal_head/sites/all/modules/category/category.info @@ -0,0 +1,3 @@ +; $Id: $ +name = Category +description = Allows you to structure your site and categorize content. --- D:/drupal/drupal_head/sites/all/modules/category/category_display/category_display.info +++ D:/drupal/drupal_head/sites/all/modules/category/category_display/category_display.info @@ -0,0 +1,3 @@ +; $Id: $ +name = Category Display +description = Allows additional output to be displayed and toggled for category and container nodes. Requires the category module. --- D:/drupal/drupal_head/sites/all/modules/category/category_export/category_export.info +++ D:/drupal/drupal_head/sites/all/modules/category/category_export/category_export.info @@ -0,0 +1,3 @@ +; $Id: $ +name = Category Export +description = Allows category trees to be exported as printer-friendly HTML. Requires the category module. --- D:/drupal/drupal_head/sites/all/modules/category/category_legacy/category_legacy.info +++ D:/drupal/drupal_head/sites/all/modules/category/category_legacy/category_legacy.info @@ -0,0 +1,3 @@ +; $Id: $ +name = Category Legacy +description = Allows you to convert your taxonomy and book data into category data, and vice versa. Requires the category module. --- D:/drupal/drupal_head/sites/all/modules/category/category_menu/category_menu.info +++ D:/drupal/drupal_head/sites/all/modules/category/category_menu/category_menu.info @@ -0,0 +1,3 @@ +; $Id: $ +name = Category Menu +description = Creates and manages a set of menu items that correspond to your site\'s category hierarchy. Requires the category module.