Index: modules/blogapi/blogapi.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.module,v
retrieving revision 1.113
diff -u -p -r1.113 blogapi.module
--- modules/blogapi/blogapi.module	31 Dec 2007 08:54:36 -0000	1.113
+++ modules/blogapi/blogapi.module	9 Jan 2008 12:01:35 -0000
@@ -475,7 +475,7 @@ function blogap_mti_publish_post($postid
     return blogapi_error(t('Invalid post.'));
   }
 
-  $node->status = 1;
+  $node->status = NODE_PUBLISHED;
   if (!node_access('update', $node)) {
     return blogapi_error(t('You do not have permission to update this post.'));
   }
Index: modules/node/node.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.admin.inc,v
retrieving revision 1.17
diff -u -p -r1.17 node.admin.inc
--- modules/node/node.admin.inc	28 Dec 2007 12:02:51 -0000	1.17
+++ modules/node/node.admin.inc	9 Jan 2008 12:01:35 -0000
@@ -78,32 +78,32 @@ function node_node_operations() {
     'publish' => array(
       'label' => t('Publish'),
       'callback' => 'node_mass_update',
-      'callback arguments' => array('updates' => array('status' => 1)),
+      'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED)),
     ),
     'unpublish' => array(
       'label' => t('Unpublish'),
       'callback' => 'node_mass_update',
-      'callback arguments' => array('updates' => array('status' => 0)),
+      'callback arguments' => array('updates' => array('status' => NODE_NOT_PUBLISHED)),
     ),
     'promote' => array(
       'label' => t('Promote to front page'),
       'callback' => 'node_mass_update',
-      'callback arguments' => array('updates' => array('status' => 1, 'promote' => 1)),
+      'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'promote' => NODE_PROMOTED)),
     ),
     'demote' => array(
       'label' => t('Demote from front page'),
       'callback' => 'node_mass_update',
-      'callback arguments' => array('updates' => array('promote' => 0)),
+      'callback arguments' => array('updates' => array('promote' => NODE_NOT_PROMOTED)),
     ),
     'sticky' => array(
       'label' => t('Make sticky'),
       'callback' => 'node_mass_update',
-      'callback arguments' => array('updates' => array('status' => 1, 'sticky' => 1)),
+      'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'sticky' => NODE_STICKY)),
     ),
     'unsticky' => array(
       'label' => t('Remove stickiness'),
       'callback' => 'node_mass_update',
-      'callback arguments' => array('updates' => array('sticky' => 0)),
+      'callback arguments' => array('updates' => array('sticky' => NODE_NOT_STICKY)),
     ),
     'delete' => array(
       'label' => t('Delete'),
@@ -495,6 +495,8 @@ function node_admin_nodes() {
     $form['name'][$node->nid] =  array('#value' => check_plain(node_get_types('name', $node)));
     $form['username'][$node->nid] = array('#value' => theme('username', $node));
     $form['status'][$node->nid] =  array('#value' => ($node->status ? t('published') : t('not published')));
+    $form['promote'][$node->nid] =  array('#value' => ($node->promote ? t('promoted') : t('not promoted')));
+    $form['sticky'][$node->nid] =  array('#value' => ($node->sticky ? t('sticky') : t('not sticky')));
     if ($multilanguage) {
       $form['language'][$node->nid] = array('#value' => empty($node->language) ? t('Language neutral') : t($languages[$node->language]->name));
     }
@@ -516,7 +518,7 @@ function theme_node_admin_nodes($form) {
   // the title form elements.
   $has_posts = isset($form['title']) && is_array($form['title']);
   $select_header = $has_posts ? theme('table_select_header_cell') : '';
-  $header = array($select_header, t('Title'), t('Type'), t('Author'), t('Status'));
+  $header = array($select_header, t('Title'), t('Type'), t('Author'), t('Status'), t('Promoted'), t('Sticky'));
   if (isset($form['language'])) {
     $header[] = t('Language');
   }
@@ -532,6 +534,8 @@ function theme_node_admin_nodes($form) {
       $row[] = drupal_render($form['name'][$key]);
       $row[] = drupal_render($form['username'][$key]);
       $row[] = drupal_render($form['status'][$key]);
+      $row[] = drupal_render($form['promote'][$key]);
+      $row[] = drupal_render($form['sticky'][$key]);
       if (isset($form['language'])) {
         $row[] = drupal_render($form['language'][$key]);
       }
Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.938
diff -u -p -r1.938 node.module
--- modules/node/node.module	8 Jan 2008 11:27:16 -0000	1.938
+++ modules/node/node.module	9 Jan 2008 12:01:37 -0000
@@ -7,14 +7,55 @@
  * programmatically submit nodes using the usual form API pattern.
  */
 
+/**
+ * Maximum date to keep node history.
+ */
 define('NODE_NEW_LIMIT', time() - 30 * 24 * 60 * 60);
 
+/**
+* @name Node build mode
+* @{
+* The build mode identifies the target for which the node is built.
+*/
 define('NODE_BUILD_NORMAL', 0);
 define('NODE_BUILD_PREVIEW', 1);
 define('NODE_BUILD_SEARCH_INDEX', 2);
 define('NODE_BUILD_SEARCH_RESULT', 3);
 define('NODE_BUILD_RSS', 4);
 define('NODE_BUILD_PRINT', 5);
+/**
+ * @} End of "Node build mode".
+ */
+
+/**
+ * Node is not published.
+ */
+define('NODE_NOT_PUBLISHED', 0);
+
+/**
+ * Node is published.
+ */
+define('NODE_PUBLISHED', 1);
+
+/**
+ * Node is not promoted to front page.
+ */
+define('NODE_NOT_PROMOTED', 0);
+
+/**
+ * Node is promoted to front page.
+ */
+define('NODE_PROMOTED', 1);
+
+/**
+ * Node is not sticky at top of the page.
+ */
+define('NODE_NOT_STICKY', 0);
+
+/**
+ * Node is sticky at top of the page.
+ */
+define('NODE_STICKY', 1);
 
 /**
  * Implementation of hook_help().
@@ -1104,7 +1145,7 @@ function node_search($op = 'search', $ke
       return;
 
     case 'status':
-      $total = db_result(db_query('SELECT COUNT(*) FROM {node} WHERE status = 1'));
+      $total = db_result(db_query('SELECT COUNT(*) FROM {node} WHERE status = %d', NODE_PUBLISHED));
       $remaining = db_result(db_query("SELECT COUNT(*) FROM {node} n LEFT JOIN {search_dataset} d ON d.type = 'node' AND d.sid = n.nid WHERE d.sid IS NULL OR d.reindex <> 0"));
       return array('remaining' => $remaining, 'total' => $total);
 
@@ -1145,7 +1186,7 @@ function node_search($op = 'search', $ke
       // Build matching conditions
       list($join1, $where1) = _db_rewrite_sql();
       $arguments1 = array();
-      $conditions1 = 'n.status = 1';
+      $conditions1 = 'n.status = '. NODE_PUBLISHED;
 
       if ($type = search_query_extract($keys, 'type')) {
         $types = array();
@@ -1582,7 +1623,7 @@ function node_feed($nids = FALSE, $chann
 
   if ($nids === FALSE) {
     $nids = array();
-    $result = db_query_range(db_rewrite_sql('SELECT n.nid, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.created DESC'), 0, variable_get('feed_default_items', 10));
+    $result = db_query_range(db_rewrite_sql('SELECT n.nid, n.created FROM {node} n WHERE n.promote = %d AND n.status = %d ORDER BY n.created DESC'), NODE_PROMOTED, NODE_PUBLISHED, 0, variable_get('feed_default_items', 10));
     while ($row = db_fetch_object($result)) {
       $nids[] = $row->nid;
     }
@@ -1663,7 +1704,7 @@ function node_feed($nids = FALSE, $chann
  * Menu callback; Generate a listing of promoted nodes.
  */
 function node_page_default() {
-  $result = pager_query(db_rewrite_sql('SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.promote = 1 AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10));
+  $result = pager_query(db_rewrite_sql('SELECT n.nid, n.sticky, n.created FROM {node} n WHERE n.promote = %d AND n.status = %d ORDER BY n.sticky DESC, n.created DESC'), variable_get('default_nodes_main', 10), 0, NULL, NODE_PROMOTED, NODE_PUBLISHED);
 
   $output = '';
   $num_rows = FALSE;
@@ -2524,55 +2565,55 @@ function node_action_info() {
 
 /**
  * Implementation of a Drupal action.
- * Sets the status of a node to 1, meaning published.
+ * Sets the status of a node to NODE_PUBLISHED, meaning published.
  */
 function node_publish_action(&$node, $context = array()) {
-  $node->status = 1;
+  $node->status = NODE_PUBLISHED;
   watchdog('action', 'Set @type %title to published.', array('@type' => node_get_types('name', $node), '%title' => $node->title));
 }
 
 /**
  * Implementation of a Drupal action.
- * Sets the status of a node to 0, meaning unpublished.
+ * Sets the status of a node to NODE_NOT_PUBLISHED, meaning unpublished.
  */
 function node_unpublish_action(&$node, $context = array()) {
-  $node->status = 0;
+  $node->status = NODE_NOT_PUBLISHED;
   watchdog('action', 'Set @type %title to unpublished.', array('@type' => node_get_types('name', $node), '%title' => $node->title));
 }
 
 /**
  * Implementation of a Drupal action.
- * Sets the sticky-at-top-of-list property of a node to 1.
+ * Sets the sticky-at-top-of-list property of a node to NODE_STICKY.
  */
 function node_make_sticky_action(&$node, $context = array()) {
-  $node->sticky = 1;
+  $node->sticky = NODE_STICKY;
   watchdog('action', 'Set @type %title to sticky.', array('@type' => node_get_types('name', $node), '%title' => $node->title));
 }
 
 /**
  * Implementation of a Drupal action.
- * Sets the sticky-at-top-of-list property of a node to 0.
+ * Sets the sticky-at-top-of-list property of a node to NODE_NOT_STICKY.
  */
 function node_make_unsticky_action(&$node, $context = array()) {
-  $node->sticky = 0;
+  $node->sticky = NODE_NOT_STICKY;
   watchdog('action', 'Set @type %title to unsticky.', array('@type' => node_get_types('name', $node), '%title' => $node->title));
 }
 
 /**
  * Implementation of a Drupal action.
- * Sets the promote property of a node to 1.
+ * Sets the promote property of a node to NODE_PROMOTED.
  */
 function node_promote_action(&$node, $context = array()) {
-  $node->promote = 1;
+  $node->promote = NODE_PROMOTED;
   watchdog('action', 'Promoted @type %title to front page.', array('@type' => node_get_types('type', $node), '%title' => $node->title));
 }
 
 /**
  * Implementation of a Drupal action.
- * Sets the promote property of a node to 0.
+ * Sets the promote property of a node to NODE_NOT_PROMOTED.
  */
 function node_unpromote_action(&$node, $context = array()) {
-  $node->promote = 0;
+  $node->promote = NODE_NOT_PROMOTED;
   watchdog('action', 'Removed @type %title from front page.', array('@type' => node_get_types('type', $node), '%title' => $node->title));
 }
 
@@ -2671,7 +2712,7 @@ function node_unpublish_by_keyword_actio
 function node_unpublish_by_keyword_action($node, $context) {
   foreach ($context['keywords'] as $keyword) {
     if (strstr(node_view(drupal_clone($node)), $keyword) || strstr($node->title, $keyword)) {
-      $node->status = 0;
+      $node->status = NODE_NOT_PUBLISHED;
       watchdog('action', 'Set @type %title to unpublished.', array('@type' => node_get_types('name', $node), '%title' => $node->title));
       break;
     }
Index: modules/ping/ping.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/ping/ping.module,v
retrieving revision 1.52
diff -u -p -r1.52 ping.module
--- modules/ping/ping.module	19 Dec 2007 17:45:42 -0000	1.52
+++ modules/ping/ping.module	9 Jan 2008 12:01:37 -0000
@@ -28,7 +28,7 @@ function ping_cron() {
   global $base_url;
 
   if (variable_get('site_name', 0)) {
-    if (db_result(db_query("SELECT COUNT(*) FROM {node} WHERE status = 1 AND (created > '". variable_get('cron_last', time()) ."' OR changed > '". variable_get('cron_last', time()) ."')"))) {
+    if (db_result(db_query("SELECT COUNT(*) FROM {node} WHERE status = %d AND (created > '". variable_get('cron_last', time()) ."' OR changed > '". variable_get('cron_last', time()) ."')"), NODE_PUBLISHED)) {
       _ping_notify(variable_get('site_name', ''), $base_url);
     }
   }
