fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14030] Syncromind: Merge 13977:14029 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [14030] Syncromind: Merge 13977:14029 from trunk
Date: Sat, 26 Sep 2015 15:50:14 +0000

Revision: 14030
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14030
Author:   sigurdne
Date:     2015-09-26 15:50:13 +0000 (Sat, 26 Sep 2015)
Log Message:
-----------
Syncromind: Merge 13977:14029 from trunk

Modified Paths:
--------------
    branches/dev-syncromind/activitycalendar/inc/class.uicommon.inc.php
    branches/dev-syncromind/bim/setup/setup.inc.php
    branches/dev-syncromind/bim/setup/tables_current.inc.php
    branches/dev-syncromind/bim/setup/tables_update.inc.php
    branches/dev-syncromind/booking/inc/class.uiapplication_settings.inc.php
    branches/dev-syncromind/booking/inc/class.uibuilding.inc.php
    branches/dev-syncromind/booking/inc/class.uicommon.inc.php
    branches/dev-syncromind/booking/inc/class.uievent_mail_settings.inc.php
    branches/dev-syncromind/booking/inc/class.uigroup.inc.php
    branches/dev-syncromind/booking/inc/class.uimail_settings.inc.php
    branches/dev-syncromind/booking/inc/class.uimetasettings.inc.php
    branches/dev-syncromind/booking/inc/class.uiorganization.inc.php
    branches/dev-syncromind/booking/inc/class.uiresource.inc.php
    branches/dev-syncromind/booking/inc/class.uisystem_message.inc.php
    branches/dev-syncromind/catch/setup/setup.inc.php
    branches/dev-syncromind/catch/setup/tables_current.inc.php
    branches/dev-syncromind/catch/setup/tables_update.inc.php
    branches/dev-syncromind/controller/inc/class.uicase.inc.php
    branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
    branches/dev-syncromind/phpgwapi/cron/asyncservices.php
    branches/dev-syncromind/phpgwapi/inc/class.asyncservice.inc.php
    branches/dev-syncromind/property/inc/class.bodocument.inc.php
    branches/dev-syncromind/property/inc/class.soadmin_entity.inc.php
    branches/dev-syncromind/property/inc/class.sodocument.inc.php
    branches/dev-syncromind/property/inc/class.soentity.inc.php
    branches/dev-syncromind/property/setup/phpgw_no.lang
    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

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


Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13731-13773,13775,13778-13791,13793-13800,13802-13811,13816-13880,13882-13931,13934,13940-13963
   + /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13731-13773,13775,13778-13791,13793-13800,13802-13811,13816-13880,13882-13931,13934,13940-13963,13978-14029

Modified: branches/dev-syncromind/activitycalendar/inc/class.uicommon.inc.php
===================================================================
--- branches/dev-syncromind/activitycalendar/inc/class.uicommon.inc.php 
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/activitycalendar/inc/class.uicommon.inc.php 
2015-09-26 15:50:13 UTC (rev 14030)
@@ -19,7 +19,7 @@
                {
                        if(in_array($key, array_keys($array)))
                        {
-                               $result[$key] = $array[$key];
+                               $result[$key] = 
phpgw::clean_value($array[$key]);
                        }
                }
                return $result;

Modified: branches/dev-syncromind/bim/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind/bim/setup/setup.inc.php     2015-09-26 00:41:31 UTC 
(rev 14029)
+++ branches/dev-syncromind/bim/setup/setup.inc.php     2015-09-26 15:50:13 UTC 
(rev 14030)
@@ -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: branches/dev-syncromind/bim/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind/bim/setup/tables_current.inc.php    2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/bim/setup/tables_current.inc.php    2015-09-26 
15:50:13 UTC (rev 14030)
@@ -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: branches/dev-syncromind/bim/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind/bim/setup/tables_update.inc.php     2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/bim/setup/tables_update.inc.php     2015-09-26 
15:50:13 UTC (rev 14030)
@@ -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


Property changes on: branches/dev-syncromind/booking
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,13179-13344,13434-13481,13778-13791,13816-13880,13882-13931,13940-13963
   + /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
/trunk/booking:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,13179-13344,13434-13481,13778-13791,13816-13880,13882-13931,13940-13963,13978-14029

Modified: 
branches/dev-syncromind/booking/inc/class.uiapplication_settings.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiapplication_settings.inc.php    
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uiapplication_settings.inc.php    
2015-09-26 15:50:13 UTC (rev 14030)
@@ -26,7 +26,7 @@
                                {
                                        if (strlen(trim($value)) > 0)
                                        {
-                                               $config->value($dim, 
trim($value));
+                                               $config->value($dim, 
phpgw::clean_value($value));
                                        }
                                        else
                                        {

Modified: branches/dev-syncromind/booking/inc/class.uibuilding.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uibuilding.inc.php        
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uibuilding.inc.php        
2015-09-26 15:50:13 UTC (rev 14030)
@@ -30,7 +30,31 @@
                        $this->bo = CreateObject('booking.bobuilding');
             $this->bo_booking = CreateObject('booking.bobooking');
                        self::set_active_menu('booking::buildings');
-                       $this->fields = array('name', 'homepage', 
'description', 'email', 'tilsyn_name', 'tilsyn_email', 'tilsyn_phone', 
'tilsyn_name2', 'tilsyn_email2', 'tilsyn_phone2', 'street', 'zip_code', 'city', 
'district', 'phone', 'active', 
'location_code','deactivate_application','deactivate_calendar','deactivate_sendmessage','extra_kalendar','calendar_text');
+                       $this->fields = array
+                       (
+                               'name'                                          
=> 'string',
+                               'homepage'                                      
=> 'url',
+                               'description'                           => 
'html',
+                               'email'                                         
=> 'email',
+                               'tilsyn_name'                           => 
'string',
+                               'tilsyn_email'                          => 
'email',
+                               'tilsyn_phone'                          => 
'string',
+                               'tilsyn_name2'                          => 
'string',
+                               'tilsyn_email2'                         => 
'email',
+                               'tilsyn_phone2'                         => 
'string',
+                               'street'                                        
=> 'string',
+                               'zip_code'                                      
=> 'string',
+                               'city'                                          
=> 'string',
+                               'district'                                      
=> 'string',
+                               'phone'                                         
=> 'string',
+                               'active'                                        
=> 'int',
+                               'location_code'                         => 
'string',
+                               'deactivate_application'        => 'int',
+                               'deactivate_calendar'           => 'int',
+                               'deactivate_sendmessage'        => 'int',
+                               'extra_kalendar'                        => 
'string',
+                               'calendar_text'                         => 
'string',
+                       );
                }
                
                public function properties()

Modified: branches/dev-syncromind/booking/inc/class.uicommon.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uicommon.inc.php  2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uicommon.inc.php  2015-09-26 
15:50:13 UTC (rev 14030)
@@ -20,16 +20,79 @@
                );
                
                $options = array_merge($default_options, $options);
-               
                $result = array();
-               foreach($keys as $write_key)
+
+               $isIndexed = array_values($keys) === $keys;
+               if($isIndexed)
                {
-                       $array_key = 
$options['prefix'].$write_key.$options['suffix'];
-                       if(isset($array[$array_key]))
+                       foreach($keys as $write_key)
                        {
-                               $result[($options['preserve_prefix'] ? 
$options['prefix'] : '').$write_key.($options['preserve_suffix'] ? 
$options['suffix'] : '')] = phpgw::clean_value($array[$array_key]);
+                               $array_key = 
$options['prefix'].$write_key.$options['suffix'];
+                               if(isset($array[$array_key]))
+                               {
+                                       $result[($options['preserve_prefix'] ? 
$options['prefix'] : '').$write_key.($options['preserve_suffix'] ? 
$options['suffix'] : '')] = phpgw::clean_value($array[$array_key]);
+                               }
+
                        }
                }
+               else
+               {
+                       foreach($keys as $write_key => $type)
+                       {
+                               switch($type)
+                               {
+                                       case 'string':
+                                       default:
+                                               $_type = 'string';
+                                               break;
+                                       case 'bool':
+                                       case 'boolean':
+                                               $_type = 'bool';
+                                               break;
+                                       case 'int':
+                                       case 'integer':
+                                       case 'number':
+                                               $_type = 'int';
+                                               break;
+                                       case 'float':
+                                       case 'double':
+                                               $_type = 'float';
+                                               break;
+                                               /* Specific string types */
+                                       case 'color':
+                                               $_type = 'color';
+                                               break;
+                                       case 'email':
+                                               $_type = 'email';
+                                               break;
+                                       case 'filename':
+                                               $_type = 'filename';
+                                               break;
+                                       case 'ip':
+                                               $_type = 'ip';
+                                               break;
+                                       case 'location':
+                                               $_type = 'location';
+                                               break;
+                                       case 'url':
+                                               $_type = 'url';
+                                               break;
+                                       /* only use this if you really know 
what you are doing */
+                                       case 'raw':
+                                               $_type = 'raw';
+                                               break;
+                                       case 'html':
+                                               $_type = 'html';
+                                               break;
+                               }
+                               $array_key = 
$options['prefix'].$write_key.$options['suffix'];
+                               if(isset($array[$array_key]))
+                               {
+                                       $result[($options['preserve_prefix'] ? 
$options['prefix'] : '').$write_key.($options['preserve_suffix'] ? 
$options['suffix'] : '')] = phpgw::clean_value($array[$array_key],$_type);
+                               }
+                       }
+               }
+               
                return $result;
        }
        

Modified: 
branches/dev-syncromind/booking/inc/class.uievent_mail_settings.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uievent_mail_settings.inc.php     
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uievent_mail_settings.inc.php     
2015-09-26 15:50:13 UTC (rev 14030)
@@ -26,7 +26,7 @@
                                {
                                        if (strlen(trim($value)) > 0)
                                        {
-                                               $config->value($dim, 
trim($value));
+                                               $config->value($dim, 
phpgw::clean_value($value));
                                        }
                                        else
                                        {

Modified: branches/dev-syncromind/booking/inc/class.uigroup.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uigroup.inc.php   2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uigroup.inc.php   2015-09-26 
15:50:13 UTC (rev 14030)
@@ -279,7 +279,17 @@
                        $errors = array();
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
-                               $group = array_merge($group, 
extract_values($_POST, array('name', 'shortname', 'organization_id', 
'organization_name', 'description', 'contacts', 'active', 'activity_id', 
'show_in_portal')));
+                               $group = array_merge($group, 
extract_values($_POST, array(
+                                       'name'                          => 
'string',
+                                       'shortname'                     => 
'string',
+                                       'organization_id'       => 'string',
+                                       'organization_name'     => 'string',
+                                       'description'           => 'html',
+                                       'contacts'                      => 
'string',
+                                       'active'                        => 
'int',
+                                       'activity_id'           => 'int',
+                                       'show_in_portal'        => 'int',
+                                       )));
                                if (!isset($group["active"]))
                                {
                                        $group['active'] = '1';

Modified: branches/dev-syncromind/booking/inc/class.uimail_settings.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uimail_settings.inc.php   
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uimail_settings.inc.php   
2015-09-26 15:50:13 UTC (rev 14030)
@@ -28,7 +28,7 @@
                                {
                                        if (strlen(trim($value)) > 0)
                                        {
-                                               $config->value($dim, 
trim($value));
+                                               $config->value($dim, 
phpgw::clean_value($value));
                                        }
                                        else
                                        {

Modified: branches/dev-syncromind/booking/inc/class.uimetasettings.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uimetasettings.inc.php    
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uimetasettings.inc.php    
2015-09-26 15:50:13 UTC (rev 14030)
@@ -25,7 +25,7 @@
                                {
                                        if (strlen(trim($value)) > 0)
                                        {
-                                               $config->value($dim, 
trim($value));
+                                               $config->value($dim, 
phpgw::clean_value($value));
                                        }
                                        else
                                        {

Modified: branches/dev-syncromind/booking/inc/class.uiorganization.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiorganization.inc.php    
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uiorganization.inc.php    
2015-09-26 15:50:13 UTC (rev 14030)
@@ -30,13 +30,26 @@
                        
                        self::set_active_menu('booking::organizations');
                        $this->module = "booking";
-                       $this->fields = array('name', 'shortname', 'homepage', 
'phone', 'email', 
-                                                                 'street', 
'zip_code', 'city', 'district', 
-                                                                 
'description', 'contacts', 'active', 
-                                                                 
'organization_number', 'activity_id',
-                                                                 
'customer_number', 'customer_internal', 'show_in_portal');
-                                                               
-                       
+                       $this->fields = array(
+                               'name'                                  => 
'string',
+                               'shortname'                             => 
'string',
+                               'homepage'                              => 
'url',
+                               'phone'                                 => 
'string',
+                               'email'                                 => 
'email',
+                               'street'                                => 
'string',
+                               'zip_code'                              => 
'string',
+                               'city'                                  => 
'string',
+                               'district'                              => 
'string',
+                               'description'                   => 'html',
+                               'contacts'                              => 
'string',
+                               'active'                                => 
'int',
+                               'organization_number'   => 'string',
+                               'activity_id'                   => 'int',
+                               'customer_number'               => 'string',
+                               'customer_internal'             => 'int',
+                               'show_in_portal'                => 'int',
+                               );
+
                }
                
                public function building_users() {

Modified: branches/dev-syncromind/booking/inc/class.uiresource.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uiresource.inc.php        
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uiresource.inc.php        
2015-09-26 15:50:13 UTC (rev 14030)
@@ -29,7 +29,17 @@
                        
                        $this->bo = CreateObject('booking.boresource');
                        $this->activity_bo = CreateObject('booking.boactivity');
-                       $this->fields = array('name', 'building_id', 
'building_name','description','activity_id', 'active', 'type', 'sort', 
'organizations_ids');
+                       $this->fields = array(
+                                       'name'                                  
=> 'string',
+                                       'building_id'                   => 
'string',
+                                       'building_name'                 => 
'string',
+                                       'description'                   => 
'html',
+                                       'activity_id'                   => 
'int',
+                                       'active'                                
=> 'int',
+                                       'type'                                  
=> 'string',
+                                       'sort'                                  
=> 'string',
+                                       'organizations_ids'             => 
'string',
+                               );
                        self::set_active_menu('booking::buildings::resources');
                }
                

Modified: branches/dev-syncromind/booking/inc/class.uisystem_message.inc.php
===================================================================
--- branches/dev-syncromind/booking/inc/class.uisystem_message.inc.php  
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/booking/inc/class.uisystem_message.inc.php  
2015-09-26 15:50:13 UTC (rev 14030)
@@ -345,7 +345,9 @@
                        $errors = array();
                        if($_SERVER['REQUEST_METHOD'] == 'POST')
                        {
-                               $system_message = array_merge($system_message, 
extract_values($_POST, array('time', 'title', 'message')));
+                               $system_message = array_merge($system_message, 
extract_values($_POST, array(
+                                       'name' => 'string', 'time' => 'string', 
'title' => 'string', 'message' => 'html', 'phone' => 'string', 'email' => 
'email')
+                               ));
                                if (!isset($system_message["Status"]))
                                {
                                        $system_message['status'] = 'NEW';

Modified: branches/dev-syncromind/catch/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind/catch/setup/setup.inc.php   2015-09-26 00:41:31 UTC 
(rev 14029)
+++ branches/dev-syncromind/catch/setup/setup.inc.php   2015-09-26 15:50:13 UTC 
(rev 14030)
@@ -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: branches/dev-syncromind/catch/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind/catch/setup/tables_current.inc.php  2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/catch/setup/tables_current.inc.php  2015-09-26 
15:50:13 UTC (rev 14030)
@@ -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: branches/dev-syncromind/catch/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind/catch/setup/tables_update.inc.php   2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/catch/setup/tables_update.inc.php   2015-09-26 
15:50:13 UTC (rev 14030)
@@ -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


Property changes on: branches/dev-syncromind/controller
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune/controller:12743-12875,12986
/trunk/controller:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13728-13729,13731-13773,13802-13811,13816-13880,13882-13931,13940-13963
   + /branches/stavangerkommune/controller:12743-12875,12986
/trunk/controller:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13728-13729,13731-13773,13802-13811,13816-13880,13882-13931,13940-13963,13978-14029

Modified: branches/dev-syncromind/controller/inc/class.uicase.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicase.inc.php 2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/controller/inc/class.uicase.inc.php 2015-09-26 
15:50:13 UTC (rev 14030)
@@ -632,7 +632,7 @@
                                        $message_details .= "Hvor: 
{$short_desc}\n";
                                }
 
-                               $message_details .=  'Hva: ' . 
$case->get_descr() . "\n";
+                               $message_details .=  'Hva: ' . 
$case->get_descr() . "\n\n";
                                $counter++;
                        }
                        

Modified: branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php   
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php   
2015-09-26 15:50:13 UTC (rev 14030)
@@ -913,7 +913,7 @@
                                if($doc_type)
                                {
                                        $document_list = 
array_merge($document_list, $sodocument->read_at_location(array(
-                                               'entity_id' => 
$entity_id,'cat_id' => $cat_id, 'id' =>$data['id'], 'doc_type' => $doc_type, 
'allrows' => true)));
+                                               'entity_id' => 
$entity_id,'cat_id' => $cat_id, 'p_num' =>$data['id'], 'doc_type' => $doc_type, 
'allrows' => true)));
                                }
                        }
                

Modified: branches/dev-syncromind/phpgwapi/cron/asyncservices.php
===================================================================
--- branches/dev-syncromind/phpgwapi/cron/asyncservices.php     2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/phpgwapi/cron/asyncservices.php     2015-09-26 
15:50:13 UTC (rev 14030)
@@ -60,7 +60,8 @@
 
        echo "Domain: {$GLOBALS['phpgw_info']['user']['domain']}\n";
        echo 'Start cron: ' . date('Y/m/d H:i:s ') . "\n";
-       $num = ExecMethod('phpgwapi.asyncservice.check_run','crontab');
+       $num = (int) ExecMethod('phpgwapi.asyncservice.check_run','crontab');
+       echo "Number of jobs: {$num}\n";
        echo 'End cron: ' . date('Y/m/d H:i:s ') . "\n";
        // if the following comment got removed, you will get an email from 
cron for every check performed
        //echo date('Y/m/d H:i:s ').$_GET['domain'].': '.($num ? "$num job(s) 
executed" : 'Nothing to execute')."\n";

Modified: branches/dev-syncromind/phpgwapi/inc/class.asyncservice.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.asyncservice.inc.php     
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/phpgwapi/inc/class.asyncservice.inc.php     
2015-09-26 15:50:13 UTC (rev 14030)
@@ -428,8 +428,19 @@
                                        {
                                                try
                                                {
-                                                       echo 
"{$job['method']}\n";
+                                                       echo 'Start job: ' . 
date('Y/m/d H:i:s ') . "\n";
+                                                       echo "--id: 
{$job['id']}\n";
+                                                       echo "--method: 
{$job['method']}\n";
+                                                       if(isset($job['data']) 
&& $job['data'])
+                                                       {
+                                                               echo "--data: ";
+                                                               
print_r($job['data']);
+                                                               echo "\n";
+                                                       }
                                                        
ExecMethod($job['method'],$job['data']);
+
+                                                       echo 'End job: ' . 
date('Y/m/d H:i:s ') . "\n\n";
+
                                                }
                                                catch (Exception $e)
                                                {
@@ -453,24 +464,24 @@
 
                                        
$GLOBALS['phpgw']->db->Exception_On_Error = $this->Exception_On_Error;
 
-                                               if ($job['next'] = 
$this->next_run($job['times']))
-                                               {
-                                                       $updated_jobs = 
$this->read($id);
-                                                       if 
(isset($updated_jobs[$id]) && isset($updated_jobs[$id]['data']))
-                                                       { // update async data 
field, it could be changed during ExecMethod()
-                                                               $job['data'] = 
$updated_jobs[$id]['data'];
-                                                       }
-                                                       // TK 20.11.06 write 
job to get 'next' and alarm updated
-                                                       $job['data']['time'] = 
$job['next'];
-                                                       $this->write($job);
+                                       if ($job['next'] = 
$this->next_run($job['times']))
+                                       {
+                                               $updated_jobs = 
$this->read($id);
+                                               if (isset($updated_jobs[$id]) 
&& isset($updated_jobs[$id]['data']))
+                                               { // update async data field, 
it could be changed during ExecMethod()
+                                                       $job['data'] = 
$updated_jobs[$id]['data'];
                                                }
-                                               else    // no further runs
+                                               // TK 20.11.06 write job to get 
'next' and alarm updated
+                                               $job['data']['time'] = 
$job['next'];
+                                               $this->write($job);
+                                       }
+                                       else    // no further runs
+                                       {
+                                               if($job['next'] <= time())
                                                {
-                                                       if($job['next'] <= 
time())
-                                                       {
-                                                               
$this->delete($job['id']);
-                                                       }
+                                                       
$this->delete($job['id']);
                                                }
+                                       }
 
                                }
                        }

Modified: branches/dev-syncromind/property/inc/class.bodocument.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.bodocument.inc.php       
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/property/inc/class.bodocument.inc.php       
2015-09-26 15:50:13 UTC (rev 14030)
@@ -40,6 +40,7 @@
                var $filter;
                var $sort;
                var $order;
+               var $p_num;
                var $cat_id;
                var $entity_id;
                var $status_id;
@@ -71,29 +72,31 @@
                                $this->use_session = true;
                        }
 
-                       $start                   = phpgw::get_var('start', 
'int', 'REQUEST', 0);
-                       $query                   = phpgw::get_var('query');
-                       $sort                    = phpgw::get_var('sort');
-                       $order                   = phpgw::get_var('order');
-                       $filter                  = phpgw::get_var('filter', 
'int');
-                       $cat_id                  = phpgw::get_var('cat_id', 
'int');
-                       $status_id               = phpgw::get_var('status_id');
-                       $entity_id               = phpgw::get_var('entity_id', 
'int');
-                       $doc_type                = phpgw::get_var('doc_type');
-                       $query_location  = phpgw::get_var('query_location');
-                       $allrows                 = phpgw::get_var('allrows', 
'bool');
+                       $start                                  = 
phpgw::get_var('start', 'int', 'REQUEST', 0);
+                       $query                                  = 
phpgw::get_var('query');
+                       $sort                                   = 
phpgw::get_var('sort');
+                       $order                                  = 
phpgw::get_var('order');
+                       $filter                                 = 
phpgw::get_var('filter', 'int');
+                       $p_num                                  = 
phpgw::get_var('p_num', 'int');
+                       $cat_id                                 = 
phpgw::get_var('cat_id', 'int');
+                       $status_id                              = 
phpgw::get_var('status_id');
+                       $entity_id                              = 
phpgw::get_var('entity_id', 'int');
+                       $doc_type                               = 
phpgw::get_var('doc_type');
+                       $query_location                 = 
phpgw::get_var('query_location');
+                       $allrows                                = 
phpgw::get_var('allrows', 'bool');
 
-                       $this->start                     = $start ? $start : 0;
-                       $this->query                     = isset($query) ? 
$query : '';
-                       $this->sort                              = isset($sort) 
&& $sort ? $sort : '';
-                       $this->order                     = isset($order) && 
$order ? $order : '';
-                       $this->filter                    = isset($filter) && 
$filter ? $filter : '';
-                       $this->cat_id                    = isset($cat_id) && 
$cat_id ? $cat_id : '';
-                       $this->status_id                 = isset($status_id) && 
$status_id ? $status_id : '';
-                       $this->entity_id                 = isset($entity_id) && 
$entity_id ? $entity_id : '';
-                       $this->doc_type                  = isset($doc_type) && 
$doc_type ? $doc_type : '';
-                       $this->query_location    = isset($query_location) && 
$query_location ? $query_location : '';
-                       $this->allrows                   = isset($allrows) && 
$allrows ? $allrows : '';
+                       $this->start                    = $start ? $start : 0;
+                       $this->query                    = isset($query) ? 
$query : '';
+                       $this->sort                             = isset($sort) 
&& $sort ? $sort : '';
+                       $this->order                    = isset($order) && 
$order ? $order : '';
+                       $this->filter                   = isset($filter) && 
$filter ? $filter : '';
+                       $this->p_num                    = isset($p_num) && 
$p_num ? $p_num : '';
+                       $this->cat_id                   = isset($cat_id) && 
$cat_id ? $cat_id : '';
+                       $this->status_id                = isset($status_id) && 
$status_id ? $status_id : '';
+                       $this->entity_id                = isset($entity_id) && 
$entity_id ? $entity_id : '';
+                       $this->doc_type                 = isset($doc_type) && 
$doc_type ? $doc_type : '';
+                       $this->query_location   = isset($query_location) && 
$query_location ? $query_location : '';
+                       $this->allrows                  = isset($allrows) && 
$allrows ? $allrows : '';
                }
 
                function save_sessiondata($data)
@@ -230,10 +233,9 @@
                        }
 
 
-                       $document                        = 
$this->so->read_at_location(array('start'                     => $this->start, 
'query'                        => $this->query,
-                               'sort'                   => $this->sort, 
'order'                         => $this->order,
-                               'filter'                 => $this->filter, 
'cat_id'              => $this->cat_id, 'entity_id'           => 
$this->entity_id,
-                               'location_code'  => $location_code, 'doc_type'  
         => $this->doc_type, 'allrows'           => $this->allrows));
+                       $document = $this->so->read_at_location(array('start' 
=> $this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
+                               'filter' => $this->filter,'p_num' 
=>$this->p_num, 'cat_id' => $this->cat_id,'entity_id' => $this->entity_id,
+                               'location_code' => 
$location_code,'doc_type'=>$this->doc_type, 'allrows' => $this->allrows));
                        $this->total_records = $this->so->total_records;
 
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
@@ -454,4 +456,4 @@
                {
                        $this->so->delete($document_id);
                }
-       }
\ No newline at end of file
+       }

Modified: branches/dev-syncromind/property/inc/class.soadmin_entity.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.soadmin_entity.inc.php   
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/property/inc/class.soadmin_entity.inc.php   
2015-09-26 15:50:13 UTC (rev 14030)
@@ -595,10 +595,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['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['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;
                }
 
@@ -1254,4 +1256,4 @@
                        }
                        return $this->db->transaction_commit();
                }
-       }
\ No newline at end of file
+       }

Modified: branches/dev-syncromind/property/inc/class.sodocument.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.sodocument.inc.php       
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/property/inc/class.sodocument.inc.php       
2015-09-26 15:50:13 UTC (rev 14030)
@@ -315,20 +315,21 @@
                {
                        if(is_array($data))
                        {
-                               $start                   = 
isset($data['start']) && $data['start'] ? $data['start'] : 0;
-                               $query                   = 
isset($data['query']) ? $data['query'] : '';
-                               $sort                    = isset($data['sort']) 
&& $data['sort'] ? $data['sort'] : 'DESC';
-                               $order                   = 
isset($data['order']) ? $data['order'] : '';
-                               $filter                  = 
isset($data['filter']) && $data['filter'] ? (int)$data['filter'] : 0;
-                               $entity_id               = 
isset($data['entity_id']) && $data['entity_id'] ? (int)$data['entity_id'] : 0;
-                               $cat_id                  = 
isset($data['cat_id']) && $data['cat_id'] ? (int)$data['cat_id'] : 0;
-                               $id                              = 
isset($data['id']) && $data['id'] ? (int)$data['id'] : 0;
-                               $doc_type                = 
isset($data['doc_type']) && $data['doc_type'] ? $data['doc_type'] : 0;
-                               $allrows                 = 
isset($data['allrows']) ? $data['allrows'] : '';
-                               $location_code   = 
isset($data['location_code']) ? $data['location_code'] : '';
+                               $start                  = isset($data['start']) 
&& $data['start'] ? $data['start']:0;
+                               $query                  = 
isset($data['query'])?$data['query']:'';
+                               $sort                   = isset($data['sort']) 
&& $data['sort'] ? $data['sort']:'DESC';
+                               $order                  = 
isset($data['order'])?$data['order']:'';
+                               $filter                 = 
isset($data['filter']) && $data['filter'] ? (int) $data['filter']: 0;
+                               $entity_id              = 
isset($data['entity_id']) && $data['entity_id'] ? (int)$data['entity_id']:0;
+                               $cat_id                 = 
isset($data['cat_id']) && $data['cat_id'] ? (int)$data['cat_id']: 0;
+                               $p_num                  = isset($data['p_num']) 
&& $data['p_num'] ? (int)$data['p_num']: 0;
+                               $id                             = 
isset($data['id']) && $data['id'] ? (int)$data['id']: 0;
+                               $doc_type               = 
isset($data['doc_type']) && $data['doc_type'] ? $data['doc_type']: 0;
+                               $allrows                = 
isset($data['allrows'])?$data['allrows']:'';
+                               $location_code  = 
isset($data['location_code'])?$data['location_code']:'';
                        }
 
-                       if(!$location_code && !($entity_id && $cat_id ))
+                       if( !$location_code && !($entity_id && $cat_id && 
$p_num))
                        {
                                return array();
                        }
@@ -359,16 +360,10 @@
                        }
                        if($cat_id > 0)
                        {
-                               $filtermethod .= " $where 
fm_document.p_cat_id={$cat_id} AND fm_document.p_entity_id={$entity_id}";
+                               $filtermethod .= " $where 
fm_document.p_cat_id={$cat_id} AND fm_document.p_entity_id={$entity_id} AND 
p_num = '{$p_num}'";
                                $where = 'AND';
                        }
 
-                       if($id > 0)
-                       {
-                               $filtermethod .= " $where 
fm_document.p_num='{$id}'";
-                               $where = 'AND';
-                       }
-
                        if($filter > 0)
                        {
                                $filtermethod .= "  $where 
fm_document.user_id='$filter' ";
@@ -1044,4 +1039,4 @@
                        }
                        return $file_list;
                }
-       }
\ No newline at end of file
+       }

Modified: branches/dev-syncromind/property/inc/class.soentity.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.soentity.inc.php 2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/property/inc/class.soentity.inc.php 2015-09-26 
15:50:13 UTC (rev 14030)
@@ -47,6 +47,7 @@
                        'entity' => 'property',
                        'catch'  => 'catch'
                );
+               private $account;
 
                function __construct($entity_id = '', $cat_id = '')
                {
@@ -938,6 +939,7 @@
                                                'get_single_function_input'     
 => $uicols['get_single_function_input'][$key]
                                        );
                                }
+                               unset($key);
 
 
                                //Start: get short descripion - if any
@@ -1307,6 +1309,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',
@@ -2322,15 +2335,17 @@
 //                     _debug_array($xml);
 
                        $value_set = array
-                               (
-                               'xml_representation' => 
$this->db->db_addslashes($xml),
-                               'p_location_id'          => 
isset($data['p_location_id']) && $data['p_location_id'] ? 
$data['p_location_id'] : '',
-                               'p_id'                           => 
isset($data['p_id']) && $data['p_id'] ? $data['p_id'] : '',
-                               'location_code'          => 
$data['location_code'],
-                               'loc1'                           => 
$data['loc1'],
-                               'address'                        => 
$data['address'],
-                               'org_unit_id'            => 
$data['org_unit_id'],
-                               'entity_group_id'        => 
$data['entity_group_id']
+                       (
+                               'xml_representation'    => 
$this->db->db_addslashes($xml),
+                               'p_location_id'                 => 
isset($data['p_location_id']) && $data['p_location_id'] ? 
$data['p_location_id'] : '',
+                               'p_id'                                  => 
isset($data['p_id']) && $data['p_id'] ? $data['p_id'] : '',
+                               'location_code'                 => 
$data['location_code'],
+                               'loc1'                                  => 
$data['loc1'],
+                               'address'                               => 
$data['address'],
+                               'org_unit_id'                   => 
$data['org_unit_id'],
+                               'entity_group_id'               => 
$data['entity_group_id'],
+                               'modified_by'                   => 
$this->account,
+                               'modified_on'                   => time()
                        );
 
                        $value_set = $this->db->validate_update($value_set);
@@ -2502,8 +2517,11 @@
                                        $value_set['p_num'] = $p_id;
                                }
 
-                               $value_set = 
$this->db->validate_update($value_set);
-                               $this->db->query("UPDATE $table set $value_set 
WHERE id=" . $values['id'], __LINE__, __FILE__);
+                               $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__);
                        }
 
                        if(isset($history_set) && is_array($history_set))
@@ -2911,4 +2929,4 @@
                        }
                        return $id;
                }
-       }
\ No newline at end of file
+       }

Modified: branches/dev-syncromind/property/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind/property/setup/phpgw_no.lang        2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/property/setup/phpgw_no.lang        2015-09-26 
15:50:13 UTC (rev 14030)
@@ -2045,4 +2045,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: branches/dev-syncromind/property/setup/setup.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/setup.inc.php        2015-09-26 
00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/property/setup/setup.inc.php        2015-09-26 
15:50:13 UTC (rev 14030)
@@ -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: branches/dev-syncromind/property/setup/tables_current.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/tables_current.inc.php       
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/property/setup/tables_current.inc.php       
2015-09-26 15:50:13 UTC (rev 14030)
@@ -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: branches/dev-syncromind/property/setup/tables_update.inc.php
===================================================================
--- branches/dev-syncromind/property/setup/tables_update.inc.php        
2015-09-26 00:41:31 UTC (rev 14029)
+++ branches/dev-syncromind/property/setup/tables_update.inc.php        
2015-09-26 15:50:13 UTC (rev 14030)
@@ -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




reply via email to

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