Skip to content
Snippets Groups Projects
Commit 255a1f64 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: String translated twice

parent db006dcd
No related branches found
No related tags found
No related merge requests found
<?php <?php
/* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com> /* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2011-204 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
...@@ -73,7 +73,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) ...@@ -73,7 +73,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
if ($zipcode) $sql.=" AND z.zip LIKE '" . $db->escape($zipcode) . "%'"; if ($zipcode) $sql.=" AND z.zip LIKE '" . $db->escape($zipcode) . "%'";
if ($town) $sql.=" AND z.town LIKE '%" . $db->escape($town) . "%'"; if ($town) $sql.=" AND z.town LIKE '%" . $db->escape($town) . "%'";
$sql.= " ORDER BY z.zip, z.town"; $sql.= " ORDER BY z.zip, z.town";
$sql.= $db->plimit(50); // Avoid pb with bad criteria $sql.= $db->plimit(100); // Avoid pb with bad criteria
} }
else // Use table of third parties else // Use table of third parties
{ {
...@@ -87,7 +87,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) ...@@ -87,7 +87,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
if ($zipcode) $sql.= " s.zip LIKE '".$db->escape($zipcode)."%'"; if ($zipcode) $sql.= " s.zip LIKE '".$db->escape($zipcode)."%'";
if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'"; if ($town) $sql.= " s.town LIKE '%" . $db->escape($town) . "%'";
$sql.= " ORDER BY s.fk_pays, s.zip, s.town"; $sql.= " ORDER BY s.fk_pays, s.zip, s.town";
$sql.= $db->plimit(50); // Avoid pb with bad criteria $sql.= $db->plimit(100); // Avoid pb with bad criteria
} }
//print $sql; //print $sql;
...@@ -97,8 +97,8 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) ...@@ -97,8 +97,8 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
{ {
while ($row = $db->fetch_array($resql)) while ($row = $db->fetch_array($resql))
{ {
$country = $row['fk_country']?($langs->trans('Country'.$row['country_code'])!='Country'.$row['country_code']?$langs->trans('Country'.$row['country_code']):$row['country']):''; $country = $row['fk_country']?($langs->transnoentitiesnoconv('Country'.$row['country_code'])!='Country'.$row['country_code']?$langs->transnoentitiesnoconv('Country'.$row['country_code']):$row['country']):'';
$county = $row['fk_county']?($langs->trans($row['county_code'])!=$row['county_code']?$langs->trans($row['county_code']):($row['county']!='-'?$row['county']:'')):''; $county = $row['fk_county']?($langs->transnoentitiesnoconv($row['county_code'])!=$row['county_code']?$langs->transnoentitiesnoconv($row['county_code']):($row['county']!='-'?$row['county']:'')):'';
$row_array['label'] = $row['zip'].' '.$row['town']; $row_array['label'] = $row['zip'].' '.$row['town'];
$row_array['label'] .= ($county || $country)?' (':''; $row_array['label'] .= ($county || $country)?' (':'';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment