phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: news_admin/website export.php,1.1.4.1.2.3,1.1.4


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] CVS: news_admin/website export.php,1.1.4.1.2.3,1.1.4.1.2.4
Date: Sun, 01 Jun 2003 04:10:27 -0400

Update of /cvsroot/phpgroupware/news_admin/website
In directory subversions:/tmp/cvs-serv4239

Modified Files:
      Tag: Version-0_9_16-branch
        export.php 
Log Message:
gremlins be gone :)

Index: export.php
===================================================================
RCS file: /cvsroot/phpgroupware/news_admin/website/export.php,v
retrieving revision 1.1.4.1.2.3
retrieving revision 1.1.4.1.2.4
diff -C2 -r1.1.4.1.2.3 -r1.1.4.1.2.4
*** export.php  1 Jun 2003 03:58:42 -0000       1.1.4.1.2.3
--- export.php  1 Jun 2003 08:10:25 -0000       1.1.4.1.2.4
***************
*** 18,30 ****
  
        $cat_id = intval($_GET['cat_id']);
!       $format = (isset($_GET['format']) ? trim($_GET['format']) : 'rss');
        $limit  = (isset($_GET['limit']) ? trim($_GET['limit']) : 5);
        $all    = (isset($_GET['all']) ? True : False); 
  
        $tpl->set_file(array('news' => $format . '.tpl'));
        $tpl->set_block('news', 'item', 'items');
!       if($format == 'rdf')
        {
!               set_block('news', 'seq', 'seqs');
        }
  
--- 18,42 ----
  
        $cat_id = intval($_GET['cat_id']);
!       $format = (isset($_GET['format']) ? strtolower(trim($_GET['format'])) : 
'rss');
        $limit  = (isset($_GET['limit']) ? trim($_GET['limit']) : 5);
        $all    = (isset($_GET['all']) ? True : False); 
  
+       //validate format
+ 
+       $available_formats = array('rss'        => True, //RSS 0.91
+                               'rdf-chan'      => True, //RDF 1.0
+                               'rdf2'          => True, //RDF/RSS 2.0
+                               );
+ 
+       if(!$available_formats[$format])
+       {
+               $format = 'rss';
+       }
+ 
        $tpl->set_file(array('news' => $format . '.tpl'));
        $tpl->set_block('news', 'item', 'items');
!       if($format == 'rdf-chan')
        {
!               $tpl->set_block('news', 'seq', 'seqs');
        }
  
***************
*** 46,50 ****
                        $tpl->set_var($news_data);
                        $tpl->set_var('item_link', $site['link'] . '?item=' . 
$news_id);
!                       if($format == 'rdf')
                        {
                                $tpl->parse('seqs','seq',True);
--- 58,62 ----
                        $tpl->set_var($news_data);
                        $tpl->set_var('item_link', $site['link'] . '?item=' . 
$news_id);
!                       if($format == 'rdf-chan')
                        {
                                $tpl->parse('seqs','seq',True);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]