Changeset 4367 for trunk/comments.php


Ignore:
Timestamp:
Nov 25, 2009, 8:02:57 PM (14 years ago)
Author:
nikrou
Message:

Feature 1255: modification in sql queries

  • manage random function
  • manage regex syntax
  • manage quote (single instead of double)
  • manage interval
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/comments.php

    r4334 r4367  
    5252$since_options = array(
    5353  1 => array('label' => l10n('today'),
    54              'clause' => 'date > SUBDATE(CURDATE(), INTERVAL 1 DAY)'),
     54             'clause' => 'date > '.pwg_db_get_recent_period_expression(1)),
    5555  2 => array('label' => sprintf(l10n('last %d days'), 7),
    56              'clause' => 'date > SUBDATE(CURDATE(), INTERVAL 7 DAY)'),
     56             'clause' => 'date > '.pwg_db_get_recent_period_expression(7)),
    5757  3 => array('label' => sprintf(l10n('last %d days'), 30),
    58              'clause' => 'date > SUBDATE(CURDATE(), INTERVAL 30 DAY)'),
     58             'clause' => 'date > '.pwg_db_get_recent_period_expression(30)),
    5959  4 => array('label' => l10n('the beginning'),
    6060             'clause' => '1=1') // stupid but generic
     
    139139if ( !is_admin() )
    140140{
    141   $page['where_clauses'][] = 'validated="true"';
     141  $page['where_clauses'][] = 'validated=\'true\'';
    142142}
    143143
Note: See TracChangeset for help on using the changeset viewer.