|
From: Enlightenment S. <no-...@en...> - 2013-04-28 16:21:27
|
Log: www: warning-- Author: beber Date: 2013-04-28 09:09:15 -0700 (Sun, 28 Apr 2013) New Revision: 84525 Trac: http://trac.enlightenment.org/e/changeset/84525 Modified: trunk/web/www/p/news/class.news.php trunk/web/www/p/news/en-body trunk/web/www/update.php Modified: trunk/web/www/p/news/class.news.php =================================================================== --- trunk/web/www/p/news/class.news.php 2013-04-28 13:55:45 UTC (rev 84524) +++ trunk/web/www/p/news/class.news.php 2013-04-28 16:09:15 UTC (rev 84525) @@ -84,6 +84,7 @@ return NULL; $new['content'] = NULL; + $i = 0; while (!feof($fp)) { $buffer = fgets($fp, 4096); @@ -120,6 +121,7 @@ return NULL; $name = strrchr($path, "/"); + $date = array(); for($i=1; $name[$i] != NULL; $i++) { if ($i <= 4) Modified: trunk/web/www/p/news/en-body =================================================================== --- trunk/web/www/p/news/en-body 2013-04-28 13:55:45 UTC (rev 84524) +++ trunk/web/www/p/news/en-body 2013-04-28 16:09:15 UTC (rev 84525) @@ -11,12 +11,17 @@ $news = new news; $list = $news->get(10); + +$lang = "en"; +if ($_GET['l']) + $lang = $_GET['l']; + foreach($list as $new) { if (($new = $news->read_content($new)) !== NULL) { echo "<div class='post'>\n"; - echo "<p class='news-title'><a href='p.php?p=news/show&l=".$_GET['l']."&news_id=$new[id]'>".$new['title']."</a></p>"; + echo "<p class='news-title'><a href='p.php?p=news/show&l=$lang&news_id=$new[id]'>".$new['title']."</a></p>"; echo "<p class='tiny'><a href='mailto:".$new['email']."'>".$new['author']."</a> - ".$new['date']."</p>"; echo "<div class='news-content'>".$new['content']."</div>\n"; echo "</div>\n"; @@ -25,7 +30,7 @@ if ($news->has_archives() == true) { - echo "<p><a href='p.php?p=news/archives&l=".$_GET['l']."' title='Read archives'>News archives</a></p>"; + echo "<p><a href='p.php?p=news/archives&l=$lang' title='Read archives'>News archives</a></p>"; } ?> Modified: trunk/web/www/update.php =================================================================== --- trunk/web/www/update.php 2013-04-28 13:55:45 UTC (rev 84524) +++ trunk/web/www/update.php 2013-04-28 16:09:15 UTC (rev 84525) @@ -38,7 +38,7 @@ $lines = explode("\n", $data); $linecount = count($lines); -for ($l = 0; $l <= $linecount; $l++) +for ($l = 0; $l < $linecount; $l++) { $items = explode(" ", $lines[$l]); $res = "OK"; @@ -65,7 +65,7 @@ $nsv = count($vsv); $num = $ncl; if ($nsv < $num) $num = $nsv; - for ($i = 0; $i <= $num; $i++) + for ($i = 0; $i < $num; $i++) { if (intval($vsv[$i]) > intval($vcl[$i])) { |