Ignore:
Timestamp:
Jan 9, 2007 12:47:08 AM (17 years ago)
Author:
quinn
Message:

fixed bug: PHP Notice: Undefined index: authenticated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Utilities.inc.php

    r219 r224  
    524524 * @return string         Comma list of array values.
    525525 */
    526 function escapedList($in)
     526function escapedList($in, $separator="', '")
    527527{
    528528    $db =& DB::getInstance();
    529529   
    530530    if (is_array($in) && !empty($in)) {
    531         return "'" . join("', '", array_map(array($db, 'escapeString'), $in)) . "'";
     531        return join($separator, array_map(array($db, 'escapeString'), $in));
    532532    } else {
    533533        return $db->escapeString($in);
     
    549549    // Translate the human string date into SQL-safe date format.
    550550    if (empty($date) || strpos($date, '0000-00-00') !== false || strtotime($date) === -1 || strtotime($date) === false) {
    551         return '0000-00-00';
     551        // Return a string of zero time, formatted the same as $format.
     552        return strtr($format, array(
     553            'Y' => '0000',
     554            'm' => '00',
     555            'd' => '00',
     556            'H' => '00',
     557            'i' => '00',
     558            's' => '00',
     559        ));
    552560    } else {
    553561        return date($format, strtotime($date));
Note: See TracChangeset for help on using the changeset viewer.