Révision a2baadd1
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/taxonomy_menu/taxonomy_menu.module | ||
---|---|---|
6 | 6 |
*/ |
7 | 7 |
|
8 | 8 |
//include the database layer |
9 |
require_once(drupal_get_path('module', 'taxonomy_menu') . '/taxonomy_menu.database.inc'); |
|
9 |
require_once(DRUPAL_ROOT . '/' . drupal_get_path('module', 'taxonomy_menu') . '/taxonomy_menu.database.inc');
|
|
10 | 10 |
|
11 | 11 |
//include the batch functions |
12 |
require_once(drupal_get_path('module', 'taxonomy_menu') . '/taxonomy_menu.batch.inc'); |
|
12 |
require_once(DRUPAL_ROOT . '/' . drupal_get_path('module', 'taxonomy_menu') . '/taxonomy_menu.batch.inc');
|
|
13 | 13 |
|
14 | 14 |
/** |
15 | 15 |
* Implements hook_form_alter(). |
... | ... | |
481 | 481 |
*/ |
482 | 482 |
function _taxonomy_menu_nodeapi_helper($op, $terms = array(), $node) { |
483 | 483 |
foreach ($terms as $key => $tid) { |
484 |
$term = taxonomy_term_load($tid); |
|
484 |
|
|
485 |
// taxonomy_term_load($tid) return FALSE if the term was not found |
|
486 |
// if taxonomy $term is false, then go to the next $term |
|
487 |
if (!$term = taxonomy_term_load($tid)) { |
|
488 |
continue; |
|
489 |
} |
|
485 | 490 |
|
486 | 491 |
// update the menu for each term if necessary |
487 | 492 |
$menu_name = variable_get(_taxonomy_menu_build_variable('vocab_menu', $term->vid), FALSE); |
... | ... | |
754 | 759 |
} |
755 | 760 |
else { |
756 | 761 |
$path = 'taxonomy/term/' . $tid; |
757 |
if (variable_get(_taxonomy_menu_build_variable('display_decendants', $vid), FALSE)) { |
|
762 |
if (variable_get(_taxonomy_menu_build_variable('display_descendants', $vid), FALSE)) {
|
|
758 | 763 |
// Use 'all' at the end of the path |
759 | 764 |
if (variable_get(_taxonomy_menu_build_variable('end_all', $vid), FALSE)) { |
760 | 765 |
$path .= '/all'; |
Formats disponibles : Unified diff
Weekly update of contrib modules