fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9549] api: custom fields: short_description


From: Sigurd Nes
Subject: [Fmsystem-commits] [9549] api: custom fields: short_description
Date: Mon, 11 Jun 2012 13:11:33 +0000

Revision: 9549
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9549
Author:   sigurdne
Date:     2012-06-11 13:11:32 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
api: custom fields: short_description

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.custom_fields.inc.php
    trunk/phpgwapi/setup/setup.inc.php
    trunk/phpgwapi/setup/tables_current.inc.php
    trunk/phpgwapi/setup/tables_update.inc.php

Modified: trunk/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.custom_fields.inc.php      2012-06-11 12:40:52 UTC 
(rev 9548)
+++ trunk/phpgwapi/inc/class.custom_fields.inc.php      2012-06-11 13:11:32 UTC 
(rev 9549)
@@ -276,7 +276,8 @@
                                'get_list_function'     => 
$attrib['get_list_function'],
                                'get_list_function_input' => 
$attrib['get_list_function_input'] ? 
$this->_db->db_addslashes(serialize($attrib['get_list_function_input'])) : '',
                                'get_single_function'   => 
$attrib['get_single_function'],
-                               'get_single_function_input' => 
$attrib['get_single_function_input'] ? 
$this->_db->db_addslashes(serialize($attrib['get_single_function_input'])) : ''
+                               'get_single_function_input' => 
$attrib['get_single_function_input'] ? 
$this->_db->db_addslashes(serialize($attrib['get_single_function_input'])) : '',
+                               'short_description'                     => 
isset($attrib['short_description']) && $attrib['short_description'] ? (int) 
$attrib['short_description'] : false
                        );
 
                        if ( isset($attrib['search']) )
@@ -730,7 +731,8 @@
                                        'get_list_function'             => 
$attrib['get_list_function'],
                                        'get_list_function_input' => 
$attrib['get_list_function_input'] ? 
$this->_db->db_addslashes(serialize($attrib['get_list_function_input'])) : '',
                                        'get_single_function'           => 
$attrib['get_single_function'],
-                                       'get_single_function_input' => 
$attrib['get_single_function_input'] ? 
$this->_db->db_addslashes(serialize($attrib['get_single_function_input'])) : ''
+                                       'get_single_function_input' => 
$attrib['get_single_function_input'] ? 
$this->_db->db_addslashes(serialize($attrib['get_single_function_input'])) : '',
+                                       'short_description'                     
=> isset($attrib['short_description']) && $attrib['short_description'] ? (int) 
$attrib['short_description'] : false
                                );
 
                                if($OldGroup != $attrib['group_id'])
@@ -1045,6 +1047,7 @@
                                        'get_list_function_input' => 
$this->_db->f('get_list_function_input') ? 
unserialize($this->_db->f('get_list_function_input', true)) : '',
                                        'get_single_function'           => 
$this->_db->f('get_single_function'),
                                        'get_single_function_input' => 
$this->_db->f('get_single_function_input') ? 
unserialize($this->_db->f('get_single_function_input', true)) : '',
+                                       'short_description'                     
=> $this->_db->f('short_description')
 
                                );
                        }
@@ -1229,16 +1232,16 @@
                                'get_list_function_input' => 
$this->_db->f('get_list_function_input') ? 
unserialize($this->_db->f('get_list_function_input', true)) : '',
                                'get_single_function'           
=>$this->_db->f('get_single_function',true),
                                'get_single_function_input' => 
$this->_db->f('get_single_function_input') ? 
unserialize($this->_db->f('get_single_function_input', true)) : '',
-
-                               'column_info'                   => array
-                                                                               
(
-                                                                               
        'precision'     => $this->_db->f('precision_'),
-                                                                               
        'scale'         => $this->_db->f('scale'),
-                                                                               
        'default'       => $this->_db->f('default_value', true),
-                                                                               
        // more duplicated values
-                                                                               
        'nullable'      => $this->_db->f('nullable'),
-                                                                               
        'type'          => $this->_db->f('datatype')
-                                                                               
)
+                               'short_description'                     => 
$this->_db->f('short_description'),
+                               'column_info'                           => array
+                                                                               
        (
+                                                                               
                'precision'     => $this->_db->f('precision_'),
+                                                                               
                'scale'         => $this->_db->f('scale'),
+                                                                               
                'default'       => $this->_db->f('default_value', true),
+                                                                               
                // more duplicated values
+                                                                               
                'nullable'      => $this->_db->f('nullable'),
+                                                                               
                'type'          => $this->_db->f('datatype')
+                                                                               
        )
                        );
 
                        if ( $inc_choices )

Modified: trunk/phpgwapi/setup/setup.inc.php
===================================================================
--- trunk/phpgwapi/setup/setup.inc.php  2012-06-11 12:40:52 UTC (rev 9548)
+++ trunk/phpgwapi/setup/setup.inc.php  2012-06-11 13:11:32 UTC (rev 9549)
@@ -12,7 +12,7 @@
        // Basic information about this app
        $setup_info['phpgwapi']['name']      = 'phpgwapi';
        $setup_info['phpgwapi']['title']     = 'phpgwapi';
-       $setup_info['phpgwapi']['version']   = '0.9.17.539';
+       $setup_info['phpgwapi']['version']   = '0.9.17.540';
        $setup_info['phpgwapi']['versions']['current_header'] = '1.31';
        $setup_info['phpgwapi']['versions']['system'] = '1.0';
        $setup_info['phpgwapi']['enable']    = 3;

Modified: trunk/phpgwapi/setup/tables_current.inc.php
===================================================================
--- trunk/phpgwapi/setup/tables_current.inc.php 2012-06-11 12:40:52 UTC (rev 
9548)
+++ trunk/phpgwapi/setup/tables_current.inc.php 2012-06-11 13:11:32 UTC (rev 
9549)
@@ -582,7 +582,8 @@
                                'get_list_function' => array('type' => 
'varchar','precision' => 255,'nullable' => true),
                                'get_list_function_input' => array('type' => 
'varchar','precision' => 255,'nullable' => true),
                                'get_single_function' => array('type' => 
'varchar','precision' => 255,'nullable' => true),
-                               'get_single_function_input' => array('type' => 
'varchar','precision' => 255,'nullable' => true)
+                               'get_single_function_input' => array('type' => 
'varchar','precision' => 255,'nullable' => true),
+                               'short_description' => array('type' => 
'int','precision' => 2,'nullable' => true)
                        ),
                        'pk' => array('location_id', 'id'),
                        'fk' => array(),

Modified: trunk/phpgwapi/setup/tables_update.inc.php
===================================================================
--- trunk/phpgwapi/setup/tables_update.inc.php  2012-06-11 12:40:52 UTC (rev 
9548)
+++ trunk/phpgwapi/setup/tables_update.inc.php  2012-06-11 13:11:32 UTC (rev 
9549)
@@ -3071,3 +3071,27 @@
                }
        }
 
+       $test[] = '0.9.17.539';
+       /**
+       * Add custom attibute type that allows attribute used as part of short 
description
+       *
+       * @return string the new version number
+       */
+       function phpgwapi_upgrade0_9_17_539()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_cust_attribute','short_description',
 array(
+                       'type' => 'int',
+                       'precision' => 2,
+                       'nullable' => true
+               ));
+
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['phpgwapi']['currentver'] = 
'0.9.17.540';
+                       return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+               }
+       }
+
+




reply via email to

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