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

Diff of /contributions/modules/createcontentblock/createcontentblock.module

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

revision 1.1.2.5, Wed Dec 19 00:09:27 2007 UTC revision 1.1.2.6, Wed Dec 19 00:14:56 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: createcontentblock.module,v 1.1.2.3 2007/12/18 20:53:22 douggreen Exp $  // $Id: createcontentblock.module,v 1.1.2.5 2007/12/19 00:09:27 douggreen Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 100  function createcontentblock_form_init() Line 100  function createcontentblock_form_init()
100    }    }
101    
102    if (count($init['options'])) {    if (count($init['options'])) {
     $init['destination'] = theme('destination', $init);  
103      return $init;      return $init;
104    }    }
105  }  }
106    
107  function createcontentblock_form($init) {  function createcontentblock_form($init) {
108    $form = array();    $form = array();
109    if ($init['destination']) {    if (isset($init['group_nid'])) {
110      $form['dest'] = array(      $form['dest'] = array(
111        '#type' => 'hidden',        '#type' => 'hidden',
112        '#value' => $init['destination'],        '#value' => 'node/'. $init['group_nid'],
113      );      );
114    }    }
115    if (isset($init['group_nid'])) {    if (isset($init['group_nid'])) {
# Line 140  function createcontentblock_form($init) Line 139  function createcontentblock_form($init)
139    return $form;    return $form;
140  }  }
141    
 /**  
  * Use a theme overridable function so that the site developer can hook the  
  * this process and specify an alternate destination URL.  
  *  
  * The default behavior is to not set the destination.  
  */  
 function theme_destination($init) {  
 //return $_GET['q'];  
 }  
   
142  function createcontentblock_form_submit($form_id, &$form) {  function createcontentblock_form_submit($form_id, &$form) {
143    $fragment = array();    $fragment = array();
144    if (isset($form['dest'])) {    if (isset($form['dest'])) {

Legend:
Removed from v.1.1.2.5  
changed lines
  Added in v.1.1.2.6

  ViewVC Help
Powered by ViewVC 1.1.2