Changeset 2296


Ignore:
Timestamp:
Apr 4, 2008, 9:47:07 PM (16 years ago)
Author:
rvelices
Message:
  • an optimization of a Mysql query for tags (oddly but it's faster)
  • now the dates in the RSS feed are always correct (and in GMT)
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/feed.php

    r2152 r2296  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    139139    $item->descriptionHtmlSyndicated = true;
    140140
    141     $item->date = ts_to_iso8601(mysqldt_to_ts($dbnow));
     141    $item->date = mysqldt_to_ts($dbnow);
    142142    $item->author = 'PhpWebGallery notifier';
    143143    $item->guid= sprintf('%s', $dbnow);;
     
    191191  $item->descriptionHtmlSyndicated = true;
    192192
    193   $item->date = ts_to_iso8601(mysqldt_to_ts($date));
     193  $item->date = mysqldt_to_ts($date);
    194194  $item->author = 'PhpWebGallery notifier';
    195195  $item->guid= sprintf('%s', 'pics-'.$date);;
     
    198198}
    199199
     200$fileName= $conf['local_data_dir'].'/tmp';
     201@mkdir($fileName); // just in case
     202$fileName.='/feed.xml';
    200203// send XML feed
    201 echo $rss->saveFeed('RSS2.0', '', true);
     204echo $rss->saveFeed('RSS2.0', $fileName, true);
    202205?>
  • trunk/include/feedcreator.class.php

    r2132 r2296  
    157157
    158158// your local timezone, set to "" to disable or for GMT
    159 define("TIME_ZONE","+01:00");
     159define("TIME_ZONE","+00:00");
    160160
    161161
  • trunk/include/section_init.inc.php

    r2201 r2296  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    77// | file          : $Id$
     
    287287    {
    288288      $query = '
    289 SELECT image_id
     289SELECT DISTINCT image_id
    290290  FROM '.IMAGE_CATEGORY_TABLE.' INNER JOIN '.IMAGES_TABLE.' ON image_id=id
    291291  WHERE image_id IN ('.implode(',', $items).')
     
    293293    $conf['order_by'].'
    294294;';
    295       $items = array_unique(
    296         array_from_query($query, 'image_id')
    297         );
     295      $items =  array_from_query($query, 'image_id');
    298296    }
    299297
     
    304302      array(
    305303        'title' => $title,
    306         'items' => array_values($items),
     304        'items' => $items,
    307305        )
    308306      );
Note: See TracChangeset for help on using the changeset viewer.