[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15819] Stable: Merge 15815:15818 from trunk
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [15819] Stable: Merge 15815:15818 from trunk |
Date: |
Wed, 12 Oct 2016 17:25:26 +0000 (UTC) |
Revision: 15819
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15819
Author: sigurdne
Date: 2016-10-12 17:25:25 +0000 (Wed, 12 Oct 2016)
Log Message:
-----------
Stable: Merge 15815:15818 from trunk
Modified Paths:
--------------
branches/Version-2_0-branch/admin/inc/class.uiconfig.inc.php
branches/Version-2_0-branch/phpgwapi/inc/auth/class.auth_customsso.inc.php
branches/Version-2_0-branch/property/inc/class.bocommon.inc.php
branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
branches/Version-2_0-branch/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
branches/Version-2_0-branch/property/setup/setup.inc.php
branches/Version-2_0-branch/property/setup/tables_current.inc.php
branches/Version-2_0-branch/property/setup/tables_update.inc.php
Property Changed:
----------------
branches/Version-2_0-branch/
Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14933-15747
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814
+ /branches/dev-syncromind:13653
/branches/dev-syncromind-2:14933-15747
/branches/stavangerkommune:12743-12875,12986
/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818
Modified: branches/Version-2_0-branch/admin/inc/class.uiconfig.inc.php
===================================================================
--- branches/Version-2_0-branch/admin/inc/class.uiconfig.inc.php
2016-10-12 17:21:24 UTC (rev 15818)
+++ branches/Version-2_0-branch/admin/inc/class.uiconfig.inc.php
2016-10-12 17:25:25 UTC (rev 15819)
@@ -93,7 +93,7 @@
while (list($key,$config) =
each($_POST['newsettings']))
{
- if ($config)
+ if ($config || $config === '0')
{
if(isset($GLOBALS['phpgw_info']['server']['found_validation_hook']) &&
$GLOBALS['phpgw_info']['server']['found_validation_hook'] &&
function_exists($key))
{
Modified:
branches/Version-2_0-branch/phpgwapi/inc/auth/class.auth_customsso.inc.php
===================================================================
--- branches/Version-2_0-branch/phpgwapi/inc/auth/class.auth_customsso.inc.php
2016-10-12 17:21:24 UTC (rev 15818)
+++ branches/Version-2_0-branch/phpgwapi/inc/auth/class.auth_customsso.inc.php
2016-10-12 17:25:25 UTC (rev 15819)
@@ -108,18 +108,8 @@
$headers = getallheaders();
-// $headers['Osso-User-Dn'] =
'cn=02035701829,cn=users,dc=usrv,dc=ubergenkom,dc=no';// test
+ $fodsels_nr = $headers['uid'];
- $header_regular_expression = '/^cn=(.*),cn=users.*$/';
- $header_key = 'Osso-User-Dn';
- $matches = array();
-
preg_match_all($header_regular_expression,$headers[$header_key], $matches);
- $fodsels_nr = $matches[1][0];
-
- $uid = $headers['uid'];
-
- $fodsels_nr = $uid ? $uid : $fodsels_nr;
-
$sql = "SELECT BRUKERNAVN FROM V_AD_PERSON WHERE
FODSELSNR ='{$fodsels_nr}'";
$db->query($sql,__LINE__,__FILE__);
$db->next_record();
Modified: branches/Version-2_0-branch/property/inc/class.bocommon.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.bocommon.inc.php
2016-10-12 17:21:24 UTC (rev 15818)
+++ branches/Version-2_0-branch/property/inc/class.bocommon.inc.php
2016-10-12 17:25:25 UTC (rev 15819)
@@ -2526,7 +2526,8 @@
}
$sogeneric = CreateObject('property.sogeneric', $type);
- $values = $sogeneric->read(array('query' => $query));
+ $filter = array('active' => 1);
+ $values = $sogeneric->read(array('filter' =>
$filter,'query' => $query));
foreach ($values as &$value)
{
@@ -2579,7 +2580,8 @@
$query = phpgw::get_var('query');
$sogeneric = CreateObject('property.sogeneric', 'dimb');
- $values = $sogeneric->read(array('query' => $query));
+ $filter = array('active' => 1);
+ $values = $sogeneric->read(array('filter' =>
$filter,'query' => $query));
foreach ($values as &$value)
{
Modified: branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
===================================================================
--- branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
2016-10-12 17:21:24 UTC (rev 15818)
+++ branches/Version-2_0-branch/property/inc/class.sogeneric.inc.php
2016-10-12 17:25:25 UTC (rev 15819)
@@ -137,6 +137,17 @@
'get_single_value' => 'property.sogeneric.get_name',
'method_input' => array('type' => 'org_unit', 'selected' => '##org_unit_id##')
)
+ ),
+ array(
+ 'name' =>
'active',
+ 'descr' =>
lang('active'),
+ 'type' =>
'checkbox',
+ 'default' =>
'checked',
+ 'filter' =>
true,
+ 'sortable' =>
true,
+ 'values_def' =>
array(
+
'valueset' => array(array('id' => 1, 'name' => lang('active'))),
+ )
)
),
'custom_criteria' => array
Modified:
branches/Version-2_0-branch/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
===================================================================
---
branches/Version-2_0-branch/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
2016-10-12 17:21:24 UTC (rev 15818)
+++
branches/Version-2_0-branch/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
2016-10-12 17:25:25 UTC (rev 15819)
@@ -51,7 +51,7 @@
$fellesdata->set_debug($this->debug);
-
+ $fellesdata->update_dimb();
$fellesdata->get_org_unit_ids_from_top();
if ($this->debug)
@@ -328,6 +328,44 @@
$db->transaction_commit();
}
+ function update_dimb()
+ {
+ if (!$db = $this->get_db())
+ {
+ return;
+ }
+
+ $sql = "SELECT V_ANSVAR.ANSVAR,
V_ANSVAR.BESKRIVELSE,V_ANSVAR.STATUS, V_ORG_ENHET.ORG_ENHET_ID"
+ . " FROM V_ANSVAR JOIN V_ORG_ENHET ON
(V_ANSVAR.RESULTATENHET = V_ORG_ENHET.RESULTATENHET)";
+
+ $db->query($sql, __LINE__, __FILE__);
+ $values = array();
+ while ($db->next_record())
+ {
+ $values[] = array(
+ 'id' => (int)$db->f('ANSVAR'),
+ 'descr' =>
$GLOBALS['phpgw']->db->db_addslashes($db->f('BESKRIVELSE', true)),
+ 'active' => $db->f('STATUS') == 'C' ? 0
: 1,
+ 'org_unit_id' =>
(int)$db->f('ORG_ENHET_ID')
+ );
+ }
+
+ foreach ($values as $entry)
+ {
+ $GLOBALS['phpgw']->db->query("SELECT id FROM
fm_ecodimb WHERE id = {$entry['id']}", __LINE__, __FILE__);
+ if($GLOBALS['phpgw']->db->next_record())
+ {
+ $sql = "UPDATE fm_ecodimb SET descr =
'{$entry['descr']}', active = {$entry['active']}, org_unit_id =
{$entry['org_unit_id']} WHERE id = {$entry['id']}";
+ }
+ else
+ {
+ $sql = "INSERT INTO fm_ecodimb (id,
descr, active, org_unit_id)"
+ . " VALUES ({$entry['id']},
'{$entry['descr']}', {$entry['active']}, {$entry['org_unit_id']})";
+ }
+ $GLOBALS['phpgw']->db->query($sql, __LINE__,
__FILE__);
+ }
+ }
+
function get_org_unit_ids_from_top()
{
if (!$db = $this->get_db())
Modified: branches/Version-2_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/setup.inc.php 2016-10-12
17:21:24 UTC (rev 15818)
+++ branches/Version-2_0-branch/property/setup/setup.inc.php 2016-10-12
17:25:25 UTC (rev 15819)
@@ -11,7 +11,7 @@
* @version $Id$
*/
$setup_info['property']['name'] = 'property';
- $setup_info['property']['version'] = '0.9.17.706';
+ $setup_info['property']['version'] = '0.9.17.707';
$setup_info['property']['app_order'] = 8;
$setup_info['property']['enable'] = 1;
$setup_info['property']['app_group'] = 'office';
Modified: branches/Version-2_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_current.inc.php
2016-10-12 17:21:24 UTC (rev 15818)
+++ branches/Version-2_0-branch/property/setup/tables_current.inc.php
2016-10-12 17:25:25 UTC (rev 15819)
@@ -1453,6 +1453,7 @@
'id' => array('type' => 'int', 'precision' =>
'4', 'nullable' => False),
'descr' => array('type' => 'varchar',
'precision' => '50', 'nullable' => False),
'org_unit_id' => array('type' => 'int',
'precision' => '4', 'nullable' => False),
+ 'active' => array('type' => 'int', 'precision'
=> '2', 'nullable' => True, 'default' => 1),
),
'pk' => array('id'),
'ix' => array(),
Modified: branches/Version-2_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-2_0-branch/property/setup/tables_update.inc.php
2016-10-12 17:21:24 UTC (rev 15818)
+++ branches/Version-2_0-branch/property/setup/tables_update.inc.php
2016-10-12 17:25:25 UTC (rev 15819)
@@ -9346,3 +9346,32 @@
return $GLOBALS['setup_info']['property']['currentver'];
}
}
+
+ /**
+ * Update property version from 0.9.17.706 to 0.9.17.707
+ *
+ */
+ $test[] = '0.9.17.706';
+
+ function property_upgrade0_9_17_706()
+ {
+ $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+ $GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_ecodimb', 'id',
array('type' => 'int', 'precision' => '4', 'nullable' => False));
+
+ $GLOBALS['phpgw_setup']->oProc->AddColumn("fm_ecodimb",
'active', array(
+ 'type' => 'int',
+ 'precision' => 2,
+ 'nullable' => True,
+ 'default' => 1
+ )
+ );
+
+ if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+ {
+ $GLOBALS['setup_info']['property']['currentver'] =
'0.9.17.707';
+ return $GLOBALS['setup_info']['property']['currentver'];
+ }
+ }
+
+
\ No newline at end of file
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15819] Stable: Merge 15815:15818 from trunk,
sigurdne <=