phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/inc class.borequest.inc.php, 1.5 class.soreq


From: sigurdne
Subject: [Phpgroupware-cvs] property/inc class.borequest.inc.php, 1.5 class.sorequest.inc.php, 1.6 class.uirequest.inc.php, 1.10
Date: Tue, 1 Mar 2005 16:47:00 +0100

Update of property/inc

Modified Files:
     Branch: MAIN
            class.borequest.inc.php lines: +5 -6
            class.sorequest.inc.php lines: +4 -3
            class.uirequest.inc.php lines: +3 -8

Log Message:
no message

====================================================
Index: property/inc/class.borequest.inc.php
diff -u property/inc/class.borequest.inc.php:1.4 
property/inc/class.borequest.inc.php:1.5
--- property/inc/class.borequest.inc.php:1.4    Tue Mar  1 15:04:27 2005
+++ property/inc/class.borequest.inc.php        Tue Mar  1 15:47:48 2005
@@ -644,16 +644,15 @@
                        $request['start_date']  = mktime 
(2,0,0,$start_date['month'],$start_date['day'],$start_date['year']);
                        $request['end_date']    = mktime 
(2,0,0,$end_date['month'],$end_date['day'],$end_date['year']);

-//_debug_array($request);
                        if ($action=='edit')
                        {
                                $receipt = $this->so->edit($request);

-                               if($values['delete_file'])
+                               if($request['delete_file'])
                                {
-                                       for 
($i=0;$i<count($values['delete_file']);$i++)
+                                       for 
($i=0;$i<count($request['delete_file']);$i++)
                                        {
-                                               $file = $this->fakebase. SEP . 
'request' . SEP . $request['location_code'] . SEP . $values['id'] . SEP . 
$values['delete_file'][$i];
+                                               $file = $this->fakebase. SEP . 
'request' . SEP . $request['location_code'] . SEP . $request['request_id'] . 
SEP . $request['delete_file'][$i];

                                                
if($this->vfs->file_exists(array(
                                                                'string' => 
$file,
@@ -669,11 +668,11 @@
                                                             )
                                                        )))
                                                        {
-                                                               
$receipt['error'][]=array('msg'=>lang('failed to delete file') . ' :'. 
$this->fakebase. SEP . 'request' . SEP . $request['location_code']. SEP . 
$values['id'] . SEP .$values['delete_file'][$i]);
+                                                               
$receipt['error'][]=array('msg'=>lang('failed to delete file') . ' :'. 
$this->fakebase. SEP . 'request' . SEP . $request['location_code']. SEP . 
$request['request_id'] . SEP .$request['delete_file'][$i]);
                                                        }
                                                        else
                                                        {
-                                                               
$receipt['message'][]=array('msg'=>lang('file deleted') . ' :'. 
$this->fakebase. SEP . 'request' . SEP . $request['location_code']. SEP . 
$values['id'] . SEP . $values['delete_file'][$i]);
+                                                               
$receipt['message'][]=array('msg'=>lang('file deleted') . ' :'. 
$this->fakebase. SEP . 'request' . SEP . $request['location_code']. SEP . 
$request['request_id'] . SEP . $request['delete_file'][$i]);
                                                        }
                                                        
$this->vfs->override_acl = 0;
                                                }

====================================================
Index: property/inc/class.sorequest.inc.php
diff -u property/inc/class.sorequest.inc.php:1.5 
property/inc/class.sorequest.inc.php:1.6
--- property/inc/class.sorequest.inc.php:1.5    Tue Mar  1 15:04:27 2005
+++ property/inc/class.sorequest.inc.php        Tue Mar  1 15:47:48 2005
@@ -104,12 +104,12 @@

                function update_score($priority_key,$request_id='')
                {
-//_debug_array($priority_key);
                        if(!$priority_key)
                        {
                                $priority_key = $this->read_priority_key();
                        }

+//_debug_array($priority_key);

                        $safety                                         = 
$priority_key['safety'];
                        $aesthetics                                     = 
$priority_key['aesthetics'];
@@ -121,10 +121,11 @@

                        if($request_id)
                        {
-                               $where =" where id = $request_id";
+                               $where =" WHERE id = $request_id";
                        }

-                       $this->db->query("update fm_request set score=($safety* 
(d_safety*p_safety*(c_safety+1)))"
+                       $this->db->query("UPDATE fm_request SET score="
+                       . "  ($safety* (d_safety*p_safety*(c_safety+1)))"
                        . "+ ($aesthetics* 
(d_aesthetics*p_aesthetics*(c_aesthetics+1)))"
                        . "+ ($indoor_climate* 
(d_indoor_climate*p_indoor_climate*(c_indoor_climate+1)))"
                        . "+ ($consequential_damage* 
(d_consequential_damage*p_consequential_damage*(c_consequential_damage+1)))"

====================================================
Index: property/inc/class.uirequest.inc.php
diff -u property/inc/class.uirequest.inc.php:1.9 
property/inc/class.uirequest.inc.php:1.10
--- property/inc/class.uirequest.inc.php:1.9    Tue Mar  1 15:04:27 2005
+++ property/inc/class.uirequest.inc.php        Tue Mar  1 15:47:48 2005
@@ -613,7 +613,7 @@
                                }

                                $values['file_name']=str_replace(" 
","_",$_FILES['file']['name']);
-                               $to_file = $this->fakebase. SEP . 'request' . 
SEP . $values['location']['location_code'] . SEP . $values['id'] . SEP . 
$values['file_name'];
+                               $to_file = $this->fakebase. SEP . 'request' . 
SEP . implode("-",$values['location']) . SEP . $values['request_id'] . SEP . 
$values['file_name'];

                                if(!$values['document_name_orig'] && 
$this->bo->vfs->file_exists(array(
                                                'string' => $to_file,
@@ -634,10 +634,11 @@
                                                $id     = $values['request_id'];
                                        }
                                        $receipt = 
$this->bo->save($values,$action);
+//_debug_array($values);

                                        if($values['file_name'])
                                        {
-                                               
$this->bo->create_document_dir($values['location']['location_code'], 
$values['id']);
+                                               
$this->bo->create_document_dir(implode("-",$values['location']), 
$values['request_id']);
                                                $this->bo->vfs->override_acl = 
1;

                                                if(!$this->bo->vfs->cp (array (
@@ -903,11 +904,6 @@
                                'value_origin_id'                               
=> $origin_id,
                                'lang_origin_statustext'                => 
lang('Link to the origin for this request'),

-//                             'lang_project'                                  
=> lang('Project'),
-//                             'lang_project_statustext'               => 
lang('Link to the project originatet from this request'),
-//                             'link_project'                                  
=> $GLOBALS['phpgw']->link('/index.php',$project_lookup_data),
-//                             'value_project_id'                              
=> $values['project_id'],
-
                                'generate_project_action'                       
=> 
$GLOBALS['phpgw']->link('/index.php','menuaction='.$this->currentapp.'.uiproject.edit'),
                                'lang_generate_project'                         
=> lang('Generate project'),
                                'lang_generate_project_statustext'      => 
lang('Generate a project from this request'),
@@ -928,7 +924,6 @@
                                'lang_history'                                  
=> lang('History'),
                                'lang_no_history'                               
=> lang('No history'),

-
                                'jsDateFormat'                                  
=> $jsDateFormat,
                                'date_img'                                      
        => $cal_info['img'],
                                'lang_datetitle'                                
=> lang('Select date'),






reply via email to

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