From 529b8ae38e915e0ddf91fb1ff00dccfff0cf0b80 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sat, 23 Feb 2013 10:43:16 +0100 Subject: [PATCH] english standardization --- htdocs/societe/commerciaux.php | 2 +- htdocs/societe/lien.php | 6 +++--- htdocs/societe/societe.php | 16 ++++++++-------- scripts/members/sync_members_ldap2dolibarr.php | 2 -- test/phpunit/AdherentTest.php | 2 +- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/htdocs/societe/commerciaux.php b/htdocs/societe/commerciaux.php index 8305e973adf..a5c8ec4a8b4 100644 --- a/htdocs/societe/commerciaux.php +++ b/htdocs/societe/commerciaux.php @@ -126,7 +126,7 @@ if ($_GET["socid"]) print "".$langs->trans('Address')."".nl2br($soc->address).""; print ''.$langs->trans('Zip').''.$soc->cp.""; - print ''.$langs->trans('Town').''.$soc->ville.""; + print ''.$langs->trans('Town').''.$soc->town.""; print ''.$langs->trans('Country').''.$soc->pays.''; diff --git a/htdocs/societe/lien.php b/htdocs/societe/lien.php index dbc2bb8a45d..cbb5aed7300 100644 --- a/htdocs/societe/lien.php +++ b/htdocs/societe/lien.php @@ -193,7 +193,7 @@ if ($socid) $socm = new Societe($db); $socm->fetch($soc->parent); print ''.img_object($langs->trans("ShowCompany"),'company').' '.$socm->nom.''.($socm->code_client?" (".$socm->code_client.")":""); - print ($socm->ville?' - '.$socm->ville:''); + print ($socm->town?' - '.$socm->town:''); print ' '; print img_delete(); print '
'; @@ -233,7 +233,7 @@ if ($socid) $title=$langs->trans("CompanyList"); - $sql = "SELECT s.rowid as socid, s.nom, s.ville, s.prefix_comm, s.client, s.fournisseur,"; + $sql = "SELECT s.rowid as socid, s.nom, s.town, s.prefix_comm, s.client, s.fournisseur,"; $sql.= " te.code, te.libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."c_typent as te"; @@ -284,7 +284,7 @@ if ($socid) $var=!$var; print ""; print $obj->nom."\n"; - print "".$obj->ville." \n"; + print "".$obj->town." \n"; print "".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."\n"; print ''; if ($obj->client==1) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 6e370ea2220..9147d550242 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -40,7 +40,7 @@ $result = restrictedArea($user,'societe',$socid,''); $search_nom=trim(GETPOST("search_nom")); $search_nom_only=trim(GETPOST("search_nom_only")); $search_all=trim(GETPOST("search_all")); -$search_ville=trim(GETPOST("search_ville")); +$search_town=trim(GETPOST("search_town")); $socname=trim(GETPOST("socname")); $search_idprof1=trim(GETPOST('search_idprof1')); $search_idprof2=trim(GETPOST('search_idprof2')); @@ -150,7 +150,7 @@ if (GETPOST("button_removefilter_x")) $search_sale=''; $socname=""; $search_nom=""; - $search_ville=""; + $search_town=""; $search_idprof1=''; $search_idprof2=''; $search_idprof3=''; @@ -177,7 +177,7 @@ if ($socname) */ $title=$langs->trans("ListOfThirdParties"); -$sql = "SELECT s.rowid, s.nom as name, s.ville, s.datec, s.datea,"; +$sql = "SELECT s.rowid, s.nom as name, s.town, s.datec, s.datea,"; $sql.= " st.libelle as stcomm, s.prefix_comm, s.client, s.fournisseur, s.canvas, s.status as status,"; $sql.= " s.siren as idprof1, s.siret as idprof2, ape as idprof3, idprof4 as idprof4"; // We'll need these fields in order to filter by sale (including the case where the user can only see his prospects) @@ -229,7 +229,7 @@ if ($search_nom) $sql.= " OR s.url LIKE '%".$db->escape($search_nom)."%'"; $sql.= ")"; } -if ($search_ville) $sql .= " AND s.ville LIKE '%".$db->escape($search_ville)."%'"; +if ($search_town) $sql .= " AND s.town LIKE '%".$db->escape($search_town)."%'"; if ($search_idprof1) $sql .= " AND s.siren LIKE '%".$db->escape($search_idprof1)."%'"; if ($search_idprof2) $sql .= " AND s.siret LIKE '%".$db->escape($search_idprof2)."%'"; if ($search_idprof3) $sql .= " AND s.ape LIKE '%".$db->escape($search_idprof3)."%'"; @@ -259,7 +259,7 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $params = "&socname=".$socname."&search_nom=".$search_nom."&search_ville=".$search_ville; + $params = "&socname=".$socname."&search_nom=".$search_nom."&search_town=".$search_town; $params.= '&search_idprof1='.$search_idprof1; $params.= '&search_idprof2='.$search_idprof2; $params.= '&search_idprof3='.$search_idprof3; @@ -318,7 +318,7 @@ if ($resql) // Lines of titles print ''; print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$params,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.ville","",$params,'',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("Town"),$_SERVER["PHP_SELF"],"s.town","",$params,'',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId1Short"),$textprofid[1],1,0),$_SERVER["PHP_SELF"],"s.siren","",$params,'nowrap="nowrap"',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId2Short"),$textprofid[2],1,0),$_SERVER["PHP_SELF"],"s.siret","",$params,'nowrap="nowrap"',$sortfield,$sortorder); print_liste_field_titre($form->textwithpicto($langs->trans("ProfId3Short"),$textprofid[3],1,0),$_SERVER["PHP_SELF"],"s.ape","",$params,'nowrap="nowrap"',$sortfield,$sortorder); @@ -335,7 +335,7 @@ if ($resql) if (! empty($search_nom_only) && empty($search_nom)) $search_nom=$search_nom_only; print ''; print ''; - print ''; + print ''; print ''; // IdProf1 print ''; @@ -385,7 +385,7 @@ if ($resql) $companystatic->status=$obj->status; print $companystatic->getNomUrl(1,'',24); print "\n"; - print "".$obj->ville."\n"; + print "".$obj->town."\n"; print "".$obj->idprof1."\n"; print "".$obj->idprof2."\n"; print "".$obj->idprof3."\n"; diff --git a/scripts/members/sync_members_ldap2dolibarr.php b/scripts/members/sync_members_ldap2dolibarr.php index bbe3f9ab100..d2e26aa2527 100755 --- a/scripts/members/sync_members_ldap2dolibarr.php +++ b/scripts/members/sync_members_ldap2dolibarr.php @@ -193,11 +193,9 @@ if ($result >= 0) $member->pass=$ldapuser[$conf->global->LDAP_FIELD_PASSWORD]; //$member->societe; - $member->adresse=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; // deprecated $member->address=$ldapuser[$conf->global->LDAP_FIELD_ADDRESS]; $member->cp=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; // deprecated $member->zip=$ldapuser[$conf->global->LDAP_FIELD_ZIP]; - $member->ville=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; // deprecated $member->town=$ldapuser[$conf->global->LDAP_FIELD_TOWN]; $member->pays=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; // deprecated $member->country=$ldapuser[$conf->global->LDAP_FIELD_COUNTRY]; diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 75a95cb4df0..07c7703605a 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -282,7 +282,7 @@ class AdherentTest extends PHPUnit_Framework_TestCase $template = '%DOL_MAIN_URL_ROOT%,%ID%,%CIVILITE%,%FIRSTNAME%,%LASTNAME%,%FULLNAME%,%COMPANY%,'. '%ADDRESS%,%ZIP%,%TOWN%,%COUNTRY%,%EMAIL%,%NAISS%,%PHOTO%,%LOGIN%,%PASSWORD%,%PRENOM%,'. - '%NOM%,%SOCIETE%,%ADRESSE%,%CP%,%VILLE%,%PAYS%'; + '%NOM%,%SOCIETE%,%ADDRESS%,%CP%,%TOWN%,%PAYS%'; $expected = DOL_MAIN_URL_ROOT.','.$localobject->id.',0,New firstname,New name,New firstname New name,'. 'New company,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->naiss,'day').',,'.