DrupalBin
Submit Code
About
Recent Posts
Node id in node title
3 min 21 sec
ago
ad
4 min 42 sec
ago
Example of your custom template variable
6 min 22 sec
ago
Code
2 hours 56 sec
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
autotaxweightmod
View
Download
Fix
June 30, 2008 - 8:03pm — Anonymous
<?php
// $Id$
function
autotaxweight_taxonomy
(
$op
,
$type
,
$array
=
NULL
)
{
if
(
(
$op
==
'insert'
||
$op
==
'update'
)
&&
$type
==
'term'
)
{
if
(
$array
[
parent
]
[
0
]
==
0
)
{
$array
[
weight
]
=
1
;
}
}
}