summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--index.php208
1 files changed, 61 insertions, 147 deletions
diff --git a/index.php b/index.php
index 1c9709c..607dd9e 100644
--- a/index.php
+++ b/index.php
@@ -41,157 +41,71 @@ print_header("", "home");
</div>
<div id="news">
<h3>
- <a href="/news/" title="Browse the news archives"><s>Latest News</s> (to be implemented)</a>
+ <a href="https://news.archlinux32.org/" title="Browse the news archives">Latest News</a>
<span class="arrow"></span>
</h3>
<a href="https://news.archlinux32.org/rss.php" title="Arch 32 News RSS Feed" class="rss-icon"><img width="16" height="16" src="/static/rss.c5ebdc5318d6.png" alt="RSS Feed" /></a>
<?php
-/*
- TODO: loop through news
- <h4>
- <a href="/news/libutf8proc211-3-update-requires-manual-intervention/"
- title="View full article: libutf8proc&gt;=2.1.1-3 update requires manual intervention">libutf8proc&gt;=2.1.1-3 update requires manual intervention</a>
- </h4>
- <p class="timestamp">2018-07-14</p>
- <div class="article-content">
- <p>The libutf8proc package prior to version 2.1.1-3 had an incorrect soname link. This has been fixed in 2.1.1-3, so the upgrade will need to overwrite the untracked soname link created by ldconfig. If you get an error</p>
-<p><code>libutf8proc: /usr/lib/libutf8proc.so.2 exists in filesystem</code></p>
-<p>when updating, use</p>
-<p><code>pacman -Suy --overwrite usr/lib/libutf8proc.so.2</code></p>
-<p>to perform the upgrade.</p>
-
- </div>
-
- <h4>
- <a href="/news/js52-5273-2-upgrade-requires-intervention/"
- title="View full article: js52 52.7.3-2 upgrade requires intervention">js52 52.7.3-2 upgrade requires intervention</a>
- </h4>
- <p class="timestamp">2018-05-04</p>
- <div class="article-content">
- <p>Due to the SONAME of <code>/usr/lib/libmozjs-52.so</code> not matching its file name, ldconfig created an untracked file <code>/usr/lib/libmozjs-52.so.0</code>. This is now fixed and both files are present in the package.</p>
-<p>To pass the upgrade, remove <code>/usr/lib/libmozjs-52.so.0</code> prior to upgrading.</p>
- </div>
-
- <h4>
- <a href="/news/glibc-227-2-and-pam-130-2-may-require-manual-intervention/"
- title="View full article: glibc 2.27-2 and pam 1.3.0-2 may require manual intervention">glibc 2.27-2 and pam 1.3.0-2 may require manual intervention</a>
- </h4>
- <p class="timestamp">2018-04-20</p>
- <div class="article-content">
- <p>The new version of glibc removes support for NIS and NIS+. The default
-<code>/etc/nsswitch.conf</code> file provided by <code>filesystem</code> package already
-reflects this change. Please make sure to merge pacnew file if it exists
-prior to upgrade.</p>
-<p>NIS functionality can still be enabled by installing <code>libnss_nis</code>
-package. There is no replacement for NIS+ in the official repositories.</p>
-<p><code>pam 1.3.0-2</code> no longer ships pam_unix2 module and <code>pam_unix_*.so</code>
-compatibility symlinks. Before upgrading, review PAM configuration files
-in the <code>/etc/pam.d</code> directory and replace removed modules with
-<code>pam_unix.so</code>. Users of pam_unix2 should also reset their passwords
-after ...</p>
- </div>
-
- <h4>
- <a href="/news/zita-resampler-160-1-2-update-requires-manual-intervention/"
- title="View full article: zita-resampler 1.6.0-1 -&gt; 2 update requires manual intervention">zita-resampler 1.6.0-1 -&gt; 2 update requires manual intervention</a>
- </h4>
- <p class="timestamp">2018-02-22</p>
- <div class="article-content">
- <p>The zita-resampler 1.6.0-1 package was missing a library symlink that has been readded in 1.6.0-2. If you installed 1.6.0-1, ldconfig would have created this symlink at install time, and it will conflict with the one included in 1.6.0-2. In that case, remove /usr/lib/libzita-resampler.so.1 manually before updating.</p>
- </div>
-
- <h4>
- <a href="/news/the-end-of-i686-support/"
- title="View full article: The end of i686 support"> The end of i686 support</a>
- </h4>
- <p class="timestamp">2017-11-08</p>
- <div class="article-content">
- <p>Following 9 months of <a href="https://www.archlinux.org/news/phasing-out-i686-support/">deprecation period</a>, support for the i686
-architecture effectively ends today. By the end of November, i686
-packages will be removed from our mirrors and later from the packages
-archive. The [multilib] repository is not affected.</p>
-<p>For users unable to upgrade their hardware to x86_64, an alternative is
-a community maintained fork named <a href="https://archlinux32.org/">Arch Linux 32</a>. See their website
-for details on migrating existing installations.</p>
- </div>
-
- <h3>
- <a href="/news/"
- title="Browse the news archives">Older News</a>
- <span class="arrow"></span>
- </h3>
- <dl class="newslist">
-
- <dt>2017-09-02</dt>
- <dd>
- <a href="/news/perl-library-path-change/"
- title="View full article: Perl library path change">Perl library path change</a>
- </dd>
-
-
- <dt>2017-05-15</dt>
- <dd>
- <a href="/news/deprecation-of-abs/"
- title="View full article: Deprecation of ABS tool and rsync endpoint">Deprecation of ABS tool and rsync endpoint</a>
- </dd>
-
-
- <dt>2017-03-15</dt>
- <dd>
- <a href="/news/ca-certificates-utils-20170307-1-upgrade-requires-manual-intervention/"
- title="View full article: ca-certificates-utils 20170307-1 upgrade requires manual intervention">ca-certificates-utils 20170307-1 upgrade requires manual intervention</a>
- </dd>
-
-
- <dt>2017-02-27</dt>
- <dd>
- <a href="/news/mesa-with-libglvnd-support-is-now-in-testing/"
- title="View full article: mesa with libglvnd support is now in testing">mesa with libglvnd support is now in testing</a>
- </dd>
-
-
- <dt>2017-01-25</dt>
- <dd>
- <a href="/news/phasing-out-i686-support/"
- title="View full article: Phasing out i686 support">Phasing out i686 support</a>
- </dd>
-
-
- <dt>2017-01-14</dt>
- <dd>
- <a href="/news/xorg-server-1191-is-now-in-extra/"
- title="View full article: xorg-server 1.19.1 is now in extra">xorg-server 1.19.1 is now in extra</a>
- </dd>
-
-
- <dt>2016-12-30</dt>
- <dd>
- <a href="/news/openvpn-240-update-requires-administrative-interaction/"
- title="View full article: OpenVPN 2.4.0 update requires administrative interaction">OpenVPN 2.4.0 update requires administrative interaction</a>
- </dd>
-
-
- <dt>2016-10-31</dt>
- <dd>
- <a href="/news/ttf-dejavu-237-will-require-forced-upgrade/"
- title="View full article: ttf-dejavu 2.37 will require forced upgrade">ttf-dejavu 2.37 will require forced upgrade</a>
- </dd>
-
-
- <dt>2016-08-06</dt>
- <dd>
- <a href="/news/texlive-2016-packages-are-now-available/"
- title="View full article: TeXLive 2016 packages are now available">TeXLive 2016 packages are now available</a>
- </dd>
-
-
- <dt>2016-07-18</dt>
- <dd>
- <a href="/news/test-sec-flags-call-for-assistance/"
- title="View full article: test-sec-flags: Call for Assistance">test-sec-flags: Call for Assistance</a>
- </dd>
- </dl>
-*/
+
+$news = simplexml_load_string(
+ file_get_contents("https://news.archlinux32.org/rss.php")
+);
+
+if ($news === false) {
+
+ print " <h4>\n";
+ print " sorry, news are currently unavailable\n";
+ print " </h4>\n";
+
+} else {
+
+ $news_count = -5;
+ foreach($news -> entry as $entry) {
+ $news_count ++;
+ if ($news_count == 0) {
+ print " <h3>\n";
+ print " <a href=\"https://news.archlinux32.org/\" title=\"Browse the news archives\">Older News</a>\n";
+ print " <span class=\"arrow\"></span>\n";
+ print " </h3>\n";
+ print " <dl class=\"newslist\">\n";
+ }
+ if ($news_count < 0) {
+ print " <h4>\n";
+ print " <a href=\"";
+ print $entry -> {'link'} -> attributes() -> {'href'};
+ print "\" title=\"View full article: ";
+ print $entry -> title;
+ print "\">";
+ print $entry -> title;
+ print "</a>\n";
+ print " </h4>\n";
+ print " <p class=\"timestamp\">\n";
+ print " " . explode('T', $entry -> published)[0] . "\n";
+ print " </p>\n";
+ print " <div class=\"article-content\">\n";
+ print $entry -> content;
+ print " </div>\n";
+ } else {
+ print " <dt>";
+ print explode('T', $entry -> published)[0];
+ print "</dt>\n";
+ print " <dd>\n";
+ print " <a href=\"";
+ print $entry -> {'link'} -> attributes() -> {'href'};
+ print "\" title=\"View full article: ";
+ print $entry -> title;
+ print "\">";
+ print $entry -> title;
+ print "</a>\n";
+ print " </dd>\n";
+ }
+ }
+ if ($news_count >= 0) {
+ print " </dl>\n";
+ }
+
+}
+
?>
</div>
</div>