aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--feed.php11
-rw-r--r--include/feedcreator.class.php2
-rw-r--r--include/section_init.inc.php10
3 files changed, 12 insertions, 11 deletions
diff --git a/feed.php b/feed.php
index 9e4862722..0fa75324d 100644
--- a/feed.php
+++ b/feed.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -138,7 +138,7 @@ if (!$image_only)
$item->description.= '</ul>';
$item->descriptionHtmlSyndicated = true;
- $item->date = ts_to_iso8601(mysqldt_to_ts($dbnow));
+ $item->date = mysqldt_to_ts($dbnow);
$item->author = 'PhpWebGallery notifier';
$item->guid= sprintf('%s', $dbnow);;
@@ -190,13 +190,16 @@ foreach($dates as $date_detail)
$item->descriptionHtmlSyndicated = true;
- $item->date = ts_to_iso8601(mysqldt_to_ts($date));
+ $item->date = mysqldt_to_ts($date);
$item->author = 'PhpWebGallery notifier';
$item->guid= sprintf('%s', 'pics-'.$date);;
$rss->addItem($item);
}
+$fileName= $conf['local_data_dir'].'/tmp';
+@mkdir($fileName); // just in case
+$fileName.='/feed.xml';
// send XML feed
-echo $rss->saveFeed('RSS2.0', '', true);
+echo $rss->saveFeed('RSS2.0', $fileName, true);
?> \ No newline at end of file
diff --git a/include/feedcreator.class.php b/include/feedcreator.class.php
index 5138eb30e..f274b8417 100644
--- a/include/feedcreator.class.php
+++ b/include/feedcreator.class.php
@@ -156,7 +156,7 @@ echo $rss->saveFeed("RSS1.0", "news/feed.xml");
**************************************************************************/
// your local timezone, set to "" to disable or for GMT
-define("TIME_ZONE","+01:00");
+define("TIME_ZONE","+00:00");
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index bfed38409..8b150250a 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -286,15 +286,13 @@ else
if (!empty($items) )
{
$query = '
-SELECT image_id
+SELECT DISTINCT image_id
FROM '.IMAGE_CATEGORY_TABLE.' INNER JOIN '.IMAGES_TABLE.' ON image_id=id
WHERE image_id IN ('.implode(',', $items).')
'.$forbidden.
$conf['order_by'].'
;';
- $items = array_unique(
- array_from_query($query, 'image_id')
- );
+ $items = array_from_query($query, 'image_id');
}
$title = get_tags_content_title();
@@ -303,7 +301,7 @@ SELECT image_id
$page,
array(
'title' => $title,
- 'items' => array_values($items),
+ 'items' => $items,
)
);
}