[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13989] property: add modify info
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13989] property: add modify info |
Date: |
Tue, 22 Sep 2015 11:33:16 +0000 |
Revision: 13989
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13989
Author: sigurdne
Date: 2015-09-22 11:33:14 +0000 (Tue, 22 Sep 2015)
Log Message:
-----------
property: add modify info
Modified Paths:
--------------
trunk/bim/setup/setup.inc.php
trunk/bim/setup/tables_current.inc.php
trunk/bim/setup/tables_update.inc.php
trunk/catch/setup/setup.inc.php
trunk/catch/setup/tables_current.inc.php
trunk/catch/setup/tables_update.inc.php
trunk/property/inc/class.soadmin_entity.inc.php
trunk/property/inc/class.soentity.inc.php
trunk/property/setup/phpgw_no.lang
trunk/property/setup/setup.inc.php
trunk/property/setup/tables_current.inc.php
trunk/property/setup/tables_update.inc.php
Modified: trunk/bim/setup/setup.inc.php
===================================================================
--- trunk/bim/setup/setup.inc.php 2015-09-22 00:27:54 UTC (rev 13988)
+++ trunk/bim/setup/setup.inc.php 2015-09-22 11:33:14 UTC (rev 13989)
@@ -12,7 +12,7 @@
*/
$setup_info['bim']['name'] = 'bim';
- $setup_info['bim']['version'] = '0.9.17.509';
+ $setup_info['bim']['version'] = '0.9.17.510';
$setup_info['bim']['app_order'] = 8;
$setup_info['bim']['enable'] = 1;
$setup_info['bim']['app_group'] = 'office';
Modified: trunk/bim/setup/tables_current.inc.php
===================================================================
--- trunk/bim/setup/tables_current.inc.php 2015-09-22 00:27:54 UTC (rev
13988)
+++ trunk/bim/setup/tables_current.inc.php 2015-09-22 11:33:14 UTC (rev
13989)
@@ -62,6 +62,8 @@
'user_id' => array('type' => 'int','precision'
=> '4','nullable' => True),
'org_unit_id' => array('type' =>
'int','precision' => '4','nullable' => True),
'entity_group_id' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'int','precision' => 8,'nullable' => true),
),
'pk' => array('type','id'),
'fk' => array(
Modified: trunk/bim/setup/tables_update.inc.php
===================================================================
--- trunk/bim/setup/tables_update.inc.php 2015-09-22 00:27:54 UTC (rev
13988)
+++ trunk/bim/setup/tables_update.inc.php 2015-09-22 11:33:14 UTC (rev
13989)
@@ -216,4 +216,22 @@
$GLOBALS['setup_info']['bim']['currentver'] =
'0.9.17.509';
return $GLOBALS['setup_info']['bim']['currentver'];
}
+ }
+
+ /**
+ * Update bim version from 0.9.17.509 to 0.9.17.510
+ */
+ $test[] = '0.9.17.509';
+ function bim_upgrade0_9_17_509()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_bim_item','modified_by',
array('type' => 'int', 'precision' => 4,'nullable' => true));
+
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_bim_item','modified_on',
array('type' => 'int', 'precision' => 8,'nullable' => true));
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['bim']['currentver'] =
'0.9.17.510';
+ return $GLOBALS['setup_info']['bim']['currentver'];
+ }
}
\ No newline at end of file
Modified: trunk/catch/setup/setup.inc.php
===================================================================
--- trunk/catch/setup/setup.inc.php 2015-09-22 00:27:54 UTC (rev 13988)
+++ trunk/catch/setup/setup.inc.php 2015-09-22 11:33:14 UTC (rev 13989)
@@ -27,7 +27,7 @@
*/
$setup_info['catch']['name'] = 'catch';
- $setup_info['catch']['version'] = '0.9.17.520';
+ $setup_info['catch']['version'] = '0.9.17.521';
$setup_info['catch']['app_order'] = 20;
$setup_info['catch']['enable'] = 1;
$setup_info['catch']['globals_checked'] = True;
Modified: trunk/catch/setup/tables_current.inc.php
===================================================================
--- trunk/catch/setup/tables_current.inc.php 2015-09-22 00:27:54 UTC (rev
13988)
+++ trunk/catch/setup/tables_current.inc.php 2015-09-22 11:33:14 UTC (rev
13989)
@@ -145,7 +145,9 @@
'entry_date' => array('type' =>
'int','precision' => '4','nullable' => True),
'user_id' => array('type' => 'int','precision'
=> '4','nullable' => True),
'unitid' => array('type' =>
'varchar','precision' => '50','nullable' => False),
- 'user_' => array('type' => 'int','precision' =>
'4','nullable' => False)
+ 'user_' => array('type' => 'int','precision' =>
'4','nullable' => False),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'int','precision' => 8,'nullable' => true),
),
'pk' => array('id'),
'fk' => array(),
Modified: trunk/catch/setup/tables_update.inc.php
===================================================================
--- trunk/catch/setup/tables_update.inc.php 2015-09-22 00:27:54 UTC (rev
13988)
+++ trunk/catch/setup/tables_update.inc.php 2015-09-22 11:33:14 UTC (rev
13989)
@@ -621,3 +621,39 @@
return $GLOBALS['setup_info']['catch']['currentver'];
}
}
+
+ $test[] = '0.9.17.520';
+ function catch_upgrade0_9_17_520()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM
fm_catch_category");
+
+ $categories = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $categories[] = array
+ (
+ 'entity_id' =>
$GLOBALS['phpgw_setup']->oProc->f('entity_id'),
+ 'cat_id' =>
$GLOBALS['phpgw_setup']->oProc->f('id')
+ );
+ }
+
+ $tables = $GLOBALS['phpgw_setup']->oProc->m_odb->table_names();
+
+ foreach ($categories as $category)
+ {
+ $table =
"fm_catch_{$category['entity_id']}_{$category['cat_id']}";
+ if(in_array($table, $tables))
+ {
+
$GLOBALS['phpgw_setup']->oProc->AddColumn($table,'modified_by', array('type' =>
'int', 'precision' => 4,'nullable' => true));
+
$GLOBALS['phpgw_setup']->oProc->AddColumn($table,'modified_on', array('type' =>
'int', 'precision' => 8,'nullable' => true));
+ }
+ }
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['catch']['currentver'] =
'0.9.17.521';
+ return $GLOBALS['setup_info']['catch']['currentver'];
+ }
+ }
\ No newline at end of file
Modified: trunk/property/inc/class.soadmin_entity.inc.php
===================================================================
--- trunk/property/inc/class.soadmin_entity.inc.php 2015-09-22 00:27:54 UTC
(rev 13988)
+++ trunk/property/inc/class.soadmin_entity.inc.php 2015-09-22 11:33:14 UTC
(rev 13989)
@@ -600,10 +600,12 @@
$fd['contact_phone'] = array('type' => 'varchar',
'precision' => 30, 'nullable' => true);
// $fd['status'] = array('type' => 'int', 'precision' =>
4, 'nullable' => true);
- $fd['entry_date'] = array('type' => 'int', 'precision'
=> 4, 'nullable' => true);
+ $fd['entry_date'] = array('type' => 'int', 'precision'
=> 8, 'nullable' => true);
$fd['user_id'] = array('type' => 'int', 'precision' =>
4, 'nullable' => true);
$fd['org_unit_id'] = array('type' => 'int', 'precision'
=> 4, 'nullable' => true);
$fd['entity_group_id'] = array('type' => 'int',
'precision' => 4, 'nullable' => true);
+ $fd['modified_by'] = array('type' => 'int', 'precision'
=> 4, 'nullable' => true);
+ $fd['modified_on'] = array('type' => 'int', 'precision'
=> 8, 'nullable' => true);
return $fd;
}
Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php 2015-09-22 00:27:54 UTC (rev
13988)
+++ trunk/property/inc/class.soentity.inc.php 2015-09-22 11:33:14 UTC (rev
13989)
@@ -49,6 +49,7 @@
'entity' => 'property',
'catch' => 'catch'
);
+ private $account;
function __construct($entity_id='',$cat_id='')
{
@@ -953,6 +954,7 @@
'get_single_function_input'
=> $uicols['get_single_function_input'][$key]
);
}
+ unset($key);
//Start: get short descripion - if any
@@ -1279,6 +1281,17 @@
$uicols['formatter'][] = '';
$uicols['classname'][] = '';
+
+ $uicols['input_type'][] = 'text';
+ $uicols['name'][] =
'modified_on';
+ $uicols['descr'][] =
lang('modified on');
+ $uicols['statustext'][] = lang('date' );
+ $uicols['datatype'][] = 'timestamp';
+ $uicols['sortable'][] = true;
+ $uicols['exchange'][] = false;
+ $uicols['formatter'][] = '';
+ $uicols['classname'][] = '';
+
$uicols['cols_return_extra'][$i] = array
(
'name' => 'entry_date',
@@ -2314,7 +2327,9 @@
'loc1' =>
$data['loc1'],
'address' =>
$data['address'],
'org_unit_id' =>
$data['org_unit_id'],
- 'entity_group_id' =>
$data['entity_group_id']
+ 'entity_group_id' =>
$data['entity_group_id'],
+ 'modified_by' =>
$this->account,
+ 'modified_on' => time()
);
$value_set =
$this->db->validate_update($value_set);
@@ -2486,6 +2501,9 @@
$value_set['p_num'] = $p_id;
}
+ $value_set['modified_by'] =
$this->account;
+ $value_set['modified_on'] = time();
+
$value_set =
$this->db->validate_update($value_set);
$this->db->query("UPDATE $table set $value_set
WHERE id=" . $values['id'],__LINE__,__FILE__);
}
Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang 2015-09-22 00:27:54 UTC (rev 13988)
+++ trunk/property/setup/phpgw_no.lang 2015-09-22 11:33:14 UTC (rev 13989)
@@ -2043,4 +2043,5 @@
tender delay property no Forsinket tilbud
enable bulk common no Aktiver bulk
enable controller common no Aktiver Kontroll
-entity group common no RegisterGruppe
\ No newline at end of file
+entity group common no RegisterGruppe
+modified on common no Oppdatert
\ No newline at end of file
Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php 2015-09-22 00:27:54 UTC (rev 13988)
+++ trunk/property/setup/setup.inc.php 2015-09-22 11:33:14 UTC (rev 13989)
@@ -12,7 +12,7 @@
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.693';
+ $setup_info['property']['version'] = '0.9.17.694';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: trunk/property/setup/tables_current.inc.php
===================================================================
--- trunk/property/setup/tables_current.inc.php 2015-09-22 00:27:54 UTC (rev
13988)
+++ trunk/property/setup/tables_current.inc.php 2015-09-22 11:33:14 UTC (rev
13989)
@@ -2046,7 +2046,9 @@
'category' => array('type' => 'int','precision'
=> '4','nullable' => False),
'ext_system_id' => array('type' =>
'varchar','precision' => '20','nullable' => False),
'maaler_nr' => array('type' =>
'varchar','precision' => '20','nullable' => False),
- 'remark' => array('type' =>
'varchar','precision' => '255','nullable' => True)
+ 'remark' => array('type' =>
'varchar','precision' => '255','nullable' => True),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'int','precision' => 8,'nullable' => true),
),
'pk' => array('id'),
'fk' => array(),
@@ -2076,7 +2078,9 @@
'attribute2' => array('type' =>
'timestamp','nullable' => True),
'attribute3' => array('type' =>
'int','precision' => '4','nullable' => True),
'attribute4' => array('type' =>
'text','nullable' => True),
- 'attribute5' => array('type' =>
'int','precision' => '4','nullable' => True)
+ 'attribute5' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'int','precision' => 8,'nullable' => true),
),
'pk' => array('id'),
'fk' => array(),
@@ -2105,7 +2109,9 @@
'attribute2' => array('type' =>
'timestamp','nullable' => True),
'attribute3' => array('type' =>
'int','precision' => '4','nullable' => True),
'attribute4' => array('type' =>
'text','nullable' => True),
- 'attribute5' => array('type' =>
'int','precision' => '4','nullable' => True)
+ 'attribute5' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'int','precision' => 8,'nullable' => true),
),
'pk' => array('id'),
'fk' => array(),
@@ -2134,7 +2140,9 @@
'attribute2' => array('type' =>
'timestamp','nullable' => True),
'attribute3' => array('type' =>
'int','precision' => '4','nullable' => True),
'attribute4' => array('type' =>
'text','nullable' => True),
- 'attribute5' => array('type' =>
'int','precision' => '4','nullable' => True)
+ 'attribute5' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'int','precision' => 8,'nullable' => true),
),
'pk' => array('id'),
'fk' => array(),
@@ -2163,7 +2171,9 @@
'attribute2' => array('type' =>
'timestamp','nullable' => True),
'attribute3' => array('type' =>
'int','precision' => '4','nullable' => True),
'attribute4' => array('type' =>
'text','nullable' => True),
- 'attribute5' => array('type' =>
'int','precision' => '4','nullable' => True)
+ 'attribute5' => array('type' =>
'int','precision' => '4','nullable' => True),
+ 'modified_by' => array('type' =>
'int','precision' => 4,'nullable' => true),
+ 'modified_on' => array('type' =>
'int','precision' => 8,'nullable' => true),
),
'pk' => array('id'),
'fk' => array(),
Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php 2015-09-22 00:27:54 UTC (rev
13988)
+++ trunk/property/setup/tables_update.inc.php 2015-09-22 11:33:14 UTC (rev
13989)
@@ -8565,7 +8565,7 @@
}
/**
- * Update property version from 0.9.17.691 to 0.9.17.692
+ * Update property version from 0.9.17.692 to 0.9.17.693
* Alter field name.
*/
$test[] = '0.9.17.692';
@@ -8582,4 +8582,45 @@
$GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.693';
return $GLOBALS['setup_info']['property']['currentver'];
}
+ }
+
+ /**
+ * Update property version from 0.9.17.693 to 0.9.17.694
+ * Add modified info.
+ */
+ $test[] = '0.9.17.693';
+ function property_upgrade0_9_17_693()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+ $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+
+ $GLOBALS['phpgw_setup']->oProc->query("SELECT * FROM
fm_entity_category");
+
+ $categories = array();
+ while ($GLOBALS['phpgw_setup']->oProc->next_record())
+ {
+ $categories[] = array
+ (
+ 'entity_id' =>
$GLOBALS['phpgw_setup']->oProc->f('entity_id'),
+ 'cat_id' =>
$GLOBALS['phpgw_setup']->oProc->f('id')
+ );
+ }
+
+ $tables = $GLOBALS['phpgw_setup']->oProc->m_odb->table_names();
+
+ foreach ($categories as $category)
+ {
+ $table =
"fm_entity_{$category['entity_id']}_{$category['cat_id']}";
+ if(in_array($table, $tables))
+ {
+
$GLOBALS['phpgw_setup']->oProc->AddColumn($table,'modified_by', array('type' =>
'int', 'precision' => 4,'nullable' => true));
+
$GLOBALS['phpgw_setup']->oProc->AddColumn($table,'modified_on', array('type' =>
'int', 'precision' => 8,'nullable' => true));
+ }
+ }
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.694';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
}
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13989] property: add modify info,
Sigurd Nes <=