fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6790] property: htmlspecialchars_decode


From: Sigurd Nes
Subject: [Fmsystem-commits] [6790] property: htmlspecialchars_decode
Date: Mon, 17 Jan 2011 19:34:48 +0000

Revision: 6790
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6790
Author:   sigurdne
Date:     2011-01-17 19:34:47 +0000 (Mon, 17 Jan 2011)
Log Message:
-----------
property: htmlspecialchars_decode

Modified Paths:
--------------
    trunk/property/inc/class.soagreement.inc.php
    trunk/property/inc/class.sopricebook.inc.php
    trunk/property/inc/class.sowo_hour.inc.php

Modified: trunk/property/inc/class.soagreement.inc.php
===================================================================
--- trunk/property/inc/class.soagreement.inc.php        2011-01-17 14:43:03 UTC 
(rev 6789)
+++ trunk/property/inc/class.soagreement.inc.php        2011-01-17 19:34:47 UTC 
(rev 6790)
@@ -379,17 +379,15 @@
 
                function read_details($data)
                {
-                       if(is_array($data))
-                       {
-                               $start                  = 
(isset($data['start'])?$data['start']:0);
-                               $filter                 = 
(isset($data['filter'])?$data['filter']:'none');
-                               $query                  = 
(isset($data['query'])?$data['query']:'');
-                               $sort                   = 
(isset($data['sort'])?$data['sort']:'DESC');
-                               $order                  = 
(isset($data['order'])?$data['order']:'');
-                               $cat_id                 = 
(isset($data['cat_id'])?$data['cat_id']:'');
-                               $allrows                = 
(isset($data['allrows'])?$data['allrows']:'');
-                               $agreement_id   = 
(isset($data['agreement_id'])?$data['agreement_id']:'');
-                       }
+                               $start                  = isset($data['start']) 
&& $data['start'] ? $data['start']:0;
+                               $filter                 = 
isset($data['filter']) && $data['filter'] ? $data['filter']:'none';
+                               $query                  = isset($data['query']) 
? $data['query'] : '';
+                               $sort                   = isset($data['sort']) 
&& $data['sort'] ? $data['sort']:'DESC';
+                               $order                  = isset($data['order']) 
? $data['order'] : '';
+                               $cat_id                 = 
isset($data['cat_id']) ? $data['cat_id'] : '';
+                               $allrows                = 
isset($data['allrows']) ? $data['allrows'] : '';
+                               $agreement_id   = isset($data['agreement_id']) 
? $data['agreement_id'] : '';
+
                        $allrows = true; // return all..
 
                        $entity_table = 'fm_activity_price_index';
@@ -493,7 +491,7 @@
                                                'activity_id'           => 
$this->db->f('activity_id'),
                                                'id'                            
=> $this->db->f('id'),
                                                'num'                           
=> $this->db->f('num'),
-                                               'descr'                         
=> $this->db->f('descr'),
+                                               'descr'                         
=> htmlspecialchars_decode($this->db->f('descr',true)),
                                                'unit'                          
=> $this->db->f('unit'),
                                                'm_cost'                        
=> $this->db->f('m_cost'),
                                                'w_cost'                        
=> $this->db->f('w_cost'),

Modified: trunk/property/inc/class.sopricebook.inc.php
===================================================================
--- trunk/property/inc/class.sopricebook.inc.php        2011-01-17 14:43:03 UTC 
(rev 6789)
+++ trunk/property/inc/class.sopricebook.inc.php        2011-01-17 19:34:47 UTC 
(rev 6790)
@@ -272,8 +272,8 @@
                                                'unit'                  => 
$this->db->f('unit'),
                                                'dim_d'                 => 
$this->db->f('dim_d'),
                                                'ns3420_id'             => 
$this->db->f('ns3420'),
-                                               'descr'                 => 
stripslashes($this->db->f('descr')),
-                                               'base_descr'            => 
stripslashes($this->db->f('base_descr')),
+                                               'descr'                 => 
htmlspecialchars_decode($this->db->f('descr',true)),
+                                               'base_descr'            => 
htmlspecialchars_decode($this->db->f('base_descr',true)),
                                                'index_count'           => 
$this->db->f('index_count'),
                                                'agreement_id'          => 
$this->db->f('fm_agreement.id')
                                        );
@@ -504,12 +504,12 @@
                                        (
                                                'activity_id'   => 
$this->db->f('activity_id'),
                                                'num'                   => 
$this->db->f('num'),
-                                               'base_descr'    => 
stripslashes($this->db->f('base_descr')),
+                                               'base_descr'    => 
htmlspecialchars_decode($this->db->f('base_descr',true)),
                                                'branch'                => 
$this->db->f('branch'),
                                                'dim_d'                 => 
$this->db->f('dim_d'),
                                                'ns3420'                => 
$this->db->f('ns3420'),
                                                'unit'                  => 
$this->db->f('unit'),
-                                               'descr'                 => 
stripslashes($this->db->f('descr'))
+                                               'descr'                 => 
htmlspecialchars_decode($this->db->f('descr',true))
                                        );
                        }
                        //              _debug_array($pricebook);
@@ -603,8 +603,8 @@
                                $activity['unit']               = 
$this->db->f('unit');
                                $activity['cat_id']             = 
$this->db->f('agreement_group_id');
                                $activity['ns3420_id']  = 
$this->db->f('ns3420');
-                               $activity['descr']              = 
stripslashes($this->db->f('descr'));
-                               $activity['base_descr'] = 
stripslashes($this->db->f('base_descr'));
+                               $activity['descr']              = 
htmlspecialchars_decode($this->db->f('descr',true));
+                               $activity['base_descr'] = 
htmlspecialchars_decode($this->db->f('base_descr',true));
                                $activity['dim_d']              = 
$this->db->f('dim_d');
                                $activity['branch_id']  = 
$this->db->f('branch_id');
 

Modified: trunk/property/inc/class.sowo_hour.inc.php
===================================================================
--- trunk/property/inc/class.sowo_hour.inc.php  2011-01-17 14:43:03 UTC (rev 
6789)
+++ trunk/property/inc/class.sowo_hour.inc.php  2011-01-17 19:34:47 UTC (rev 
6790)
@@ -125,11 +125,11 @@
                                        (
                                                'hour_id'                       
=> $this->db->f('id'),
                                                'activity_num'          => 
$this->db->f('activity_num'),
-                                               'hours_descr'           => 
stripslashes($this->db->f('hours_descr')),
+                                               'hours_descr'           => 
htmlspecialchars_decode($this->db->f('hours_descr',true)),
                                                'owner'                         
=> $this->db->f('owner'),
                                                'quantity'                      
=> $this->db->f('quantity'),
                                                'grouping_id'           => 
$this->db->f('grouping_id'),
-                                               'grouping_descr'        => 
$this->db->f('grouping_descr'),
+                                               'grouping_descr'        => 
$this->db->f('grouping_descr',true),
                                                'ns3420_id'                     
=> $this->db->f('ns3420_id'),
                                                'tolerance'                     
=> $this->db->f('tolerance'),
                                                'activity_id'           => 
$this->db->f('activity_id'),
@@ -542,21 +542,21 @@
                        {
                                $hour['hour_id']                        = 
$this->db->f('id');
                                $hour['record']                         = 
$this->db->f('record');
-                               $hour['activity_id']                    = 
$this->db->f('activity_id');
-                               $hour['activity_num']                   = 
$this->db->f('activity_num');
-                               $hour['grouping_id']                    = 
$this->db->f('grouping_id');
-                               $hour['hours_descr']                    = 
$this->db->f('hours_descr');
+                               $hour['activity_id']            = 
$this->db->f('activity_id');
+                               $hour['activity_num']           = 
$this->db->f('activity_num');
+                               $hour['grouping_id']            = 
$this->db->f('grouping_id');
+                               $hour['hours_descr']            = 
htmlspecialchars_decode($this->db->f('hours_descr',true));
                                $hour['remark']                         = 
$this->db->f('remark');
                                $hour['billperae']                      = 
$this->db->f('billperae');
                                $hour['unit']                           = 
$this->db->f('unit');
                                $hour['ns3420_id']                      = 
$this->db->f('ns3420_id');
-                               $hour['tolerance_id']                   = 
(int)$this->db->f('tolerance');
-                               $hour['building_part_id']               = 
(int)$this->db->f('building_part');
+                               $hour['tolerance_id']           = 
(int)$this->db->f('tolerance');
+                               $hour['building_part_id']       = 
(int)$this->db->f('building_part');
                                $hour['quantity']                       = 
$this->db->f('quantity');
                                $hour['cost']                           = 
$this->db->f('cost');
                                $hour['dim_d']                          = 
$this->db->f('dim_d');
-                               $hour['wo_hour_cat']                    = 
$this->db->f('category');
-                               $hour['cat_per_cent']                   = 
$this->db->f('cat_per_cent');
+                               $hour['wo_hour_cat']            = 
$this->db->f('category');
+                               $hour['cat_per_cent']           = 
$this->db->f('cat_per_cent');
                        }
 
                        return $hour;




reply via email to

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