fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [7518] Merge 7512:7517 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [7518] Merge 7512:7517 from trunk
Date: Sun, 21 Aug 2011 15:12:37 +0000

Revision: 7518
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7518
Author:   sigurdne
Date:     2011-08-21 15:12:37 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
Merge 7512:7517 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/admin/inc/class.uilog.inc.php
    
branches/Version-1_0-branch/catch/inc/custom/default/update_location_at_record_nlsh.php
    branches/Version-1_0-branch/property/inc/cron/default/catch_ppc.php
    
branches/Version-1_0-branch/property/inc/import/default/cvs_import_vedlikeholdsplan_bkb
    
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh

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,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511
   + 
/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,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517

Modified: branches/Version-1_0-branch/admin/inc/class.uilog.inc.php
===================================================================
--- branches/Version-1_0-branch/admin/inc/class.uilog.inc.php   2011-08-21 
15:10:11 UTC (rev 7517)
+++ branches/Version-1_0-branch/admin/inc/class.uilog.inc.php   2011-08-21 
15:12:37 UTC (rev 7518)
@@ -37,9 +37,9 @@
                        }
                        
                        $account_id             = phpgw::get_var('account_id', 
'int');
-                       $start                  = phpgw::get_var('start', 
'int', 'POST');
-                       $sort                   = phpgw::get_var('sort', 'int', 
'POST');
-                       $order                  = phpgw::get_var('order', 
'int', 'POST');
+                       $start                  = phpgw::get_var('start', 
'int');
+                       $sort                   = phpgw::get_var('sort', 'int');
+                       $order                  = phpgw::get_var('order', 
'int');
                        
                
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('Admin').' - '.lang('View error log');

Modified: 
branches/Version-1_0-branch/catch/inc/custom/default/update_location_at_record_nlsh.php
===================================================================
--- 
branches/Version-1_0-branch/catch/inc/custom/default/update_location_at_record_nlsh.php
     2011-08-21 15:10:11 UTC (rev 7517)
+++ 
branches/Version-1_0-branch/catch/inc/custom/default/update_location_at_record_nlsh.php
     2011-08-21 15:12:37 UTC (rev 7518)
@@ -1,9 +1,8 @@
 <?php
                if(!isset($this->db) || !is_object($this->db))
                {
-                       $this->db               = clone($GLOBALS['phpgw']->db);
-                       $this->like             = & $this->db->like;
-                       
+                       $this->db               = & $GLOBALS['phpgw']->db;
+                       $this->like             = & $this->db->like;            
                }
 
                $this->db2              = clone($this->db);
@@ -12,7 +11,7 @@
                {
                        $target_table = 
"fm_{$this->type_app[$this->type]}_{$entity_id}_{$cat_id}";
                }
-               
+
                $ids = array();
                $this->db->query("SELECT id FROM $target_table WHERE 
location_code is NULL",__LINE__,__FILE__);
                while ($this->db->next_record())
@@ -107,10 +106,10 @@
                                        $value_set['location_code'] = 
implode('-', $location);
                                }
                        }
-                       
+
                        if($value_set)
                        {
                                $value_set      = 
$this->db->validate_update($value_set);
-                               $this->db->query("UPDATE $target_table SET 
$value_set WHERE id= {$_id}",__LINE__,__FILE__);
+                               $this->db->query("UPDATE $target_table SET 
$value_set WHERE id={$_id}",__LINE__,__FILE__);
                        }
                }

Modified: branches/Version-1_0-branch/property/inc/cron/default/catch_ppc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/cron/default/catch_ppc.php 
2011-08-21 15:10:11 UTC (rev 7517)
+++ branches/Version-1_0-branch/property/inc/cron/default/catch_ppc.php 
2011-08-21 15:12:37 UTC (rev 7518)
@@ -39,7 +39,7 @@
 
                public function __construct()
                {
-                       $this->db           = clone($GLOBALS['phpgw']->db);
+                       $this->db           = & $GLOBALS['phpgw']->db;
                        $this->join                     = & $this->db->join;
                        $this->like                     = & $this->db->like;
                }
@@ -316,7 +316,7 @@
                                                        $file = 
PHPGW_SERVER_ROOT . 
"/catch/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
                                                        if ( $entry['active'] 
&& is_file($file) )
                                                        {
-                                                               require_once 
$file;
+                                                               require $file;
                                                        }
                                                }
                                                

Modified: 
branches/Version-1_0-branch/property/inc/import/default/cvs_import_vedlikeholdsplan_bkb
===================================================================
--- 
branches/Version-1_0-branch/property/inc/import/default/cvs_import_vedlikeholdsplan_bkb
     2011-08-21 15:10:11 UTC (rev 7517)
+++ 
branches/Version-1_0-branch/property/inc/import/default/cvs_import_vedlikeholdsplan_bkb
     2011-08-21 15:12:37 UTC (rev 7518)
@@ -11,6 +11,8 @@
                        set_time_limit(10000); //Set the time limit for this 
request oto 3000 seconds
                        $this->account          = 
(int)$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->db           = & $GLOBALS['phpgw']->db;
+                       $this->custom           = 
createObject('property.custom_fields');
+                       $this->attrib_data      = 
$this->custom->find('property', '.project.request', 0, '', 'ASC', 
'attrib_sort', true, true);
                }
 
                public function add($data)
@@ -81,7 +83,6 @@
                                $entry_date = time();
                        }
 
-//$category = ????;
 //$authorities_demands
 //$building_part
 //$coordinator
@@ -111,7 +112,32 @@
                                        $value_set['closed_date']               
= strtotime("{$data[9]}/06/24");
                                }
                        }
+
+/*
+                       $value_set['in_progress_date']  = time();
+                       $value_set['delivered_date']    = time();
+*/
+
                        
+                       switch ($data[4])
+                       {
+                               case 'D':
+                                       $category = 13;
+                                       break;
+                               case 'V':
+                                       $category = 12;
+                                       break;
+                               case 'U':
+                                       $category = 14;
+                                       break;
+                               case 'Kombinasjon':
+                                       $category = 201;
+                                       break;
+                               default:
+                                       $category = 201;
+                                       break;
+
+                       }
                        
                        $value_set['id']                                        
= $id;
                        $value_set['title']                                     
= $this->db->db_addslashes("{$data[0]}::{$data[6]}::{$data[20]}");
@@ -123,14 +149,45 @@
                        $value_set['entry_date']                        = 
$entry_date;
                        $value_set['budget']                            = 
(int)str_replace(',', '', $data[21]);
                        $value_set['status']                            = 
$status;
-       //              $value_set['branch_id']                         = 
$data['branch_id'];
        //              $value_set['coordinator']                       = 
$coordinator;
                        $value_set['authorities_demands']       = 
$authorities_demands;
                        $value_set['building_part']                     = 
$data[5];
-       //              $value_set['start_date']                        = 
$data['start_date'];
-       //              $value_set['end_date']                          = 
$data['end_date'];
-       //              $value_set['regulations']                       = 
$data['regulations'] ? ',' . implode(',',$data['regulations']) . ',' : '';
+                       $value_set['vurderingskriterie']        = 
(int)$data[10];
 
+                       reset($this->attrib_data);
+                       foreach ( $this->attrib_data as $attrib )
+                       {
+                               if($attrib['datatype'] == 'LB' && 
$attrib['column_name'] == 'lovhjemmel')
+                               {
+                                       foreach($attrib['choice'] as $choice)
+                                       {
+                                               
if(preg_match("/{$choice['value']}/i", $data[11]))
+                                               {
+                                                       
$value_set['lovhjemmel']        = $choice['id'];
+                                                       break 2;
+                                               }
+                                       }
+                               }
+                       }
+
+                       reset($this->attrib_data);
+                       foreach ( $this->attrib_data as $attrib )
+                       {
+                               if($attrib['datatype'] == 'LB' && 
$attrib['column_name'] == 'forskriftshjemmel')
+                               {
+                                       foreach($attrib['choice'] as $choice)
+                                       {
+                                               
if(preg_match("/{$choice['value']}/i", $data[12]))
+                                               {
+                                                       
$value_set['forskriftshjemmel'] = $choice['id'];
+                                                       break 2;
+                                               }
+                                       }
+                               }
+                       }
+
+
+
                        $cols = implode(',', array_keys($value_set));
                        $values = 
$this->db->validate_insert(array_values($value_set));
 
@@ -142,18 +199,23 @@
                        }
                        else
                        {
-//                             $request_ok = 
$this->db->query($sql,__LINE__,__FILE__);
+                               $request_ok = 
$this->db->query($sql,__LINE__,__FILE__);
+                               if($request_ok)
+                               {
+                                       $this->db->query("UPDATE fm_idgenerator 
set value = value + 1 where name = 'request'");
+                               }
                        }
 
                        $condition = array();
+                       $condition_type = (int) substr($data[14], 0, 1);
                        
-                       if($data[8] || $data[9])
+                       if($data[13] || $data[15])
                        {
-                               $condition[1] = array
+                               $condition[$condition_type] = array
                                (
-                                       'degree'                => 
(int)$data[8],
-                                       'probability'   =>      2,
-                                       'consequence'   =>      (int)$data[9]
+                                       'degree'                => 
(int)$data[13],
+                                       'probability'   =>      $data[16] ? 
(int)$data[16] : 1,
+                                       'consequence'   =>      (int)$data[15]
                                );
                        }
                        
@@ -176,141 +238,29 @@
                                }
                                else
                                {
-//                                     
$this->db->query($sql,__LINE__,__FILE__);
+                                       
$this->db->query($sql,__LINE__,__FILE__);
                                }
                        }
 
-/*
-                       $value_set['in_progress_date']  = time();
-                       $value_set['closed_date']               = time();
-                       $value_set['delivered_date']    = time();
-*/
+                       $consume_data = array();
 
-                       for ($i=13; $i<27; $i++)
+                       $j = 0;
+                       for ($i=22; $i<36; $i++)
                        {
                                $data[$i] = str_replace(',', '', $data[$i]);
-                       }
 
-                       $consume_data = array();
-                       if($data[13] && ctype_digit($data[13]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[13],
-                                        'date' => strtotime("2012/06/24")
-                               );
+                               $year = 2012 - $j;
+                               $j++;
+                               if($data[$i] && ctype_digit($data[$i]))
+                               {
+                                       $consume_data[] = array
+                                       (
+                                                'value' => (int)$data[$i],
+                                                'date' => 
strtotime("{$year}/06/24")
+                                       );
+                               }
                        }
 
-                       if($data[14] && ctype_digit($data[14]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[14],
-                                        'date' => strtotime("2011/06/24")
-                               );
-                       }
-                       if($data[15] && ctype_digit($data[15]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[15],
-                                        'date' => strtotime("2010/06/24")
-                               );
-                       }
-                       if($data[16] && ctype_digit($data[16]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[16],
-                                        'date' => strtotime("2009/06/24")
-                               );
-                       }
-                       if($data[17] && ctype_digit($data[17]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[17],
-                                        'date' => strtotime("2008/06/24")
-                               );
-                       }
-
-                       if($data[18] && ctype_digit($data[18]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[18],
-                                        'date' => strtotime("2007/06/24")
-                               );
-                       }
-                       if($data[19] && ctype_digit($data[19]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[19],
-                                        'date' => strtotime("2006/06/24")
-                               );
-                       }
-                       if($data[20] && ctype_digit($data[20]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[20],
-                                        'date' => strtotime("2005/06/24")
-                               );
-                       }
-                       if($data[21] && ctype_digit($data[21]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[21],
-                                        'date' => strtotime("2004/06/24")
-                               );
-                       }
-
-                       if($data[22] && ctype_digit($data[22]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[22],
-                                        'date' => strtotime("2003/06/24")
-                               );
-                       }
-                       if($data[23] && ctype_digit($data[23]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[23],
-                                        'date' => strtotime("2002/06/24")
-                               );
-                       }
-                       if($data[24] && ctype_digit($data[24]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[24],
-                                        'date' => strtotime("2001/06/24")
-                               );
-                       }
-
-                       if($data[25] && ctype_digit($data[25]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[25],
-                                        'date' => strtotime("2000/06/24")
-                               );
-                       }
-
-                       if($data[26] && ctype_digit($data[26]))
-                       {
-                               $consume_data[] = array
-                               (
-                                        'value' => (int)$data[26],
-                                        'date' => strtotime("1999/06/24")
-                               );
-                       }
-
-
                        foreach ($consume_data as $consume)
                        {
                                $sql = "INSERT INTO fm_request_consume 
(request_id,amount,date,user_id,entry_date) "
@@ -320,28 +270,26 @@
                                        . (int)$consume['date'] . ","
                                        . $this->account . ","
                                        . time() . ")";
+
                                if($debug)
                                {
                                        _debug_array($sql);
                                }
                                else
                                {
-//                                     
$this->db->query($sql,__LINE__,__FILE__);
+                                       
$this->db->query($sql,__LINE__,__FILE__);
                                }
                        }
 
 
-//                     $this->db->query("UPDATE fm_idgenerator set value = 
value + 1 where name = 'request'");
-
-
                        if(!$error)
                        {
-                               $this->messages[] = "Successfully imported 
location: Title ({$data[1]})";
+                               $this->messages[] = "Successfully imported 
location: Title ({$data[20]})";
                                $ok = true;
                        }
                        else
                        {
-                               $this->errors[] = "Error importing location: 
Title ({$data[1]})";
+                               $this->errors[] = "Error importing location: 
Title ({$data[20]})";
                                $ok = false;
                        }
                        return $ok;

Modified: 
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
===================================================================
--- 
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
  2011-08-21 15:10:11 UTC (rev 7517)
+++ 
branches/Version-1_0-branch/property/tutorials/property/examples/install.apache.sh
  2011-08-21 15:12:37 UTC (rev 7518)
@@ -54,8 +54,8 @@
 #  * @var               string PHP, PHPTAR
 #  * Download: http://httpd.apache.org/
 #  */
-PHPTAR="php-5.3.5.tar.bz2"
-PHP="php-5.3.5"
+PHPTAR="php-5.3.7.tar.bz2"
+PHP="php-5.3.7"
 
 #/**
 #  * Name of the EACCELERATOR tarball e.g eaccelerator-0.9.5.tar.bz2
@@ -160,7 +160,7 @@
     IMAP_CONFIG="--with-imap=/opt/web/$IMAP --with-imap-ssl"
     echo $IMAP_CONFIG
     else
-    echo "Skipping Oracle"
+    echo "Skipping IMAP"
 fi
 
 # include the MSSQL/SYBASE-support in the install




reply via email to

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