/[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.5.2.2, Fri Mar 13 02:25:56 2009 UTC revision 1.5.2.3, Thu Mar 19 05:49:49 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: publishcontent.module,v 1.5.2.1 2009/03/13 02:23:19 malaussene Exp $  // $Id: publishcontent.module,v 1.5.2.2 2009/03/13 02:25:56 malaussene Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 18  function publishcontent_menu($may_cache) Line 18  function publishcontent_menu($may_cache)
18      $node = node_load(arg(1));      $node = node_load(arg(1));
19      if ($node->nid) {      if ($node->nid) {
20        $items[] = array(        $items[] = array(
21          'path' => 'node/'. arg(1) .'/publish',          'path' => 'node/'. arg(1) .'/publish/'. drupal_get_token(),
22          'title' => t('Publish'),          'title' => t('Publish'),
23          'callback' => 'publishcontent_toggle_status',          'callback' => 'publishcontent_toggle_status',
24          'callback arguments' => array($node),          'callback arguments' => array($node),
# Line 27  function publishcontent_menu($may_cache) Line 27  function publishcontent_menu($may_cache)
27          'type' => MENU_LOCAL_TASK,          'type' => MENU_LOCAL_TASK,
28        );        );
29        $items[] = array(        $items[] = array(
30          'path' => 'node/'. arg(1) .'/unpublish',          'path' => 'node/'. arg(1) .'/unpublish/'. drupal_get_token(),
31          'title' => t('Unpublish'),          'title' => t('Unpublish'),
32          'callback' => 'publishcontent_toggle_status',          'callback' => 'publishcontent_toggle_status',
33          'callback arguments' => array($node),          'callback arguments' => array($node),
# Line 151  function publishcontent_views_handler_no Line 151  function publishcontent_views_handler_no
151    if (($data->status && _publishcontent_unpublish_access($data)) ||    if (($data->status && _publishcontent_unpublish_access($data)) ||
152        (!$data->status && _publishcontent_publish_access($data))) {        (!$data->status && _publishcontent_publish_access($data))) {
153      return l(t($data->status ? 'Unpublish' : 'Publish'),      return l(t($data->status ? 'Unpublish' : 'Publish'),
154               "node/$data->nid/". ($data->status ? 'unpublish' : 'publish'),               "node/$data->nid/". ($data->status ? 'unpublish/' : 'publish/') . drupal_get_token(),
155               NULL, $destination);               NULL, $destination);
156    }    }
157  }  }

Legend:
Removed from v.1.5.2.2  
changed lines
  Added in v.1.5.2.3

  ViewVC Help
Powered by ViewVC 1.1.2