use https for gravatar
[e-DoKo.git] / rss.php
diff --git a/rss.php b/rss.php
index 6dbb6e6b5d41f6df44b4f60afc59f308c3992802..006daa22396c766a4f5cfff20411a4eab8089acb 100644 (file)
--- a/rss.php
+++ b/rss.php
@@ -1,4 +1,23 @@
 <?php
+/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Arun Persaud <arun@nubati.net>
+ *
+ *   This file is part of e-DoKo.
+ *
+ *   e-DoKo is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   e-DoKo is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with e-DoKo.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
   /* get some information from the database */
 error_reporting(E_ALL);
 
@@ -53,9 +72,13 @@ header("Content-Type: text/xml");
 ?>
 <feed xmlns="http://www.w3.org/2005/Atom">
 <title>E-DoKo Feed</title>
-<subtitle>Know when it is your turn</subtitle>
 <?php
 
+/* set language */
+set_language($id,'uid');
+
+echo '<subtitle>'._('Know when it is your turn')."</subtitle>\n";
+
   global $WIKI,$INDEX, $HOST;
 
   /* output last creation date */
@@ -77,15 +100,15 @@ echo "</author>\n\n";
 
   $result = DB_query("SELECT Hand.hash,Hand.game_id,Game.player from Hand".
                     " LEFT JOIN Game On Hand.game_id=Game.id".
-                    " WHERE Hand.user_id='$id'".
-                    " AND ( Game.player='$id' OR ISNULL(Game.player) )".
+                    " WHERE Hand.user_id=".DB_quote_smart($id).
+                    " AND ( Game.player=".DB_quote_smart($id)." OR ISNULL(Game.player) )".
                     " AND ( Game.status='pre' OR Game.status='play' )".
                     " ORDER BY Game.session" );
 
   while( $r = DB_fetch_array($result))
     {
       echo "<entry>\n";
-      echo "<title>game ".DB_format_gameid($r[1])."</title>\n";
+      echo "<title>"._('game').' '.DB_format_gameid($r[1])."</title>\n";
       $url=$INDEX."?action=game&amp;me=".$r[0];
       echo "<link href=\"".$HOST.$url."\" />\n";
       $date = DB_get_game_timestamp($r[1]);
@@ -93,7 +116,7 @@ echo "</author>\n\n";
       $date = date("Y-m-d",$timestamp);
       echo "<id>tag:doko.nubati.net,$date:$url</id>\n";
       echo "<updated>".date(DATE_ATOM,$timestamp)."</updated>\n";
-      echo "<summary>Please use the link to access the game.</summary>\n";
+      echo '<summary>'._('Please use the link to access the game.')."</summary>\n";
       echo "</entry>\n\n";
     }