| 1 |
<?php |
<?php |
| 2 |
// $Id: taxonomy_menu.module,v 1.19.2.2.2.40 2009/10/31 18:39:33 indytechcook Exp $ |
// $Id: taxonomy_menu.module,v 1.19.2.2.2.41 2009/11/05 01:48:36 indytechcook Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 318 |
*/ |
*/ |
| 319 |
function taxonomy_menu_nodeapi(&$node, $op, $a3, $a4) { |
function taxonomy_menu_nodeapi(&$node, $op, $a3, $a4) { |
| 320 |
static $terms_old; |
static $terms_old; |
| 321 |
static $status; |
static $status; // 2 == TRUE, 1 == FALSE |
| 322 |
|
|
| 323 |
if ($op == 'presave' || $op == 'update' || $op == 'insert' || $op == 'delete') { |
if ($op == 'presave' || $op == 'update' || $op == 'insert' || $op == 'delete') { |
| 324 |
// Get the vocabs assoicated to this node |
// Get the vocabs assoicated to this node |
| 325 |
if (!$status) { |
if (!$status) { |
| 326 |
$vids = _taxonomy_menu_get_vid_by_tid($node->taxonomy); |
// The delete operation formats the taxonomy array differently |
| 327 |
|
// so pull the array keys instead of values which is always the tid |
| 328 |
|
$node_tids = array_keys($node->taxonomy); |
| 329 |
|
$vids = _taxonomy_menu_get_vid_by_tid($node_tids); |
| 330 |
// Check to see if the any of the vocabs have display num |
// Check to see if the any of the vocabs have display num |
| 331 |
// or empty terms enabled |
// or empty terms enabled |
| 332 |
foreach ($vids as $vid) { |
foreach ($vids as $vid) { |