fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6612] merge 6608:6611 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [6612] merge 6608:6611 from trunk
Date: Wed, 17 Nov 2010 14:13:18 +0000

Revision: 6612
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6612
Author:   sigurdne
Date:     2010-11-17 14:13:13 +0000 (Wed, 17 Nov 2010)
Log Message:
-----------
merge 6608:6611 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/property/inc/class.boadmin.inc.php
    branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
    branches/Version-1_0-branch/property/inc/class.bodocument.inc.php
    branches/Version-1_0-branch/property/inc/class.boentity.inc.php
    branches/Version-1_0-branch/property/inc/class.boifc.inc.php
    branches/Version-1_0-branch/property/inc/class.boinvestment.inc.php
    branches/Version-1_0-branch/property/inc/class.bolocation.inc.php
    branches/Version-1_0-branch/property/inc/class.bopricebook.inc.php
    branches/Version-1_0-branch/property/inc/class.boproject.inc.php
    branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php
    branches/Version-1_0-branch/property/inc/class.soXport.inc.php
    branches/Version-1_0-branch/property/inc/class.sodocument.inc.php
    branches/Version-1_0-branch/property/inc/class.soentity.inc.php
    branches/Version-1_0-branch/property/inc/class.sogab.inc.php
    branches/Version-1_0-branch/property/inc/class.solocation.inc.php
    branches/Version-1_0-branch/property/inc/class.soproject.inc.php
    branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
    branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
    branches/Version-1_0-branch/property/inc/class.uientity.inc.php
    branches/Version-1_0-branch/property/js/yahoo/entity.index.js

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611

Modified: branches/Version-1_0-branch/property/inc/class.boadmin.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boadmin.inc.php      
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.boadmin.inc.php      
2010-11-17 14:13:13 UTC (rev 6612)
@@ -170,7 +170,7 @@
                        $totalacl = array();
                        foreach ( $values as $rowinfo => $perm )
                        {
-                               list($user_id,$rights) = split('_', $rowinfo);
+                               list($user_id,$rights) = explode('_', $rowinfo);
 
                                if ( !isset($totalacl[$user_id]) )
                                {

Modified: branches/Version-1_0-branch/property/inc/class.bocommon.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bocommon.inc.php     
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.bocommon.inc.php     
2010-11-17 14:13:13 UTC (rev 6612)
@@ -32,6 +32,8 @@
         * @package property
         */
 
+       phpgw::import_class('phpgwapi.datetime');
+
        class property_bocommon
        {
                var $start;
@@ -167,52 +169,11 @@
                }
 
 
-               function date_array($datestr = '')
+               function date_to_timestamp($date=array())
                {
-                       if(!$datestr)
-                       {
-                               return false;
-                       }
-                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-
-                       $fields = split('[./-]',$datestr);
-                       foreach(split('[./-]',$dateformat) as $n => $field)
-                       {
-                               $date[$field] = intval($fields[$n]);
-
-                               if($field == 'M')
-                               {
-                                       for($i=1; $i <=12; $i++)
-                                       {
-                                               
if(date('M',mktime(0,0,0,$i,1,2000)) == $fields[$n])
-                                               {
-                                                       $date['m'] = $i;
-                                               }
-                                       }
-                               }
-                       }
-
-                       $ret = array(
-                               'year'  => $date['Y'],
-                               'month' => $date['m'],
-                               'day'   => $date['d']
-                       );
-                       return $ret;
+                       return  phpgwapi_datetime::date_to_timestamp($date);
                }
 
-               function date_to_timestamp($date='')
-               {
-                       if (!$date)
-                       {
-                               return false;
-                       }
-
-                       $date_array     = $this->date_array($date);
-                       $date   = mktime 
(8,0,0,$date_array['month'],$date_array['day'],$date_array['year']);
-
-                       return $date;
-               }
-
                function select_multi_list($selected='',$input_list)
                {
                        $j=0;

Modified: branches/Version-1_0-branch/property/inc/class.bodocument.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bodocument.inc.php   
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.bodocument.inc.php   
2010-11-17 14:13:13 UTC (rev 6612)
@@ -31,6 +31,7 @@
         * Description
         * @package property
         */
+       phpgw::import_class('phpgwapi.datetime');
 
        class property_bodocument
        {
@@ -394,7 +395,7 @@
                function save($values)
                {
 
-                       $document_date  = 
$this->bocommon->date_array($values['document_date']);
+                       $document_date  = 
phpgwapi_datetime::date_array($values['document_date']);
                        $values['document_date']        = mktime 
(2,0,0,$document_date['month'],$document_date['day'],$document_date['year']);
 
 //_debug_array($values);

Modified: branches/Version-1_0-branch/property/inc/class.boentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boentity.inc.php     
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.boentity.inc.php     
2010-11-17 14:13:13 UTC (rev 6612)
@@ -82,38 +82,32 @@
 
                function property_boentity($session=false)
                {
-                       $this->solocation       = 
CreateObject('property.solocation');
-                       $this->bocommon         = 
CreateObject('property.bocommon');
+                       $this->solocation                               = 
CreateObject('property.solocation');
+                       $this->bocommon                                 = 
CreateObject('property.bocommon');
 
-                       if ($session)
-                       {
-                               $this->read_sessiondata();
-                               $this->use_session = true;
-                       }
+                       $start                                                  
= phpgw::get_var('start', 'int', 'REQUEST', 0);
+                       $query                                                  
= phpgw::get_var('query');
+                       $sort                                                   
= phpgw::get_var('sort');
+                       $order                                                  
= phpgw::get_var('order');
+                       $filter                                                 
= phpgw::get_var('filter', 'int');
+                       $cat_id                                                 
= phpgw::get_var('cat_id', 'int');
+                       $district_id                                    = 
phpgw::get_var('district_id', 'int');
+                       $entity_id                                              
= phpgw::get_var('entity_id', 'int');
+                       $status                                                 
= phpgw::get_var('status');
+                       $start_date                                             
= phpgw::get_var('start_date');
+                       $end_date                                               
= phpgw::get_var('end_date');
+                       $allrows                                                
= phpgw::get_var('allrows', 'bool');
+                       $type                                                   
= phpgw::get_var('type');
+                       $criteria_id                                    = 
phpgw::get_var('criteria_id');
 
-                       $start          = phpgw::get_var('start', 'int', 
'REQUEST', 0);
-                       $query          = phpgw::get_var('query');
-                       $sort           = phpgw::get_var('sort');
-                       $order          = phpgw::get_var('order');
-                       $filter         = phpgw::get_var('filter', 'int');
-                       $cat_id         = phpgw::get_var('cat_id', 'int');
-                       $district_id    = phpgw::get_var('district_id', 'int');
-                       $entity_id      = phpgw::get_var('entity_id', 'int');
-                       $status         = phpgw::get_var('status');
-                       $start_date     = phpgw::get_var('start_date');
-                       $end_date       = phpgw::get_var('end_date');
-                       $allrows        = phpgw::get_var('allrows', 'bool');
-                       $type           = phpgw::get_var('type');
-                       $criteria_id    = phpgw::get_var('criteria_id');
+                       $this->criteria_id                              = 
isset($criteria_id) && $criteria_id ? $criteria_id : '';
 
-                       $this->criteria_id              = isset($criteria_id) 
&& $criteria_id ? $criteria_id : '';
+                       $location_code                                  = 
phpgw::get_var('location_code');
+                       $this->so                                               
= CreateObject('property.soentity',$entity_id,$cat_id);
+                       $this->type_app                                 = 
$this->so->get_type_app();
 
-                       $location_code          = 
phpgw::get_var('location_code');
-                       $this->so                       = 
CreateObject('property.soentity',$entity_id,$cat_id);
-                       $this->type_app         = $this->so->get_type_app();
-
-                       $this->type     = isset($type)  && $type && 
$this->type_app[$type] ? $type : 'entity';
-                       $this->location_code    = isset($location_code)  && 
$location_code ? $location_code : '';
+                       $this->type                                             
= isset($type)  && $type && $this->type_app[$type] ? $type : 'entity';
+                       $this->location_code                    = 
isset($location_code)  && $location_code ? $location_code : '';
                        
                        $this->soadmin_entity                   = 
CreateObject('property.soadmin_entity',$entity_id,$cat_id);
                        $this->custom                                   = & 
$this->so->custom;
@@ -123,6 +117,11 @@
 
 
                        $this->category_dir = 
"{$this->type}_{$entity_id}_{$cat_id}";
+                       if ($session)
+                       {
+                               $this->read_sessiondata();
+                               $this->use_session = true;
+                       }
 
                        $this->start                    = $start ? $start : 0;
 
@@ -150,6 +149,10 @@
                        {
                                $this->district_id = $district_id;
                        }
+                       if(isset($_POST['criteria_id']) || 
isset($_GET['criteria_id']))
+                       {
+                               $this->criteria_id = $criteria_id;
+                       }
                        if($entity_id)
                        {
                                $this->entity_id = $entity_id;
@@ -176,14 +179,14 @@
                {
                        if ($this->use_session)
                        {
-                               
$GLOBALS['phpgw']->session->appsession('session_data',$this->type,$data);
+                               
$GLOBALS['phpgw']->session->appsession('session_data',$this->category_dir,$data);
                        }
                }
 
                function read_sessiondata()
                {
-                       $data = 
$GLOBALS['phpgw']->session->appsession('session_data',$this->type);
-                       //_debug_array($data);
+                       $data = 
$GLOBALS['phpgw']->session->appsession('session_data',$this->category_dir);
+//_debug_array($data);
                        $this->start            = 
isset($data['start'])?$data['start']:'';
                        $this->query            = 
isset($data['query'])?$data['query']:'';
                        $this->filter           = 
isset($data['filter'])?$data['filter']:'';
@@ -193,6 +196,8 @@
                        $this->status           = 
isset($data['status'])?$data['status']:'';
                        $this->start_date       = 
isset($data['start_date'])?$data['start_date']:'';
                        $this->end_date         = 
isset($data['end_date'])?$data['end_date']:'';
+                       $this->criteria_id      = 
isset($data['criteria_id'])?$data['criteria_id']:'';
+                       
                        //$this->allrows                = $data['allrows'];
                }
 

Modified: branches/Version-1_0-branch/property/inc/class.boifc.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boifc.inc.php        
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.boifc.inc.php        
2010-11-17 14:13:13 UTC (rev 6612)
@@ -31,6 +31,7 @@
         * Description
         * @package hrm
         */
+       phpgw::import_class('phpgwapi.datetime');
 
        class boifc
        {
@@ -347,38 +348,12 @@
                        return 
$this->bocommon->preserve_attribute_values($values,$values_attribute);
                }
 
-               function date_array($date)
-               {
-                       if(!$date)
-                       {
-                               $date_array['day']      = date("d");
-                               $date_array['month']    = date("m");
-                               $date_array['year']     = date("Y");
-                       }
-                       else
-                       {
-                               $dateformat = 
strtolower($GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
-                               $dateformat = str_replace(".","",$dateformat);
-                               $dateformat = str_replace("-","",$dateformat);
-                               $dateformat = str_replace("/","",$dateformat);
-                               $y=strpos($dateformat,'y');
-                               $d=strpos($dateformat,'d');
-                               $m=strpos($dateformat,'m');
 
-                               $dateparts = explode('/', $date);
-                               $date_array['day']      = $dateparts[$d];
-                               $date_array['month']    = $dateparts[$m];
-                               $date_array['year']     = $dateparts[$y];
-                       }
-
-                       return $date_array;
-               }
-
                function date_to_timestamp($date)
                {
                        if($date)
                        {
-                               $date_array     = $this->date_array($date);
+                               $date_array     = 
phpgwapi_datetime::date_array($date);
                                $date   = mktime 
(8,0,0,$date_array['month'],$date_array['day'],$date_array['year']);
                        }
                        return $date;

Modified: branches/Version-1_0-branch/property/inc/class.boinvestment.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boinvestment.inc.php 
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.boinvestment.inc.php 
2010-11-17 14:13:13 UTC (rev 6612)
@@ -31,6 +31,7 @@
         * Description
         * @package property
         */
+       phpgw::import_class('phpgwapi.datetime');
 
        class property_boinvestment
        {
@@ -278,7 +279,7 @@
                function update_investment($values)
                {
 
-                       
$date_array=$this->bocommon->date_array($values['date']);
+                       $date_array = 
phpgwapi_datetime::date_array($values['date']);
 
                        $date = mktime 
(2,0,0,$date_array['month'],$date_array['day'],$date_array['year']);
                        $date= date($this->bocommon->dateformat,$date);

Modified: branches/Version-1_0-branch/property/inc/class.bolocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bolocation.inc.php   
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.bolocation.inc.php   
2010-11-17 14:13:13 UTC (rev 6612)
@@ -731,7 +731,7 @@
                                $location_code = $data;
                        }
 
-                       $location_array = split('-',$location_code);
+                       $location_array = explode('-',$location_code);
                        $type_id= count($location_array);
 
                        if (!$type_id)

Modified: branches/Version-1_0-branch/property/inc/class.bopricebook.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.bopricebook.inc.php  
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.bopricebook.inc.php  
2010-11-17 14:13:13 UTC (rev 6612)
@@ -31,6 +31,7 @@
         * Description
         * @package property
         */
+       phpgw::import_class('phpgwapi.datetime');
 
        class property_bopricebook
        {
@@ -230,7 +231,7 @@
                {
 
 //_debug_array($values);
-                       
$date_array=$this->bocommon->date_array($values['date']);
+                       
$date_array=phpgwapi_datetime::date_array($values['date']);
 
                        $date = mktime 
(2,0,0,$date_array['month'],$date_array['day'],$date_array['year']);
 //                     $date= date($this->bocommon->dateformat,$date);
@@ -297,7 +298,7 @@
                function add_activity_first_prize($values)
                {
 
-                       
$date_array=$this->bocommon->date_array($values['date']);
+                       
$date_array=phpgwapi_datetime::date_array($values['date']);
 
                        $date = mktime 
(2,0,0,$date_array['month'],$date_array['day'],$date_array['year']);
 //                     $date= date($this->bocommon->dateformat,$date);

Modified: branches/Version-1_0-branch/property/inc/class.boproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.boproject.inc.php    
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.boproject.inc.php    
2010-11-17 14:13:13 UTC (rev 6612)
@@ -31,6 +31,7 @@
         * Description
         * @package property
         */
+       phpgw::import_class('phpgwapi.datetime');
 
        class property_boproject
        {
@@ -628,8 +629,8 @@
 
                        $project['location_code']=implode("-", $location);
 
-                       $start_date     = 
$this->bocommon->date_array($project['start_date']);
-                       $end_date       = 
$this->bocommon->date_array($project['end_date']);
+                       $start_date     = 
phpgwapi_datetime::date_array($project['start_date']);
+                       $end_date       = 
phpgwapi_datetime::date_array($project['end_date']);
 
                        $project['start_date']  = mktime 
(2,0,0,$start_date['month'],$start_date['day'],$start_date['year']);
                        $project['end_date']    = $end_date ? mktime 
(2,0,0,$end_date['month'],$end_date['day'],$end_date['year']) : '';

Modified: branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php        
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.custom_fields.inc.php        
2010-11-17 14:13:13 UTC (rev 6612)
@@ -407,7 +407,7 @@
                                {
                                        if($field == 'location_code')
                                        {
-                                               $location = 
split('-',$data['value']);
+                                               $location = 
explode('-',$data['value']);
                                        }
 
                                        if(($data['datatype']=='R' || 
$data['datatype']=='LB') && $data['value'])
@@ -479,15 +479,17 @@
 
                                        if($location)
                                        {
-                                               if(!$location_count)
+                                               $_location_count = 
$location_count;
+                                               if(!$_location_count)
                                                {
-                                                       $location_count = 
count($location);
+                                                       $_location_count = 
count($location);
                                                }
-                                               for ($m=0;$m < $location_count 
; $m++)
+                                               for ($m=0;$m < $_location_count 
; $m++)
                                                {
                                                        $ret[$j]['loc' . 
($m+1)] = $location[$m];
                                                        
$ret[$j]['query_location']['loc' . ($m+1)]=implode('-', array_slice($location, 
0, ($m + 1)));
                                                }
+                                               $_location_count = 0;
                                        }
                                }
                                $j++;

Modified: branches/Version-1_0-branch/property/inc/class.soXport.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soXport.inc.php      
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.soXport.inc.php      
2010-11-17 14:13:13 UTC (rev 6612)
@@ -129,7 +129,7 @@
 
                        $this->db->next_record();
 
-//                     $location       = split("-", 
$this->db->f('location_code'));
+//                     $location       = explode("-", 
$this->db->f('location_code'));
 
                        $loc1 = $this->db->f('loc1');
                        $loc2 = $this->db->f('loc2');
@@ -252,9 +252,7 @@
                                                $fields['item_type'],
                                                $fields['item_id'],
                                                $fields['external_ref'],
-                                               isset($fields['currency']) && 
$fields['currency'] ? $fields['currency'] : 'NOK',
-                                               
$this->db->money_format($fields['belop']),
-                                               
$this->db->money_format($fields['godkjentbelop'])
+                                               isset($fields['currency']) && 
$fields['currency'] ? $fields['currency'] : 'NOK'
                                                );
 
                                        $bilagsnr       = 
(int)$fields['bilagsnr'];
@@ -265,7 +263,7 @@
                                        . " 
forfallsdato,regtid,artid,spvend_code,dimb,oppsynsmannid,saksbehandlerid,budsjettansvarligid,"
                                        . " 
fakturanr,spbudact_code,loc1,dima,dimd,mvakode,periode,merknad,oppsynsigndato,saksigndato,"
                                        . " 
budsjettsigndato,utbetalingsigndato,item_type,item_id,external_ref,currency,belop,godkjentbelop)"
-                                       . " VALUES ({$values})";
+                                       . " VALUES ({$values}," . 
$this->db->money_format($fields['belop']) . ',' . 
$this->db->money_format($fields['godkjentbelop']) .')';
 
                                        
$this->db->query($sql,__LINE__,__FILE__);
 

Modified: branches/Version-1_0-branch/property/inc/class.sodocument.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sodocument.inc.php   
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.sodocument.inc.php   
2010-11-17 14:13:13 UTC (rev 6612)
@@ -251,7 +251,7 @@
                                }
 
                                $location_code= $this->db->f('location_code');
-                               $location = split('-',$location_code);
+                               $location = explode('-',$location_code);
                                for ($m=0;$m<count($location);$m++)
                                {
                                        $document_list[$j]['loc' . ($m+1)] = 
$location[$m];

Modified: branches/Version-1_0-branch/property/inc/class.soentity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.soentity.inc.php     
2010-11-17 14:13:13 UTC (rev 6612)
@@ -925,7 +925,7 @@
                                if( !$GLOBALS['phpgw']->acl->check('run', 
PHPGW_ACL_READ, $app))
                                {
                                        continue;
-                               }
+                               }
 
                                $sql = "SELECT * FROM fm_{$type}_category";
                                $this->db->query($sql,__LINE__,__FILE__);

Modified: branches/Version-1_0-branch/property/inc/class.sogab.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sogab.inc.php        
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.sogab.inc.php        
2010-11-17 14:13:13 UTC (rev 6612)
@@ -373,7 +373,7 @@
                                }
 
                                $location_code= $this->db->f('location_code');
-                               $location = split('-',$location_code);
+                               $location = explode('-',$location_code);
                                for ($m=0;$m<count($location);$m++)
                                {
                                        $gab_list[$j]['loc' . ($m+1)] = 
$location[$m];

Modified: branches/Version-1_0-branch/property/inc/class.solocation.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.solocation.inc.php   
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.solocation.inc.php   
2010-11-17 14:13:13 UTC (rev 6612)
@@ -1087,7 +1087,7 @@
 
                function read_single($location_code='',$values = array())
                {
-                       $location_array = split('-',$location_code);
+                       $location_array = explode('-',$location_code);
                        $type_id= count($location_array);
 
                        if (!$type_id)
@@ -1306,7 +1306,7 @@
 
                function delete($location_code )
                {
-                       $location_array = split('-',$location_code);
+                       $location_array = explode('-',$location_code);
                        $type_id= count($location_array);
                        $this->db->transaction_begin();
                        $this->db->query("DELETE FROM fm_location$type_id WHERE 
location_code='{$location_code}'",__LINE__,__FILE__);
@@ -1595,7 +1595,7 @@
 
                function check_history($location_code='')
                {
-                       $location_array = split('-',$location_code);
+                       $location_array = explode('-',$location_code);
                        $type_id= count($location_array);
 
                        if (!$type_id)
@@ -1624,7 +1624,7 @@
                function get_history($location_code='')
                {
                        $this->uicols = array();
-                       $location_array = split('-',$location_code);
+                       $location_array = explode('-',$location_code);
                        $type_id= count($location_array);
                        $contacts                       = 
CreateObject('phpgwapi.contacts');
 

Modified: branches/Version-1_0-branch/property/inc/class.soproject.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soproject.inc.php    
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.soproject.inc.php    
2010-11-17 14:13:13 UTC (rev 6612)
@@ -512,7 +512,7 @@
                                        $project_list[$j]['grants'] = 
(int)$this->grants[$this->db->f('user_id')];
                                }
                                $location_code= $this->db->f('location_code');
-                               $location = split('-',$location_code);
+                               $location = explode('-',$location_code);
                                $n=count($location);
                                for ($m=0;$m<$n;$m++)
                                {

Modified: branches/Version-1_0-branch/property/inc/class.sorequest.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sorequest.inc.php    
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.sorequest.inc.php    
2010-11-17 14:13:13 UTC (rev 6612)
@@ -341,7 +341,7 @@
                                }
 
                                $location_code= $this->db->f('location_code');
-                               $location = split('-',$location_code);
+                               $location = explode('-',$location_code);
                                for ($m=0;$m<count($location);$m++)
                                {
                                        $request_list[$j]['loc' . ($m+1)] = 
$location[$m];

Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2010-11-17 14:13:13 UTC (rev 6612)
@@ -563,7 +563,7 @@
                                }
 
                                $location_code= $this->db->f('location_code');
-                               $location = split('-',$location_code);
+                               $location = explode('-',$location_code);
                                $count_location =count($location);
                                for ($m=0;$m<$count_location;$m++)
                                {

Modified: branches/Version-1_0-branch/property/inc/class.uientity.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uientity.inc.php     
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/inc/class.uientity.inc.php     
2010-11-17 14:13:13 UTC (rev 6612)
@@ -116,19 +116,19 @@
                {
                        $data = array
                        (
-                               'start'                 => $this->start,
-                               'query'                 => $this->query,
-                               'sort'                  => $this->sort,
-                               'order'                 => $this->order,
-                               'filter'                => $this->filter,
-                               'cat_id'                => $this->cat_id,
+                               'start'                         => $this->start,
+                               'query'                         => $this->query,
+                               'sort'                          => $this->sort,
+                               'order'                         => $this->order,
+                               'filter'                        => 
$this->filter,
+                               'cat_id'                        => 
$this->cat_id,
                                'part_of_town_id'       => 
$this->part_of_town_id,
                                'district_id'           => $this->district_id,
-                               'entity_id'             => $this->entity_id,
-                               'status'                => $this->status,
+                               'entity_id'                     => 
$this->entity_id,
+                               'status'                        => 
$this->status,
                                'start_date'            => $this->start_date,
-                               'end_date'              => $this->end_date,
-                               'allrows'               => $this->allrows,
+                               'end_date'                      => 
$this->end_date,
+                               'criteria_id'           => $this->criteria_id
                        );
                        $this->bo->save_sessiondata($data);
                }
@@ -330,6 +330,8 @@
                        $end_date       = urldecode($this->end_date);
                        $dry_run = false;
 
+                       $this->save_sessiondata();
+
                        //Preferencias sets
                        
if(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['group_filters'])
 && $GLOBALS['phpgw_info']['user']['preferences']['property']['group_filters'] 
== 'yes')
                        {
@@ -355,12 +357,11 @@
                                                                                
                                                'menuaction'                    
=> 'property.uientity.index',
                                                                                
                                                'entity_id'                     
=> $this->entity_id,
                                                                                
                                                'cat_id'                => 
$this->cat_id,
+                                                                               
                                                'type'                          
        => $this->type,
                                                                                
                                                'district_id'           => 
$this->district_id,
                                                                                
                                                'status'                        
=> $this->status,
                                                                                
                                                'filter'                        
=> $this->filter,
-                                                                               
                                                'query'                         
=> $this->query,
-                                                                               
                                                'type'                          
        => $this->type,
-                                                                               
                                                'location_code'                 
=> $this->location_code,
+//                                                                             
                                                'location_code'                 
=> $this->location_code,
                                                                                
                                                'criteria_id'                   
=> $this->criteria_id
                                                                                
                    ));
                                $datatable['config']['allow_allrows'] = true;
@@ -368,11 +369,10 @@
                                $datatable['config']['base_java_url']   =       
"menuaction:'property.uientity.index',".
                                                                                
                                        "entity_id:'{$this->entity_id}',".
                                                                                
                                        "cat_id:'{$this->cat_id}',".
+                                                                               
                                        "type:'{$this->type}',".
                                                                                
                                        "district_id:'{$this->district_id}',".
                                                                                
                                        "status:'{$this->status}',".
                                                                                
                                        "filter:'{$this->filter}',".
-                                                                               
                                        "query:'{$this->query}',".
-                                                                               
                                        "type:'{$this->type}',".
                                                                                
                "criteria_id:'{$this->criteria_id}',".
                                                                                
                                        
"location_code:'{$this->location_code}'";
 
@@ -457,10 +457,10 @@
                                                                                
                'menuaction'    => 'property.uientity.index',
                                                                                
                'entity_id'             => $this->entity_id,
                                                                                
                'cat_id'                => $this->cat_id,
-                                                                               
                'district_id'   => $this->district_id,
-                                                                               
                'status'                => $this->status,
-                                                                               
                'filter'                => $this->filter,
-                                                                               
                'query'                 => $this->query,
+//                                                                             
                'district_id'   => $this->district_id,
+//                                                                             
                'status'                => $this->status,
+//                                                                             
                'filter'                => $this->filter,
+//                                                                             
                'query'                 => $this->query,
                                                                                
                'type'                  => $this->type
                                                                                
          )),
                                                'fields'  => array(
@@ -540,7 +540,7 @@
                                                                                
                array( // TEXT IMPUT
                                                                                
                        'name' => 'query',
                                                                                
                        'id'   => 'txt_query',
-                                                                               
                        'value'=> '',//$query,
+                                                                               
                        'value'=> $this->query,
                                                                                
                        'type' => 'text',
                                                                                
                        'size' => 28,
                                                                                
                        'onkeypress' => 'return pulsar(event)',
@@ -967,7 +967,6 @@
                        // Prepare YUI Library
                        $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
'entity.index', 'property' );
 
-                       //$this->save_sessiondata();
                        //die(_debug_array($datatable));
                }
 

Modified: branches/Version-1_0-branch/property/js/yahoo/entity.index.js
===================================================================
--- branches/Version-1_0-branch/property/js/yahoo/entity.index.js       
2010-11-17 14:12:01 UTC (rev 6611)
+++ branches/Version-1_0-branch/property/js/yahoo/entity.index.js       
2010-11-17 14:13:13 UTC (rev 6612)
@@ -8,7 +8,7 @@
        {order:1, var_URL:'district_id',name:'btn_district_id', 
style:'districtbutton', dependiente:''},
        {order:2, var_URL:'status',             name:'btn_status_id',   
style:'statusbutton',   dependiente:''},
        {order:3, var_URL:'filter',             name:'btn_user_id',             
style:'userIdbutton',   dependiente:''},
-       {order:4, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
+       {order:4, var_URL:'criteria_id', 
name:'btn_criteria_id',style:'criteriabutton',dependiente:''}
        ]
 
        // define buttons
@@ -44,6 +44,42 @@
        {
                if(flag_particular_setting=='init')
                {
+                       //category
+/*
+                       index = 
locate_in_array_options(0,"value",path_values.cat_id);
+                       if(index)
+                       {
+                               oMenuButton_0.set("label", ("<em>" + 
array_options[0][index][1] + "</em>"));
+                       }
+*/
+                       //district
+                       index = 
locate_in_array_options(1,"value",path_values.district_id);
+                       if(index)
+                       {
+                               oMenuButton_1.set("label", ("<em>" + 
array_options[1][index][1] + "</em>"));
+                       }
+
+                       //status
+                       index = 
locate_in_array_options(2,"value",path_values.status);
+                       if(index)
+                       {
+                               oMenuButton_2.set("label", ("<em>" + 
array_options[2][index][1] + "</em>"));
+                       }
+
+                       //filter
+                       index = 
locate_in_array_options(3,"value",path_values.filter);
+                       if(index)
+                       {
+                               oMenuButton_3.set("label", ("<em>" + 
array_options[3][index][1] + "</em>"));
+                       }
+
+                       //district
+                       index = 
locate_in_array_options(4,"value",path_values.criteria_id);
+                       if(index)
+                       {
+                               oMenuButton_4.set("label", ("<em>" + 
array_options[4][index][1] + "</em>"));
+                       }
+
                        //eliminate "no category" option because is necesary 
have a category in the  PHP query
        //              delete oMenuButton_0.getMenu().itemData[0];
                        //correcting it. now look for value 




reply via email to

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