/[drupal]/contributions/modules/publishcontent/publishcontent.module
ViewVC logotype

Diff of /contributions/modules/publishcontent/publishcontent.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3.4.9, Wed Mar 18 22:55:50 2009 UTC revision 1.3.4.10, Wed Mar 18 23:52:32 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: publishcontent.module,v 1.3.4.8 2009/03/13 01:27:41 malaussene Exp $  // $Id: publishcontent.module,v 1.3.4.9 2009/03/18 22:55:50 malaussene Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 143  function publishcontent_views_handlers() Line 143  function publishcontent_views_handlers()
143      ),      ),
144    );    );
145  }  }
146    
147    /**
148     * Implementation of hook_form_alter()
149     *
150     * allow to use the 'Publishing options' on the edit/add page
151     */
152    function publishcontent_form_alter(&$form, $form_state, $form_id) {
153      if (!user_access('administer nodes')
154          && $form['type']['#value'] .'_node_form' == $form_id
155          && (_publishcontent_unpublish_access($form['#node']) ||
156              _publishcontent_publish_access($form['#node']))) {
157        $form['options']['#access'] = TRUE;
158        unset($form['options']['promote']);
159        unset($form['options']['sticky']);
160        unset($form['options']['revision']);
161      }
162    }

Legend:
Removed from v.1.3.4.9  
changed lines
  Added in v.1.3.4.10

  ViewVC Help
Powered by ViewVC 1.1.2