From c710807ebccbff5e1fceaaaed81d4bc1d5f5dda0 Mon Sep 17 00:00:00 2001 From: Martin Gummi Date: Sun, 14 Jul 2013 22:43:26 +0200 Subject: bug-1190: white space --- pages/index/0.php | 51 +++++++++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/pages/index/0.php b/pages/index/0.php index 4f1ed84..3afdc72 100644 --- a/pages/index/0.php +++ b/pages/index/0.php @@ -28,39 +28,39 @@
- %s

\n\n",_('Latest News')); + %s

\n\n",_('Latest News')); - $xml = "/www/pages/index/feed.rss"; // FIXME: use relative path to allow operation with different document root - $dom = new DOMDocument(); - $dom->preserveWhiteSpace = false; - $dom->Load($xml); + $xml = "/www/pages/index/feed.rss"; // FIXME: use relative path to allow operation with different document root + $dom = new DOMDocument(); + $dom->preserveWhiteSpace = false; + $dom->Load($xml); - $xpath = new DOMXPath($dom); //Create an XPath query + $xpath = new DOMXPath($dom); //Create an XPath query - $query = "//channel/item"; - $items = $xpath->query($query); + $query = "//channel/item"; + $items = $xpath->query($query); - foreach($items as $id => $item) { - $query = "./title"; - $nodeList = $xpath->query($query, $item); - $title = str_replace("&#", "&#", recode_string("UTF8..html" , $nodeList->item(0)->nodeValue)); + foreach($items as $id => $item) { + $query = "./title"; + $nodeList = $xpath->query($query, $item); + $title = str_replace("&#", "&#", recode_string("UTF8..html" , $nodeList->item(0)->nodeValue)); - $query = "./link"; - $nodeList = $xpath->query($query, $item); - $link = $nodeList->item(0)->nodeValue; + $query = "./link"; + $nodeList = $xpath->query($query, $item); + $link = $nodeList->item(0)->nodeValue; - $query = "./description"; - $nodeList = $xpath->query($query, $item); - $description = str_replace("&#", "&#", recode_string("UTF8..html" , $nodeList->item(0)->nodeValue)); + $query = "./description"; + $nodeList = $xpath->query($query, $item); + $description = str_replace("&#", "&#", recode_string("UTF8..html" , $nodeList->item(0)->nodeValue)); - printf("

%s

\n", $title); - printf("

%s

\n", $description); - printf("

[ %s ]

\n\n", $link,_("Full Story")); + printf("

%s

\n", $title); + printf("

%s

\n", $description); + printf("

[ %s ]

\n\n", $link,_("Full Story")); - $title = ''; - $description = ''; - $link = ''; + $title = ''; + $description = ''; + $link = ''; } ?> @@ -107,4 +107,3 @@

. - -- cgit v1.2.1