[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] sitemgr/sitemgr-site/inc class.sitebo.inc.php [skwash
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] sitemgr/sitemgr-site/inc class.sitebo.inc.php [skwashd-16-compat] |
Date: |
Wed, 23 Aug 2006 13:58:39 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: sitemgr
Branch: skwashd-16-compat
Changes by: Dave Hall <skwashd> 06/08/23 13:58:39
Modified files:
sitemgr-site/inc: class.sitebo.inc.php
Log message:
fixing mime type
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/sitemgr/sitemgr-site/inc/class.sitebo.inc.php?cvsroot=phpgroupware&only_with_tag=skwashd-16-compat&r1=1.1.2.3.4.3&r2=1.1.2.3.4.4
Patches:
Index: class.sitebo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/sitemgr-site/inc/class.sitebo.inc.php,v
retrieving revision 1.1.2.3.4.3
retrieving revision 1.1.2.3.4.4
diff -u -b -r1.1.2.3.4.3 -r1.1.2.3.4.4
--- class.sitebo.inc.php 23 Aug 2006 13:32:03 -0000 1.1.2.3.4.3
+++ class.sitebo.inc.php 23 Aug 2006 13:58:39 -0000 1.1.2.3.4.4
@@ -8,7 +8,7 @@
* Free Software Foundation; either version 2 of the License, or (at
your *
* option) any later version.
*
\*************************************************************************/
- /* $Id: class.sitebo.inc.php,v 1.1.2.3.4.3 2006/08/23 13:32:03 skwashd
Exp $ */
+ /* $Id: class.sitebo.inc.php,v 1.1.2.3.4.4 2006/08/23 13:58:39 skwashd
Exp $ */
class sitebo
{
@@ -84,16 +84,21 @@
$tpl = createObject('phpgwapi.Template',
PHPGW_SERVER_ROOT . '/news_admin/website/templates/' );
$tpl->set_file('news', "{$format}.tpl");
$tpl->set_block('news', 'item', 'items');
+
+ $date_fmt = 'r';
+ $mimetype = 'application/rss+xml';
if($format == 'rss1')
{
+ $date_fmt = $dc_date_fmt;
+ $mimetype = 'application/rdf+xml';
$tpl->set_block('news', 'seq', 'seqs');
+
}
$lastmod = 0;
$news = $news_obj->get_newslist($cat_id, 0, '', '',
$limit, true);
if(is_array($news))
{
- $date_fmt = ($format == 'rss1' ? $dc_date_fmt :
'r');
$news_link =
$GLOBALS['Common_BO']->sites->current_site['site_url'] .
($sitemgr_info['htaccess_rewrite'] ? 'news/' : 'index.php?news=');
foreach($news as $news_id => $news_data)
{
@@ -124,7 +129,7 @@
$site['lastmod'] = date('r', $lastmod);
$site['feed_dc_date'] = date($dc_date_fmt, $lastmod);
- Header('Content-Type: application/rdf+xml;
charset=UTF-8');
+ Header("Content-Type: {$mimetype}; charset=UTF-8");
Header("Last-Modified: {$site['lastmod']}" );
$tpl->set_var($site);
$tpl->pparse('out','news');
- [Phpgroupware-cvs] sitemgr/sitemgr-site/inc class.sitebo.inc.php [skwashd-16-compat],
Dave Hall <=