fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9251] property: invoice: more on ACL based on dime


From: Sigurd Nes
Subject: [Fmsystem-commits] [9251] property: invoice: more on ACL based on dime
Date: Tue, 01 May 2012 20:31:24 +0000

Revision: 9251
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9251
Author:   sigurdne
Date:     2012-05-01 20:31:24 +0000 (Tue, 01 May 2012)
Log Message:
-----------
property: invoice: more on ACL based on dime

Modified Paths:
--------------
    trunk/property/inc/class.sogeneric.inc.php
    trunk/property/inc/class.uiproject.inc.php

Modified: trunk/property/inc/class.sogeneric.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric.inc.php  2012-05-01 15:40:37 UTC (rev 
9250)
+++ trunk/property/inc/class.sogeneric.inc.php  2012-05-01 20:31:24 UTC (rev 
9251)
@@ -312,7 +312,7 @@
 
                        $join_method = $_join_method ?  implode (' ', 
$_join_method) : '';
 
-                       $sql = "SELECT * FROM {$table} {$join_method} 
{$filtermethod} {$querymethod}";
+                       $sql = "SELECT DISTINCT {$table}.* FROM {$table} 
{$join_method} {$filtermethod} {$querymethod}";
 
                        $this->_db->query('SELECT count(*) as cnt ' . 
substr($sql,strripos($sql,'from')),__LINE__,__FILE__);
                        $this->_db->next_record();

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2012-05-01 15:40:37 UTC (rev 
9250)
+++ trunk/property/inc/class.uiproject.inc.php  2012-05-01 20:31:24 UTC (rev 
9251)
@@ -1116,7 +1116,8 @@
                                                        $error_id=true;
                                                }
 
-                                               
if(!execMethod('property.boinvoice.get_approve_role', $values['ecodimb']))
+                                               $approve_role = 
execMethod('property.boinvoice.check_role', $values['ecodimb']);
+                                               if( 
!$approve_role['is_supervisor'] && ! $approve_role['budget_responsible'])
                                                {
                                                        
$receipt['error'][]=array('msg'=>lang('you are not approved for this dimb: %1', 
$values['ecodimb'] ));
                                                        $error_id=true;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]