fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11209] property: eav-support for post calculation


From: Sigurd Nes
Subject: [Fmsystem-commits] [11209] property: eav-support for post calculation
Date: Thu, 27 Jun 2013 10:49:32 +0000

Revision: 11209
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11209
Author:   sigurdne
Date:     2013-06-27 10:49:31 +0000 (Thu, 27 Jun 2013)
Log Message:
-----------
property: eav-support for post calculation

Modified Paths:
--------------
    trunk/property/inc/custom/default/BkBygg_editer_system_oversikt.php

Modified: trunk/property/inc/custom/default/BkBygg_editer_system_oversikt.php
===================================================================
--- trunk/property/inc/custom/default/BkBygg_editer_system_oversikt.php 
2013-06-27 08:56:56 UTC (rev 11208)
+++ trunk/property/inc/custom/default/BkBygg_editer_system_oversikt.php 
2013-06-27 10:49:31 UTC (rev 11209)
@@ -8,22 +8,18 @@
 
        class ikt_systemoversikt extends property_boentity
        {
-               protected $db;
 
                function __construct()
                {
                        parent::__construct();
-                       $this->db               = & $GLOBALS['phpgw']->db;
                        if($this->acl_location != '.entity.5.1')
                        {
                                throw new Exception("'ikt_systemoversikt'  is 
intended for location = '.entity.5.1'");
                        }
-
                }
 
                function 
set_classification($values,$values_attribute,$entity_id,$cat_id,$receipt)
                {
-
                        $value_set = array();
                        $value_set['konf_rangering']                    = 0;
                        $value_set['integritet_rangering']              = 0;
@@ -31,7 +27,6 @@
 
                        foreach($values_attribute as $entry)
                        {
-                               $konf_rangering =  $entry['value'];
                                switch($entry['name'])
                                {
                                        case 'konf_1':
@@ -109,11 +104,20 @@
                                                break;
                                }
                        }
+                       unset($entry);
 
-                       $value_set      = 
$this->db->validate_update($value_set);
+                       reset($values_attribute);
 
-                       $sql = "UPDATE fm_entity_5_1 SET {$value_set} WHERE id 
=" . (int)$receipt['id'];
+                       foreach($values_attribute as &$entry)
+                       {
+                               if($value_set[$entry['name']])
+                               {
+                                       $entry['value'] = 
$value_set[$entry['name']];
+                               }
+                       }
 
-                       $this->db->query($sql,__LINE__,__FILE__);
+                       $_values = $values;
+                       $_values['id'] = (int)$receipt['id'];
+                       
$this->so->edit($_values,$values_attribute,$entity_id,$cat_id);
                }
        }




reply via email to

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