summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Davis2013-02-05 14:59:41 (GMT)
committer Ben Davis2013-02-05 14:59:41 (GMT)
commitd5c5a547a0d89bdfeec159e015f8b419aaebbe04 (patch)
treed4a97a76f6ff0bc23cf1b0656382c3a98fd94282
parent3759cbd3c431f23c29e8f586e59b3436b06dba25 (diff)
Fixed fatal error when creating a new node with translation sync enabled.
-rw-r--r--weight.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/weight.module b/weight.module
index ddbe195..f125c51 100644
--- a/weight.module
+++ b/weight.module
@@ -526,7 +526,7 @@ function _weight_set_weight($node) {
}
if (module_exists('translation') && $node->nid != $node->tnid) {
- if ($settings['sync_translations']) {
+ if ($settings['sync_translations'] && $node->tnid != 0) {
$weight = _weight_get_weight($node->tnid);
}
}
@@ -553,7 +553,7 @@ function _weight_get_weight($node) {
}
elseif (module_exists('translation') && $node->nid != $node->tnid) {
$settings = _weight_get_settings($node->type);
- if ($settings['sync_translations']) {
+ if ($settings['sync_translations'] && $node->tnid != 0) {
$nid = $node->tnid;
}
else {