# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
--- /htdocs/sites/all/modules/domain_admin/domain_admin.module.cvs
+++ /htdocs/sites/all/modules/domain_admin/domain_admin.module
@@ -29,6 +29,8 @@
       'delete own unpublished nodes on domain',
       'change author and creation date of nodes on domain',
       'access published checkbox on domain',
+        'access promote checkbox on domain',
+        'access sticky checkbox on domain',
     );
 
     if (module_exists('domain_conf')) {
@@ -314,13 +316,22 @@
           if (isset($node->override_publishing_status)) {
             $node->status = $node->override_publishing_status;
           }
-          elseif (isset($default->status)) {
-            $node->status = TRUE;
           }
+        if ((domain_admin_access('access promote checkbox on domain') || domain_admin_delegated_access($node))) {
+          // Node promote override
+          if (isset($node->override_publishing_promote)) {
+            $node->promote = $node->override_publishing_promote;
         }
      }  
+        if ((domain_admin_access('access sticky checkbox on domain') || domain_admin_delegated_access($node))) {
+          // Node sticky override
+          if (isset($node->override_publishing_sticky)) {
+            $node->sticky = $node->override_publishing_sticky;
    }
 }
+      }
+  }
+}
   
 
 /**
@@ -375,33 +386,56 @@
   global $_domain, $user;
   // Apply to all node editing forms, but make sure we are not on the
   // CCK field configuration form.
-  if ($form['#id'] == 'node-form' ) {
+  if ($form['#id'] == 'node-form') {
     $node = $form['#node'];
 
     if (!user_access('administer nodes') && domain_admin_isuserindomain($user)) {
 
       // User either has permission or has been delegated to use this page
-      if (domain_admin_access('access published checkbox on domain') || domain_admin_delegated_access($node)) {
-
+      if (domain_admin_delegated_access($node) || domain_admin_access('access published checkbox on domain') || domain_admin_access('access promote checkbox on domain') || domain_admin_access('access sticky checkbox on domain')) {
         $form['options'] = array(
           '#type' => 'fieldset',
           '#title' => t('Publishing options'),
           '#weight' => 25,
         );
 
-        $form['options']['override_publishing_status']   = array(
+        if (domain_admin_access('access published checkbox on domain')) {
+          $form['options']['override_publishing_status'] = array(
           '#type' => 'checkbox',
           '#title' => t('Published'),
           '#default_value' => $node->status,
         );
-      }
-      else {
+        } else {
         // Checkbox is hidden, but form values are passed
-        $form['options']['#type'] = 'hidden';
         $form['options']['status']['#type'] = 'hidden';
         $form['options']['status']['#value'] = $node->status;
       }
 
+        if (domain_admin_access('access promote checkbox on domain')) {
+          $form['options']['override_publishing_promote'] = array(
+              '#type' => 'checkbox',
+              '#title' => t('Promote'),
+              '#default_value' => $node->promote,
+          );
+        } else {
+          // Checkbox is hidden, but form values are passed
+          $form['options']['promote']['#type'] = 'hidden';
+          $form['options']['promote']['#value'] = $node->promote;
+        }
+
+        if (domain_admin_access('access sticky checkbox on domain')) {
+          $form['options']['override_publishing_sticky'] = array(
+              '#type' => 'checkbox',
+              '#title' => t('Sticky'),
+              '#default_value' => $node->sticky,
+          );
+        } else {
+          // Checkbox is hidden, but form values are passed
+          $form['options']['sticky']['#type'] = 'hidden';
+          $form['options']['sticky']['#value'] = $node->sticky;
+        }
+      }
+
       if (domain_admin_access('change author and creation date of nodes on domain') || domain_admin_delegated_access($node)) {
         // Overriding normal author permissions, which depend on 'administer nodes' permission
         $form['author'] = array(
