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

Diff of /contributions/modules/stock/stock.module

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

revision 1.21.2.4, Sat Jul 25 17:34:51 2009 UTC revision 1.21.2.5, Thu Sep 10 23:53:22 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: stock.module,v 1.21.2.3 2008/10/26 02:52:27 kbahey Exp $  // $Id: stock.module,v 1.21.2.4 2009/07/25 17:34:51 kbahey Exp $
3  // 6.4 fixes by beyond  // 6.4 fixes by beyond
4    
5  /**  /**
# Line 102  function stock_link($type, $node = 0, $m Line 102  function stock_link($type, $node = 0, $m
102    
103  // Display the stock page  // Display the stock page
104  function stock_page() {  function stock_page() {
105    return theme('stock_page', stock_contents('page'));    drupal_add_css(drupal_get_path('module', 'stock') .'/stock.css');
106      return stock_contents('page');
107  }  }
108    
109  function stock_block($op = 'list', $delta = 0) {  function stock_block($op = 'list', $delta = 0) {
# Line 118  function stock_block($op = 'list', $delt Line 119  function stock_block($op = 'list', $delt
119          case 0:          case 0:
120            $block['subject'] = t($title);            $block['subject'] = t($title);
121           if (user_access('use stock')) {           if (user_access('use stock')) {
122             $block['content'] = theme('stock_page', stock_contents('block'));             drupal_add_css(drupal_get_path('module', 'stock') .'/stock.css');
123               $block['content'] = stock_contents('block');
124           }           }
125           else {           else {
126             $block['content'] = t('You do not have permission to access this feature');             $block['content'] = t('You do not have permission to access this feature');
# Line 132  function stock_block($op = 'list', $delt Line 134  function stock_block($op = 'list', $delt
134    
135  // Display the form  // Display the form
136  function stock_form($symbols) {  function stock_form($symbols) {
137    $output .= drupal_get_form('stock_form_definition', $symbols);    return drupal_get_form('stock_form_definition', $symbols);
   return $output;  
138  }  }
139    
140  function stock_form_definition($form_state, $symbols) {  function stock_form_definition($form_state, $symbols) {
# Line 242  function stock_contents($format = 'block Line 243  function stock_contents($format = 'block
243        break;        break;
244    }    }
245    
   
246    return $output;    return $output;
247  }  }
248    
# Line 270  function stock_do_quote($format = 'long' Line 270  function stock_do_quote($format = 'long'
270      return theme('table', $headers, $rows);      return theme('table', $headers, $rows);
271    }    }
272  }  }
 function stock_theme() {  
   return array('stock_page' => array() );  
 }  
   
 function theme_stock_page($output) {  
   drupal_add_css(drupal_get_path('module', 'stock') .'/stock.css');  
   return $output;  
 }  
273    
274  function stock_get_headers($format = 'long') {  function stock_get_headers($format = 'long') {
275    // keys in these arrays must match the column names in the    // keys in these arrays must match the column names in the

Legend:
Removed from v.1.21.2.4  
changed lines
  Added in v.1.21.2.5

  ViewVC Help
Powered by ViewVC 1.1.2