From: Gabriel Dunne Date: Mon, 19 Dec 2011 02:07:14 +0000 (-0800) Subject: Updated RSS X-Git-Tag: v0.1~31 X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=b046e8ad48f17e303dd5014ac2a1fa180c71d374;p=clmpr.git Updated RSS --- diff --git a/get.php b/get.php index a2168e1..a90c953 100644 --- a/get.php +++ b/get.php @@ -6,8 +6,11 @@ $params = array(); $params['user'] = isset($_GET['user']) ? $_GET['user'] : null; $params['id'] = isset($_GET['id']) ? $_GET['id'] : null; +$pathinfo = pathinfo($_SERVER['REQUEST_URI']); $format = isset($pathinfo['extension']) ? $pathinfo['extension'] : null; +$endpoint = str_replace('.'.$format, '', $endpoint); + $dbh = get_db_connection(); $dbh->beginTransaction(); @@ -24,7 +27,7 @@ try { $q->execute( array( $user['id'] )); } } - if ($params['id']) { + else if ($params['id']) { $q = $dbh->prepare("SELECT *, clumps.id as clump_id FROM clumps JOIN users @@ -49,7 +52,7 @@ catch(PDOException $e) } switch ($format) { -case 'xml' : + case 'xml' : case 'rss' : include 'rss.php'; exit; diff --git a/rss.php b/rss.php index fbadf14..3d07221 100644 --- a/rss.php +++ b/rss.php @@ -9,8 +9,8 @@ fetch(); $i++ ): ?> - <?php echo urlencode($row['title']) ?> - + <?php echo $row['title'] ?> +