[20911] Feature : added condition
Pascal Vilarem <[email protected]>
| Newsgroups | gmane.comp.web.phpgroupware.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 20911
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20911
Author: maat
Date: 2010-01-05 17:40:41 +0000 (Tue, 05 Jan 2010)
Log Message:
-----------
Feature : added condition
Modified Paths:
--------------
modules/ged/trunk/inc/class.flow_client.inc.php
Modified: modules/ged/trunk/inc/class.flow_client.inc.php
===================================================================
--- modules/ged/trunk/inc/class.flow_client.inc.php 2010-01-05 17:36:55 UTC (rev 20910)
+++ modules/ged/trunk/inc/class.flow_client.inc.php 2010-01-05 17:40:41 UTC (rev 20911)
@@ -123,6 +123,26 @@
return($result);
}
+ function is_not_last_version($object)
+ {
+ // TODO : Here we need to rework condition to avoid code duplication
+ // DEBUG
+ //_debug_array($object);
+
+ $last_version=$this->ged_dm->get_last_version($object['element_id']);
+
+ if ( $last_version['version_id'] == $object['version_id'])
+ {
+ $result=false;
+ }
+ else
+ {
+ $result=true;
+ }
+
+ return($result);
+ }
+
/*
* SET_STATUS
*/