fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [12672] Syncromind: Merge 12603:12670 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [12672] Syncromind: Merge 12603:12670 from trunk
Date: Thu, 29 Jan 2015 19:50:09 +0000

Revision: 12672
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12672
Author:   sigurdne
Date:     2015-01-29 19:50:08 +0000 (Thu, 29 Jan 2015)
Log Message:
-----------
Syncromind: Merge 12603:12670 from trunk

Modified Paths:
--------------
    branches/dev-syncromind/property/inc/class.menu.inc.php
    branches/dev-syncromind/property/inc/class.sogeneric.inc.php
    branches/dev-syncromind/property/setup/setup.inc.php
    branches/dev-syncromind/property/setup/tables_current.inc.php
    branches/dev-syncromind/property/setup/tables_update.inc.php
    branches/dev-syncromind/rental/inc/SnappyPdf.php
    branches/dev-syncromind/rental/inc/class.uicomposite.inc.php

Property Changed:
----------------
    branches/dev-syncromind/


Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602
   + 
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670

Modified: branches/dev-syncromind/property/inc/class.menu.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.menu.inc.php     2015-01-29 
19:45:43 UTC (rev 12671)
+++ branches/dev-syncromind/property/inc/class.menu.inc.php     2015-01-29 
19:50:08 UTC (rev 12672)
@@ -586,6 +586,11 @@
                                                        'text'  => lang('Unit'),
                                                        'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index', 'type' => 'unit') )
                                                ),
+                                               'ns3420'        => array
+                                               (
+                                                       'text'  => 
lang('ns3420'),
+                                                       'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.index', 'type' => 'ns3420') )
+                                               ),
                                                'key_location'  => array
                                                (
                                                        'text'  => lang('Key 
location'),

Modified: branches/dev-syncromind/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.sogeneric.inc.php        
2015-01-29 19:45:43 UTC (rev 12671)
+++ branches/dev-syncromind/property/inc/class.sogeneric.inc.php        
2015-01-29 19:50:08 UTC (rev 12672)
@@ -1498,6 +1498,85 @@
                                                'menu_selection'        => 
'admin::property::document_status'
                                        );
                                break;
+                       case 'ns3420':
+                               $info = array
+                                       (
+                                               'table'                         
=> 'fm_ns3420',
+                                               'id'                            
=> array('name' => 'id', 'type' => 'varchar'),
+                                               'fields'                        
=> array
+                                               (
+                                                       array
+                                                       (
+                                                               'name'          
        => 'parent_id',
+                                                               'descr'         
        => lang('parent'),
+                                                               'type'          
        => 'select',
+                                                               'sortable'      
        => true,
+                                                               'nullable'      
        => true,
+                                                               'filter'        
        => false,
+                                                               'role'          
        => 'parent',
+                                                               'values_def'    
=> array
+                                                               (
+                                                                       
'valueset'              => false,
+                                                                       
'method'                => 'property.bogeneric.get_list',
+                                                                       
'method_input'  => array('type' => 'ns3420', 'role' => 'parent', 'selected' => 
'##parent_id##',
+                                                                               
                                'id_in_name'=> 'num', 'mapping' => array('name' 
=> 'tekst1')
+                                                                               
                        )
+                                                               )
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 'num',
+                                                               'descr' => 
lang('num'),
+                                                               'type' => 
'varchar',
+                                                               'nullable'      
=> false,
+                                                               'sortable'      
=> true
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'tekst1',
+                                                               'descr' => 
'tekst1',
+                                                               'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'tekst2',
+                                                               'descr' => 
'tekst2',
+                                                               'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'tekst3',
+                                                               'descr' => 
'tekst3',
+                                                               'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'tekst4',
+                                                               'descr' => 
'tekst4',
+                                                               'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'tekst5',
+                                                               'descr' => 
'tekst5',
+                                                               'type' => 
'varchar'
+                                                       ),
+                                                       array
+                                                       (
+                                                               'name' => 
'tekst6',
+                                                               'descr' => 
'tekst6',
+                                                               'type' => 
'varchar'
+                                                       )
+                                               ),
+                                               'edit_msg'                      
=> lang('edit'),
+                                               'add_msg'                       
=> lang('add'),
+                                               'name'                          
=> lang('ns3420'),
+                                               'acl_app'                       
=> 'property',
+                                               'acl_location'          => 
'.admin',
+                                               'menu_selection'        => 
'admin::property::ns3420',
+                                               'check_grant'           => false
+                                       );
+                               break;
                        case 'unit':
                                $info = array
                                        (

Modified: branches/dev-syncromind/property/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/setup.inc.php        2015-01-29 
19:45:43 UTC (rev 12671)
+++ branches/dev-syncromind/property/setup/setup.inc.php        2015-01-29 
19:50:08 UTC (rev 12672)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.686';
+       $setup_info['property']['version']              = '0.9.17.687';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: branches/dev-syncromind/property/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/tables_current.inc.php       
2015-01-29 19:45:43 UTC (rev 12671)
+++ branches/dev-syncromind/property/setup/tables_current.inc.php       
2015-01-29 19:50:08 UTC (rev 12672)
@@ -982,21 +982,22 @@
                ),
                'fm_ns3420' => array(
                        'fd' => array(
-                               'id' => array('type' => 'varchar','precision' 
=> '20','nullable' => False),
+                               'id' => array('type' => 'int','precision' => 
'4','nullable' => False),
+                               'num' => array('type' => 'varchar','precision' 
=> '20','nullable' => False),
+                               'parent_id' => array('type' => 
'int','precision' => '4','nullable' => True),
+                               'enhet' => array('type' => 
'varchar','precision' => '6','nullable' => True),
                                'tekst1' => array('type' => 
'varchar','precision' => '50','nullable' => True),
-                               'enhet' => array('type' => 
'varchar','precision' => '6','nullable' => True),
                                'tekst2' => array('type' => 
'varchar','precision' => '50','nullable' => True),
                                'tekst3' => array('type' => 
'varchar','precision' => '50','nullable' => True),
                                'tekst4' => array('type' => 
'varchar','precision' => '50','nullable' => True),
                                'tekst5' => array('type' => 
'varchar','precision' => '50','nullable' => True),
                                'tekst6' => array('type' => 
'varchar','precision' => '50','nullable' => True),
-                               'parent' => array('type' => 
'varchar','precision' => '20','nullable' => True),
                                'type' => array('type' => 'varchar','precision' 
=> '20','nullable' => True)
                        ),
                        'pk' => array('id'),
                        'fk' => array(),
                        'ix' => array(),
-                       'uc' => array()
+                       'uc' => array('name')
                ),
                'fm_tts_status' => array(
                        'fd' => array(

Modified: branches/dev-syncromind/property/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/tables_update.inc.php        
2015-01-29 19:45:43 UTC (rev 12671)
+++ branches/dev-syncromind/property/setup/tables_update.inc.php        
2015-01-29 19:50:08 UTC (rev 12672)
@@ -8169,7 +8169,7 @@
 
        /**
        * Update property version from 0.9.17.685 to 0.9.17.686
-       * Convert id from character ti integer for fm_vendor_category::id
+       * Convert id from character to integer for fm_vendor_category::id
        */
        $test[] = '0.9.17.685';
        function property_upgrade0_9_17_685()
@@ -8234,3 +8234,74 @@
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
+
+       /**
+       * Update property version from 0.9.17.686 to 0.9.17.687
+       * Convert ns3420 table
+       */
+       $test[] = '0.9.17.686';
+       function property_upgrade0_9_17_686()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM fm_ns3420 
ORDER BY id");
+
+               $ns3420 = array();
+               $id = 1;
+
+               while ($GLOBALS['phpgw_setup']->oProc->next_record())
+               {
+                       $ns3420[]=array
+                       (
+                               'id' => $id,
+                               'num' => 
$GLOBALS['phpgw_setup']->oProc->f('id'),
+                               'enhet' => 
$GLOBALS['phpgw_setup']->oProc->f('enhet'),
+                               'tekst1' => 
$GLOBALS['phpgw_setup']->oProc->f('tekst1'),
+                               'tekst2' => 
$GLOBALS['phpgw_setup']->oProc->f('tekst2'),
+                               'tekst3' => 
$GLOBALS['phpgw_setup']->oProc->f('tekst3'),
+                               'tekst4' => 
$GLOBALS['phpgw_setup']->oProc->f('tekst4'),
+                               'tekst5' => 
$GLOBALS['phpgw_setup']->oProc->f('tekst5'),
+                               'tekst6' => 
$GLOBALS['phpgw_setup']->oProc->f('tekst6'),
+                       );
+                       $id ++;
+               }
+
+               $GLOBALS['phpgw_setup']->oProc->DropTable('fm_ns3420');
+
+               $GLOBALS['phpgw_setup']->oProc->CreateTable(
+                       'fm_ns3420', array(
+                               'fd' => array(
+                                       'id' => array('type' => 
'int','precision' => '4','nullable' => False),
+                                       'num' => array('type' => 
'varchar','precision' => '20','nullable' => False),
+                                       'parent_id' => array('type' => 
'int','precision' => '4','nullable' => True),
+                                       'enhet' => array('type' => 
'varchar','precision' => '6','nullable' => True),
+                                       'tekst1' => array('type' => 
'varchar','precision' => '50','nullable' => True),
+                                       'tekst2' => array('type' => 
'varchar','precision' => '50','nullable' => True),
+                                       'tekst3' => array('type' => 
'varchar','precision' => '50','nullable' => True),
+                                       'tekst4' => array('type' => 
'varchar','precision' => '50','nullable' => True),
+                                       'tekst5' => array('type' => 
'varchar','precision' => '50','nullable' => True),
+                                       'tekst6' => array('type' => 
'varchar','precision' => '50','nullable' => True),
+                                       'type' => array('type' => 
'varchar','precision' => '20','nullable' => True)
+                               ),
+                               'pk' => array('id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array('num')
+                       )
+               );
+
+               foreach ($ns3420 as $value_set)
+               {
+                       $cols = implode(',', array_keys($value_set));
+                       $values = 
$GLOBALS['phpgw_setup']->oProc->validate_insert(array_values($value_set));
+                       $sql = "INSERT INTO fm_ns3420 ({$cols}) VALUES 
({$values})";
+                       
$GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+               }
+       
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.687';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }

Modified: branches/dev-syncromind/rental/inc/SnappyPdf.php
===================================================================
--- branches/dev-syncromind/rental/inc/SnappyPdf.php    2015-01-29 19:45:43 UTC 
(rev 12671)
+++ branches/dev-syncromind/rental/inc/SnappyPdf.php    2015-01-29 19:50:08 UTC 
(rev 12672)
@@ -36,8 +36,7 @@
         'lowquality' => true,
         'username' => null,
         'password' => null,
-        'minimum-font-size'    => 16,
+        'minimum-font-size'    => 12,
     );
     
-}
-?>
+}
\ No newline at end of file

Modified: branches/dev-syncromind/rental/inc/class.uicomposite.inc.php
===================================================================
--- branches/dev-syncromind/rental/inc/class.uicomposite.inc.php        
2015-01-29 19:45:43 UTC (rev 12671)
+++ branches/dev-syncromind/rental/inc/class.uicomposite.inc.php        
2015-01-29 19:50:08 UTC (rev 12672)
@@ -109,6 +109,10 @@
                        foreach($result_objects as $result) {
                                if(isset($result))
                                {
+                                       if(!$result->is_active())
+                                       {
+                                               $result->set_status('Ikke i 
drift');
+                                       }
                                        $rows[] = $result->serialize();
                                }
                        }
@@ -119,10 +123,29 @@
                        $editable = phpgw::get_var('editable') == 'true' ? true 
: false;
                        
                        $contract_types = 
rental_socontract::get_instance()->get_fields_of_responsibility();
+
+                       $config = CreateObject('phpgwapi.config','rental');
+                       $config->read();
+                       $valid_contract_types = array();
+                       if(isset($config->config_data['contract_types']) && 
is_array($config->config_data['contract_types']))
+                       {
+                               foreach ($config->config_data['contract_types'] 
as $_key => $_value)
+                               {
+                                       if($_value)
+                                       {
+                                               $valid_contract_types[] = 
$_value;
+                                       }
+                               }
+                       }
+
                        
                        $create_types = array();
                        foreach($contract_types as $id => $label)
                        {
+                               if($valid_contract_types && 
!in_array($id,$valid_contract_types))
+                               {
+                                       continue;
+                               }
        
                                $names = $this->locations->get_name($id);
                                if($names['appname'] == 
$GLOBALS['phpgw_info']['flags']['currentapp'])




reply via email to

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