[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [12034] api: custom functions
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [12034] api: custom functions |
Date: |
Mon, 30 Jun 2014 07:37:27 +0000 |
Revision: 12034
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=12034
Author: sigurdne
Date: 2014-06-30 07:37:26 +0000 (Mon, 30 Jun 2014)
Log Message:
-----------
api: custom functions
Modified Paths:
--------------
trunk/phpgwapi/inc/class.custom_functions.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_functions.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.custom_functions.inc.php 2014-06-30 07:36:23 UTC
(rev 12033)
+++ trunk/phpgwapi/inc/class.custom_functions.inc.php 2014-06-30 07:37:26 UTC
(rev 12034)
@@ -130,6 +130,7 @@
'file_name' =>
$this->_db->db_addslashes($custom_function['custom_function_file']),
'descr' =>
$this->_db->db_addslashes($custom_function['descr']),
'active' =>
!!$custom_function['active'],
+ 'pre_commit' =>
!!$custom_function['pre_commit'],
'client_side' =>
!!$custom_function['client_side'],
'custom_sort' => $custom_sort
);
@@ -218,6 +219,7 @@
'descr' =>
$this->_db->db_addslashes($custom_function['descr']),
'file_name' =>
$custom_function['custom_function_file'],
'active' =>
$custom_function['active'],
+ 'pre_commit' =>
$custom_function['pre_commit'],
'client_side' =>
$custom_function['client_side'],
);
unset($custom_function);
@@ -320,6 +322,7 @@
'sorting' =>
$this->_db->f('custom_sort'),
'descr' =>
$this->_db->f('descr'),
'active' =>
!!$this->_db->f('active'),
+ 'pre_commit' =>
!!$this->_db->f('pre_commit'),
'client_side' =>
!!$this->_db->f('client_side')
);
}
@@ -362,6 +365,7 @@
'descr' =>
$this->_db->f('descr', true),
'custom_function_file' =>
$this->_db->f('file_name'),
'active' =>
!!$this->_db->f('active'),
+ 'pre_commit' =>
!!$this->_db->f('pre_commit'),
'client_side' =>
!!$this->_db->f('client_side')
);
}
Modified: trunk/phpgwapi/setup/setup.inc.php
===================================================================
--- trunk/phpgwapi/setup/setup.inc.php 2014-06-30 07:36:23 UTC (rev 12033)
+++ trunk/phpgwapi/setup/setup.inc.php 2014-06-30 07:37:26 UTC (rev 12034)
@@ -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.545';
+ $setup_info['phpgwapi']['version'] = '0.9.17.546';
$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 2014-06-30 07:36:23 UTC (rev
12033)
+++ trunk/phpgwapi/setup/tables_current.inc.php 2014-06-30 07:37:26 UTC (rev
12034)
@@ -632,6 +632,7 @@
'descr' => array('type' => 'text','nullable' =>
true),
'file_name' => array('type' =>
'varchar','precision' => 255,'nullable' => false),
'active' => array('type' => 'int','precision'
=> 2,'nullable' => true),
+ 'pre_commit' => array('type' =>
'int','precision' => 2,'nullable' => true),//otherwise: post commit
'client_side' => array('type' =>
'int','precision' => 2,'nullable' => true),//otherwise: server-side
'custom_sort' => array('type' =>
'int','precision' => 4,'nullable' => true)
),
Modified: trunk/phpgwapi/setup/tables_update.inc.php
===================================================================
--- trunk/phpgwapi/setup/tables_update.inc.php 2014-06-30 07:36:23 UTC (rev
12033)
+++ trunk/phpgwapi/setup/tables_update.inc.php 2014-06-30 07:37:26 UTC (rev
12034)
@@ -3232,3 +3232,26 @@
}
}
+ $test[] = '0.9.17.545';
+ /**
+ * Add option on pre/post commit on custom functions - when to include
function
+ *
+ * @return string the new version number
+ */
+ function phpgwapi_upgrade0_9_17_545()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ //otherwise: post commit
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('phpgw_cust_function','pre_commit',
array(
+ 'type' => 'int',
+ 'precision' => 2,
+ 'nullable' => true
+ ));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['phpgwapi']['currentver'] =
'0.9.17.546';
+ return $GLOBALS['setup_info']['phpgwapi']['currentver'];
+ }
+ }
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [12034] api: custom functions,
Sigurd Nes <=