Changeset 1510 for trunk/gregarius/opml.php
- Timestamp:
- 06/24/06 23:19:23 (2 years ago)
- Files:
-
- 1 modified
-
trunk/gregarius/opml.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/gregarius/opml.php
r1328 r1510 121 121 // Output should be valid xml. (*fingers crossed*) 122 122 if (array_key_exists('act',$_REQUEST)) { 123 124 $rs = rss_query( "select fid,tag from " .getTable('tag') 125 ." t, " .getTable('metatag') ." mt " 126 ." where mt.tid=t.id and ttype='channel'"); 127 $cats=array(); 128 while(list($cid,$tag) = rss_fetch_row($rs)) { 129 if (!isset($cats[$cid])) { 130 $cats[$cid]=array(); 131 } 132 $cats[$cid][]=$tag; 133 } 134 135 123 136 $sql = "select " 124 137 ." c.id, c.title, c.url, c.siteurl, d.name, c.parent, c.descr " … … 152 165 ."<?xml-stylesheet type=\"text/xsl\" href=\"".getPath()."css/opml.xsl\"?>\n" 153 166 ."<!-- Generated by "._TITLE_. " " . _VERSION_ ." -->\n" 154 ."<opml version=\" 1.1\">\n";167 ."<opml version=\"2.0\">\n"; 155 168 156 169 echo "\t<head>\n" … … 191 204 echo " htmlUrl=\"$siteurl_\""; 192 205 } 193 206 if (isset($cats[$id]) && count($cats[$id])) { 207 echo " categories=\"" . implode(",",$cats[$id]) ."\""; 208 } 194 209 echo " xmlUrl=\"$url_\" />\n"; 195 210 }
