Commit 1bc55e06 authored by Jonathan Hunt's avatar Jonathan Hunt

#5 Update ClimbNZ Place to 7.x-1.0-alpha13 with nodeheirarchy children list hidden.

parent e355779f
...@@ -225,7 +225,7 @@ function climbnz_place_field_default_field_instances() { ...@@ -225,7 +225,7 @@ function climbnz_place_field_default_field_instances() {
'module' => 'text', 'module' => 'text',
'settings' => array(), 'settings' => array(),
'type' => 'text_default', 'type' => 'text_default',
'weight' => 15, 'weight' => 14,
), ),
'teaser' => array( 'teaser' => array(
'label' => 'above', 'label' => 'above',
...@@ -318,7 +318,7 @@ function climbnz_place_field_default_field_instances() { ...@@ -318,7 +318,7 @@ function climbnz_place_field_default_field_instances() {
'module' => 'file', 'module' => 'file',
'settings' => array(), 'settings' => array(),
'type' => 'file_default', 'type' => 'file_default',
'weight' => 14, 'weight' => 13,
), ),
'teaser' => array( 'teaser' => array(
'label' => 'above', 'label' => 'above',
...@@ -663,7 +663,7 @@ function climbnz_place_field_default_field_instances() { ...@@ -663,7 +663,7 @@ function climbnz_place_field_default_field_instances() {
'weight' => 7, 'weight' => 7,
), ),
'default' => array( 'default' => array(
'label' => 'above', 'label' => 'inline',
'module' => 'text', 'module' => 'text',
'settings' => array(), 'settings' => array(),
'type' => 'text_default', 'type' => 'text_default',
......
...@@ -2,7 +2,7 @@ name = ClimbNZ Place ...@@ -2,7 +2,7 @@ name = ClimbNZ Place
description = Place content type for geographic locations description = Place content type for geographic locations
core = 7.x core = 7.x
package = ClimbNZ package = ClimbNZ
version = 7.x-1.0-alpha12 version = 7.x-1.0-alpha13
dependencies[] = entityreference dependencies[] = entityreference
dependencies[] = features dependencies[] = features
dependencies[] = file dependencies[] = file
...@@ -60,11 +60,15 @@ features[variable][] = comment_form_location_place ...@@ -60,11 +60,15 @@ features[variable][] = comment_form_location_place
features[variable][] = comment_place features[variable][] = comment_place
features[variable][] = comment_preview_place features[variable][] = comment_preview_place
features[variable][] = comment_subject_field_place features[variable][] = comment_subject_field_place
features[variable][] = diff_enable_revisions_page_node_place
features[variable][] = diff_show_preview_changes_node_place
features[variable][] = diff_view_mode_preview_node_place
features[variable][] = field_bundle_settings_node__place features[variable][] = field_bundle_settings_node__place
features[variable][] = menu_options_place features[variable][] = menu_options_place
features[variable][] = menu_parent_place features[variable][] = menu_parent_place
features[variable][] = node_options_place features[variable][] = node_options_place
features[variable][] = node_preview_place features[variable][] = node_preview_place
features[variable][] = node_submitted_place features[variable][] = node_submitted_place
features[variable][] = pathauto_node_place_pattern
features[views_view][] = climbnz_places_in_place features[views_view][] = climbnz_places_in_place
features_exclude[dependencies][ctools] = ctools features_exclude[dependencies][ctools] = ctools
...@@ -164,3 +164,27 @@ function climbnz_place_node_view($node, $view_mode, $langcode) { ...@@ -164,3 +164,27 @@ function climbnz_place_node_view($node, $view_mode, $langcode) {
); );
} }
} }
/**
* Based on _nodehierarchy_get_descendant_count() but modified to count Routes.
* Count the descendants of the given node.
*
* @param integer $nid
*/
function place_nodehierarchy_get_descendant_count($parent) {
if ($plids = _nodehierarchy_get_node_mlids($parent)) {
$where = array();
$args = array();
// Build all nine ORs to check if the plid is anywhere in the descendent paths.
for ($i = 1; $i < MENU_MAX_DEPTH; $i++) {
foreach ($plids as $plid) {
$where[] = "p$i = :plid_$i";
$args[":plid_$i"] = $plid;
}
}
// Add one more plid for the exclusion clause.
$args['mlid'] = $plid;
return db_query("SELECT count(mlid) as descendent_count FROM {menu_links} WHERE (" . implode(' OR ', $where) . ") AND mlid != :mlid AND module = 'nodehierarchy'", $args)->fetchField();
}
return 0;
}
\ No newline at end of file
...@@ -59,6 +59,27 @@ function climbnz_place_strongarm() { ...@@ -59,6 +59,27 @@ function climbnz_place_strongarm() {
$strongarm->value = 1; $strongarm->value = 1;
$export['comment_subject_field_place'] = $strongarm; $export['comment_subject_field_place'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'diff_enable_revisions_page_node_place';
$strongarm->value = 1;
$export['diff_enable_revisions_page_node_place'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'diff_show_preview_changes_node_place';
$strongarm->value = 1;
$export['diff_show_preview_changes_node_place'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'diff_view_mode_preview_node_place';
$strongarm->value = 'full';
$export['diff_view_mode_preview_node_place'] = $strongarm;
$strongarm = new stdClass(); $strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */ $strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1; $strongarm->api_version = 1;
...@@ -111,8 +132,8 @@ function climbnz_place_strongarm() { ...@@ -111,8 +132,8 @@ function climbnz_place_strongarm() {
'display' => array( 'display' => array(
'nodehierarchy_children' => array( 'nodehierarchy_children' => array(
'default' => array( 'default' => array(
'weight' => '11', 'weight' => '17',
'visible' => TRUE, 'visible' => FALSE,
), ),
'climbnz_field_guide' => array( 'climbnz_field_guide' => array(
'weight' => '11', 'weight' => '11',
...@@ -121,7 +142,7 @@ function climbnz_place_strongarm() { ...@@ -121,7 +142,7 @@ function climbnz_place_strongarm() {
), ),
'nodehierarchy_children_links' => array( 'nodehierarchy_children_links' => array(
'default' => array( 'default' => array(
'weight' => '12', 'weight' => '11',
'visible' => TRUE, 'visible' => TRUE,
), ),
'climbnz_field_guide' => array( 'climbnz_field_guide' => array(
...@@ -131,19 +152,19 @@ function climbnz_place_strongarm() { ...@@ -131,19 +152,19 @@ function climbnz_place_strongarm() {
), ),
'route_table' => array( 'route_table' => array(
'default' => array( 'default' => array(
'weight' => '13', 'weight' => '12',
'visible' => TRUE, 'visible' => TRUE,
), ),
), ),
'place_table' => array( 'place_table' => array(
'default' => array( 'default' => array(
'weight' => '17', 'weight' => '16',
'visible' => TRUE, 'visible' => TRUE,
), ),
), ),
'guide_list' => array( 'guide_list' => array(
'default' => array( 'default' => array(
'weight' => '16', 'weight' => '15',
'visible' => TRUE, 'visible' => TRUE,
), ),
), ),
...@@ -192,5 +213,12 @@ function climbnz_place_strongarm() { ...@@ -192,5 +213,12 @@ function climbnz_place_strongarm() {
$strongarm->value = 0; $strongarm->value = 0;
$export['node_submitted_place'] = $strongarm; $export['node_submitted_place'] = $strongarm;
$strongarm = new stdClass();
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
$strongarm->api_version = 1;
$strongarm->name = 'pathauto_node_place_pattern';
$strongarm->value = '';
$export['pathauto_node_place_pattern'] = $strongarm;
return $export; return $export;
} }
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