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

Diff of /contributions/modules/wishlist/wishlist.module

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

revision 1.45.2.1, Sat Mar 1 06:11:16 2008 UTC revision 1.45.2.2, Thu Dec 18 05:26:25 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  /* $Id: wishlist.module,v 1.45 2008/01/26 23:05:37 smclewin Exp $ */  /* $Id: wishlist.module,v 1.45.2.1 2008/03/01 06:11:16 smclewin Exp $ */
3  // Wishlist management module for Drupal  // Wishlist management module for Drupal
4  // Written by Scott McLewin and Melanie Paul-McLewin  // Written by Scott McLewin and Melanie Paul-McLewin
5  // drupal AT mclewin DOT com  // drupal AT mclewin DOT com
6    
7    
8    
9    // Random value to pass into drupal_get_token()/drupal_valid_token() to protect action oriented URLs.
10    define(WISHLIST_SEC_TOKEN_VALUE, 'ajf8e7yf8723r4rhdcmfhai23746yfn,cjfy');
11    define(WISHLIST_SEC_TOKEN_NAME, 'wlatkn');  // WishListActionToKeN - just a somewhat meaningful string that is likely to be unique.
12    
13    
14  /** PHP4 compatibliibility **/  /** PHP4 compatibliibility **/
15  if (!function_exists("stripos")) {  if (!function_exists("stripos")) {
16    function stripos($str,$needle) {    function stripos($str,$needle) {
# Line 165  function wishlist_link($type, $node = 0, Line 170  function wishlist_link($type, $node = 0,
170        if($node->item_quantity_purchased < $node->item_quantity_requested) {        if($node->item_quantity_purchased < $node->item_quantity_requested) {
171           $links['wishlist_get_this_gift'] = array(           $links['wishlist_get_this_gift'] = array(
172                  'title' => t('Get this gift'),                  'title' => t('Get this gift'),
173                  'href' => "wishlist/item/$node->nid/purchase"                  'href' => "wishlist/item/$node->nid/purchase",
174                'query' => array(WISHLIST_SEC_TOKEN_NAME => drupal_get_token(WISHLIST_SEC_TOKEN_VALUE)),
175           );           );
176        }        }
177      } else if(!$user->uid) {      } else if(!$user->uid) {
# Line 722  function _wishlist_render_view($node, $t Line 728  function _wishlist_render_view($node, $t
728           }           }
729           $rows[] = array(           $rows[] = array(
730              array("data" => $wishlist_purch->wishlist_purch_quantity),              array("data" => $wishlist_purch->wishlist_purch_quantity),
731              array("data" => l($action_str, "wishlist/item/$node->nid/return/$wishlist_purch->wishlist_purch_wid"))              array("data" => l($action_str, "wishlist/item/$node->nid/return/$wishlist_purch->wishlist_purch_wid", array('query' => array(WISHLIST_SEC_TOKEN_NAME => drupal_get_token(WISHLIST_SEC_TOKEN_VALUE)))))
732           );           );
733    
734       }       }

Legend:
Removed from v.1.45.2.1  
changed lines
  Added in v.1.45.2.2

  ViewVC Help
Powered by ViewVC 1.1.2