• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-jp-ancient: Commit

Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用


Commit MetaInfo

Revision061bb59a71465e24bf13dc169f8bc621901652b7 (tree)
Zeit2005-03-12 14:29:10
Autorkimitake <kimitake@1ca2...>
Commiterkimitake

Log Message

commited by WinCVS

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-15@29 1ca29b6e-896d-4ea0-84a5-967f57386b96

Ändern Zusammenfassung

Diff

--- a/euc/xml-rss2.php
+++ b/euc/xml-rss2.php
@@ -1,65 +1,65 @@
1-<?php
2-
3-/**
4- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5- * Copyright (C) 2002-2004 The Nucleus Group
6- *
7- * This program is free software; you can redistribute it and/or
8- * modify it under the terms of the GNU General Public License
9- * as published by the Free Software Foundation; either version 2
10- * of the License, or (at your option) any later version.
11- * (see nucleus/documentation/index.html#license for more info)
12- *
13- * Nucleus RSS syndication channel skin
14- */
15-
16-header("Pragma: no-cache");
17-
18-$CONF = array();
19-$CONF['Self'] = "xml-rss2.php";
20-
21-include('./config.php');
22-
23-if (!$CONF['DisableSite']) {
24- // get feed into $feed
25- ob_start();
26- selectSkin('feeds/rss20');
27- selector();
28- $feed = ob_get_contents();
29- ob_end_clean();
30-
31- // create ETAG (hash of feed)
32- // (HTTP_IF_NONE_MATCH has quotes around it)
33- $eTag = '"'.md5($feed).'"';
34- header('Etag: '.$eTag);
35-
36- // compare Etag to what we got
37- if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) {
38- header("HTTP/1.0 304 Not Modified");
39- header('Content-Length: 0');
40- } else {
41- $feed = mb_convert_encoding($feed, "UTF-8", "EUC-JP");
42- header("Content-Type: application/xml");
43- // dump feed
44- echo $feed;
45- }
46-
47-} else {
48- // output empty RSS file...
49- // (because site is disabled)
50-
51- echo '<' . '?xml version="1.0" encoding="ISO-8859-1"?' . '>';
52-
53- ?>
54- <rss version="2.0">
55- <channel>
56- <title><?php echo htmlspecialchars($CONF['SiteName'])?></title>
57- <link><?php echo htmlspecialchars($CONF['IndexURL'])?></link>
58- <description></description>
59- <docs>http://backend.userland.com/rss</docs>
60- </channel>
61- </rss>
62- <?php
63-}
64-
65-?>
1+<?php
2+
3+/**
4+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5+ * Copyright (C) 2002-2004 The Nucleus Group
6+ *
7+ * This program is free software; you can redistribute it and/or
8+ * modify it under the terms of the GNU General Public License
9+ * as published by the Free Software Foundation; either version 2
10+ * of the License, or (at your option) any later version.
11+ * (see nucleus/documentation/index.html#license for more info)
12+ *
13+ * Nucleus RSS syndication channel skin
14+ */
15+
16+header("Pragma: no-cache");
17+
18+$CONF = array();
19+$CONF['Self'] = "xml-rss2.php";
20+
21+include('./config.php');
22+
23+if (!$CONF['DisableSite']) {
24+ // get feed into $feed
25+ ob_start();
26+ selectSkin('feeds/rss20');
27+ selector();
28+ $feed = ob_get_contents();
29+ ob_end_clean();
30+
31+ // create ETAG (hash of feed)
32+ // (HTTP_IF_NONE_MATCH has quotes around it)
33+ $eTag = '"'.md5($feed).'"';
34+ header('Etag: '.$eTag);
35+
36+ // compare Etag to what we got
37+ if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) {
38+ header("HTTP/1.0 304 Not Modified");
39+ header('Content-Length: 0');
40+ } else {
41+ $feed = mb_convert_encoding($feed, "UTF-8", "EUC-JP");
42+ header("Content-Type: application/xml");
43+ // dump feed
44+ echo $feed;
45+ }
46+
47+} else {
48+ // output empty RSS file...
49+ // (because site is disabled)
50+
51+ echo '<' . '?xml version="1.0" encoding="ISO-8859-1"?' . '>';
52+
53+ ?>
54+ <rss version="2.0">
55+ <channel>
56+ <title><?php echo htmlspecialchars($CONF['SiteName'])?></title>
57+ <link><?php echo htmlspecialchars($CONF['IndexURL'])?></link>
58+ <description></description>
59+ <docs>http://backend.userland.com/rss</docs>
60+ </channel>
61+ </rss>
62+ <?php
63+}
64+
65+?>
Show on old repository browser