Accéder au contenu.
Menu Sympa

devel - [Devel] r490 - branches/generic

Objet : devel-adl

Archives de la liste

[Devel] r490 - branches/generic


Chronologique Discussions 
  • From: svn AT agendadulibre.org
  • To: devel AT agendadulibre.org
  • Subject: [Devel] r490 - branches/generic
  • Date: Tue, 9 Nov 2010 20:17:07 +0100 (CET)
  • List-archive: <http://agendadulibre.org/pipermail/devel>
  • List-id: Developpement de l'Agenda du Libre <devel.agendadulibre.org>

Author: ploc
Date: Tue Nov 9 20:17:06 2010
New Revision: 490

Log:
Fixing bug where rss feed was outputing mysql error when city name was
containing characters such as [']. The fix consist in escaping mysql
parameters using the mysql_real_escape_string php function in the
get_city_coordinates agenda function.

Modified:
branches/generic/rss.php

Modified: branches/generic/rss.php
==============================================================================
--- branches/generic/rss.php Tue Nov 9 20:06:04 2010 (r489)
+++ branches/generic/rss.php Tue Nov 9 20:17:06 2010 (r490)
@@ -68,7 +68,7 @@

function get_city_coordinates ($db, $city)
{
- $sql = "select longitude, latitude from cities where name='" . $city . "'";
+ $sql = "select longitude, latitude from cities where name='" .
mysql_real_escape_string($city, $db) . "'";
$ret = $db->query($sql);

if (mysql_num_rows($ret) == 1)





Archives gérées par MHonArc 2.6.16.

Haut de le page