From d93cc061db7d52b95ba0c5e27b26755d2941f2d2 Mon Sep 17 00:00:00 2001
From: Michael Stenta <mike@mstenta.net>
Date: Tue, 13 Dec 2011 12:20:13 -0500
Subject: [PATCH] Respect default weight variable in hook_nodeapi presave.

---
 weight.module |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/weight.module b/weight.module
index 0722a81..e5e592d 100644
--- a/weight.module
+++ b/weight.module
@@ -83,7 +83,7 @@ function weight_nodeapi(&$node, $op) {
       case 'presave':
         // Non-weighted nodes have a weight of zero.
         if (is_null($node->node_weight)) {
-          $node->node_weight = 0;
+          $node->node_weight = variable_get('weight_default', 0);
         }
 
         // If the admin wants to use the menu weight, see if there is one.
-- 
1.6.6

