From e20c1decdf30886e4c36654ddd3175a92ea1bebc Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Thu, 15 Jan 2015 03:51:47 +0100
Subject: [PATCH] Fixed: object instead of soc and vis versa.

---
 htdocs/categories/categorie.php   |  2 +-
 htdocs/core/lib/functions.lib.php |  1 +
 htdocs/societe/info.php           | 10 +++++-----
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/htdocs/categories/categorie.php b/htdocs/categories/categorie.php
index e9e11b656b9..a77751fcb29 100644
--- a/htdocs/categories/categorie.php
+++ b/htdocs/categories/categorie.php
@@ -278,7 +278,7 @@ if ($socid)
 
 	// Address
 	print '<tr><td valign="top">'.$langs->trans('Address').'</td><td colspan="3">';
-    print dol_print_address($soc->address,'gmap','thirdparty',$object->id);
+    print dol_print_address($soc->address,'gmap','thirdparty',$soc->id);
     print '</td></tr>';
 
 	// Zip / Town
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 3ec602c9d2b..cdb7e2b4d78 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -4574,6 +4574,7 @@ function dol_eval($s,$returnvalue=0)
 	global $leftmenu;
 	global $rights;
 	global $object;
+    global $soc;
 
 	//print $s."<br>\n";
 	if ($returnvalue) return @eval('return '.$s.';');
diff --git a/htdocs/societe/info.php b/htdocs/societe/info.php
index 305936e6f56..9d06d203d9c 100644
--- a/htdocs/societe/info.php
+++ b/htdocs/societe/info.php
@@ -59,21 +59,21 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e
 $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
 llxHeader('',$langs->trans("ThirdParty"),$help_url);
 
-$soc = new Societe($db);
-$soc->fetch($socid);
-$soc->info($socid);
+$object = new Societe($db);
+$object->fetch($socid);
+$object->info($socid);
 
 /*
  * Affichage onglets
  */
-$head = societe_prepare_head($soc);
+$head = societe_prepare_head($object);
 
 dol_fiche_head($head, 'info', $langs->trans("ThirdParty"),0,'company');
 
 
 
 print '<table width="100%"><tr><td>';
-dol_print_object_info($soc);
+dol_print_object_info($object);
 print '</td></tr></table>';
 
 
-- 
GitLab