Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/index.php b/index.php
index d0e7334..9dd1926 100644
--- a/index.php
+++ b/index.php
@@ -75,14 +75,14 @@ print_header("", "home");
$news_reachable = apcu_fetch('news_reachable', $apcu_success);
if ($apcu_success == false) {
- if (site_is_reachable('https://news.archlinux32.org/rss.php'))
+ if (site_is_reachable('https://bbs.archlinux32.org/extern.php?action=feed&fid=12&type=atom'))
$news_reachable = 'YES';
else
$news_reachable = 'NO';
apcu_store('news_reachable', $news_reachable, 300);
}
if ($news_reachable == 'YES') {
- $ch = curl_init('https://news.archlinux32.org/rss.php');
+ $ch = curl_init('https://bbs.archlinux32.org/extern.php?action=feed&fid=12&type=atom');
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
@@ -108,10 +108,10 @@ if ($news32 === false) {
} else {
foreach($news32 -> {'entry'} as $entry) {
$news[] = array (
- 'content' => $entry -> {'content'},
- 'date' => explode('T', $entry -> {'published'})[0],
- 'link' => $entry -> {'link'} -> attributes() -> {'href'},
- 'title' => $entry -> {'title'}
+ 'content' => preg_replace('#^<p>By [^<]*<br />On [^<]*</p>#', '', $entry -> {'summary'} -> __toString()),
+ 'date' => explode('T', $entry -> {'updated'} -> __toString())[0],
+ 'link' => $entry -> {'link'} -> attributes() -> {'href'} -> __toString(),
+ 'title' => $entry -> {'title'} -> __toString()
);
}
}