From 9130e5bcd07bdee58617a8b65ba764aafbc3c96c Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Tue, 25 Aug 2009 13:52:13 +0000 Subject: [PATCH] New helper function IsModified SVN:code[101] --- trunk/core/dbobject.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trunk/core/dbobject.class.php b/trunk/core/dbobject.class.php index c9d69a0b9..9a52b562d 100644 --- a/trunk/core/dbobject.class.php +++ b/trunk/core/dbobject.class.php @@ -533,6 +533,13 @@ abstract class DBObject return $this->ListChangedValues($this->m_aCurrValues); } + // Tells whether or not an object was modified + public function IsModified() + { + $aChanges = $this->ListChanges(); + return (count($aChanges) != 0); + } + // used both by insert/update private function DBWriteLinks() {