[Vtigercrm-developers] [PATCH] __toString() fix
Enrico Weigelt
weigelt at metux.de
Thu May 10 08:20:49 PDT 2007
Hi folks,
there were some __toString() methods necessary ...
cu
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT service
phone: +49 36207 519931 www: http://www.metux.de/
fax: +49 36207 519932 email: contact at metux.de
cellphone: +49 174 7066481
---------------------------------------------------------------------
-- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
---------------------------------------------------------------------
-------------- next part --------------
diff -ruN cleaned/data/CRMEntity.php working/data/CRMEntity.php
--- cleaned/data/CRMEntity.php 2007-05-03 17:50:00.000000000 +0200
+++ working/data/CRMEntity.php 2007-05-03 23:38:06.000000000 +0200
@@ -25,10 +25,16 @@
require_once('data/Tracker.php');
require_once('include/utils/utils.php');
require_once('include/utils/UserInfoUtil.php');
-
-class CRMEntity
-{
- /**
+
+class CRMEntity
+{
+ /* generic toString() method added by nekrad */
+ function __toString()
+ {
+ return serialize($this);
+ }
+
+ /**
* This method implements a generic insert and update logic for any SugarBean
* This method only works for subclasses that implement the same variable names.
* This method uses the presence of an id vtiger_field that is not null to signify and update.
diff -ruN cleaned/modules/Users/Users.php working/modules/Users/Users.php
--- cleaned/modules/Users/Users.php 2007-05-04 02:32:05.000000000 +0200
+++ working/modules/Users/Users.php 2007-05-04 02:59:03.000000000 +0200
@@ -163,6 +163,11 @@
$this->log->debug("Exiting Users() method ...");
}
+ function __toString()
+ {
+ return "[[USERS]]";
+ }
+
// Mike Crowe Mod --------------------------------------------------------Default ordering for us
/**
* Function to get sort order
More information about the vtigercrm-developers
mailing list