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

Diff of /contributions/modules/premium/premium.module

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

revision 1.7.2.3, Sun Aug 3 04:28:56 2008 UTC revision 1.7.2.4, Sun Aug 3 06:26:20 2008 UTC
# Line 1  Line 1 
1  <?php /* $Id: premium.module,v 1.14 2008/08/03 04:28:04 vauxia Exp $ */  <?php /* $Id: premium.module,v 1.16 2008/08/03 06:17:46 jerdavis Exp $ */
2  /**  /**
3   * @file Restrict access to the full body of premium content   * @file Restrict access to the full body of premium content
4   */   */
# Line 202  function premium_settings() { Line 202  function premium_settings() {
202   */   */
203  function premium_settings_save($form_id, $form_values) {  function premium_settings_save($form_id, $form_values) {
204    $count = $form_values['premium_time_count'];    $count = $form_values['premium_time_count'];
205    $unit  = $form_values['premium_unit_count'];    $unit  = $form_values['premium_time_unit'];
206    $mode  = $form_values['premium_mode'];    $mode  = $form_values['premium_mode'];
207    $types = $form_values['premium_node_types'];    $types = $form_values['premium_node_types'];
208    
# Line 273  function _premium_node($node) { Line 273  function _premium_node($node) {
273    if ($node->nid) {    if ($node->nid) {
274      // Attempt to find the value from the premium table.      // Attempt to find the value from the premium table.
275      return (int) db_result(db_query("SELECT 1 FROM {premium}  WHERE nid = %d      return (int) db_result(db_query("SELECT 1 FROM {premium}  WHERE nid = %d
276        AND ( start_ts = 0 and end_ts > %d)        AND (( start_ts = 0 and end_ts > %d)
277        OR ( start_ts < %d AND end_ts = 0)        OR ( start_ts < %d AND end_ts = 0)
278        OR ( start_ts = 0 AND end_ts = 0)", $node->nid, time(), time()));        OR ( start_ts = 0 AND end_ts = 0))", $node->nid, time(), time()));
279    }    }
280    
281    // Use default settings for this node type.    // Use default settings for this node type.

Legend:
Removed from v.1.7.2.3  
changed lines
  Added in v.1.7.2.4

  ViewVC Help
Powered by ViewVC 1.1.2