fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [14726] formatting


From: Sigurd Nes
Subject: [Fmsystem-commits] [14726] formatting
Date: Thu, 11 Feb 2016 20:07:26 +0000

Revision: 14726
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14726
Author:   sigurdne
Date:     2016-02-11 20:07:07 +0000 (Thu, 11 Feb 2016)
Log Message:
-----------
formatting

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.uicommon_jquery.inc.php
    trunk/property/inc/class.XmlToArray.inc.php
    trunk/property/inc/class.boXport.inc.php
    trunk/property/inc/class.boadmin.inc.php
    trunk/property/inc/class.boadmin_entity.inc.php
    trunk/property/inc/class.boadmin_location.inc.php
    trunk/property/inc/class.boagreement.inc.php
    trunk/property/inc/class.boalarm.inc.php
    trunk/property/inc/class.boasync.inc.php
    trunk/property/inc/class.bobudget.inc.php
    trunk/property/inc/class.bocommon.inc.php
    trunk/property/inc/class.bocondition_survey.inc.php
    trunk/property/inc/class.bocustom.inc.php
    trunk/property/inc/class.bodimb_role_user.inc.php
    trunk/property/inc/class.bodocument.inc.php
    trunk/property/inc/class.boentity.inc.php
    trunk/property/inc/class.boevent.inc.php
    trunk/property/inc/class.bofiles.inc.php
    trunk/property/inc/class.bogab.inc.php
    trunk/property/inc/class.bogallery.inc.php
    trunk/property/inc/class.bogeneric.inc.php
    trunk/property/inc/class.boifc.inc.php
    trunk/property/inc/class.boinvestment.inc.php
    trunk/property/inc/class.boinvoice.inc.php
    trunk/property/inc/class.bojasper.inc.php
    trunk/property/inc/class.bolocation.inc.php
    trunk/property/inc/class.bolookup.inc.php
    trunk/property/inc/class.bomigrate.inc.php
    trunk/property/inc/class.bopricebook.inc.php
    trunk/property/inc/class.boproject.inc.php
    trunk/property/inc/class.borequest.inc.php
    trunk/property/inc/class.boresponsible.inc.php
    trunk/property/inc/class.bos_agreement.inc.php
    trunk/property/inc/class.botemplate.inc.php
    trunk/property/inc/class.botenant_claim.inc.php
    trunk/property/inc/class.botts.inc.php
    trunk/property/inc/class.bowo_hour.inc.php
    trunk/property/inc/class.boworkorder.inc.php
    trunk/property/inc/class.cat_hooks.inc.php
    trunk/property/inc/class.custom_fields.inc.php
    trunk/property/inc/class.custom_functions.inc.php
    trunk/property/inc/class.db_mssql.inc.php
    trunk/property/inc/class.db_oci8.inc.php
    trunk/property/inc/class.fileuploader.inc.php
    trunk/property/inc/class.historylog.inc.php
    trunk/property/inc/class.hook_helper.inc.php
    trunk/property/inc/class.import.inc.php
    trunk/property/inc/class.interlink.inc.php
    trunk/property/inc/class.menu.inc.php
    trunk/property/inc/class.notify.inc.php
    trunk/property/inc/class.ods.inc.php
    trunk/property/inc/class.soXport.inc.php
    trunk/property/inc/class.soadmin.inc.php
    trunk/property/inc/class.soadmin_entity.inc.php
    trunk/property/inc/class.soadmin_location.inc.php
    trunk/property/inc/class.soagreement.inc.php
    trunk/property/inc/class.soalarm.inc.php
    trunk/property/inc/class.soasync.inc.php
    trunk/property/inc/class.sobudget.inc.php
    trunk/property/inc/class.socommon.inc.php
    trunk/property/inc/class.socommon_core.inc.php
    trunk/property/inc/class.socondition_survey.inc.php
    trunk/property/inc/class.socustom.inc.php
    trunk/property/inc/class.sodimb_role_user.inc.php
    trunk/property/inc/class.sodocument.inc.php
    trunk/property/inc/class.soentity.inc.php
    trunk/property/inc/class.soevent.inc.php
    trunk/property/inc/class.soexportentity.inc.php
    trunk/property/inc/class.sogab.inc.php
    trunk/property/inc/class.sogallery.inc.php
    trunk/property/inc/class.sogeneric.inc.php
    trunk/property/inc/class.soinvestment.inc.php
    trunk/property/inc/class.soinvoice.inc.php
    trunk/property/inc/class.sojasper.inc.php
    trunk/property/inc/class.solocation.inc.php
    trunk/property/inc/class.solookup.inc.php
    trunk/property/inc/class.sopending_action.inc.php
    trunk/property/inc/class.sopricebook.inc.php
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.sorequest.inc.php
    trunk/property/inc/class.soresponsible.inc.php
    trunk/property/inc/class.sos_agreement.inc.php
    trunk/property/inc/class.sotemplate.inc.php
    trunk/property/inc/class.sotenant_claim.inc.php
    trunk/property/inc/class.sotts.inc.php
    trunk/property/inc/class.sowo_hour.inc.php
    trunk/property/inc/class.soworkorder.inc.php
    trunk/property/inc/class.test.inc.php
    trunk/property/inc/class.uiXport.inc.php
    trunk/property/inc/class.uiadmin.inc.php
    trunk/property/inc/class.uiadmin_entity.inc.php
    trunk/property/inc/class.uiadmin_location.inc.php
    trunk/property/inc/class.uiagreement.inc.php
    trunk/property/inc/class.uialarm.inc.php
    trunk/property/inc/class.uiasync.inc.php
    trunk/property/inc/class.uibudget.inc.php
    trunk/property/inc/class.uicondition_survey.inc.php
    trunk/property/inc/class.uicustom.inc.php
    trunk/property/inc/class.uidebug_json.inc.php
    trunk/property/inc/class.uidimb_role_user.inc.php
    trunk/property/inc/class.uidocument.inc.php
    trunk/property/inc/class.uidocument2.inc.php
    trunk/property/inc/class.uientity.inc.php
    trunk/property/inc/class.uievent.inc.php
    trunk/property/inc/class.uigab.inc.php
    trunk/property/inc/class.uigallery.inc.php
    trunk/property/inc/class.uigeneric.inc.php
    trunk/property/inc/class.uiifc.inc.php
    trunk/property/inc/class.uiimport.inc.php
    trunk/property/inc/class.uiinvestment.inc.php
    trunk/property/inc/class.uiinvoice.inc.php
    trunk/property/inc/class.uiinvoice2.inc.php
    trunk/property/inc/class.uijasper.inc.php
    trunk/property/inc/class.uilocation.inc.php
    trunk/property/inc/class.uilookup.inc.php
    trunk/property/inc/class.uimigrate.inc.php
    trunk/property/inc/class.uipricebook.inc.php
    trunk/property/inc/class.uiproject.inc.php
    trunk/property/inc/class.uirequest.inc.php
    trunk/property/inc/class.uiresponsible.inc.php
    trunk/property/inc/class.uis_agreement.inc.php
    trunk/property/inc/class.uitemplate.inc.php
    trunk/property/inc/class.uitenant_claim.inc.php
    trunk/property/inc/class.uitts.inc.php
    trunk/property/inc/class.uiwo_hour.inc.php
    trunk/property/inc/class.uiworkorder.inc.php
    trunk/property/inc/cron/class.cron_parent.inc.php
    trunk/property/inc/cron/cron.php
    trunk/property/inc/cron/default/Import_fra_agresso_X205.php
    trunk/property/inc/cron/default/catch_ppc.php
    trunk/property/inc/cron/default/forward_mail_as_sms.php
    trunk/property/inc/cron/default/import_from_scanner.php
    
trunk/property/inc/cron/default/import_oppdatering_av_bestilling_fra_agresso_bkb.php
    trunk/property/inc/cron/default/lag_lang_filer.php
    trunk/property/inc/cron/default/oppdater_antall_leieobjekt.php
    trunk/property/inc/cron/default/oppdater_utgaatt_objekt.php
    trunk/property/inc/cron/default/organize_drawing.php
    trunk/property/inc/cron/default/organize_energy_pdf_bbb.php
    trunk/property/inc/cron/default/reset_workorder_cached_budget.php
    trunk/property/inc/cron/default/synkroniser_avdelinger_med_fellesdata.php
    trunk/property/inc/cron/default/synkroniser_med_boei.php
    trunk/property/inc/cron/default/update_googlemap.php
    trunk/property/inc/cron/default/update_phpgw.php
    trunk/property/inc/cron/default/update_workorder_status.php
    trunk/property/inc/custom/default/BkBygg_editer_system_oversikt.js
    trunk/property/inc/custom/default/BkBygg_editer_system_oversikt.php
    trunk/property/inc/custom/default/EBF_update_ticket_on_project_change.php
    trunk/property/inc/custom/default/LRS_oppdater_el_anlegg.php
    trunk/property/inc/custom/default/catch_ticket_export.php
    trunk/property/inc/custom/default/estimert_ferdigdato_til_leieobjekt_BBB.php
    trunk/property/inc/custom/default/hent_maaler_nr_til_besikt_rapport.php
    trunk/property/inc/custom/default/innflyttetdato_entity_2_11_BBB.php
    trunk/property/inc/custom/default/kalkuler_risiko_for_ros.php
    trunk/property/inc/custom/default/ticket_NLSH_pre_commit_validate.php
    trunk/property/inc/custom/default/ticket_NLSH_validate.js
    trunk/property/inc/custom/default/ticket_redirect_based_on_status.php
    
trunk/property/inc/custom/default/varsle_prosjektoordinator_ved_avsluttet_relatert_melding_BBB.php
    trunk/property/inc/export/default/Agresso_Bergen_Kostfordeling
    trunk/property/inc/export/default/Agresso_X114
    trunk/property/inc/export/default/El_anlegg_LRS
    trunk/property/inc/hook_config.inc.php
    trunk/property/inc/hook_help.inc.php
    trunk/property/inc/hook_manual.inc.php
    trunk/property/inc/hook_settings.inc.php
    trunk/property/inc/hook_sidebox_menu.inc.php
    trunk/property/inc/import/default/Import_fra_Service_EBF
    trunk/property/inc/import/default/cvs_import_fiktiv_faktura_nlsh
    trunk/property/inc/import/default/cvs_import_kunstoversikt_bilde_bkb
    trunk/property/inc/import/default/cvs_import_kunstoversikt_bkb
    trunk/property/inc/import/default/cvs_import_romdata_bkb
    trunk/property/inc/import/import_update_generic.php
    trunk/property/inc/ods/ods.php
    trunk/property/inc/soap_client/bra5/soap.php
    trunk/property/inc/soap_client/braarkiv/services.php
    trunk/property/inc/soap_client/braarkiv/soap.php
    trunk/property/js/core/check.js
    trunk/property/js/dateformat/dateformat.js
    trunk/property/js/jquery/gallery.index.js
    trunk/property/js/jquery/jquery.colorbox.js
    trunk/property/js/jquery/jquery.min.js
    trunk/property/js/overlib/overlib.js
    trunk/property/js/portico/admin_entity.edit_category.js
    trunk/property/js/portico/agreement.edit.js
    trunk/property/js/portico/ajax_dimb_role_user.js
    trunk/property/js/portico/ajax_invoice.js
    trunk/property/js/portico/ajax_project_edit.js
    trunk/property/js/portico/ajax_workorder_edit.js
    trunk/property/js/portico/budget.basis.js
    trunk/property/js/portico/budget.obligations.js
    trunk/property/js/portico/condition_survey.js
    trunk/property/js/portico/condition_survey_edit.js
    trunk/property/js/portico/custom.edit.js
    trunk/property/js/portico/entity.edit.js
    trunk/property/js/portico/entity.edit_inventory.js
    trunk/property/js/portico/event.index.js
    trunk/property/js/portico/investment.history.js
    trunk/property/js/portico/investment.index.js
    trunk/property/js/portico/invoice.index.js
    trunk/property/js/portico/invoice.list_sub.js
    trunk/property/js/portico/invoice2.index.js
    trunk/property/js/portico/location.edit.js
    trunk/property/js/portico/notify.js
    trunk/property/js/portico/pricebook.index.js
    trunk/property/js/portico/project.edit.js
    trunk/property/js/portico/request.edit.js
    trunk/property/js/portico/s_agreement.edit.js
    trunk/property/js/portico/tenant_claim.edit.js
    trunk/property/js/portico/tts.add.js
    trunk/property/js/portico/tts.index.js
    trunk/property/js/portico/tts.view.js
    trunk/property/js/portico/uialarm.index.js
    trunk/property/js/portico/wo_hour.deviation.js
    trunk/property/js/portico/wo_hour.prizebook.js
    trunk/property/js/portico/wo_hour.template.js
    trunk/property/js/portico/workorder.edit.js

Modified: trunk/phpgwapi/inc/class.uicommon_jquery.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.uicommon_jquery.inc.php    2016-02-11 15:47:31 UTC 
(rev 14725)
+++ trunk/phpgwapi/inc/class.uicommon_jquery.inc.php    2016-02-11 20:07:07 UTC 
(rev 14726)
@@ -1,53 +1,50 @@
 <?php
        /**
-       * phpGroupWare
-       *
-       * @author Erik Holm-Larsen <address@hidden>
-       * @author Torstein Vadla <address@hidden>
-       * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
-       * This file is part of phpGroupWare.
-       *
-       * phpGroupWare is free software; you can redistribute it and/or modify
-       * it under the terms of the GNU General Public License as published by
-       * the Free Software Foundation; either version 2 of the License, or
-       * (at your option) any later version.
-       *
-       * phpGroupWare is distributed in the hope that it will be useful,
-       * but WITHOUT ANY WARRANTY; without even the implied warranty of
-       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-       * GNU General Public License for more details.
-       *
-       * You should have received a copy of the GNU General Public License
-       * along with phpGroupWare; if not, write to the Free Software
-       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
-       *
-       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
-       * @package phpgwapi
-       * @subpackage utilities
-       * @version $Id: class.uicommon.inc.php 11988 2014-05-23 13:26:30Z 
sigurdne $
-       */
-
+        * phpGroupWare
+        *
+        * @author Erik Holm-Larsen <address@hidden>
+        * @author Torstein Vadla <address@hidden>
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package phpgwapi
+        * @subpackage utilities
+        * @version $Id: class.uicommon.inc.php 11988 2014-05-23 13:26:30Z 
sigurdne $
+        */
        phpgw::import_class('phpgwapi.jquery');
 
        abstract class phpgwapi_uicommon_jquery
        {
+
                const UI_SESSION_FLASH = 'flash_msgs';
 
                protected
-                       $filesArray,
-                       $ui_session_key,
-                       $flash_msgs;
-
-
+               $filesArray,
+               $ui_session_key,
+               $flash_msgs;
                public $dateFormat;
-
                public $type_of_user;
 
-       //      public $flash_msgs;
+               //      public $flash_msgs;
 
-               public function __construct($currentapp ='', $yui = '')
+               public function __construct( $currentapp = '', $yui = '' )
                {
 
                        $yui = isset($yui) && $yui == 'yui3' ? 'yui3' : 'yahoo';
@@ -55,16 +52,16 @@
 
 
                        $this->tmpl_search_path = array();
-            array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/booking/templates/base');
+                       array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/booking/templates/base');
                        array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/phpgwapi/templates/base');
                        array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set']);
                        array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/' . $currentapp . '/templates/base');
                        array_push($this->tmpl_search_path, PHPGW_SERVER_ROOT . 
'/' . $currentapp . '/templates/' . 
$GLOBALS['phpgw_info']['server']['template_set']);
 
-                       if($yui == 'yui3')
+                       if ($yui == 'yui3')
                        {
                                self::add_javascript('phpgwapi', 'yui3', 
'yui/yui-min.js');
-                       self::add_javascript('phpgwapi', $yui, 'common.js');
+                               self::add_javascript('phpgwapi', $yui, 
'common.js');
                        }
 
                        self::add_javascript('phpgwapi', "jquery", 'common.js');
@@ -77,13 +74,12 @@
                        $this->locations = & $GLOBALS['phpgw']->locations;
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang($currentapp);
-                       
+
                        phpgwapi_jquery::load_widget('core');
                        self::add_javascript('phpgwapi', 'DataTables', 
'media/js/jquery.dataTables.min.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Responsive/js/dataTables.responsive.js');
 //                     self::add_javascript('phpgwapi', 'DataTables', 
'extensions/ColVis/js/dataTables.colVis.min.js');
 //                     self::add_javascript('phpgwapi', 'DataTables', 
'extensions/TableTools/js/dataTables.tableTools.js');
-
                        //Buttons
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Buttons/js/dataTables.buttons.min.js');
                        self::add_javascript('phpgwapi', 'DataTables', 
'extensions/Buttons/js/buttons.colVis.min.js');
@@ -105,13 +101,12 @@
                        self::add_javascript('phpgwapi', 'tinybox2', 
'packed.js');
                        
$GLOBALS['phpgw']->css->add_external_file('phpgwapi/js/tinybox2/style.css');
 
-                       if(phpgw::get_var('nonavbar'))
+                       if (phpgw::get_var('nonavbar'))
                        {
-                       //      $GLOBALS['phpgw_info']['flags']['nonavbar'] = 
true;
+                               //      
$GLOBALS['phpgw_info']['flags']['nonavbar'] = true;
                                $GLOBALS['phpgw_info']['flags']['noframework'] 
= true;
-                       //      
$GLOBALS['phpgw_info']['flags']['headonly']=true;
+                               //      
$GLOBALS['phpgw_info']['flags']['headonly']=true;
                        }
-
                }
 
                private function get_ui_session_key()
@@ -146,12 +141,12 @@
                        $this->store_flash_msgs();
                }
 
-               protected function session_set($key, $data)
+               protected function session_set( $key, $data )
                {
                        return 
phpgwapi_cache::session_set($this->get_ui_session_key(), $key, $data);
                }
 
-               protected function session_get($key)
+               protected function session_get( $key )
                {
                        return 
phpgwapi_cache::session_get($this->get_ui_session_key(), $key);
                }
@@ -159,91 +154,110 @@
                /**
                 * Provides a private session cache setter per ui class.
                 */
-               protected function ui_session_set($key, $data)
+               protected function ui_session_set( $key, $data )
                {
-                       return $this->session_set(get_class($this).'_'.$key, 
$data);
+                       return $this->session_set(get_class($this) . '_' . 
$key, $data);
                }
 
                /**
                 * Provides a private session cache getter per ui class .
                 */
-               protected function ui_session_get($key)
+               protected function ui_session_get( $key )
                {
-                       return $this->session_get(get_class($this).'_'.$key);
+                       return $this->session_get(get_class($this) . '_' . 
$key);
                }
 
-               protected function generate_secret($length = 10)
+               protected function generate_secret( $length = 10 )
                {
-                       return 
substr(base64_encode(rand(1000000000,9999999999)),0, $length);
+                       return substr(base64_encode(rand(1000000000, 
9999999999)), 0, $length);
                }
 
-               public function add_js_event($event, $js)
+               public function add_js_event( $event, $js )
                {
                        $GLOBALS['phpgw']->js->add_event($event, $js);
                }
 
-               public function add_js_load_event($js)
+               public function add_js_load_event( $js )
                {
                        $this->add_js_event('load', $js);
                }
 
-               public function link($data)
+               public function link( $data )
                {
-            if($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'bookingfrontend')
+                       if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'bookingfrontend')
                                return 
$GLOBALS['phpgw']->link('/bookingfrontend/', $data);
-            elseif ($GLOBALS['phpgw_info']['flags']['currentapp'] == 
'activitycalendarfrontend')
-                return $GLOBALS['phpgw']->link('/activitycalendarfrontend/', 
$data);
+                       elseif ($GLOBALS['phpgw_info']['flags']['currentapp'] 
== 'activitycalendarfrontend')
+                               return 
$GLOBALS['phpgw']->link('/activitycalendarfrontend/', $data);
                        else
-                       return $GLOBALS['phpgw']->link('/index.php', $data);
+                               return $GLOBALS['phpgw']->link('/index.php', 
$data);
                }
 
-               public function redirect($link_data)
+               public function redirect( $link_data )
                {
                        $GLOBALS['phpgw']->redirect_link('/index.php', 
$link_data);
                }
 
-               public function flash($msg, $type='success')
+               public function flash( $msg, $type = 'success' )
                {
                        $this->flash_msgs[$msg] = $type == 'success';
                }
 
-               public function flash_form_errors($errors)
+               public function flash_form_errors( $errors )
                {
-                       foreach($errors as $field => $msg)
+                       foreach ($errors as $field => $msg)
                        {
                                $this->flash_msgs[$msg] = false;
                        }
                }
 
-               public function add_stylesheet($path)
+               public static function message_set( $messages = array() )
                {
+                       if (isset($messages['error']) && 
is_array($messages['error']))
+                       {
+                               foreach ($messages['error'] as $key => $entry)
+                               {
+                                       
phpgwapi_cache::message_set($entry['msg'], 'message');
+                               }
+                               unset($entry);
+                       }
+                       if (isset($messages['message']) && 
is_array($messages['message']))
+                       {
+                               foreach ($messages['message'] as $key => $entry)
+                               {
+                                       
phpgwapi_cache::message_set($entry['msg'], 'message');
+                               }
+                       }
+               }
+
+               public function add_stylesheet( $path )
+               {
                        $GLOBALS['phpgw']->css->add_external_file($path);
                }
 
-               public function add_javascript($app, $pkg, $name)
+               public function add_javascript( $app, $pkg, $name )
                {
-                       return $GLOBALS['phpgw']->js->validate_file($pkg, 
str_replace('.js', '', $name), $app);
+                       return $GLOBALS['phpgw']->js->validate_file($pkg, 
str_replace('.js', '', $name), $app);
                }
 
-               public function set_active_menu($item)
+               public function set_active_menu( $item )
                {
                        $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
$item;
                }
 
                /**
-               * A more flexible version of xslttemplate.add_file
-               */
-               public function add_template_file($tmpl)
+                * A more flexible version of xslttemplate.add_file
+                */
+               public function add_template_file( $tmpl )
                {
-                       if(is_array($tmpl))
+                       if (is_array($tmpl))
                        {
-                               foreach($tmpl as $t)
+                               foreach ($tmpl as $t)
                                {
                                        $this->add_template_file($t);
                                }
                                return;
                        }
-                       foreach(array_reverse($this->tmpl_search_path) as $path)
+                       foreach (array_reverse($this->tmpl_search_path) as 
$path)
                        {
                                $filename = $path . '/' . $tmpl . '.xsl';
                                if (file_exists($filename))
@@ -257,14 +271,14 @@
                        die;
                }
 
-               public function render_template($output)
+               public function render_template( $output )
                {
                        $GLOBALS['phpgw']->common->phpgw_header(true);
-                       if($this->flash_msgs)
+                       if ($this->flash_msgs)
                        {
                                $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox_data($this->flash_msgs);
                                $msgbox_data = 
$GLOBALS['phpgw']->common->msgbox($msgbox_data);
-                               foreach($msgbox_data as & $message)
+                               foreach ($msgbox_data as & $message)
                                {
                                        echo "<div 
class='{$message['msgbox_class']}'>";
                                        echo $message['msgbox_text'];
@@ -281,14 +295,14 @@
                function lang_array()
                {
                        $keys = func_get_args();
-                       foreach($keys as &$key)
+                       foreach ($keys as &$key)
                        {
                                $key = lang($key);
                        }
                        return $keys;
                }
 
-               public function add_jquery_translation(&$data)
+               public function add_jquery_translation( &$data )
                {
                        $this->add_template_file('jquery_phpgw_i18n');
                        $previous = lang('prev');
@@ -310,46 +324,44 @@
                                $rows_per_page = 10;
                        }
                        $lengthmenu = array();
-                       for($i = 1; $i < 4; $i++)
+                       for ($i = 1; $i < 4; $i++)
                        {
                                $lengthmenu[0][] = $i * $rows_per_page;
                                $lengthmenu[1][] = $i * $rows_per_page;
                        }
 
-                       if(isset($data['datatable']['allrows']) && 
$data['datatable']['allrows'])
+                       if (isset($data['datatable']['allrows']) && 
$data['datatable']['allrows'])
                        {
                                $lengthmenu[0][] = -1;
                                $lengthmenu[1][] = lang('all');
                        }
                        $data['jquery_phpgw_i18n'] = array(
                                'datatable' => array(
-                                       'emptyTable'    =>      json_encode("No 
data available in table"),
-                                       'info'                  =>      
json_encode("Showing _START_ to _END_ of _TOTAL_ entries"),
-                                       'infoEmpty'             =>      
json_encode("Showing 0 to 0 of 0 entries"),
-                                       'infoFiltered'  =>  
json_encode("(filtered from _MAX_ total entries)"),
-                                       'infoPostFix'   =>      json_encode(""),
-                                       'thousands'             =>      
json_encode(","),
-                                       'lengthMenu'    =>      
json_encode("Show _MENU_ entries"),
-                                       'loadingRecords'=>      
json_encode("Loading..."),
-                                       'processing'    =>      
json_encode("Processing..."),
-                                       'search'                =>      
json_encode(lang('search')),
-                                       'zeroRecords'   =>      json_encode("No 
matching records found"),
-                                       'paginate'              =>      
json_encode(array(
-                                                               'first'         
=>      $first,
-                                                               'last'          
=>      $last,
-                                                               'next'          
=>      $next,
-                                                               'previous'      
=>      $previous
-
+                                       'emptyTable' => json_encode("No data 
available in table"),
+                                       'info' => json_encode("Showing _START_ 
to _END_ of _TOTAL_ entries"),
+                                       'infoEmpty' => json_encode("Showing 0 
to 0 of 0 entries"),
+                                       'infoFiltered' => 
json_encode("(filtered from _MAX_ total entries)"),
+                                       'infoPostFix' => json_encode(""),
+                                       'thousands' => json_encode(","),
+                                       'lengthMenu' => json_encode("Show 
_MENU_ entries"),
+                                       'loadingRecords' => 
json_encode("Loading..."),
+                                       'processing' => 
json_encode("Processing..."),
+                                       'search' => json_encode(lang('search')),
+                                       'zeroRecords' => json_encode("No 
matching records found"),
+                                       'paginate' => json_encode(array(
+                                               'first' => $first,
+                                               'last' => $last,
+                                               'next' => $next,
+                                               'previous' => $previous
                                        )),
-                                       'aria'  => json_encode(array(
-                                                               
'sortAscending'=>  ": activate to sort column ascending",
-                                                               
'sortDescending'=> ": activate to sort column descending"
+                                       'aria' => json_encode(array(
+                                               'sortAscending' => ": activate 
to sort column ascending",
+                                               'sortDescending' => ": activate 
to sort column descending"
                                        )),
                                ),
                                'lengthmenu' => array('_' => 
json_encode($lengthmenu))
                        );
 //                     _debug_array($data['jquery_phpgw_i18n']);die();
-
                }
 
                public function add_template_helpers()
@@ -357,11 +369,11 @@
                        $this->add_template_file('helpers');
                }
 
-               public function render_template_xsl($files, $data)
+               public function render_template_xsl( $files, $data )
                {
                        $GLOBALS['phpgw_info']['flags']['xslt_app'] = true;
 
-                       if($this->flash_msgs)
+                       if ($this->flash_msgs)
                        {
                                $data['msgbox_data'] = 
$GLOBALS['phpgw']->common->msgbox($this->flash_msgs);
                        }
@@ -378,28 +390,28 @@
                        $output = phpgw::get_var('output', 'string', 'REQUEST', 
'html');
                        $GLOBALS['phpgw']->xslttpl->set_output($output);
                        $this->add_template_file($files);
-                       
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('data' => $data));
+                       $GLOBALS['phpgw']->xslttpl->set_var('phpgw', 
array('data' => $data));
                }
 
                // Add link key to a result array
                // Add link key to a result array
-               public function _add_links(&$value, $key, $data)
+               public function _add_links( &$value, $key, $data )
                {
                        $unset = 0;
                        // FIXME: Fugly workaround
                        // I cannot figure out why this variable isn't set, but 
it is needed
                        // by the ->link() method, otherwise we wind up in the 
phpgroupware
                        // errorhandler which does lot of weird things and 
breaks the output
-                       if 
(!isset($GLOBALS['phpgw_info']['server']['webserver_url'])) {
+                       if 
(!isset($GLOBALS['phpgw_info']['server']['webserver_url']))
+                       {
                                
$GLOBALS['phpgw_info']['server']['webserver_url'] = "/";
                                $unset = 1;
                        }
 
-                       if(is_array($data))
+                       if (is_array($data))
                        {
                                $link_array = $data;
                                $link_array['id'] = $value['id'];
-
                        }
                        else
                        {
@@ -413,13 +425,14 @@
                        // in phpgroupware which I cannot figure out.
                        // If this variable isn't unset() (if it wasn't set 
before that is)
                        // then it will contain extra slashes and break URLs
-                       if ($unset) {
+                       if ($unset)
+                       {
                                
unset($GLOBALS['phpgw_info']['server']['webserver_url']);
                        }
                }
 
                // Build a YUI result style array
-               public function yui_results($results)
+               public function yui_results( $results )
                {
                        if (!$results)
                        {
@@ -427,36 +440,36 @@
                                $result['results'] = array();
                        }
 
-                       $num_rows = 
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] ? (int) 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] : 15;
+                       $num_rows = 
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] ? 
(int)$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] : 15;
 
                        return array(
                                'ResultSet' => array(
-                                       'totalResultsAvailable' => 
$results['total_records'],
-                                       'totalRecords'          => 
$results['total_records'],// temeporary
-                                       'recordsReturned'       => 
count($results['results']),
-                                       'pageSize'                      => 
$num_rows,
-                                       'startIndex'            => 
$results['start'],
-                                       'sortKey'                       => 
$results['sort'],
-                                       'sortDir'                       => 
$results['dir'],
-                                       'Result'                        => 
$results['results'],
-                                       'actions'                       => 
$results['actions']
+                                       'totalResultsAvailable' => 
$results['total_records'],
+                                       'totalRecords' => 
$results['total_records'], // temeporary
+                                       'recordsReturned' => 
count($results['results']),
+                                       'pageSize' => $num_rows,
+                                       'startIndex' => $results['start'],
+                                       'sortKey' => $results['sort'],
+                                       'sortDir' => $results['dir'],
+                                       'Result' => $results['results'],
+                                       'actions' => $results['actions']
                                )
                        );
                }
 
                // Build a jquery result style array
-               public function jquery_results($result=array())
+               public function jquery_results( $result = array() )
                {
                        if (!$result)
                        {
-                               $result['recordsTotal'] = 0;
-                               $result['recordsFiltered']      = 0;
-                               $result['data']                         = 
array();
+                               $result['recordsTotal'] = 0;
+                               $result['recordsFiltered'] = 0;
+                               $result['data'] = array();
                        }
 
-                       $result['recordsTotal']         = 
$result['total_records'];
-                       $result['recordsFiltered']      = 
$result['recordsTotal'];
-                       $result['data']                         = 
(array)$result['results'];
+                       $result['recordsTotal'] = $result['total_records'];
+                       $result['recordsFiltered'] = $result['recordsTotal'];
+                       $result['data'] = (array)$result['results'];
                        unset($result['results']);
                        unset($result['total_records']);
 
@@ -467,38 +480,36 @@
                 * Initiate rich text editor for selected targets
                 * @param array $targets
                 */
-               public function rich_text_editor($targets)
+               public function rich_text_editor( $targets )
                {
-                       if(!is_array($targets))
+                       if (!is_array($targets))
                        {
                                $targets = array($targets);
                        }
-                       foreach ( $targets as $target )
+                       foreach ($targets as $target)
                        {
                                phpgwapi_jquery::init_ckeditor($target);
                        }
                }
 
-
                /**
                 * Initiate rich text editor for selected targets
                 * @param array $targets
                 */
-               public function use_yui_editor($targets)
+               public function use_yui_editor( $targets )
                {
                        $this->rich_text_editor($targets);
                }
 
-               public function render($template,$local_variables = array())
+               public function render( $template, $local_variables = array() )
                {
-                       foreach($local_variables as $name => $value)
+                       foreach ($local_variables as $name => $value)
                        {
                                $$name = $value;
-
                        }
 
                        ob_start();
-                       foreach(array_reverse($this->tmpl_search_path) as $path)
+                       foreach (array_reverse($this->tmpl_search_path) as 
$path)
                        {
                                $filename = $path . '/' . $template;
                                if (file_exists($filename))
@@ -526,25 +537,31 @@
                 * @param $extra_cols the list of extra columns to set
                 * @return string javascript
                 */
-               public static function get_extra_column_defs($array_name, 
$extra_cols = array())
+               public static function get_extra_column_defs( $array_name, 
$extra_cols = array() )
                {
                        $result = "";
 
-                       foreach($extra_cols as $col){
-                               $literal  = '{';
+                       foreach ($extra_cols as $col)
+                       {
+                               $literal = '{';
                                $literal .= 'key: "' . $col['key'] . '",';
                                $literal .= 'label: "' . $col['label'] . '"';
-                               if (isset($col['formatter'])) {
+                               if (isset($col['formatter']))
+                               {
                                        $literal .= ',formatter: ' . 
$col['formatter'];
                                }
-                               if (isset($col['parser'])) {
+                               if (isset($col['parser']))
+                               {
                                        $literal .= ',parser: ' . 
$col['parser'];
                                }
                                $literal .= '}';
 
-                               if($col["index"]){
-                                       $result .= 
"{$array_name}.splice(".$col["index"].", 0,".$literal.");";
-                               } else {
+                               if ($col["index"])
+                               {
+                                       $result .= "{$array_name}.splice(" . 
$col["index"] . ", 0," . $literal . ");";
+                               }
+                               else
+                               {
                                        $result .= 
"{$array_name}.push($literal);";
                                }
                        }
@@ -560,11 +577,12 @@
                 * @param $editors the list of editors, keyed by column key
                 * @return string javascript
                 */
-               public static function get_column_editors($array_name, $editors 
= array())
+               public static function get_column_editors( $array_name, 
$editors = array() )
                {
-                       $result  = "for (var i in {$array_name}) {\n";
+                       $result = "for (var i in {$array_name}) {\n";
                        $result .= "    switch ({$array_name}[i].key) {\n";
-                       foreach ($editors as $field => $editor) {
+                       foreach ($editors as $field => $editor)
+                       {
                                $result .= "            case '{$field}':\n";
                                $result .= "                    
{$array_name}[i].editor = {$editor};\n";
                                $result .= "                    break;\n";
@@ -584,36 +602,39 @@
                 * @param $field the name of the attribute to display errors for
                 * @return string a html formatted error message
                 */
-               public static function get_field_error($object, $field)
+               public static function get_field_error( $object, $field )
                {
-                       if(isset($object))
+                       if (isset($object))
                        {
                                $errors = $object->get_validation_errors();
 
-                               if ($errors[$field]) {
+                               if ($errors[$field])
+                               {
                                        return '<label class="error" for="' . 
$field . '">' . $errors[$field] . '</label>';
                                }
                                return '';
                        }
                }
 
-               public static function get_messages($messages, $message_type)
+               public static function get_messages( $messages, $message_type )
                {
                        $output = '';
-                       if(is_array($messages) && count($messages) > 0) // 
Array of messages
+                       if (is_array($messages) && count($messages) > 0) // 
Array of messages
                        {
                                $output = "<div class=\"{$message_type}\">";
-                               foreach($messages as $message)
+                               foreach ($messages as $message)
                                {
                                        $output .= "<p 
class=\"message\">{$message}</p>";
                                }
                                $output .= "</div>";
                        }
-                       else if($messages) {
+                       else if ($messages)
+                       {
                                $output = "<div class=\"{$message_type}\"><p 
class=\"message\">{$messages}</p></div>";
                        }
                        return $output;
                }
+
                /**
                 * Returns a html-formatted error message to display on top of 
the page.  If
                 * no error is defined, an empty string is returned.
@@ -621,7 +642,7 @@
                 * @param $error the error to display
                 * @return string a html formatted error message
                 */
-               public static function get_page_error($errors)
+               public static function get_page_error( $errors )
                {
                        return self::get_messages($errors, 'error');
                }
@@ -633,7 +654,7 @@
                 * @param $error the error to display
                 * @return string a html formatted error message
                 */
-               public static function get_page_warning($warnings)
+               public static function get_page_warning( $warnings )
                {
                        return self::get_messages($warnings, 'warning');
                }
@@ -645,7 +666,7 @@
                 * @param $message the message to display
                 * @return string a html formatted info message
                 */
-               public static function get_page_message($messages)
+               public static function get_page_message( $messages )
                {
                        return self::get_messages($messages, 'info');
                }
@@ -660,9 +681,12 @@
 
                        $keys = array();
 
-                       if(count($list[0]) > 0) {
-                               foreach($list[0] as $key => $value) {
-                                       if(!is_array($value)) {
+                       if (count($list[0]) > 0)
+                       {
+                               foreach ($list[0] as $key => $value)
+                               {
+                                       if (!is_array($value))
+                                       {
                                                array_push($keys, $key);
                                        }
                                }
@@ -670,18 +694,18 @@
 
                        // Remove newlines from output
                        $count = count($list);
-                       for($i = 0; $i < $count; $i++)
+                       for ($i = 0; $i < $count; $i++)
                        {
-                               foreach ($list[$i] as $key => &$data)
-                               {
-                                       $data = str_replace(array("\n","\r\n", 
"<br>"),'',$data);
-                               }
+                               foreach ($list[$i] as $key => &$data)
+                               {
+                                       $data = str_replace(array("\n", "\r\n", 
"<br>"), '', $data);
+                               }
                        }
 
-                        // Use keys as headings
+                       // Use keys as headings
                        $headings = array();
                        $count_keys = count($keys);
-                       for($j=0;$j<$count_keys;$j++)
+                       for ($j = 0; $j < $count_keys; $j++)
                        {
                                array_push($headings, lang($keys[$j]));
                        }
@@ -698,7 +722,7 @@
                 *
                 * @return string Human-readable string.
                 */
-               public static function 
humanize($lower_case_and_underscored_word)
+               public static function humanize( 
$lower_case_and_underscored_word )
                {
                        if (substr($lower_case_and_underscored_word, -3) === 
'_id')
                        {
@@ -708,13 +732,13 @@
                        return ucfirst(str_replace('_', ' ', 
$lower_case_and_underscored_word));
                }
 
-         /**
-          * Retrieves an array of files from $_FILES
-          *
-          * @param  string $key        A key
-          * @return array              An associative array of files
-          */
-               public function get_files($key = null)
+               /**
+                * Retrieves an array of files from $_FILES
+                *
+                * @param  string $key          A key
+                * @return array                An associative array of files
+                */
+               public function get_files( $key = null )
                {
                        if (!$this->filesArray)
                        {
@@ -726,7 +750,7 @@
 
                public function toggle_show_showall()
                {
-                       if(isset($_SESSION['showall']) && 
!empty($_SESSION['showall']))
+                       if (isset($_SESSION['showall']) && 
!empty($_SESSION['showall']))
                        {
                                unset($_SESSION['showall']);
                        }
@@ -734,12 +758,12 @@
                        {
                                $_SESSION['showall'] = "1";
                        }
-                       $this->redirect(array('menuaction' => 
$this->url_prefix.'.index'));
+                       $this->redirect(array('menuaction' => $this->url_prefix 
. '.index'));
                }
 
                public function toggle_show_inactive()
                {
-                       if(isset($_SESSION['showall']) && 
!empty($_SESSION['showall']))
+                       if (isset($_SESSION['showall']) && 
!empty($_SESSION['showall']))
                        {
                                unset($_SESSION['showall']);
                        }
@@ -747,10 +771,10 @@
                        {
                                $_SESSION['showall'] = "1";
                        }
-                       $this->redirect(array('menuaction' => 
$this->url_prefix.'.index'));
+                       $this->redirect(array('menuaction' => $this->url_prefix 
. '.index'));
                }
 
-               static protected function fix_php_files_array($data)
+               static protected function fix_php_files_array( $data )
                {
                        $fileKeys = array('error', 'name', 'size', 'tmp_name', 
'type');
                        $keys = array_keys($data);
@@ -758,22 +782,22 @@
 
                        if ($fileKeys != $keys || !isset($data['name']) || 
!is_array($data['name']))
                        {
-                               return $data;
+                               return $data;
                        }
 
                        $files = $data;
                        foreach ($fileKeys as $k)
                        {
-                               unset($files[$k]);
+                               unset($files[$k]);
                        }
                        foreach (array_keys($data['name']) as $key)
                        {
                                $files[$key] = self::fix_php_files_array(array(
-                                       'error' => $data['error'][$key],
-                                       'name'   => $data['name'][$key],
-                                       'type'   => $data['type'][$key],
+                                       'error' => $data['error'][$key],
+                                       'name' => $data['name'][$key],
+                                       'type' => $data['type'][$key],
                                        'tmp_name' => $data['tmp_name'][$key],
-                                       'size'   => $data['size'][$key],
+                                       'size' => $data['size'][$key],
                                ));
                        }
 
@@ -781,13 +805,13 @@
                }
 
                /**
-               * It's safe to pass an already converted array, in which case 
this method just returns the original array unmodified.
-               *
-               * @param  array $taintedFiles An array representing uploaded 
file information
-               *
-               * @return array An array of re-ordered uploaded file information
-               */
-               static public function convert_file_information(array 
$taintedFiles)
+                * It's safe to pass an already converted array, in which case 
this method just returns the original array unmodified.
+                *
+                * @param  array $taintedFiles An array representing uploaded 
file information
+                *
+                * @return array An array of re-ordered uploaded file 
information
+                */
+               static public function convert_file_information( array 
$taintedFiles )
                {
                        $files = array();
                        foreach ($taintedFiles as $key => $data)
@@ -797,4 +821,4 @@
 
                        return $files;
                }
-       }
+       }
\ No newline at end of file

Modified: trunk/property/inc/class.XmlToArray.inc.php
===================================================================
--- trunk/property/inc/class.XmlToArray.inc.php 2016-02-11 15:47:31 UTC (rev 
14725)
+++ trunk/property/inc/class.XmlToArray.inc.php 2016-02-11 20:07:07 UTC (rev 
14726)
@@ -153,25 +153,25 @@
                 * @param   bool        $includeEmptyValues (optional) Defaults 
to no/false
                 * @return  object  XmlToArray instance
                 */
-               function __construct($encoding = NULL, $stripLinebreaks = NULL, 
$includeRootElement = NULL, $automaticUtf8Decoding = NULL, $includeEmptyValues 
= NULL)
+               function __construct( $encoding = NULL, $stripLinebreaks = 
NULL, $includeRootElement = NULL, $automaticUtf8Decoding = NULL, 
$includeEmptyValues = NULL )
                {
-                       if(is_string($encoding))
+                       if (is_string($encoding))
                        {
                                $this->setEncoding($encoding);
                        }
-                       if(is_bool($stripLinebreaks))
+                       if (is_bool($stripLinebreaks))
                        {
                                $this->setStripsLinebreaks($stripLinebreaks);
                        }
-                       if(is_bool($includeRootElement))
+                       if (is_bool($includeRootElement))
                        {
                                $this->setIncludesRoot($includeRootElement);
                        }
-                       if(is_bool($automaticUtf8Decoding))
+                       if (is_bool($automaticUtf8Decoding))
                        {
                                
$this->setDecodesUTF8Automaticly($automaticUtf8Decoding);
                        }
-                       if(is_bool($includeEmptyValues))
+                       if (is_bool($includeEmptyValues))
                        {
                                
$this->setIncludesEmptyValues($includeEmptyValues);
                        }
@@ -187,10 +187,10 @@
                 *
                 * @param  string  $enc
                 */
-               function setEncoding($enc)
+               function setEncoding( $enc )
                {
                        $enc = strtoupper($enc);
-                       if($enc != 'ISO-8859-1' && $enc != 'UTF-8' && $enc != 
'US-ASCII')
+                       if ($enc != 'ISO-8859-1' && $enc != 'UTF-8' && $enc != 
'US-ASCII')
                        {
                                $this->_logError('setEncoding', 'Unsupported 
encoding specified. Using default/current.');
                                return;
@@ -209,7 +209,7 @@
                /**
                 * @param bool $b
                 */
-               function setStripsLinebreaks($b)
+               function setStripsLinebreaks( $b )
                {
                        $this->_strip_linebreaks = $b;
                }
@@ -225,7 +225,7 @@
                /**
                 * @param int $i  CASE_LOWER or CASE_UPPER
                 */
-               function setTagCase($i)
+               function setTagCase( $i )
                {
                        $this->_lower_case_tags = ($i == CASE_LOWER);
                }
@@ -236,7 +236,7 @@
                 *
                 * @param bool $b
                 */
-               function setIncludesRoot($b)
+               function setIncludesRoot( $b )
                {
                        $this->_includesRoot = $b;
                }
@@ -255,7 +255,7 @@
                 *
                 * @param bool $b
                 */
-               function setDecodesUTF8Automaticly($b)
+               function setDecodesUTF8Automaticly( $b )
                {
                        $this->_automaticUtf8Decoding = $b;
                }
@@ -274,7 +274,7 @@
                 *
                 * @param bool $b
                 */
-               function setIncludesEmptyValues($b)
+               function setIncludesEmptyValues( $b )
                {
                        $this->_include_empty_values = $b;
                }
@@ -308,11 +308,11 @@
                 *                                                              
           or array(&$object, 'function')
                 * @return  bool  Success?
                 */
-               function setValueModifier($function)
+               function setValueModifier( $function )
                {
-                       if(is_string($function))
+                       if (is_string($function))
                        {
-                               if(function_exists($function))
+                               if (function_exists($function))
                                {
                                        $this->_valueModifier = $function;
                                        return true;
@@ -323,7 +323,7 @@
                                        return false;
                                }
                        }
-                       else if(is_array($function))
+                       else if (is_array($function))
                        {
                                $this->_valueModifier = $function;
                        }
@@ -349,9 +349,9 @@
                 * @param string $file
                 * @return array
                 */
-               function parseFile($file)
+               function parseFile( $file )
                {
-                       if(!file_exists($file))
+                       if (!file_exists($file))
                        {
                                $this->_logError('parseFile', 'The file "' . 
$file . '" can not be found!');
                                return array();
@@ -362,11 +362,11 @@
                /**
                 * @access private
                 */
-               function _logError($function, $msg)
+               function _logError( $function, $msg )
                {
                        list($usec, $sec) = explode(" ", microtime());
                        $time = ((float)$usec + (float)$sec) - 
$this->_error_start_timer;
-                       $this->_error_trace[]    = array($function, $msg, 
$time);
+                       $this->_error_trace[] = array($function, $msg, $time);
                }
 
                /**
@@ -376,11 +376,11 @@
                 */
                function errors()
                {
-                       if(count($this->_error_trace) == 0)
+                       if (count($this->_error_trace) == 0)
                                return NULL;
-                       $s       = '';
+                       $s = '';
                        $len = count($this->_error_trace) - 1;
-                       for($i = $len; $i > -1; $i--)
+                       for ($i = $len; $i > -1; $i--)
                        {
                                $s .= '[' . round($this->_error_trace[$i][2] * 
1000, 2) . ' ms] <b>XmlToArray2->' . $this->_error_trace[$i][0] . '()</b> ' . 
$this->_error_trace[$i][1] . "<br/>";
                        }
@@ -393,17 +393,17 @@
                 *
                 * @access private
                 */
-               function _onValue($value)
+               function _onValue( $value )
                {
-                       if($this->_strip_linebreaks)
+                       if ($this->_strip_linebreaks)
                        {
                                $value = preg_replace('/[\r\n]+/', ' ', $value);
                        }
-                       if($this->_decodeUtf8)
+                       if ($this->_decodeUtf8)
                        {
                                $value = utf8_decode($value);
                        }
-                       if($this->_valueModifier != NULL)
+                       if ($this->_valueModifier != NULL)
                        {
                                $value = @call_user_func($this->_valueModifier, 
$value);
                        }
@@ -415,9 +415,9 @@
                 *
                 * @access private
                 */
-               function _onAttributes($attr)
+               function _onAttributes( $attr )
                {
-                       foreach($attr as $k => $v)
+                       foreach ($attr as $k => $v)
                        {
                                $attr[$k] = $this->_onValue($v);
                        }
@@ -430,20 +430,20 @@
                 * @param string $data
                 * @return array
                 */
-               function parse($data)
+               function parse( $data )
                {
                        $data = trim($data);
-                       $err     = false;
+                       $err = false;
 
-                       if($data == '')
+                       if ($data == '')
                        {
                                $this->_logError('parse', 'Empty data');
                                return array();
                        }
 
-                       if($this->_automaticUtf8Decoding)
+                       if ($this->_automaticUtf8Decoding)
                        {
-                               if($this->_seems_utf8($data))
+                               if ($this->_seems_utf8($data))
                                {
                                        $this->_decodeUtf8 = true;
                                }
@@ -454,10 +454,10 @@
                        xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 
0);
                        xml_parse_into_struct($parser, $data, $vals, $index) or 
$err = true;
 
-                       if($err)
+                       if ($err)
                        {
                                $this->_logError('parse', 'XML parser failed: '
-                               . 
ucfirst(xml_error_string(xml_get_error_code($parser))));
+                                       . 
ucfirst(xml_error_string(xml_get_error_code($parser))));
                                xml_parser_free($parser);
                                return;
                        }
@@ -467,11 +467,11 @@
                        $i = 0;
 
                        $tagname = ( $this->_lower_case_tags ) ? 
strtolower($vals[$i]['tag']) : $vals[$i]['tag'];
-                       if(isset($vals[$i]['attributes']))
+                       if (isset($vals[$i]['attributes']))
                        {
-                               if($this->get_attributes)
+                               if ($this->get_attributes)
                                {
-                                       $tree[$tagname][]['@']   = 
$vals[$i]['attributes'];
+                                       $tree[$tagname][]['@'] = 
$vals[$i]['attributes'];
                                        $index = count($tree[$tagname]) - 1;
                                        $tree[$tagname][$index] = 
array_merge($tree[$tagname][$index], $this->_getChildren($vals, $i));
                                }
@@ -485,10 +485,10 @@
                                $tree[$tagname][] = $this->_getChildren($vals, 
$i);
                        }
 
-                       if(!$this->_includesRoot)
+                       if (!$this->_includesRoot)
                        {
                                $keys = array_keys($tree);
-                               $tree    = $tree[$keys[0]][0];
+                               $tree = $tree[$keys[0]][0];
                        }
                        return $tree;
                }
@@ -497,30 +497,30 @@
                 * @access private
                 * @return mixed
                 */
-               function _getChildren($vals, &$i)
+               function _getChildren( $vals, &$i )
                {
                        $children = array(); // Contains node data
-                       if(isset($vals[$i]['tag']))
+                       if (isset($vals[$i]['tag']))
                        {
-                               if(isset($vals[$i]['value']) && 
trim($vals[$i]['value']) != '')
+                               if (isset($vals[$i]['value']) && 
trim($vals[$i]['value']) != '')
                                {
                                        $children = 
$this->_onValue($vals[$i]['value']);
                                }
-                               while(++$i < count($vals))
+                               while (++$i < count($vals))
                                {
-                                       switch($vals[$i]['type'])
+                                       switch ($vals[$i]['type'])
                                        {
                                                case 'cdata':
-                                                       
if(isset($children['#']))
+                                                       if 
(isset($children['#']))
                                                        {
-                                                               
if(trim($vals[$i]['value']) != '')
+                                                               if 
(trim($vals[$i]['value']) != '')
                                                                {
                                                                        
$children['#'] .= $vals[$i]['value'];
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               
if(trim($vals[$i]['value']) != '')
+                                                               if 
(trim($vals[$i]['value']) != '')
                                                                {
                                                                        
$children['#'] = $vals[$i]['value'];
                                                                }
@@ -529,17 +529,17 @@
 
                                                case 'complete':
                                                        $tagname = ( 
$this->_lower_case_tags ) ? strtolower($vals[$i]['tag']) : $vals[$i]['tag'];
-                                                       
if(isset($vals[$i]['attributes']))
+                                                       if 
(isset($vals[$i]['attributes']))
                                                        {
-                                                               
if($this->get_attributes)
+                                                               if 
($this->get_attributes)
                                                                {
-                                                                       
$children[$tagname][]['@']       = $vals[$i]['attributes'];
+                                                                       
$children[$tagname][]['@'] = $vals[$i]['attributes'];
                                                                        $index 
= count($children[$tagname]) - 1;
                                                                }
 
-                                                               
if(isset($vals[$i]['value']))
+                                                               if 
(isset($vals[$i]['value']))
                                                                {
-                                                                       
if($this->get_attributes)
+                                                                       if 
($this->get_attributes)
                                                                        {
                                                                                
$children[$tagname][] = $this->_onValue($vals[$i]['value']);
                                                                        }
@@ -548,18 +548,18 @@
                                                                                
$children[$tagname] = $this->_onValue($vals[$i]['value']);
                                                                        }
                                                                }
-                                                               else 
if($this->_include_empty_values)
+                                                               else if 
($this->_include_empty_values)
                                                                {
                                                                        
$children[$tagname] = '';
                                                                }
                                                        }
                                                        else
                                                        {
-                                                               
if(isset($vals[$i]['value']))
+                                                               if 
(isset($vals[$i]['value']))
                                                                {
                                                                        
$children[$tagname] = $this->_onValue($vals[$i]['value']);
                                                                }
-                                                               else 
if($this->_include_empty_values)
+                                                               else if 
($this->_include_empty_values)
                                                                {
                                                                        
$children[$tagname] = '';
                                                                }
@@ -568,9 +568,9 @@
 
                                                case 'open':
                                                        $tagname = ( 
$this->_lower_case_tags ) ? strtolower($vals[$i]['tag']) : $vals[$i]['tag'];
-                                                       
if(isset($vals[$i]['attributes']))
+                                                       if 
(isset($vals[$i]['attributes']))
                                                        {
-                                                               
if($this->get_attributes)
+                                                               if 
($this->get_attributes)
                                                                {
                                                                        
$children[$tagname][]['@'] = $this->_onAttributes($vals[$i]['attributes']);
                                                                        //      
$index = count($children[$tagname])-1;
@@ -598,27 +598,27 @@
                /**
                 * @access private
                 */
-               function _seems_utf8($Str)
+               function _seems_utf8( $Str )
                {
-                       for($i = 0; $i < strlen($Str); $i++)
+                       for ($i = 0; $i < strlen($Str); $i++)
                        {
-                               if(ord($Str[$i]) < 0x80)
+                               if (ord($Str[$i]) < 0x80)
                                        continue;# 0bbbbbbb
-                               elseif((ord($Str[$i]) & 0xE0) == 0xC0)
-                                       $n       = 1;# 110bbbbb
-                               elseif((ord($Str[$i]) & 0xF0) == 0xE0)
-                                       $n       = 2;# 1110bbbb
-                               elseif((ord($Str[$i]) & 0xF8) == 0xF0)
-                                       $n       = 3;# 11110bbb
-                               elseif((ord($Str[$i]) & 0xFC) == 0xF8)
-                                       $n       = 4;# 111110bb
-                               elseif((ord($Str[$i]) & 0xFE) == 0xFC)
-                                       $n       = 5;# 1111110b
+                               elseif ((ord($Str[$i]) & 0xE0) == 0xC0)
+                                       $n = 1;# 110bbbbb
+                               elseif ((ord($Str[$i]) & 0xF0) == 0xE0)
+                                       $n = 2;# 1110bbbb
+                               elseif ((ord($Str[$i]) & 0xF8) == 0xF0)
+                                       $n = 3;# 11110bbb
+                               elseif ((ord($Str[$i]) & 0xFC) == 0xF8)
+                                       $n = 4;# 111110bb
+                               elseif ((ord($Str[$i]) & 0xFE) == 0xFC)
+                                       $n = 5;# 1111110b
                                else
                                        return false;# Does not match any model
-                               for($j = 0; $j < $n; $j++) # n bytes matching 
10bbbbbb follow ?
+                               for ($j = 0; $j < $n; $j++) # n bytes matching 
10bbbbbb follow ?
                                {
-                                       if(( ++$i == strlen($Str)) || 
((ord($Str[$i]) & 0xC0) != 0x80))
+                                       if (( ++$i == strlen($Str)) || 
((ord($Str[$i]) & 0xC0) != 0x80))
                                        {
                                                return false;
                                        }
@@ -626,4 +626,4 @@
                        }
                        return true;
                }
-       }
+       }
\ No newline at end of file

Modified: trunk/property/inc/class.boXport.inc.php
===================================================================
--- trunk/property/inc/class.boXport.inc.php    2016-02-11 15:47:31 UTC (rev 
14725)
+++ trunk/property/inc/class.boXport.inc.php    2016-02-11 20:07:07 UTC (rev 
14726)
@@ -36,9 +36,9 @@
 
                var $public_functions = array
                        (
-                       'import'                 => true,
-                       'export'                 => true,
-                       'export_cron'    => true
+                       'import' => true,
+                       'export' => true,
+                       'export_cron' => true
                );
                var $start;
                var $query;
@@ -46,45 +46,45 @@
                var $order;
                var $filter;
                var $cat_id;
-               var $use_session                 = false;
+               var $use_session = false;
 
-               function __construct($session = false)
+               function __construct( $session = false )
                {
 
                        $GLOBALS['phpgw_info']['flags']['currentapp'] = 
'property';
 
                        $this->config = CreateObject('admin.soconfig', 
$GLOBALS['phpgw']->locations->get_id('property', '.invoice'));
 
-                       if($session)
+                       if ($session)
                        {
                                $this->read_sessiondata();
                                $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');
+                       $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');
 
-                       if($start || $start == 0)
+                       if ($start || $start == 0)
                        {
                                $this->start = $start;
                        }
-                       if($query)
+                       if ($query)
                        {
                                $this->query = $query;
                        }
-                       if($sort)
+                       if ($sort)
                        {
                                $this->sort = $sort;
                        }
-                       if($order)
+                       if ($order)
                        {
                                $this->order = $order;
                        }
-                       if($filter)
+                       if ($filter)
                        {
                                $this->filter = $filter;
                        }
@@ -94,18 +94,18 @@
                function save_sessiondata()
                {
 
-                       if($this->use_session)
+                       if ($this->use_session)
                        {
                                $data = array
                                        (
-                                       'start'  => $this->start,
-                                       'query'  => $this->query,
-                                       'sort'   => $this->sort,
-                                       'order'  => $this->order,
+                                       'start' => $this->start,
+                                       'query' => $this->query,
+                                       'sort' => $this->sort,
+                                       'order' => $this->order,
                                        'filter' => $this->filter,
                                        'cat_id' => $this->cat_id
                                );
-                               if($this->debug)
+                               if ($this->debug)
                                {
                                        echo '<br>Save:';
                                        _debug_array($data);
@@ -118,22 +118,22 @@
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data', 'export');
 
-                       $this->start     = $data['start'];
-                       $this->query     = $data['query'];
-                       $this->sort              = $data['sort'];
-                       $this->order     = $data['order'];
-                       $this->filter    = $data['filter'];
-                       $this->cat_id    = $data['cat_id'];
+                       $this->start = $data['start'];
+                       $this->query = $data['query'];
+                       $this->sort = $data['sort'];
+                       $this->order = $data['order'];
+                       $this->filter = $data['filter'];
+                       $this->cat_id = $data['cat_id'];
                }
 
-               function select_import_conv($selected = '')
+               function select_import_conv( $selected = '' )
                {
-                       $dir_handle      = @opendir(PHPGW_SERVER_ROOT . 
"/property/inc/import/{$GLOBALS['phpgw_info']['user']['domain']}");
-                       $i                       = 0;
+                       $dir_handle = @opendir(PHPGW_SERVER_ROOT . 
"/property/inc/import/{$GLOBALS['phpgw_info']['user']['domain']}");
+                       $i = 0;
                        $myfilearray = array();
-                       while($file              = readdir($dir_handle))
+                       while ($file = readdir($dir_handle))
                        {
-                               if((substr($file, 0, 1) != '.') && 
is_file(PHPGW_SERVER_ROOT . 
"/property/inc/import/{$GLOBALS['phpgw_info']['user']['domain']}/{$file}"))
+                               if ((substr($file, 0, 1) != '.') && 
is_file(PHPGW_SERVER_ROOT . 
"/property/inc/import/{$GLOBALS['phpgw_info']['user']['domain']}/{$file}"))
                                {
                                        $myfilearray[$i] = $file;
                                        $i++;
@@ -142,26 +142,26 @@
                        closedir($dir_handle);
                        sort($myfilearray);
 
-                       for($i = 0; $i < count($myfilearray); $i++)
+                       for ($i = 0; $i < count($myfilearray); $i++)
                        {
-                               $fname           = preg_replace('/_/', ' ', 
$myfilearray[$i]);
-                               $sel_file        = '';
-                               if($myfilearray[$i] == $selected)
+                               $fname = preg_replace('/_/', ' ', 
$myfilearray[$i]);
+                               $sel_file = '';
+                               if ($myfilearray[$i] == $selected)
                                {
                                        $sel_file = 'selected';
                                }
 
                                $conv_list[] = array
                                        (
-                                       'id'             => $myfilearray[$i],
-                                       'name'           => $fname,
-                                       'selected'       => $sel_file
+                                       'id' => $myfilearray[$i],
+                                       'name' => $fname,
+                                       'selected' => $sel_file
                                );
                        }
 
-                       for($i = 0; $i < count($conv_list); $i++)
+                       for ($i = 0; $i < count($conv_list); $i++)
                        {
-                               if($conv_list[$i]['selected'] != 'selected')
+                               if ($conv_list[$i]['selected'] != 'selected')
                                {
                                        unset($conv_list[$i]['selected']);
                                }
@@ -170,14 +170,14 @@
                        return $conv_list;
                }
 
-               function select_export_conv($selected = '')
+               function select_export_conv( $selected = '' )
                {
-                       $dir_handle      = @opendir(PHPGW_SERVER_ROOT . 
"/property/inc/export/{$GLOBALS['phpgw_info']['user']['domain']}");
-                       $i                       = 0;
+                       $dir_handle = @opendir(PHPGW_SERVER_ROOT . 
"/property/inc/export/{$GLOBALS['phpgw_info']['user']['domain']}");
+                       $i = 0;
                        $myfilearray = array();
-                       while($file              = readdir($dir_handle))
+                       while ($file = readdir($dir_handle))
                        {
-                               if((substr($file, 0, 1) != '.') && 
is_file(PHPGW_SERVER_ROOT . 
"/property/inc/export/{$GLOBALS['phpgw_info']['user']['domain']}/{$file}"))
+                               if ((substr($file, 0, 1) != '.') && 
is_file(PHPGW_SERVER_ROOT . 
"/property/inc/export/{$GLOBALS['phpgw_info']['user']['domain']}/{$file}"))
                                {
                                        $myfilearray[$i] = $file;
                                        $i++;
@@ -186,26 +186,26 @@
                        closedir($dir_handle);
                        sort($myfilearray);
 
-                       for($i = 0; $i < count($myfilearray); $i++)
+                       for ($i = 0; $i < count($myfilearray); $i++)
                        {
-                               $fname           = preg_replace('/_/', ' ', 
$myfilearray[$i]);
-                               $sel_file        = '';
-                               if($myfilearray[$i] == $selected)
+                               $fname = preg_replace('/_/', ' ', 
$myfilearray[$i]);
+                               $sel_file = '';
+                               if ($myfilearray[$i] == $selected)
                                {
                                        $sel_file = 'selected';
                                }
 
                                $conv_list[] = array
                                        (
-                                       'id'             => $myfilearray[$i],
-                                       'name'           => $fname,
-                                       'selected'       => $sel_file
+                                       'id' => $myfilearray[$i],
+                                       'name' => $fname,
+                                       'selected' => $sel_file
                                );
                        }
 
-                       for($i = 0; $i < count($conv_list); $i++)
+                       for ($i = 0; $i < count($conv_list); $i++)
                        {
-                               if($conv_list[$i]['selected'] != 'selected')
+                               if ($conv_list[$i]['selected'] != 'selected')
                                {
                                        unset($conv_list[$i]['selected']);
                                }
@@ -214,16 +214,16 @@
                        return $conv_list;
                }
 
-               function select_rollback_file($selected = '')
+               function select_rollback_file( $selected = '' )
                {
                        $file_catalog = 
$this->config->config_data['export']['path'];
 
-                       $dir_handle      = @opendir($file_catalog);
-                       $i                       = 0;
+                       $dir_handle = @opendir($file_catalog);
+                       $i = 0;
                        $myfilearray = '';
-                       while($file              = readdir($dir_handle))
+                       while ($file = readdir($dir_handle))
                        {
-                               if((substr($file, 0, 1) != '.') && 
is_file("{$file_catalog}/{$file}"))
+                               if ((substr($file, 0, 1) != '.') && 
is_file("{$file_catalog}/{$file}"))
                                {
                                        $myfilearray[$i] = $file;
                                        $i++;
@@ -232,26 +232,26 @@
                        closedir($dir_handle);
                        @sort($myfilearray);
 
-                       for($i = 0; $i < count($myfilearray); $i++)
+                       for ($i = 0; $i < count($myfilearray); $i++)
                        {
-                               $fname           = preg_replace('/_/', ' ', 
$myfilearray[$i]);
-                               $sel_file        = '';
-                               if($myfilearray[$i] == $selected)
+                               $fname = preg_replace('/_/', ' ', 
$myfilearray[$i]);
+                               $sel_file = '';
+                               if ($myfilearray[$i] == $selected)
                                {
                                        $sel_file = 'selected';
                                }
 
                                $rollback_list[] = array
                                        (
-                                       'id'             => $myfilearray[$i],
-                                       'name'           => $fname,
-                                       'selected'       => $sel_file
+                                       'id' => $myfilearray[$i],
+                                       'name' => $fname,
+                                       'selected' => $sel_file
                                );
                        }
 
-                       for($i = 0; $i < count($rollback_list); $i++)
+                       for ($i = 0; $i < count($rollback_list); $i++)
                        {
-                               if($rollback_list[$i]['selected'] != 'selected')
+                               if ($rollback_list[$i]['selected'] != 
'selected')
                                {
                                        unset($rollback_list[$i]['selected']);
                                }
@@ -260,18 +260,18 @@
                        return $rollback_list;
                }
 
-               function import($invoice_common, $download)
+               function import( $invoice_common, $download )
                {
                        include (PHPGW_SERVER_ROOT . 
"/property/inc/import/{$GLOBALS['phpgw_info']['user']['domain']}/{$invoice_common['conv_type']}");
                        $invoice = new import_conv;
 
                        $buffer = $invoice->import($invoice_common, $download);
-                       if($download)
+                       if ($download)
                        {
-                               $header  = $invoice->header;
-                               $import  = $invoice->import;
-                               $buffer  = array(
-                                       'table'  => $buffer,
+                               $header = $invoice->header;
+                               $import = $invoice->import;
+                               $buffer = array(
+                                       'table' => $buffer,
                                        'header' => $header,
                                        'import' => $import
                                );
@@ -279,12 +279,12 @@
                        return $buffer;
                }
 
-               function export($data)
+               function export( $data )
                {
-                       $conv_type                       = $data['conv_type'];
-                       $download                        = $data['download'];
-                       $pre_transfer            = $data['pre_transfer'];
-                       $force_period_year       = $data['force_period_year'];
+                       $conv_type = $data['conv_type'];
+                       $download = $data['download'];
+                       $pre_transfer = $data['pre_transfer'];
+                       $force_period_year = $data['force_period_year'];
 
                        include(PHPGW_SERVER_ROOT . 
"/property/inc/export/{$GLOBALS['phpgw_info']['user']['domain']}/{$conv_type}");
                        $invoice = new export_conv;
@@ -294,20 +294,20 @@
                        return $buffer;
                }
 
-               function rollback($conv_type, $role_back_date, $rollback_file, 
$rollback_voucher, $voucher_id_intern)
+               function rollback( $conv_type, $role_back_date, $rollback_file, 
$rollback_voucher, $voucher_id_intern )
                {
                        include (PHPGW_SERVER_ROOT . 
"/property/inc/export/{$GLOBALS['phpgw_info']['user']['domain']}/{$conv_type}");
                        $invoice = new export_conv;
-                       $buffer  = $invoice->RullTilbake($role_back_date, 
$rollback_file, $rollback_voucher, $voucher_id_intern);
+                       $buffer = $invoice->RullTilbake($role_back_date, 
$rollback_file, $rollback_voucher, $voucher_id_intern);
                        return $buffer;
                }
 
-               function export_cron($data = array())
+               function export_cron( $data = array() )
                {
-                       if(!$data)
+                       if (!$data)
                        {
-                               $data    = 
unserialize(urldecode(phpgw::get_var('data')));
-                               $data    = phpgw::clean_value($data);
+                               $data = 
unserialize(urldecode(phpgw::get_var('data')));
+                               $data = phpgw::clean_value($data);
                        }
                        _debug_array($data);
                        $receipt = $this->export($data);

Modified: trunk/property/inc/class.boadmin.inc.php
===================================================================
--- trunk/property/inc/class.boadmin.inc.php    2016-02-11 15:47:31 UTC (rev 
14725)
+++ trunk/property/inc/class.boadmin.inc.php    2016-02-11 20:07:07 UTC (rev 
14726)
@@ -41,35 +41,35 @@
                var $offset;
                var $acl_app;
 
-               function __construct($session = '')
+               function __construct( $session = '' )
                {
                        //      $this->currentapp       = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
-                       $this->so                = 
CreateObject('property.soadmin');
-                       $this->acl               = & $GLOBALS['phpgw']->acl;
-                       $this->bocommon  = CreateObject('property.bocommon');
-                       $this->right     = array(1, 2, 4, 8, 16);
+                       $this->so = CreateObject('property.soadmin');
+                       $this->acl = & $GLOBALS['phpgw']->acl;
+                       $this->bocommon = CreateObject('property.bocommon');
+                       $this->right = array(1, 2, 4, 8, 16);
                        $this->account_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
 
-                       if($session)
+                       if ($session)
                        {
                                $this->read_sessiondata();
                                $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', 
'string');
-                       $permission              = phpgw::get_var('permission');
-       //              $location                = 
get_var('location',array('POST','GET')); // don't work for some reason...
-                       $module                  = phpgw::get_var('module');
-                       $granting_group  = phpgw::get_var('granting_group', 
'int');
-                       $allrows                 = phpgw::get_var('allrows', 
'bool');
-                       $acl_app                 = 'property'; 
//get_var('acl_app',array('POST','GET'));
+                       $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', 'string');
+                       $permission = phpgw::get_var('permission');
+                       //              $location                = 
get_var('location',array('POST','GET')); // don't work for some reason...
+                       $module = phpgw::get_var('module');
+                       $granting_group = phpgw::get_var('granting_group', 
'int');
+                       $allrows = phpgw::get_var('allrows', 'bool');
+                       $acl_app = 'property'; 
//get_var('acl_app',array('POST','GET'));
 
-                       if($start)
+                       if ($start)
                        {
                                $this->start = $start;
                        }
@@ -78,38 +78,38 @@
                                $this->start = 0;
                        }
 
-                       if(isset($query))
+                       if (isset($query))
                        {
                                $this->query = $query;
                        }
-                       if(isset($filter))
+                       if (isset($filter))
                        {
                                $this->filter = $filter;
                        }
-                       if(isset($sort))
+                       if (isset($sort))
                        {
                                $this->sort = $sort;
                        }
-                       if(isset($order))
+                       if (isset($order))
                        {
                                $this->order = $order;
                        }
-                       if(isset($cat_id))
+                       if (isset($cat_id))
                        {
                                $this->cat_id = $cat_id;
                        }
-                       if(isset($module))
+                       if (isset($module))
                        {
                                $this->location = $module;
                        }
-                       if(isset($granting_group))
+                       if (isset($granting_group))
                        {
                                $this->granting_group = $granting_group;
                        }
 
                        $this->allrows = $allrows ? $allrows : '';
 
-                       if(isset($acl_app))
+                       if (isset($acl_app))
                        {
                                $this->acl_app = $acl_app;
                        }
@@ -119,27 +119,27 @@
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data', 'fm_admin');
 
-                       $this->start                     = $data['start'];
-                       $this->query                     = $data['query'];
-                       $this->filter                    = $data['filter'];
-                       $this->sort                              = 
$data['sort'];
-                       $this->order                     = $data['order'];
-                       $this->cat_id                    = $data['cat_id'];
-                       $this->location                  = $data['location'];
-                       $this->granting_group    = $data['granting_group'];
+                       $this->start = $data['start'];
+                       $this->query = $data['query'];
+                       $this->filter = $data['filter'];
+                       $this->sort = $data['sort'];
+                       $this->order = $data['order'];
+                       $this->cat_id = $data['cat_id'];
+                       $this->location = $data['location'];
+                       $this->granting_group = $data['granting_group'];
                }
 
-               function save_sessiondata($data)
+               function save_sessiondata( $data )
                {
-                       if($this->use_session)
+                       if ($this->use_session)
                        {
                                
$GLOBALS['phpgw']->session->appsession('session_data', 'fm_admin', $data);
                        }
                }
 
-               function select_category_list($format = '', $selected = '')
+               function select_category_list( $format = '', $selected = '' )
                {
-                       switch($format)
+                       switch ($format)
                        {
                                case 'select':
                                        
$GLOBALS['phpgw']->xslttpl->add_file(array('cat_select'));
@@ -149,27 +149,27 @@
                                        break;
                        }
 
-                       $categories[0]['id']     = 'groups';
-                       $categories[0]['name']   = lang('Groups');
-                       $categories[1]['id']     = 'accounts';
-                       $categories[1]['name']   = lang('Users');
+                       $categories[0]['id'] = 'groups';
+                       $categories[0]['name'] = lang('Groups');
+                       $categories[1]['id'] = 'accounts';
+                       $categories[1]['name'] = lang('Users');
 
                        return $this->bocommon->select_list($selected, 
$categories);
                }
 
-               function set_permission2($values, $r_processed, $grantor = -1, 
$type = 0)
+               function set_permission2( $values, $r_processed, $grantor = -1, 
$type = 0 )
                {
-                       if(!is_array($values))
+                       if (!is_array($values))
                        {
                                //                              return;
                        }
 
                        $totalacl = array();
-                       foreach($values as $rowinfo => $perm)
+                       foreach ($values as $rowinfo => $perm)
                        {
                                list($user_id, $rights) = explode('_', 
$rowinfo);
 
-                               if(!isset($totalacl[$user_id]))
+                               if (!isset($totalacl[$user_id]))
                                {
                                        $totalacl[$user_id] = 0;
                                }
@@ -178,16 +178,16 @@
                        }
 
                        $user_checked = array();
-                       foreach($totalacl as $user_id => $rights)
+                       foreach ($totalacl as $user_id => $rights)
                        {
-                               $user_checked[]  = $user_id;
-                               $this->acl->set_account_id($user_id, true, 
$this->acl_app, $this->location, $account_type        = 'accounts');
+                               $user_checked[] = $user_id;
+                               $this->acl->set_account_id($user_id, true, 
$this->acl_app, $this->location, $account_type = 'accounts');
                                $this->acl->delete($this->acl_app, 
$this->location, $grantor, $type);
                                $this->acl->add($this->acl_app, 
$this->location, $rights, $grantor, $type);
                                $this->acl->save_repository($this->acl_app, 
$this->location);
                        }
 
-                       if(is_array($r_processed) && count($user_checked))
+                       if (is_array($r_processed) && count($user_checked))
                        {
                                $user_delete = array_diff($r_processed, 
$user_checked);
                        }
@@ -198,11 +198,11 @@
 
                        $users_at_location = 
$this->acl->get_accounts_at_location($this->acl_app, $this->location, $grantor, 
$type);
 
-                       if(is_array($user_delete) && count($user_delete) > 0)
+                       if (is_array($user_delete) && count($user_delete) > 0)
                        {
-                               foreach($user_delete as $user_id)
+                               foreach ($user_delete as $user_id)
                                {
-                                       if(isset($users_at_location[$user_id]) 
&& $users_at_location[$user_id])
+                                       if (isset($users_at_location[$user_id]) 
&& $users_at_location[$user_id])
                                        {
                                                
$this->acl->set_account_id($user_id, true);
                                                
$this->acl->delete($this->acl_app, $this->location, $grantor, $type);
@@ -212,31 +212,31 @@
                        }
                }
 
-               function set_permission($values, $r_processed, $set_grant = 
false, $initials = '')
+               function set_permission( $values, $r_processed, $set_grant = 
false, $initials = '' )
                {
                        $this->acl->enable_inheritance = 
phpgw::get_var('enable_inheritance', 'bool', 'POST');
 
-                       if($initials)
+                       if ($initials)
                        {
                                $this->so->set_initials($initials);
                        }
 
                        $process = explode('_', $r_processed);
 
-                       if(!isset($values['right']) || 
!is_array($values['right']))
+                       if (!isset($values['right']) || 
!is_array($values['right']))
                        {
                                $values['right'] = array();
                        }
 
-                       if(!isset($values['mask']) || 
!is_array($values['mask']))
+                       if (!isset($values['mask']) || 
!is_array($values['mask']))
                        {
                                $values['mask'] = array();
                        }
 
                        $grantor = -1;
-                       if($set_grant)
+                       if ($set_grant)
                        {
-                               if($this->granting_group)
+                               if ($this->granting_group)
                                {
                                        $grantor = $this->granting_group;
                                }
@@ -248,28 +248,28 @@
 
                        $this->set_permission2($values['right'], $process, 
$grantor, 0);
                        $this->set_permission2($values['mask'], $process, 
$grantor, 1);
-                       $cleared                                 = 
$this->bocommon->reset_fm_cache_userlist();
-                       $receipt['message'][]    = array('msg' => 
lang('permissions are updated!'));
-                       $receipt['message'][]    = array('msg' => lang('%1 
userlists cleared from cache', $cleared));
+                       $cleared = $this->bocommon->reset_fm_cache_userlist();
+                       $receipt['message'][] = array('msg' => 
lang('permissions are updated!'));
+                       $receipt['message'][] = array('msg' => lang('%1 
userlists cleared from cache', $cleared));
                        phpgwapi_cache::user_clear('phpgwapi', 'menu', -1);
                        return $receipt;
                }
 
-               function get_user_list($type = '', $get_grants = '')
+               function get_user_list( $type = '', $get_grants = '' )
                {
-                       if($type == 'groups')
+                       if ($type == 'groups')
                        {
                                $check_account_type = array('accounts');
-                               $acl_account_type        = 'accounts';
-                               $valid_users             = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run', phpgwapi_acl::READ, 
'property');
+                               $acl_account_type = 'accounts';
+                               $valid_users = 
$GLOBALS['phpgw']->acl->get_ids_for_location('run', phpgwapi_acl::READ, 
'property');
                        }
                        else
                        {
                                $check_account_type = array('groups', 
'accounts');
-                               $acl_account_type        = 'both';
-                               $_valid_users            = 
$GLOBALS['phpgw']->acl->get_user_list_right(phpgwapi_acl::READ, 'run', 
$this->acl_app);
-                               $valid_users             = array();
-                               foreach($_valid_users as $_user)
+                               $acl_account_type = 'both';
+                               $_valid_users = 
$GLOBALS['phpgw']->acl->get_user_list_right(phpgwapi_acl::READ, 'run', 
$this->acl_app);
+                               $valid_users = array();
+                               foreach ($_valid_users as $_user)
                                {
                                        $valid_users[] = $_user['account_id'];
                                }
@@ -278,9 +278,9 @@
                        }
 
                        $grantor = -1;
-                       if($get_grants)
+                       if ($get_grants)
                        {
-                               if($this->granting_group)
+                               if ($this->granting_group)
                                {
                                        $grantor = $this->granting_group;
                                }
@@ -290,7 +290,7 @@
                                }
                        }
 
-                       if($this->location == '.invoice')
+                       if ($this->location == '.invoice')
                        {
                                $this->right = array(1, 2, 4, 8, 16, 32, 64, 
128);
                        }
@@ -301,9 +301,9 @@
 
                        //                      $allusers       = 
array_intersect_key($allusers, $valid_users);
 
-                       foreach($allusers as $user)
+                       foreach ($allusers as $user)
                        {
-                               if(!in_array($user->id, $valid_users))
+                               if (!in_array($user->id, $valid_users))
                                {
                                        unset($allusers[$user->id]);
                                }
@@ -312,28 +312,28 @@
                        reset($allusers);
 
                        $this->total_records = count($allusers);
-                       $length                          = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
+                       $length = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
 
-                       if($this->allrows)
+                       if ($this->allrows)
                        {
                                $this->start = 0;
-                               $length          = $this->total_records;
+                               $length = $this->total_records;
                        }
 
                        $allusers = array_slice($allusers, $this->start, 
$length, true);
 
                        $user_list = array();
-                       if(isset($allusers) && is_array($allusers))
+                       if (isset($allusers) && is_array($allusers))
                        {
                                $j = 0;
-                               foreach($allusers as $account)
+                               foreach ($allusers as $account)
                                {
-                                       $user_list[$j]['account_id']            
 = $account->id;
-                                       $user_list[$j]['account_lid']           
 = $account->lid;
-                                       $user_list[$j]['account_firstname']     
 = $account->firstname;
-                                       $user_list[$j]['account_lastname']      
 = $account->lastname;
+                                       $user_list[$j]['account_id'] = 
$account->id;
+                                       $user_list[$j]['account_lid'] = 
$account->lid;
+                                       $user_list[$j]['account_firstname'] = 
$account->firstname;
+                                       $user_list[$j]['account_lastname'] = 
$account->lastname;
 
-                                       if($this->location == '.invoice')
+                                       if ($this->location == '.invoice')
                                        {
                                                $user_list[$j]['initials'] = 
$this->so->get_initials($account->id);
                                        }
@@ -342,23 +342,23 @@
 
                                        $count_right = count($right);
 
-                                       for($i = 0; $i < $count_right; ++$i)
+                                       for ($i = 0; $i < $count_right; ++$i)
                                        {
-                                               
if($this->acl->check_rights($this->location, $right[$i], $this->acl_app, 
$grantor, 0, $check_account_type))
+                                               if 
($this->acl->check_rights($this->location, $right[$i], $this->acl_app, 
$grantor, 0, $check_account_type))
                                                {
-                                                       
if($this->acl->account_type == 'g')
+                                                       if 
($this->acl->account_type == 'g')
                                                        {
                                                                
$user_list[$j]['right'][$right[$i]] = 'from_group';
                                                        }
                                                        else
                                                        {
-                                                               
$user_list[$j]['right'][$right[$i]]      = 'checked';
+                                                               
$user_list[$j]['right'][$right[$i]] = 'checked';
                                                        }
                                                        
$user_list[$j]['result'][$right[$i]] = 'checked';
                                                }
-                                               
if($this->acl->check_rights($this->location, $right[$i], $this->acl_app, 
$grantor, 1, $check_account_type))
+                                               if 
($this->acl->check_rights($this->location, $right[$i], $this->acl_app, 
$grantor, 1, $check_account_type))
                                                {
-                                                       
if($this->acl->account_type == 'g')
+                                                       if 
($this->acl->account_type == 'g')
                                                        {
                                                                
$user_list[$j]['mask'][$right[$i]] = 'from_group';
                                                        }
@@ -383,8 +383,8 @@
                        return $fm_ids;
                }
 
-               function edit_id($values = '')
+               function edit_id( $values = '' )
                {
                        return $this->so->edit_id($values);
                }
-       }
+       }
\ No newline at end of file

Modified: trunk/property/inc/class.boadmin_entity.inc.php
===================================================================
--- trunk/property/inc/class.boadmin_entity.inc.php     2016-02-11 15:47:31 UTC 
(rev 14725)
+++ trunk/property/inc/class.boadmin_entity.inc.php     2016-02-11 20:07:07 UTC 
(rev 14726)
@@ -79,23 +79,23 @@
                 */
                protected $custom;
                var $public_functions = array
-               (
-                       'read'                          => true,
-                       'read_single'           => true,
-                       'save'                          => true,
-                       'delete'                        => true,
-                       'check_perms'           => true,
-                       'get_category_list'     => true,
-                       'get_attrib_list'       => true
+                       (
+                       'read' => true,
+                       'read_single' => true,
+                       'save' => true,
+                       'delete' => true,
+                       'check_perms' => true,
+                       'get_category_list' => true,
+                       'get_attrib_list' => true
                );
                var $type_app;
 
-               function __construct($session = false)
+               function __construct( $session = false )
                {
                        $this->bocommon = CreateObject('property.bocommon');
                        $this->custom = createObject('property.custom_fields');
 
-                       if($session)
+                       if ($session)
                        {
                                $this->read_sessiondata();
                                $this->use_session = true;
@@ -110,7 +110,7 @@
                        $allrows = phpgw::get_var('allrows', 'bool');
                        $entity_id = phpgw::get_var('entity_id', 'int');
 
-                       $this->start             = $start ? $start : 0;
+                       $this->start = $start ? $start : 0;
                        $this->query = isset($query) ? $query : $this->query;
                        $this->sort = isset($sort) && $sort ? $sort : '';
                        $this->order = isset($order) && $order ? $order : '';
@@ -119,13 +119,13 @@
                        $this->entity_id = isset($entity_id) && $entity_id ? 
$entity_id : '';
                        $this->allrows = phpgw::get_var('allrows', 'bool');
                        $this->so = CreateObject('property.soadmin_entity', '', 
'', $this->bocommon);
-                       $this->so->type         = $this->type;
-                       $this->type_app         = $this->so->get_type_app();
+                       $this->so->type = $this->type;
+                       $this->type_app = $this->so->get_type_app();
                }
 
-               function save_sessiondata($data)
+               function save_sessiondata( $data )
                {
-                       if($this->use_session)
+                       if ($this->use_session)
                        {
                                
$GLOBALS['phpgw']->session->appsession('session_data', 'standard_e', $data);
                        }
@@ -144,55 +144,55 @@
                        $this->allrows = isset($data['allrows']) ? 
$data['allrows'] : '';
                }
 
-               function get_location_level_list($selected = '')
+               function get_location_level_list( $selected = '' )
                {
 
                        $soadmin_location = 
CreateObject('property.soadmin_location');
-                       $location_types          = 
$soadmin_location->select_location_type();
+                       $location_types = 
$soadmin_location->select_location_type();
                        $max_location_type = count($location_types);
 
-                       for($i = 1; $i <= $max_location_type; $i++)
+                       for ($i = 1; $i <= $max_location_type; $i++)
                        {
-                               $location[$i]['id']              = $i;
-                               $location[$i]['name']    = $i . '-' . 
$location_types[($i - 1)]['name'];
+                               $location[$i]['id'] = $i;
+                               $location[$i]['name'] = $i . '-' . 
$location_types[($i - 1)]['name'];
                        }
 
                        return $this->bocommon->select_list($selected, 
$location);
                }
 
-               function get_entity_list($selected = '')
+               function get_entity_list( $selected = '' )
                {
                        $list = $this->so->read(array('allrows' => true));
                        return $this->bocommon->select_multi_list($selected, 
$list);
                }
 
-               function get_entity_list_2($selected = '')
+               function get_entity_list_2( $selected = '' )
                {
-                       $list[0]['id']   = 'project';
+                       $list[0]['id'] = 'project';
                        $list[0]['name'] = 'project';
-                       $list[1]['id']   = 'ticket';
+                       $list[1]['id'] = 'ticket';
                        $list[1]['name'] = 'ticket';
-                       $list[2]['id']   = 'document';
+                       $list[2]['id'] = 'document';
                        $list[2]['name'] = 'document';
-                       $list[3]['id']   = 'request';
+                       $list[3]['id'] = 'request';
                        $list[3]['name'] = 'request';
-                       $list[4]['id']   = 'investment';
+                       $list[4]['id'] = 'investment';
                        $list[4]['name'] = 'investment';
-                       $list[5]['id']   = 's_agreement';
+                       $list[5]['id'] = 's_agreement';
                        $list[5]['name'] = 'service agreement';
                        return $this->bocommon->select_multi_list($selected, 
$list);
                }
 
-               function get_entity_list_3($selected = '')
+               function get_entity_list_3( $selected = '' )
                {
-                       $list[0]['id']   = 'ticket';
+                       $list[0]['id'] = 'ticket';
                        $list[0]['name'] = 'ticket';
-                       $list[1]['id']   = 'request';
+                       $list[1]['id'] = 'request';
                        $list[1]['name'] = 'request';
                        return $this->bocommon->select_multi_list($selected, 
$list);
                }
 
-               function read($data = array())
+               function read( $data = array() )
                {
                        #$entity = $this->so->read(array
                        #            (
@@ -207,7 +207,7 @@
                        return $entity;
                }
 
-               function read_category($data = array())
+               function read_category( $data = array() )
                {
                        /* $category = $this->so->read_category( array
                          (
@@ -232,31 +232,31 @@
                }
 
                /**
-               * Fetch custom attributes for an given komponent type
-               */
+                * Fetch custom attributes for an given komponent type
+                */
                public function get_attrib_list()
                {
-                       $entity_id              = phpgw::get_var('entity_id');
-                       $cat_id                 = phpgw::get_var('cat_id');
+                       $entity_id = phpgw::get_var('entity_id');
+                       $cat_id = phpgw::get_var('cat_id');
 
                        return $this->custom->find('property', 
".entity.{$entity_id}.{$cat_id}", 0, '', '', '', true, true);
                }
 
-               function read_single($id)
+               function read_single( $id )
                {
                        return $this->so->read_single($id);
                }
 
-               function read_single_category($entity_id, $cat_id)
+               function read_single_category( $entity_id, $cat_id )
                {
                        return $this->so->read_single_category($entity_id, 
$cat_id);
                }
 
-               function save($values, $action = '')
+               function save( $values, $action = '' )
                {
-                       if($action == 'edit')
+                       if ($action == 'edit')
                        {
-                               if($values['id'] != '')
+                               if ($values['id'] != '')
                                {
                                        $receipt = 
$this->so->edit_entity($values);
                                }
@@ -269,11 +269,11 @@
                        return $receipt;
                }
 
-               function save_category($values, $action = '')
+               function save_category( $values, $action = '' )
                {
-                       if($action == 'edit')
+                       if ($action == 'edit')
                        {
-                               if($values['id'] != '')
+                               if ($values['id'] != '')
                                {
                                        $receipt = 
$this->so->edit_category($values);
                                }
@@ -282,14 +282,14 @@
                        {
                                $receipt = $this->so->add_category($values);
                                execMethod('phpgwapi.menu.clear');
-                               if(isset($values['category_template']) && 
$values['category_template'] && isset($receipt['id']) && $receipt['id'])
+                               if (isset($values['category_template']) && 
$values['category_template'] && isset($receipt['id']) && $receipt['id'])
                                {
                                        $values2 = array
                                                (
-                                               'entity_id'                     
 => $values['entity_id'],
-                                               'cat_id'                        
 => $receipt['id'],
-                                               'category_template'      => 
$values['category_template'],
-                                               'selected'                      
 => $values['template_attrib']
+                                               'entity_id' => 
$values['entity_id'],
+                                               'cat_id' => $receipt['id'],
+                                               'category_template' => 
$values['category_template'],
+                                               'selected' => 
$values['template_attrib']
                                        );
 
                                        
$this->_add_attrib_from_template($values2);
@@ -298,24 +298,24 @@
                        return $receipt;
                }
 
-               protected function _add_attrib_from_template($values)
+               protected function _add_attrib_from_template( $values )
                {
                        $template_info = explode('_', 
$values['category_template']);
-                       $template_entity_id      = $template_info[0];
-                       $template_cat_id         = $template_info[1];
+                       $template_entity_id = $template_info[0];
+                       $template_cat_id = $template_info[1];
 
                        $attrib_group_list = 
$this->read_attrib_group(array('entity_id' => $template_entity_id,
                                'cat_id' => $template_cat_id, 'allrows' => 
true));
 
-                       foreach($attrib_group_list as $attrib_group)
+                       foreach ($attrib_group_list as $attrib_group)
                        {
                                $group = array
                                        (
-                                       'appname'        => 
$this->type_app[$this->type],
-                                       'location'       => 
".{$this->type}.{$values['entity_id']}.{$values['cat_id']}",
+                                       'appname' => 
$this->type_app[$this->type],
+                                       'location' => 
".{$this->type}.{$values['entity_id']}.{$values['cat_id']}",
                                        'group_name' => $attrib_group['name'],
-                                       'descr'          => 
$attrib_group['descr'],
-                                       'remark'         => 
$attrib_group['remark']
+                                       'descr' => $attrib_group['descr'],
+                                       'remark' => $attrib_group['remark']
                                );
                                $this->custom->add_group($group);
                        }
@@ -324,74 +324,74 @@
                                'allrows' => true));
 
                        $template_attribs = array();
-                       foreach($attrib_list as $attrib)
+                       foreach ($attrib_list as $attrib)
                        {
-                               if(in_array($attrib['id'], $values['selected']))
+                               if (in_array($attrib['id'], 
$values['selected']))
                                {
                                        $template_attribs[] = 
$this->read_single_attrib($template_entity_id, $template_cat_id, $attrib['id']);
                                }
                        }
 
-                       foreach($template_attribs as $attrib)
+                       foreach ($template_attribs as $attrib)
                        {
-                               $attrib['appname']       = 
$this->type_app[$this->type];
-                               $attrib['location']      = 
".{$this->type}.{$values['entity_id']}.{$values['cat_id']}";
+                               $attrib['appname'] = 
$this->type_app[$this->type];
+                               $attrib['location'] = 
".{$this->type}.{$values['entity_id']}.{$values['cat_id']}";
 
                                $choices = array();
-                               if(isset($attrib['choice']) && 
$attrib['choice'])
+                               if (isset($attrib['choice']) && 
$attrib['choice'])
                                {
                                        $choices = $attrib['choice'];
                                        unset($attrib['choice']);
                                }
 
                                $id = $this->custom->add($attrib);
-                               if($choices)
+                               if ($choices)
                                {
-                                       foreach($choices as $choice)
+                                       foreach ($choices as $choice)
                                        {
-                                               $attrib['new_choice']    = 
$choice['value'];
-                                               $attrib['id']                   
 = $id;
+                                               $attrib['new_choice'] = 
$choice['value'];
+                                               $attrib['id'] = $id;
                                                $this->custom->edit($attrib);
                                        }
                                }
                        }
                }
 
-               function delete($cat_id = '', $entity_id = '', $attrib_id = '', 
$acl_location = '', $custom_function_id = '', $group_id = '')
+               function delete( $cat_id = '', $entity_id = '', $attrib_id = 
'', $acl_location = '', $custom_function_id = '', $group_id = '' )
                {
-                       if(!$attrib_id && !$cat_id && $entity_id && 
!$custom_function_id && !$group_id)
+                       if (!$attrib_id && !$cat_id && $entity_id && 
!$custom_function_id && !$group_id)
                        {
                                $this->so->delete_entity($entity_id);
                                execMethod('phpgwapi.menu.clear');
                        }
-                       else if(!$attrib_id && $cat_id && $entity_id && 
!$custom_function_id && !$group_id)
+                       else if (!$attrib_id && $cat_id && $entity_id && 
!$custom_function_id && !$group_id)
                        {
                                $this->so->delete_category($entity_id, $cat_id);
                                execMethod('phpgwapi.menu.clear');
                        }
-                       else if($group_id && $cat_id && $entity_id && 
!$custom_function_id && !$attrib_id)
+                       else if ($group_id && $cat_id && $entity_id && 
!$custom_function_id && !$attrib_id)
                        {
                                
$this->custom->delete_group($this->type_app[$this->type], 
".{$this->type}.{$entity_id}.{$cat_id}", $group_id);
                        }
-                       else if($attrib_id && $cat_id && $entity_id && 
!$custom_function_id && !$group_id)
+                       else if ($attrib_id && $cat_id && $entity_id && 
!$custom_function_id && !$group_id)
                        {
                                
$this->custom->delete($this->type_app[$this->type], 
".{$this->type}.{$entity_id}.{$cat_id}", $attrib_id);
                                $this->so->delete_history($entity_id, $cat_id, 
$attrib_id);
                        }
-                       else if($custom_function_id && $acl_location)
+                       else if ($custom_function_id && $acl_location)
                        {
                                
$GLOBALS['phpgw']->custom_functions->delete($this->type_app[$this->type], 
$acl_location, $custom_function_id);
                        }
                }
 
-               function get_attrib_group_list($entity_id, $cat_id, $selected)
+               function get_attrib_group_list( $entity_id, $cat_id, $selected )
                {
                        $group_list = 
$this->read_attrib_group(array('entity_id' => $entity_id, 'cat_id' => $cat_id,
                                'allrows' => true));
 
-                       foreach($group_list as &$group)
+                       foreach ($group_list as &$group)
                        {
-                               if($group['id'] == $selected)
+                               if ($group['id'] == $selected)
                                {
                                        $group['selected'] = true;
                                }
@@ -399,11 +399,11 @@
                        return $group_list;
                }
 
-               function read_attrib_group($data = array())
+               function read_attrib_group( $data = array() )
                {
                        $entity_id = $data['entity_id'];
                        $cat_id = $data['cat_id'];
-                       if($data['allrows'])
+                       if ($data['allrows'])
                        {
                                $this->allrows = $data['allrows'];
                        }
@@ -415,9 +415,9 @@
                        return $attrib;
                }
 
-               function read_attrib($data = array())
+               function read_attrib( $data = array() )
                {
-                       if($data['allrows'])
+                       if ($data['allrows'])
                        {
                                $this->allrows = $data['allrows'];
                        }
@@ -426,34 +426,34 @@
                        return $attrib;
                }
 
-               function read_single_attrib($entity_id, $cat_id, $id)
+               function read_single_attrib( $entity_id, $cat_id, $id )
                {
                        return $this->custom->get($this->type_app[$this->type], 
".{$this->type}.{$entity_id}.{$cat_id}", $id, true);
                }
 
-               function read_single_attrib_group($entity_id, $cat_id, $id)
+               function read_single_attrib_group( $entity_id, $cat_id, $id )
                {
                        return 
$this->custom->get_group($this->type_app[$this->type], 
".{$this->type}.{$entity_id}.{$cat_id}", $id, true);
                }
 
-               function resort_attrib_group($id, $resort)
+               function resort_attrib_group( $id, $resort )
                {
                        $this->custom->resort_group($id, $resort, 
$this->type_app[$this->type], 
".{$this->type}.{$this->entity_id}.{$this->cat_id}");
                }
 
-               function resort_attrib($id, $resort)
+               function resort_attrib( $id, $resort )
                {
                        $this->custom->resort($id, $resort, 
$this->type_app[$this->type], 
".{$this->type}.{$this->entity_id}.{$this->cat_id}");
                }
 
-               public function save_attrib_group($group, $action = '')
+               public function save_attrib_group( $group, $action = '' )
                {
                        $receipt = array();
-                       $group['appname']        = $this->type_app[$this->type];
-                       $group['location']       = 
".{$this->type}.{$group['entity_id']}.{$group['cat_id']}";
-                       if($action == 'edit' && $group['id'])
+                       $group['appname'] = $this->type_app[$this->type];
+                       $group['location'] = 
".{$this->type}.{$group['entity_id']}.{$group['cat_id']}";
+                       if ($action == 'edit' && $group['id'])
                        {
-                               if($this->custom->edit_group($group))
+                               if ($this->custom->edit_group($group))
                                {
                                        $receipt['message'][] = array('msg' => 
lang('group has been updated'));
                                        return $receipt;
@@ -465,36 +465,36 @@
                        else
                        {
                                $id = $this->custom->add_group($group);
-                               if($id <= 0)
+                               if ($id <= 0)
                                {
                                        $receipt['error'][] = array('msg' => 
lang('unable to add group'));
                                        return $receipt;
                                }
-                               else if($id == -1)
+                               else if ($id == -1)
                                {
-                                       $receipt['id']           = 0;
+                                       $receipt['id'] = 0;
                                        $receipt['error'][] = array('msg' => 
lang('group already exists, please choose another name'));
                                        $receipt['error'][] = array('msg' => 
lang('Attribute group has NOT been saved'));
                                        return $receipt;
                                }
 
-                               $receipt['id']                   = $id;
+                               $receipt['id'] = $id;
                                $receipt['message'][] = array('msg' => 
lang('group has been created'));
                                return $receipt;
                        }
                }
 
-               public function save_attrib($attrib, $action = '')
+               public function save_attrib( $attrib, $action = '' )
                {
                        $receipt = array();
-                       $attrib['appname']       = $this->type_app[$this->type];
-                       $attrib['location']      = 
".{$this->type}.{$attrib['entity_id']}.{$attrib['cat_id']}";
+                       $attrib['appname'] = $this->type_app[$this->type];
+                       $attrib['location'] = 
".{$this->type}.{$attrib['entity_id']}.{$attrib['cat_id']}";
                        $attrib_table = 
$GLOBALS['phpgw']->locations->get_attrib_table($attrib['appname'], 
$attrib['location']);
-                       if($action == 'edit' && $attrib['id'])
+                       if ($action == 'edit' && $attrib['id'])
                        {
-                               if($this->custom->edit($attrib))
+                               if ($this->custom->edit($attrib))
                                {
-                                       $receipt                                
 = $this->custom->receipt;
+                                       $receipt = $this->custom->receipt;
                                        $receipt['message'][] = array('msg' => 
lang('Field has been updated'));
                                        return $receipt;
                                }
@@ -504,35 +504,35 @@
                        else
                        {
                                $id = $this->custom->add($attrib, 
$attrib_table);
-                               if($id <= 0)
+                               if ($id <= 0)
                                {
                                        $receipt['error'][] = array('msg' => 
lang('Unable to add field'));
                                        return $receipt;
                                }
-                               else if($id == -1)
+                               else if ($id == -1)
                                {
-                                       $receipt['id']           = 0;
+                                       $receipt['id'] = 0;
                                        $receipt['error'][] = array('msg' => 
lang('field already exists, please choose another name'));
                                        $receipt['error'][] = array('msg' => 
lang('Attribute has NOT been saved'));
                                        return $receipt;
                                }
 
-                               $receipt['id']                   = $id;
+                               $receipt['id'] = $id;
                                $receipt['message'][] = array('msg' => 
lang('Custom field has been created'));
                                return $receipt;
                        }
                }
 
-               function read_custom_function($data = array())
+               function read_custom_function( $data = array() )
                {
 
-                       if(!$data['location'] && $data['entity_id'] && 
$data['cat_id'])
+                       if (!$data['location'] && $data['entity_id'] && 
$data['cat_id'])
                        {
                                $data['location'] = 
".{$this->type}.{$data['entity_id']}.{$data['cat_id']}";
                        }
 
                        $data['appname'] = $this->type_app[$this->type];
-                       switch($data['order'])
+                       switch ($data['order'])
                        {
                                case'sorting';
                                        $data['order'] = 'custom_sort';
@@ -546,28 +546,28 @@
                        return $values;
                }
 
-               function resort_custom_function($id, $resort)
+               function resort_custom_function( $id, $resort )
                {
                        $location = 
".{$this->type}.{$this->entity_id}.{$this->cat_id}";
                        return $GLOBALS['phpgw']->custom_functions->resort($id, 
$resort, $this->type_app[$this->type], $location);
                }
 
-               function save_custom_function($custom_function, $action = '')
+               function save_custom_function( $custom_function, $action = '' )
                {
                        $receipt = array();
                        $custom_function['appname'] = 
$this->type_app[$this->type];
-                       if(!$custom_function['location'] && 
$custom_function['entity_id'] && $custom_function['cat_id'])
+                       if (!$custom_function['location'] && 
$custom_function['entity_id'] && $custom_function['cat_id'])
                        {
                                $custom_function['location'] = 
".{$this->type}.{$custom_function['entity_id']}.{$custom_function['cat_id']}";
                        }
 
-                       if($action == 'edit')
+                       if ($action == 'edit')
                        {
-                               if($custom_function['id'] != '')
+                               if ($custom_function['id'] != '')
                                {
 
                                        $receipt['id'] = $custom_function['id'];
-                                       
if($GLOBALS['phpgw']->custom_functions->edit($custom_function))
+                                       if 
($GLOBALS['phpgw']->custom_functions->edit($custom_function))
                                        {
                                                $receipt['message'][] = 
array('msg' => 'OK');
                                        }
@@ -579,7 +579,7 @@
                        }
                        else
                        {
-                               if($receipt['id'] = 
$GLOBALS['phpgw']->custom_functions->add($custom_function))
+                               if ($receipt['id'] = 
$GLOBALS['phpgw']->custom_functions->add($custom_function))
                                {
                                        $receipt['message'][] = array('msg' => 
'OK');
                                }
@@ -591,32 +591,32 @@
                        return $receipt;
                }
 
-               function select_custom_function($selected = '')
+               function select_custom_function( $selected = '' )
                {
                        $admin_custom = createObject('admin.bo_custom');
                        return $admin_custom->select_custom_function($selected, 
$this->type_app[$this->type]);
                }
 
-               function read_single_custom_function($entity_id = '', $cat_id = 
'', $id, $location = '')
+               function read_single_custom_function( $entity_id = '', $cat_id 
= '', $id, $location = '' )
                {
-                       if(!$location && $entity_id && $cat_id)
+                       if (!$location && $entity_id && $cat_id)
                        {
                                $location = 
".{$this->type}.{$entity_id}.{$cat_id}";
                        }
                        return 
$GLOBALS['phpgw']->custom_functions->get($this->type_app[$this->type], 
$location, $id);
                }
 
-               function get_path($entity_id, $node)
+               function get_path( $entity_id, $node )
                {
                        return $this->so->get_path($entity_id, $node);
                }
 
-               function read_category_tree2($entity_id, $table)
+               function read_category_tree2( $entity_id, $table )
                {
                        return $this->so->read_category_tree2($entity_id, 
$table);
                }
 
-               function get_children2($entity_id, $parent, $level, $reset = 
false, $table)
+               function get_children2( $entity_id, $parent, $level, $reset = 
false, $table )
                {
                        return $this->so->get_children2($entity_id, $parent, 
$level, $reset, $table);
                }
@@ -625,4 +625,4 @@
                {
                        return $this->so->convert_to_eav();
                }
-       }
+       }
\ No newline at end of file

Modified: trunk/property/inc/class.boadmin_location.inc.php
===================================================================
--- trunk/property/inc/class.boadmin_location.inc.php   2016-02-11 15:47:31 UTC 
(rev 14725)
+++ trunk/property/inc/class.boadmin_location.inc.php   2016-02-11 20:07:07 UTC 
(rev 14726)
@@ -45,21 +45,21 @@
                 */
                protected $custom;
                var $public_functions = array
-               (
-                       'read'                   => true,
-                       'read_single'    => true,
-                       'save'                   => true,
-                       'delete'                 => true,
-                       'check_perms'    => true
+                       (
+                       'read' => true,
+                       'read_single' => true,
+                       'save' => true,
+                       'delete' => true,
+                       'check_perms' => true
                );
 
-               function __construct($session = false)
+               function __construct( $session = false )
                {
                        $this->so = CreateObject('property.soadmin_location');
                        $this->bocommon = CreateObject('property.bocommon');
                        $this->custom = createObject('property.custom_fields');
 
-                       if($session)
+                       if ($session)
                        {
                                //              $this->read_sessiondata();
                                $this->use_session = true;
@@ -71,16 +71,16 @@
                        $order = phpgw::get_var('order');
                        $allrows = phpgw::get_var('allrows', 'bool');
 
-                       $this->start     = $start ? $start : 0;
+                       $this->start = $start ? $start : 0;
                        $this->query = isset($query) ? $query : $this->query;
                        $this->sort = isset($sort) && $sort ? $sort : '';
                        $this->order = isset($order) && $order ? $order : '';
                        $this->allrows = isset($allrows) && $allrows ? $allrows 
: '';
                }
 
-               function save_sessiondata($data)
+               function save_sessiondata( $data )
                {
-                       if($this->use_session)
+                       if ($this->use_session)
                        {
                                
$GLOBALS['phpgw']->session->appsession('session_data', 'standard_e', $data);
                        }
@@ -92,11 +92,11 @@
 
                        $this->start = $data['start'];
                        $this->query = $data['query'];
-                       $this->sort      = $data['sort'];
+                       $this->sort = $data['sort'];
                        $this->order = $data['order'];
                }
 
-               function read($data = array())
+               function read( $data = array() )
                {
                        # $data = array()
                        #array('start' => $this->start, 'query' => 
$this->query, 'sort' => $this->sort, 'order' => $this->order)
@@ -115,19 +115,19 @@
                        return $standard;
                }
 
-               function read_config_single($column_name)
+               function read_config_single( $column_name )
                {
                        return $this->so->read_config_single($column_name);
                }
 
-               function read_single($id)
+               function read_single( $id )
                {
                        return $this->so->read_single($id);
                }
 
-               function save($standard)
+               function save( $standard )
                {
-                       if(isset($standard['id']) && $standard['id'])
+                       if (isset($standard['id']) && $standard['id'])
                        {
                                $receipt = $this->so->edit($standard);
                        }
@@ -138,26 +138,26 @@
                        return $receipt;
                }
 
-               function delete($type_id, $id, $attrib = '', $group_id)
+               function delete( $type_id, $id, $attrib = '', $group_id )
                {
-                       if($id && !$attrib)
+                       if ($id && !$attrib)
                        {
                                $receipt = $this->so->delete($id);
                        }
-                       else if($type_id && $id && $attrib)
+                       else if ($type_id && $id && $attrib)
                        {
-                               $ok              = 0;
+                               $ok = 0;
                                $receipt = array();
 
-                               if($this->custom->delete('property', 
".location.{$type_id}", $id, "fm_location{$type_id}_history", true))
+                               if ($this->custom->delete('property', 
".location.{$type_id}", $id, "fm_location{$type_id}_history", true))
                                {
                                        $ok++;
                                }
-                               if($this->custom->delete('property', 
".location.{$type_id}", $id, "fm_location{$type_id}"))
+                               if ($this->custom->delete('property', 
".location.{$type_id}", $id, "fm_location{$type_id}"))
                                {
                                        $ok++;
                                }
-                               if($ok == 2)
+                               if ($ok == 2)
                                {
                                        $receipt['message'][] = array('msg' => 
lang('attibute has been deleted'));
                                }
@@ -166,9 +166,9 @@
                                        $receipt['error'][] = array('msg' => 
lang('something went wrong'));
                                }
                        }
-                       else if($type_id && $group_id)
+                       else if ($type_id && $group_id)
                        {
-                               if($this->custom->delete_group('property', 
".location.{$type_id}", $group_id))
+                               if ($this->custom->delete_group('property', 
".location.{$type_id}", $group_id))
                                {
                                        $receipt['message'][] = array('msg' => 
lang('attibute group %1 has been deleted', $group_id));
                                }
@@ -181,14 +181,14 @@
                        return $receipt;
                }
 
-               function get_attrib_group_list($type_id, $selected)
+               function get_attrib_group_list( $type_id, $selected )
                {
-                       $location        = ".location.{$type_id}";
+                       $location = ".location.{$type_id}";
                        $group_list = $this->read_attrib_group($location, true);
 
-                       foreach($group_list as &$group)
+                       foreach ($group_list as &$group)
                        {
-                               if($group['id'] == $selected)
+                               if ($group['id'] == $selected)
                                {
                                        $group['selected'] = true;
                                }
@@ -196,9 +196,9 @@
                        return $group_list;
                }
 
-               function read_attrib_group($data = array())
+               function read_attrib_group( $data = array() )
                {
-                       if($data['allrows'] || phpgw::get_var('allrows') == 1)
+                       if ($data['allrows'] || phpgw::get_var('allrows') == 1)
                        {
                                $data['allrows'] = true;
                        }
@@ -209,35 +209,35 @@
                        return $attrib;
                }
 
-               function read_single_attrib_group($location, $id)
+               function read_single_attrib_group( $location, $id )
                {
                        return $this->custom->get_group('property', $location, 
$id, true);
                }
 
-               function resort_attrib_group($data)
+               function resort_attrib_group( $data )
                {
                        $resort = isset($data['resort']) ? $data['resort'] : 
'up';
                        $type_id = isset($data['type_id']) ? $data['type_id'] : 
'';
                        $id = (isset($data['id']) ? $data['id'] : '');
 
-                       if(!$type_id || !$id)
-               {
+                       if (!$type_id || !$id)
+                       {
                                return;
-               }
+                       }
 
                        $this->custom->resort_group($id, $resort, 'property', 
'.location.' . $type_id);
                }
 
-               public function save_attrib_group($group, $action = '')
+               public function save_attrib_group( $group, $action = '' )
                {
                        $group['appname'] = 'property';
 
-                       if($action == 'edit' && $group['id'])
+                       if ($action == 'edit' && $group['id'])
                        {
-                               if($this->custom->edit_group($group))
+                               if ($this->custom->edit_group($group))
                                {
                                        return array
-                                       (
+                                               (
                                                'msg' => array('msg' => 
lang('group has been updated'))
                                        );
                                }
@@ -247,17 +247,17 @@
                        else
                        {
                                $id = $this->custom->add_group($group);
-                               if($id <= 0)
+                               if ($id <= 0)
                                {
                                        return array('error' => lang('Unable to 
add group'));
                                }
-                               else if($id == -1)
+                               else if ($id == -1)
                                {
                                        return array
-                                       (
-                                               'id'     => 0,
-                                               'error'  => array
                                                (
+                                               'id' => 0,
+                                               'error' => array
+                                                       (
                                                        array('msg' => 
lang('group already exists, please choose another name')),
                                                        array('msg' => 
lang('Attribute group has NOT been saved'))
                                                )
@@ -265,31 +265,31 @@
                                }
 
                                return array
-                               (
-                                       'id'     => $id,
+                                       (
+                                       'id' => $id,
                                        'msg' => array('msg' => lang('group has 
been created'))
                                );
                        }
                }
 
-               function read_attrib($data = array())
+               function read_attrib( $data = array() )
                {
-                       if($data['allrows'] || phpgw::get_var('allrows') == 1)
+                       if ($data['allrows'] || phpgw::get_var('allrows') == 1)
                        {
                                $data['allrows'] = true;
                        }
 
                        $attrib = $this->custom->find(
-                       'property', '.location.' . $data['type_id'], 
$data['start'], $data['query'], $data['sort'], $data['order'], $data['allrows']
+                               'property', '.location.' . $data['type_id'], 
$data['start'], $data['query'], $data['sort'], $data['order'], $data['allrows']
                        );
                        $this->total_records = $this->custom->total_records;
 
                        return $attrib;
                }
 
-               function read_attrib_old($type_id, $allrows = '')
+               function read_attrib_old( $type_id, $allrows = '' )
                {
-                       if($allrows || phpgw::get_var('allrows') == 1)
+                       if ($allrows || phpgw::get_var('allrows') == 1)
                        {
                                $this->allrows = true;
                        }
@@ -301,18 +301,18 @@
                        return $attrib;
                }
 
-               function read_single_attrib($type_id, $id)
+               function read_single_attrib( $type_id, $id )
                {
                        return $this->custom->get('property', 
".location.{$type_id}", $id, true);
                }
 
-               function resort_attrib($data = array())
+               function resort_attrib( $data = array() )
                {
                        $resort = isset($data['resort']) ? $data['resort'] : 
'up';
                        $type_id = isset($data['type_id']) ? $data['type_id'] : 
'';
                        $id = (isset($data['id']) ? $data['id'] : '');
 
-                       if(!$type_id || !$id)
+                       if (!$type_id || !$id)
                        {
                                return;
                        }
@@ -320,20 +320,20 @@
                        $this->custom->resort($id, $resort, 'property', 
'.location.' . $type_id);
                }
 
-               public function save_attrib($attrib, $action = '')
+               public function save_attrib( $attrib, $action = '' )
                {
-                       $attrib['appname']       = 'property';
-                       $attrib['location']      = '.location.' . 
$attrib['type_id'];
-                       $primary_table           = 'fm_location' . 
$attrib['type_id'];
-                       $history_table           = $primary_table . '_history';
+                       $attrib['appname'] = 'property';
+                       $attrib['location'] = '.location.' . $attrib['type_id'];
+                       $primary_table = 'fm_location' . $attrib['type_id'];
+                       $history_table = $primary_table . '_history';
 
-                       if($action == 'edit' && $attrib['id'])
+                       if ($action == 'edit' && $attrib['id'])
                        {
-                               if($this->custom->edit($attrib, $history_table, 
true))
+                               if ($this->custom->edit($attrib, 
$history_table, true))
                                {
                                        $this->custom->edit($attrib, 
$primary_table);
                                        return array
-                                       (
+                                               (
                                                'msg' => array('msg' => 
lang('Field has been updated'))
                                        );
                                }
@@ -344,17 +344,17 @@
                        {
                                $id = $this->custom->add($attrib, 
$primary_table);
                                $this->custom->add($attrib, $history_table, 
true);
-                               if($id <= 0)
+                               if ($id <= 0)
                                {
                                        return array('error' => lang('Unable to 
add field'));
                                }
-                               else if($id == -1)
+                               else if ($id == -1)
                                {
                                        return array
-                                       (
-                                               'id'     => 0,
-                                               'error'  => array
                                                (
+                                               'id' => 0,
+                                               'error' => array
+                                                       (
                                                        array('msg' => 
lang('field already exists, please choose another name')),
                                                        array('msg' => 
lang('Attribute has NOT been saved'))
                                                )
@@ -362,45 +362,45 @@
                                }
 
                                return array
-                               (
-                                       'id'     => $id,
+                                       (
+                                       'id' => $id,
                                        'msg' => array('msg' => lang('Custom 
field has been created'))
                                );
                        }
                }
 
-               function save_config($values = '', $column_name = '')
+               function save_config( $values = '', $column_name = '' )
                {
                        return $this->so->save_config($values, $column_name);
                }
 
-               function select_location_type($selected = '')
+               function select_location_type( $selected = '' )
                {
                        $location_types = $this->so->select_location_type();
                        return $this->bocommon->select_list($selected, 
$location_types);
                }
 
-               function select_nullable($selected = '')
+               function select_nullable( $selected = '' )
                {
-                       $nullable[0]['id']       = 'true';
+                       $nullable[0]['id'] = 'true';
                        $nullable[0]['name'] = lang('true');
-                       $nullable[1]['id']       = 'false';
+                       $nullable[1]['id'] = 'false';
                        $nullable[1]['name'] = lang('false');
 
                        return $this->bocommon->select_list($selected, 
$nullable);
                }
 
-               function get_list_info($type_id = '', $selected = '')
+               function get_list_info( $type_id = '', $selected = '' )
                {
-                       if($type_id)
+                       if ($type_id)
                        {
                                $location_types = 
$this->so->select_location_type();
 
-                               for($i = 0; $i < ($type_id); $i++)
+                               for ($i = 0; $i < ($type_id); $i++)
                                {
                                        $location[$i] = $location_types[$i];
                                        unset($location[$i]['list_info']);
-                                       if(isset($selected[($i + 1)]) && 
$selected[($i + 1)])
+                                       if (isset($selected[($i + 1)]) && 
$selected[($i + 1)])
                                        {
                                                $location[$i]['selected'] = 
'selected';
                                        }

Modified: trunk/property/inc/class.boagreement.inc.php
===================================================================
--- trunk/property/inc/class.boagreement.inc.php        2016-02-11 15:47:31 UTC 
(rev 14725)
+++ trunk/property/inc/class.boagreement.inc.php        2016-02-11 20:07:07 UTC 
(rev 14726)
@@ -49,20 +49,20 @@
                protected $custom;
                var $public_functions = array
                        (
-                       'read'                   => true,
-                       'read_single'    => true,
-                       'save'                   => true,
-                       'delete'                 => true,
-                       'check_perms'    => true
+                       'read' => true,
+                       'read_single' => true,
+                       'save' => true,
+                       'delete' => true,
+                       'check_perms' => true
                );
 
-               function __construct($session = false)
+               function __construct( $session = false )
                {
                        $this->so = CreateObject('property.soagreement');
                        $this->bocommon = CreateObject('property.bocommon');
                        $this->custom = createObject('property.custom_fields');
 
-                       if($session)
+                       if ($session)
                        {
                                $this->read_sessiondata();
                                $this->use_session = true;
@@ -80,8 +80,8 @@
                        $member_id = phpgw::get_var('member_id', 'int');
                        $status_id = phpgw::get_var('status_id');
 
-                       $this->role              = $role;
-                       $this->so->role  = $role;
+                       $this->role = $role;
+                       $this->so->role = $role;
 
                        $this->status_id = isset($_REQUEST['status_id']) ? 
$status_id : $this->status_id;
                        $this->start = isset($_REQUEST['start']) ? $start : 
$this->start;
@@ -92,20 +92,20 @@
                        $this->member_id = isset($_REQUEST['member_id']) ? 
$member_id : $this->member_id;
                        $this->cat_id = isset($_REQUEST['cat_id']) ? $cat_id : 
$this->cat_id;
 
-                       if(!empty($filter))
+                       if (!empty($filter))
                        {
                                $this->filter = $filter;
                        }
 
-                       if($allrows)
+                       if ($allrows)
                        {
                                $this->allrows = $allrows;
                        }
                }
 
-               function save_sessiondata($data)
+               function save_sessiondata( $data )
                {
-                       if($this->use_session)
+                       if ($this->use_session)
                        {
                                
$GLOBALS['phpgw']->session->appsession('session_data', 'agreement', $data);
                        }
@@ -117,25 +117,25 @@
 
 //                     _debug_array($data);die();
 
-                       $this->start     = $data['start'];
-                       $this->query     = $data['query'];
-                       $this->filter    = $data['filter'];
-                       $this->sort              = $data['sort'];
-                       $this->order     = $data['order'];
-                       $this->cat_id    = $data['cat_id'];
+                       $this->start = $data['start'];
+                       $this->query = $data['query'];
+                       $this->filter = $data['filter'];
+                       $this->sort = $data['sort'];
+                       $this->order = $data['order'];
+                       $this->cat_id = $data['cat_id'];
                        $this->vendor_id = $data['vendor_id'];
                        $this->member_id = $data['member_id'];
                        $this->status_id = $data['status_id'];
                }
 
-               function check_perms($has, $needed)
+               function check_perms( $has, $needed )
                {
                        return (!!($has & $needed) == true);
                }
 
-               function select_vendor_list($format = '', $selected = '')
+               function select_vendor_list( $format = '', $selected = '' )
                {
-                       switch($format)
+                       switch ($format)
                        {
                                case 'select':
                                        
$GLOBALS['phpgw']->xslttpl->add_file(array('select_vendor'));
@@ -145,16 +145,16 @@
                                        break;
                        }
 
-                       $input_list      = $this->so->select_vendor_list();
+                       $input_list = $this->so->select_vendor_list();
                        $vendor_list = $this->bocommon->select_list($selected, 
$input_list);
 
                        return $vendor_list;
                }
 
-               function read($data = array())
+               function read( $data = array() )
                {
                        /* $agreements = $this->so->read( array('start' => 
$this->start, 'query' => $this->query, 'sort' => $this->sort, 'order' => 
$this->order,
-                               'filter' => $this->filter, 'cat_id' => 
$this->cat_id, 'allrows' => $this->allrows, 'member_id' => $this->member_id,
+                         'filter' => $this->filter, 'cat_id' => $this->cat_id, 
'allrows' => $this->allrows, 'member_id' => $this->member_id,
                          'vendor_id' => $this->vendor_id, 'status_id' => 
$this->status_id) ); */
 
                        $agreements = $this->so->read($data);
@@ -162,18 +162,18 @@
                        $this->total_records = $this->so->total_records;
                        $this->uicols = $this->so->uicols;
 
-                       foreach($agreements as &$agreement)
+                       foreach ($agreements as &$agreement)
                        {
-                               if($agreement['start_date'])
+                               if ($agreement['start_date'])
                                {
                                        $agreement['start_date'] = 
$GLOBALS['phpgw']->common->show_date($agreement['start_date'], 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                                }
-                               if($agreement['termination_date'])
+                               if ($agreement['termination_date'])
                                {
                                        $agreement['termination_date'] = 
$GLOBALS['phpgw']->common->show_date($agreement['termination_date'], 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                                }
 
-                               if($agreement['end_date'])
+                               if ($agreement['end_date'])
                                {
                                        $agreement['end_date'] = 
$GLOBALS['phpgw']->common->show_date($agreement['end_date'], 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                                }
@@ -181,9 +181,9 @@
                        return $agreements;
                }
 
-               function read_details($id, $params = '')
+               function read_details( $id, $params = '' )
                {
-                       if(!empty($params))
+                       if (!empty($params))
                        {
                                $sort = $params['sort'];
                                $order = $params['order'];
@@ -206,14 +206,14 @@
                        return $list;
                }
 
-               function read_prizing($data)
+               function read_prizing( $data )
                {
                        $list = $this->so->read_prizing($data);
                        $this->total_records = $this->so->total_records;
 
                        $this->uicols = $this->so->uicols;
 
-                       for($i = 0; $i < count($list); $i++)
+                       for ($i = 0; $i < count($list); $i++)
                        {
                                $list[$i]['index_date'] = 
$GLOBALS['phpgw']->common->show_date($list[$i]['index_date'], 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                        }
@@ -221,7 +221,7 @@
                        return $list;
                }
 
-               function read_event($data)
+               function read_event( $data )
                {
                        $boalarm = CreateObject('property.boalarm');
                        $event = $this->so->read_single($data['agreement_id']);
@@ -230,11 +230,11 @@
                        return $event;
                }
 
-               function read_single($data)
+               function read_single( $data )
                {
                        $values['attributes'] = $this->custom->find('property', 
'.agreement', 0, '', 'ASC', 'attrib_sort', true, true);
 
-                       if(isset($data['agreement_id']) && 
$data['agreement_id'])
+                       if (isset($data['agreement_id']) && 
$data['agreement_id'])
                        {
                                $values = 
$this->so->read_single($data['agreement_id'], $values);
                        }
@@ -242,28 +242,28 @@
                        $values = $this->custom->prepare($values, 'property', 
'.agreement');
 
                        $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-                       if(isset($values['entry_date']) && 
$values['entry_date'])
+                       if (isset($values['entry_date']) && 
$values['entry_date'])
                        {
                                $values['entry_date'] = 
$GLOBALS['phpgw']->common->show_date($values['entry_date'], $dateformat);
                        }
 
                        $values['start_date'] = 
$GLOBALS['phpgw']->common->show_date($values['start_date'], $dateformat);
                        $values['end_date'] = 
$GLOBALS['phpgw']->common->show_date($values['end_date'], $dateformat);
-                       if(isset($values['termination_date']) && 
$values['termination_date'])
+                       if (isset($values['termination_date']) && 
$values['termination_date'])
                        {
                                $values['termination_date'] = 
$GLOBALS['phpgw']->common->show_date($values['termination_date'], $dateformat);
                        }
 
                        $vfs = CreateObject('phpgwapi.vfs');
-                       $vfs->override_acl       = 1;
+                       $vfs->override_acl = 1;
 
                        $values['files'] = $vfs->ls(array(
-                               'string'         => 
"/property/agreement/{$data['agreement_id']}",
+                               'string' => 
"/property/agreement/{$data['agreement_id']}",
                                'relatives' => array(RELATIVE_NONE)));
 
                        $vfs->override_acl = 0;
 
-                       if(!isset($values['files'][0]['file_id']) || 
!$values['files'][0]['file_id'])
+                       if (!isset($values['files'][0]['file_id']) || 
!$values['files'][0]['file_id'])
                        {
                                unset($values['files']);
                        }
@@ -271,10 +271,10 @@
                        return $values;
                }
 
-               function read_single_item($data)
+               function read_single_item( $data )
                {
                        $values['attributes'] = $this->custom->find('property', 
'.agreement.detail', 0, '', 'ASC', 'attrib_sort', true, true);
-                       if(isset($data['agreement_id']) && 
$data['agreement_id'] && isset($data['id']) && $data['id'])
+                       if (isset($data['agreement_id']) && 
$data['agreement_id'] && isset($data['id']) && $data['id'])
                        {
                                $values = $this->so->read_single_item($data, 
$values);
                        }
@@ -290,26 +290,26 @@
                 *
                 * @return array the grouped attributes
                 */
-               public function get_attribute_groups($location, $attributes = 
array())
+               public function get_attribute_groups( $location, $attributes = 
array() )
                {
                        return $this->custom->get_attribute_groups('property', 
$location, $attributes);
                }
 
-               function save($values, $values_attribute = '', $action = '')
+               function save( $values, $values_attribute = '', $action = '' )
                {
                        $values['start_date'] = 
$this->bocommon->date_to_timestamp($values['start_date']);
                        $values['end_date'] = 
$this->bocommon->date_to_timestamp($values['end_date']);
                        $values['termination_date'] = 
$this->bocommon->date_to_timestamp($values['termination_date']);
 
-                       if(is_array($values_attribute))
+                       if (is_array($values_attribute))
                        {
                                $values_attribute = 
$this->custom->convert_attribute_save($values_attribute);
                        }
 
-                       if($action == 'edit')
+                       if ($action == 'edit')
                        //                      if ($values['agreement_id'])
                        {
-                               if($values['agreement_id'] != 0)
+                               if ($values['agreement_id'] != 0)
                                {
                                        $receipt = $this->so->edit($values, 
$values_attribute);
                                }
@@ -321,16 +321,16 @@
                        return $receipt;
                }
 
-               function save_item($values, $values_attribute = '')
+               function save_item( $values, $values_attribute = '' )
                {
                        //_debug_array($values);
                        $values['m_cost'] = str_replace(",", ".", 
$values['m_cost']);
                        $values['w_cost'] = str_replace(",", ".", 
$values['w_cost']);
-                       $values['total_cost']    = $values['m_cost'] + 
$values['w_cost'];
+                       $values['total_cost'] = $values['m_cost'] + 
$values['w_cost'];
 
-                       if($values['index_count'] > 0)
+                       if ($values['index_count'] > 0)
                        {
-                               if($values['id'] != 0)
+                               if ($values['id'] != 0)
                                {
                                        $receipt = 
$this->so->edit_item($values);
                                }
@@ -342,35 +342,35 @@
                        return $receipt;
                }
 
-               function update($values)
+               function update( $values )
                {
                        $values['date'] = 
$this->bocommon->date_to_timestamp($values['date']);
                        return $this->so->update($values);
                }
 
-               function delete_last_index($agreement_id, $id)
+               function delete_last_index( $agreement_id, $id )
                {
                        $this->so->delete_last_index($agreement_id, $id);
                }
 
-               function delete_item($agreement_id, $activity_id)
+               function delete_item( $agreement_id, $activity_id )
                {
                        $this->so->delete_item($agreement_id, $activity_id);
                }
 
-               function delete($agreement_id = '')
+               function delete( $agreement_id = '' )
                {
                        $this->so->delete($agreement_id);
                }
 
-               function column_list($selected = '', $allrows = '')
+               function column_list( $selected = '', $allrows = '' )
                {
-                       if(!$selected)
+                       if (!$selected)
                        {
                                $selected = 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']["agreement_columns"])
 ? 
$GLOBALS['phpgw_info']['user']['preferences']['property']["agreement_columns"] 
: '';
                        }
 
-                       $filter = array('list'   => ''); // translates to "list 
IS NULL"
+                       $filter = array('list' => ''); // translates to "list 
IS NULL"
                        $columns = $this->custom->find('property', 
'.agreement', 0, '', '', '', true, false, $filter);
 
                        $column_list = 
$this->bocommon->select_multi_list($selected, $columns);
@@ -383,27 +383,27 @@
                        return $this->so->request_next_id();
                }
 
-               function get_agreement_group_list($selected = '')
+               function get_agreement_group_list( $selected = '' )
                {
                        $agreement_groups = 
$this->so->get_agreement_group_list();
                        return $this->bocommon->select_list($selected, 
$agreement_groups);
                }
 
-               function read_group_activity($group_id = '', $agreement_id = '')
+               function read_group_activity( $group_id = '', $agreement_id = 
'' )
                {
                        $activity_list = 
$this->so->read_group_activity($group_id, $agreement_id);
-                       $this->uicols    = $this->so->uicols;
+                       $this->uicols = $this->so->uicols;
                        return $activity_list;
                }
 
-               function add_activity($values, $agreement_id)
+               function add_activity( $values, $agreement_id )
                {
                        return $this->so->add_activity($values, $agreement_id);
                }
 
-               function select_status_list($format = '', $selected = '')
+               function select_status_list( $format = '', $selected = '' )
                {
-                       switch($format)
+                       switch ($format)
                        {
                                case 'select':
                                        
$GLOBALS['phpgw']->xslttpl->add_file(array('status_select'));
@@ -418,7 +418,7 @@
                        return $this->bocommon->select_list($selected, 
$status_entries);
                }
 
-               function get_activity_descr($id)
+               function get_activity_descr( $id )
                {
                        return $this->so->get_activity_descr($id);
                }

Modified: trunk/property/inc/class.boalarm.inc.php
===================================================================
--- trunk/property/inc/class.boalarm.inc.php    2016-02-11 15:47:31 UTC (rev 
14725)
+++ trunk/property/inc/class.boalarm.inc.php    2016-02-11 20:07:07 UTC (rev 
14726)
@@ -1,31 +1,31 @@
 <?php
        /**
-       * phpGroupWare - property: a Facilities Management System.
-       *
-       * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
-       * This file is part of phpGroupWare.
-       *
-       * phpGroupWare is free software; you can redistribute it and/or modify
-       * it under the terms of the GNU General Public License as published by
-       * the Free Software Foundation; either version 2 of the License, or
-       * (at your option) any later version.
-       *
-       * phpGroupWare is distributed in the hope that it will be useful,
-       * but WITHOUT ANY WARRANTY; without even the implied warranty of
-       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-       * GNU General Public License for more details.
-       *
-       * You should have received a copy of the GNU General Public License
-       * along with phpGroupWare; if not, write to the Free Software
-       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
-       *
-       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
-       * @package property
-       * @subpackage admin
+        * phpGroupWare - property: a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
+        * @package property
+        * @subpackage admin
         * @version $Id$
-       */
+        */
 
        /**
         * Description
@@ -37,32 +37,32 @@
                public $allrows;
                public $method_id;
 
-               function __construct($session = '')
+               function __construct( $session = '' )
                {
-                       $GLOBALS['phpgw_info']['flags']['currentapp']   =       
'property';
-                       if(!is_object($GLOBALS['phpgw']->asyncservice))
+                       $GLOBALS['phpgw_info']['flags']['currentapp'] = 
'property';
+                       if (!is_object($GLOBALS['phpgw']->asyncservice))
                        {
                                $GLOBALS['phpgw']->asyncservice = 
CreateObject('phpgwapi.asyncservice');
                        }
-                       $this->async            = & 
$GLOBALS['phpgw']->asyncservice;
-                       $this->so                       = 
CreateObject('property.soalarm');
-                       $this->bocommon         = 
CreateObject('property.bocommon');
-                       if($session)
+                       $this->async = & $GLOBALS['phpgw']->asyncservice;
+                       $this->so = CreateObject('property.soalarm');
+                       $this->bocommon = CreateObject('property.bocommon');
+                       if ($session)
                        {
                                $this->read_sessiondata();
                                $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');
-                       $method_id      = phpgw::get_var('method_id', 'int');
-                       $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');
+                       $cat_id = phpgw::get_var('cat_id', 'int');
+                       $method_id = phpgw::get_var('method_id', 'int');
+                       $allrows = phpgw::get_var('allrows', 'bool');
 
-                       if($start)
+                       if ($start)
                        {
                                $this->start = $start;
                        }
@@ -71,23 +71,23 @@
                                $this->start = 0;
                        }
 
-                       if(isset($query))
+                       if (isset($query))
                        {
                                $this->query = $query;
                        }
-                       if(!empty($filter))
+                       if (!empty($filter))
                        {
                                $this->filter = $filter;
                        }
-                       if(isset($sort))
+                       if (isset($sort))
                        {
                                $this->sort = $sort;
                        }
-                       if(isset($order))
+                       if (isset($order))
                        {
                                $this->order = $order;
                        }
-                       if(isset($method_id) && !empty($method_id))
+                       if (isset($method_id) && !empty($method_id))
                        {
                                $this->method_id = $method_id;
                        }
@@ -95,15 +95,15 @@
                        {
                                $this->method_id = 0;
                        }
-                       if(isset($allrows))
+                       if (isset($allrows))
                        {
                                $this->allrows = $allrows;
                        }
                }
 
-               function save_sessiondata($data)
+               function save_sessiondata( $data )
                {
-                       if($this->use_session)
+                       if ($this->use_session)
                        {
                                
$GLOBALS['phpgw']->session->appsession('session_data', 'owner', $data);
                        }
@@ -113,55 +113,55 @@
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data', 'owner');
 
-                       $this->start            = $data['start'];
-                       $this->query            = $data['query'];
-                       $this->filter           = $data['filter'];
-                       $this->sort                     = $data['sort'];
-                       $this->order            = $data['order'];
-                       $this->cat_id           = $data['cat_id'];
-                       $this->method_id        = $data['method_id'];
+                       $this->start = $data['start'];
+                       $this->query = $data['query'];
+                       $this->filter = $data['filter'];
+                       $this->sort = $data['sort'];
+                       $this->order = $data['order'];
+                       $this->cat_id = $data['cat_id'];
+                       $this->method_id = $data['method_id'];
                }
 
-               function select_method_list($selected = '')
+               function select_method_list( $selected = '' )
                {
                        $list = $this->so->select_method_list();
                        $list = $this->bocommon->select_list($selected, $list);
                        return $list;
                }
 
-               function read_single_method($id)
+               function read_single_method( $id )
                {
                        return $this->so->read_single_method($id);
                }
 
-               function read($data = array())
+               function read( $data = array() )
                {
 //                     $jobs = $this->so->read(array('id'=>'%','start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
 //                             'filter' => 
$this->filter,'allrows'=>$this->allrows));
                        $jobs = $this->so->read($data);
-                       $this->total_records    = $this->so->total_records;
+                       $this->total_records = $this->so->total_records;
                        return $jobs;
                }
                /* !
-               @function read_alarms
-               @abstract read the alarms of a calendar-event specified by 
$cal_id
-               @returns array of alarms with alarm-id as key
-               @note the alarm-id is a string of 'cal:'.$cal_id.':'.$alarm_nr, 
it is used as the job-id too
+                 @function read_alarms
+                 @abstract read the alarms of a calendar-event specified by 
$cal_id
+                 @returns array of alarms with alarm-id as key
+                 @note the alarm-id is a string of 
'cal:'.$cal_id.':'.$alarm_nr, it is used as the job-id too
                 */
 
-               function read_alarms($type = '', $input_id, $text = '')
+               function read_alarms( $type = '', $input_id, $text = '' )
                {
                        $alarms = array();
 
-                       if($jobs = $this->async->read($type . ':' . 
intval($input_id) . ':%'))
+                       if ($jobs = $this->async->read($type . ':' . 
intval($input_id) . ':%'))
                        {
-                               foreach($jobs as $id => $job)
+                               foreach ($jobs as $id => $job)
                                {
-                                       $alarm                          = 
$job['data']; // text, enabled
-                                       $alarm['alarm_id']      = $id;
-                                       $alarm['time']          = 
$GLOBALS['phpgw']->common->show_date($job['next']);
-                                       $alarm['user']          = 
$GLOBALS['phpgw']->accounts->id2name($alarm['owner']);
-                                       $alarm['text']          = $text;
+                                       $alarm = $job['data']; // text, enabled
+                                       $alarm['alarm_id'] = $id;
+                                       $alarm['time'] = 
$GLOBALS['phpgw']->common->show_date($job['next']);
+                                       $alarm['user'] = 
$GLOBALS['phpgw']->accounts->id2name($alarm['owner']);
+                                       $alarm['text'] = $text;
 
                                        $alarms[] = $alarm;
                                }
@@ -169,58 +169,58 @@
                        return $alarms;
                }
                /* !
-               @function read_alarm
-               @abstract read a single alarm specified by it's $id
-               @returns array with data of the alarm
-               @note the alarm-id is a string of 'cal:'.$cal_id.':'.$alarm_nr, 
it is used as the job-id too
+                 @function read_alarm
+                 @abstract read a single alarm specified by it's $id
+                 @returns array with data of the alarm
+                 @note the alarm-id is a string of 
'cal:'.$cal_id.':'.$alarm_nr, it is used as the job-id too
                 */
 
-               function read_alarm($alarm_type, $id)
+               function read_alarm( $alarm_type, $id )
                {
-                       if(!($jobs = $this->async->read($id)))
+                       if (!($jobs = $this->async->read($id)))
                        {
                                return false;
                        }
 
-                       $alarm                  = $jobs[$id]['data'];   // 
text, enabled
-                       $alarm['id']    = $id;
-                       $alarm['time']  = $jobs[$id]['next'];
-                       $alarm['times'] = $jobs[$id]['times'];
+                       $alarm = $jobs[$id]['data']; // text, enabled
+                       $alarm['id'] = $id;
+                       $alarm['time'] = $jobs[$id]['next'];
+                       $alarm['times'] = $jobs[$id]['times'];
                        $alarm['method'] = $jobs[$id]['method'];
 
 //                     echo "<p>read_alarm('$id')="; print_r($alarm); echo 
"</p>\n";
                        return $alarm;
                }
                /* !
-               @function enable
-               @abstract enable or disable one or more alarms identified by 
its ids
-               @syntax enable($ids,$enable=true)
-               @param $ids array with alarm ids as keys (!)
-               @returns the number of alarms enabled or -1 for insuficent 
permission to do so
-               @note Not found alarms or insuficent perms stop the enableing 
of multiple alarms
+                 @function enable
+                 @abstract enable or disable one or more alarms identified by 
its ids
+                 @syntax enable($ids,$enable=true)
+                 @param $ids array with alarm ids as keys (!)
+                 @returns the number of alarms enabled or -1 for insuficent 
permission to do so
+                 @note Not found alarms or insuficent perms stop the enableing 
of multiple alarms
                 */
 
-               function enable_alarm($alarm_type, $alarms, $enable = true)
+               function enable_alarm( $alarm_type, $alarms, $enable = true )
                {
                        $enabled = 0;
-                       foreach($alarms as $id)
+                       foreach ($alarms as $id)
                        {
                                $temp = explode(':', $id);
                                $alarm_type = $temp[0];
 
-                               if(!($alarm = $this->read_alarm($alarm_type, 
$id)))
+                               if (!($alarm = $this->read_alarm($alarm_type, 
$id)))
                                {
-                                       return 0;       // alarm not found
+                                       return 0; // alarm not found
                                }
 
-                               if(!$alarm['enabled'] == !$enable)
+                               if (!$alarm['enabled'] == !$enable)
                                {
-                                       continue;       // nothing to do
+                                       continue; // nothing to do
                                }
 
                                $alarm['enabled'] = intval(!$alarm['enabled']);
 
-                               if($this->save_alarm($alarm_type, 
$alarm['event_id'], $alarm, $alarm['method']))
+                               if ($this->save_alarm($alarm_type, 
$alarm['event_id'], $alarm, $alarm['method']))
                                {
                                        ++$enabled;
                                }
@@ -257,30 +257,30 @@
                 * @param string $method
                 * @return string|boolean
                 */
-               function save_alarm($alarm_type, $event_id, $alarm, $method = 
'')
+               function save_alarm( $alarm_type, $event_id, $alarm, $method = 
'' )
                {
-                       if(!$method)
+                       if (!$method)
                        {
                                $method = 'property.boalarm.send_alarm';
                        }
 //                     echo "<p>save_alarm(event_id=$event_id, alarm="; 
print_r($alarm); echo ")</p>\n";
 
-                       if(!isset($alarm['id']) || !$alarm['id'])
+                       if (!isset($alarm['id']) || !$alarm['id'])
                        {
                                $alarms = $this->read_alarms($alarm_type, 
$event_id); // find a free alarm#
                                $n = count($alarms);
                                do
-                       {
+                               {
                                        $id = $alarm_type . ':' . 
intval($event_id) . ':' . $n;
-                               ++$n;
-                       }
-                               while(@isset($alarms[$id]));
+                                       ++$n;
+                               }
+                               while (@isset($alarms[$id]));
 
                                $alarm[$alarm_type . '_id'] = $event_id;  // we 
need the back-reference
 
                                $alarm['id'] = $id;
 
-                               if(!$this->async->set_timer($alarm['times'], 
$id, $method, $alarm))
+                               if (!$this->async->set_timer($alarm['times'], 
$id, $method, $alarm))
                                {
                                        return false;
                                }
@@ -294,32 +294,32 @@
                        }
                }
                /* !
-               @function add_alarm
-               @abstract adds a new alarm to an event
-               @syntax add(&$event,$time,$login_id)
-               @param &$event event to add the alarm too
-               @param $time for the alarm in sec before the starttime of the 
event
-               @param $login_id user to alarm
-               @returns the alarm or false
+                 @function add_alarm
+                 @abstract adds a new alarm to an event
+                 @syntax add(&$event,$time,$login_id)
+                 @param &$event event to add the alarm too
+                 @param $time for the alarm in sec before the starttime of the 
event
+                 @param $login_id user to alarm
+                 @returns the alarm or false
                 */
 
-               function add_alarm($alarm_type, &$event, $time, $owner)
+               function add_alarm( $alarm_type, &$event, $time, $owner )
                {
                        /*                      if 
(!$this->check_perms(PHPGW_ACL_SETALARM,$owner) || !($cal_id = $event['id']))
+                         {
+                         return false;
+                         }
+                        */
+                       if (!$owner > 0)
                        {
-                               return false;
-                       }
- */
-                       if(!$owner > 0)
-                       {
                                $receipt['error'][] = array('msg' => lang('No 
user selected'));
-                               return  $receipt;
+                               return $receipt;
                        }
 
                        $alarm = Array(
-                               'time'    => ($event['alarm_date'] - $time), 
//($etime=$this->bo->maketime($event['start'])) - $time,
-                               'offset'  => $time,
-                               'owner'   => $owner,
+                               'time' => ($event['alarm_date'] - $time), 
//($etime=$this->bo->maketime($event['start'])) - $time,
+                               'offset' => $time,
+                               'owner' => $owner,
                                'enabled' => 1,
                                'event_id' => $event['id'],
                                'event_name' => $event['name']
@@ -333,65 +333,65 @@
                        return $alarm;
                }
                /* !
-               @function delete
-               @abstract delete one or more alarms identified by its ids
-               @syntax delete($ids)
-               @param $ids array with alarm ids as keys (!)
-               @returns the number of alarms deleted or -1 for insuficent 
permission to do so
-               @note Not found alarms or insuficent perms stop the deleting of 
multiple alarms
+                 @function delete
+                 @abstract delete one or more alarms identified by its ids
+                 @syntax delete($ids)
+                 @param $ids array with alarm ids as keys (!)
+                 @returns the number of alarms deleted or -1 for insuficent 
permission to do so
+                 @note Not found alarms or insuficent perms stop the deleting 
of multiple alarms
                 */
 
-               function delete_alarm($alarm_type, $alarms)
+               function delete_alarm( $alarm_type, $alarms )
                {
                        $deleted = 0;
-                       foreach($alarms as $id)
+                       foreach ($alarms as $id)
                        {
-                               if(!($alarm = $this->read_alarm($alarm_type, 
$id)))
+                               if (!($alarm = $this->read_alarm($alarm_type, 
$id)))
                                {
-                                       return 0;       // alarm not found
+                                       return 0; // alarm not found
                                }
                                /*                              if 
(!$this->check_perms(PHPGW_ACL_DELETEALARM,$alarm['owner']))
+                                 {
+                                 return -1;
+                                 }
+                                */
+                               if ($this->async->cancel_timer($id))
                                {
-                                       return -1;
-                               }
- */
-                               if($this->async->cancel_timer($id))
-                               {
                                        ++$deleted;
                                }
                        }
                        return $deleted;
                }
 
-               function test_cron($alarm)
+               function test_cron( $alarm )
                {
 
                        $ids = array_values($alarm);
-                       foreach($ids as $id)
+                       foreach ($ids as $id)
                        {
                                $event = $this->async->read($id);
                        }
-                       
-                       if(isset($event[$id]) && $event[$id] &&  
$event[$id]['method'] && $event[$id]['data']['enabled'])
+
+                       if (isset($event[$id]) && $event[$id] && 
$event[$id]['method'] && $event[$id]['data']['enabled'])
                        {
                                execMethod($event[$id]['method'], 
$event[$id]['data']);
                        }
                }
 
-               function send_alarm($alarm)
+               function send_alarm( $alarm )
                {
 
 //                     echo "<p>boalarm::send_alarm("; print_r($alarm); echo 
")</p>\n";
                        $GLOBALS['phpgw_info']['user']['account_id'] = 
$this->owner = $alarm['owner'];
 
-                       if(!$alarm['enabled'] || !$alarm['owner'])
+                       if (!$alarm['enabled'] || !$alarm['owner'])
                        {
-                               return false;   // event not found
+                               return false; // event not found
                        }
 
                        $this->config = CreateObject('phpgwapi.config', 
'property');
                        $this->config->read();
-                       $this->send                     = 
CreateObject('phpgwapi.send');
+                       $this->send = CreateObject('phpgwapi.send');
 
                        $members = array();
 
@@ -407,9 +407,9 @@
 
                        $current_user_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
 
-                       $current_user_firstname = 'FM';
+                       $current_user_firstname = 'FM';
 
-                       $current_user_lastname  = 'System';
+                       $current_user_lastname = 'System';
 
                        $current_user_name = $user_firstname . " " . 
$user_lastname;
 
@@ -424,10 +424,10 @@
                        $body = lang('Alarm') . ' #' . $alarm['event_id'] . 
"\n";
                        $body .= lang('Name') . ': ' . $alarm['event_name'] . 
"\n";
                        $body .= '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
"property.ui{$info[0]}.edit",
-                               'id' => $info[1]), false, true) . '">' . 
$alarm['event_name'] . "</a>\n";
-                       if(!is_array($alarm['time']))
+                                       'id' => $info[1]), false, true) . '">' 
. $alarm['event_name'] . "</a>\n";
+                       if (!is_array($alarm['time']))
                        {
-                               $dateformat     = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                               $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
                                $body .= lang('Deadline') . ': ' . 
$GLOBALS['phpgw']->common->show_date(($alarm['time'] + $alarm['offset']), 
$dateformat) . "\n";
                        }
                        $body .= lang('Assigned To') . ': ' . 
$GLOBALS['phpgw']->accounts->id2name($alarm['owner']) . "\n";
@@ -438,12 +438,12 @@
                        $error = Array();
                        $toarray = Array();
                        $i = 0;
-                       for($i = 0; $i < count($members); $i++)
+                       for ($i = 0; $i < count($members); $i++)
                        {
-                               if($members[$i]['account_id'])
+                               if ($members[$i]['account_id'])
                                {
                                        $prefs = 
$this->bocommon->create_preferences('property', $members[$i]['account_id']);
-                                       if(strlen($prefs['email']) > 
(strlen($members[$i]['account_name']) + 1))
+                                       if (strlen($prefs['email']) > 
(strlen($members[$i]['account_name']) + 1))
                                        {
                                                $toarray[$prefs['email']] = 
$prefs['email'];
                                        }
@@ -455,7 +455,7 @@
                                }
                        }
 
-                       if(count($toarray) > 1)
+                       if (count($toarray) > 1)
                        {
                                $to = implode(',', $toarray);
                        }
@@ -464,7 +464,7 @@
                                $to = current($toarray);
                        }
 
-                       
if(isset($GLOBALS['phpgw_info']['server']['smtp_server']) && 
$GLOBALS['phpgw_info']['server']['smtp_server'])
+                       if 
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) && 
$GLOBALS['phpgw_info']['server']['smtp_server'])
                        {
                                $body = nl2br($body);
                                $rc = $this->send->msg('email', $to, $subject, 
$body, '', $cc, $bcc, $current_user_address, $current_user_name, 'html');
@@ -475,7 +475,7 @@
                        }
 
                        //      $rc=1;
-                       if(!$rc)
+                       if (!$rc)
                        {
                                $receipt['error'][] = array('msg' => lang('Your 
message could not be sent by mail!'));
                                $receipt['error'][] = array('msg' => lang('The 
mail server returned'));
@@ -492,4 +492,4 @@
                        }
 //                     return $receipt;
                }
-       }
+       }
\ No newline at end of file

Modified: trunk/property/inc/class.boasync.inc.php
===================================================================
--- trunk/property/inc/class.boasync.inc.php    2016-02-11 15:47:31 UTC (rev 
14725)
+++ trunk/property/inc/class.boasync.inc.php    2016-02-11 20:07:07 UTC (rev 
14726)
@@ -1,31 +1,31 @@
 <?php
        /**
-       * phpGroupWare - property: a Facilities Management System.
-       *
-       * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
-       * This file is part of phpGroupWare.
-       *
-       * phpGroupWare is free software; you can redistribute it and/or modify
-       * it under the terms of the GNU General Public License as published by
-       * the Free Software Foundation; either version 2 of the License, or
-       * (at your option) any later version.
-       *
-       * phpGroupWare is distributed in the hope that it will be useful,
-       * but WITHOUT ANY WARRANTY; without even the implied warranty of
-       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-       * GNU General Public License for more details.
-       *
-       * You should have received a copy of the GNU General Public License
-       * along with phpGroupWare; if not, write to the Free Software
-       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
-       *
-       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
-       * @package property
-       * @subpackage admin
+        * phpGroupWare - property: a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
+        * @package property
+        * @subpackage admin
         * @version $Id$
-       */
+        */
 
        /**
         * Description
@@ -43,42 +43,42 @@
                var $allrows;
                var $public_functions = array
                        (
-                               'read'                          => true,
-                               'read_single'           => true,
-                               'save'                          => true,
-                               'delete'                        => true,
-                               'check_perms'           => true
-                       );
+                       'read' => true,
+                       'read_single' => true,
+                       'save' => true,
+                       'delete' => true,
+                       'check_perms' => true
+               );
 
-               function __construct($session = false)
+               function __construct( $session = false )
                {
-                       $this->so               = 
CreateObject('property.soasync');
+                       $this->so = CreateObject('property.soasync');
                        $this->socommon = CreateObject('property.socommon');
 
-                       if($session)
+                       if ($session)
                        {
                                $this->read_sessiondata();
                                $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');
-                       $cat_id                         = 
phpgw::get_var('cat_id', 'int');
-                       $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');
+                       $cat_id = phpgw::get_var('cat_id', 'int');
+                       $allrows = phpgw::get_var('allrows', 'bool');
 
-                       $this->start            = $start ? $start : 0;
-                       $this->query            = isset($query) ? $query : 
$this->query;
-                       $this->sort                     = isset($sort) && $sort 
? $sort : '';
-                       $this->order            = isset($order) && $order ? 
$order : '';
-                       $this->cat_id           = isset($cat_id) && $cat_id ? 
$cat_id : '';
-                       $this->allrows          = isset($allrows) && $allrows ? 
$allrows : '';
+                       $this->start = $start ? $start : 0;
+                       $this->query = isset($query) ? $query : $this->query;
+                       $this->sort = isset($sort) && $sort ? $sort : '';
+                       $this->order = isset($order) && $order ? $order : '';
+                       $this->cat_id = isset($cat_id) && $cat_id ? $cat_id : 
'';
+                       $this->allrows = isset($allrows) && $allrows ? $allrows 
: '';
                }
 
-               function save_sessiondata($data)
+               function save_sessiondata( $data )
                {
-                       if($this->use_session)
+                       if ($this->use_session)
                        {
                                
$GLOBALS['phpgw']->session->appsession('session_data', 'async', $data);
                        }
@@ -88,15 +88,15 @@
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data', 'async');
 
-                       $this->start    = $data['start'];
-                       $this->query    = $data['query'];
-                       $this->filter   = $data['filter'];
-                       $this->sort             = $data['sort'];
-                       $this->order    = $data['order'];
-                       $this->cat_id   = $data['cat_id'];
+                       $this->start = $data['start'];
+                       $this->query = $data['query'];
+                       $this->filter = $data['filter'];
+                       $this->sort = $data['sort'];
+                       $this->order = $data['order'];
+                       $this->cat_id = $data['cat_id'];
                }
 
-               function read($data = array())
+               function read( $data = array() )
                {
                        /* $method = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
                          'allrows' => $this->allrows)); */
@@ -107,16 +107,16 @@
                        return $method;
                }
 
-               function read_single($id)
+               function read_single( $id )
                {
                        return $this->so->read_single($id);
                }
 
-               function save($method, $action = '')
+               function save( $method, $action = '' )
                {
-                       if($action == 'edit')
+                       if ($action == 'edit')
                        {
-                               if($method['id'] != '')
+                               if ($method['id'] != '')
                                {
 
                                        $receipt = $this->so->edit($method);
@@ -129,8 +129,8 @@
                        return $receipt;
                }
 
-               function delete($id)
+               function delete( $id )
                {
                        $this->so->delete($id);
                }
-       }
+       }
\ No newline at end of file

Modified: trunk/property/inc/class.bobudget.inc.php
===================================================================
--- trunk/property/inc/class.bobudget.inc.php   2016-02-11 15:47:31 UTC (rev 
14725)
+++ trunk/property/inc/class.bobudget.inc.php   2016-02-11 20:07:07 UTC (rev 
14726)
@@ -1,31 +1,31 @@
 <?php
        /**
-       * phpGroupWare - property: a Facilities Management System.
-       *
-       * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
-       * This file is part of phpGroupWare.
-       *
-       * phpGroupWare is free software; you can redistribute it and/or modify
-       * it under the terms of the GNU General Public License as published by
-       * the Free Software Foundation; either version 2 of the License, or
-       * (at your option) any later version.
-       *
-       * phpGroupWare is distributed in the hope that it will be useful,
-       * but WITHOUT ANY WARRANTY; without even the implied warranty of
-       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-       * GNU General Public License for more details.
-       *
-       * You should have received a copy of the GNU General Public License
-       * along with phpGroupWare; if not, write to the Free Software
-       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
-       *
-       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
-       * @package property
-       * @subpackage budget
+        * phpGroupWare - property: a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2003,2004,2005,2006,2007 Free Software 
Foundation, Inc. http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
+        * @package property
+        * @subpackage budget
         * @version $Id$
-       */
+        */
 
        /**
         * Description
@@ -46,85 +46,85 @@
                var $revision;
                var $allrows;
                var $details;
-               var     $sum_budget_cost                = 0;
-               var     $sum_obligation_cost    = 0;
-               var     $sum_actual_cost                = 0;
-               var     $sum_actual_cost_period         = 0;
-               var $sum_hits                           = 0;
-               var     $total_records                  = 0;
+               var $sum_budget_cost = 0;
+               var $sum_obligation_cost = 0;
+               var $sum_actual_cost = 0;
+               var $sum_actual_cost_period = 0;
+               var $sum_hits = 0;
+               var $total_records = 0;
                var $public_functions = array
                        (
-                               'read'                          => true,
-                               'read_single'           => true,
-                               'save'                          => true,
-                               'delete'                        => true,
-                               'check_perms'           => true
-                       );
+                       'read' => true,
+                       'read_single' => true,
+                       'save' => true,
+                       'delete' => true,
+                       'check_perms' => true
+               );
 
-               function __construct($session = false)
+               function __construct( $session = false )
                {
-                       $this->so                               = 
CreateObject('property.sobudget');
-                       $this->bocommon                 = 
CreateObject('property.bocommon');
-                       $this->cats                             = & 
$this->so->cats;
+                       $this->so = CreateObject('property.sobudget');
+                       $this->bocommon = CreateObject('property.bocommon');
+                       $this->cats = & $this->so->cats;
 
-                       if($session)
+                       if ($session)
                        {
                                $this->read_sessiondata();
                                $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');
-                       $dimb_id                                = 
phpgw::get_var('dimb_id', 'int');
-                       $org_unit_id                            = 
phpgw::get_var('org_unit_id', 'int');
-                       $allrows                                = 
phpgw::get_var('allrows', 'bool');
-                       $district_id                    = 
phpgw::get_var('district_id', 'int');
-                       $year                                   = 
phpgw::get_var('year', 'int');
-                       $month                                  = 
phpgw::get_var('month', 'int');
-                       $grouping                               = 
phpgw::get_var('grouping', 'int');
-                       $revision                               = 
phpgw::get_var('revision', 'int');
-                       $allrows                                = 
phpgw::get_var('allrows', 'bool');
-                       $details                                = 
phpgw::get_var('details', 'bool');
-                       $direction                              = 
phpgw::get_var('direction');
+                       $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');
+                       $dimb_id = phpgw::get_var('dimb_id', 'int');
+                       $org_unit_id = phpgw::get_var('org_unit_id', 'int');
+                       $allrows = phpgw::get_var('allrows', 'bool');
+                       $district_id = phpgw::get_var('district_id', 'int');
+                       $year = phpgw::get_var('year', 'int');
+                       $month = phpgw::get_var('month', 'int');
+                       $grouping = phpgw::get_var('grouping', 'int');
+                       $revision = phpgw::get_var('revision', 'int');
+                       $allrows = phpgw::get_var('allrows', 'bool');
+                       $details = phpgw::get_var('details', 'bool');
+                       $direction = phpgw::get_var('direction');
 
-                       $this->start                    = $start;
-                       $this->query                    = $query ? $query : 
$this->query;
-                       $this->direction                = $direction ? 
$direction : $this->direction;
-                       if(!$this->direction)
+                       $this->start = $start;
+                       $this->query = $query ? $query : $this->query;
+                       $this->direction = $direction ? $direction : 
$this->direction;
+                       if (!$this->direction)
                        {
                                $this->direction = 'expenses';
                        }
-                       
-                       $this->filter                   = isset($filter) && 
$filter ? $filter : '';
-                       $this->sort                             = isset($sort) 
&& $sort ? $sort : '';
-                       $this->order                    = isset($order) && 
$order ? $order : '';
-                       $this->cat_id                   = isset($cat_id) && 
$cat_id ? $cat_id : '';
-                       $this->dimb_id                  = isset($dimb_id) && 
$dimb_id ? $dimb_id : 
'';//$GLOBALS['phpgw_info']['user']['preferences']['property']['dimb'];
-                       $this->org_unit_id              = isset($org_unit_id) 
&& $org_unit_id ? $org_unit_id : 
'';//$GLOBALS['phpgw_info']['user']['preferences']['property']['org_unit_id'];
 
-                       $this->part_of_town_id  = isset($part_of_town_id) && 
$part_of_town_id ? $part_of_town_id : '';
-                       $this->district_id              = isset($district_id) 
&& $district_id ? $district_id : '';
-                       $this->grouping                 = isset($grouping) && 
$grouping ? $grouping : '';
-                       $this->revision                 = isset($revision) && 
$revision ? $revision : 1;
-                       $this->allrows                  = isset($allrows) && 
$allrows ? $allrows : '';
-                       $this->year                             = isset($year) 
&& $year ? $year : date('Y');
-                       $this->month                    = isset($month) && 
$month ? $month : 0;
-                       $this->details                  = $details;
+                       $this->filter = isset($filter) && $filter ? $filter : 
'';
+                       $this->sort = isset($sort) && $sort ? $sort : '';
+                       $this->order = isset($order) && $order ? $order : '';
+                       $this->cat_id = isset($cat_id) && $cat_id ? $cat_id : 
'';
+                       $this->dimb_id = isset($dimb_id) && $dimb_id ? $dimb_id 
: '';//$GLOBALS['phpgw_info']['user']['preferences']['property']['dimb'];
+                       $this->org_unit_id = isset($org_unit_id) && 
$org_unit_id ? $org_unit_id : 
'';//$GLOBALS['phpgw_info']['user']['preferences']['property']['org_unit_id'];
 
-                       if(isset($year) && !$this->year == $year && 
!$GLOBALS['phpgw_info']['menuaction'] == 'property.uibudget.obligations')
+                       $this->part_of_town_id = isset($part_of_town_id) && 
$part_of_town_id ? $part_of_town_id : '';
+                       $this->district_id = isset($district_id) && 
$district_id ? $district_id : '';
+                       $this->grouping = isset($grouping) && $grouping ? 
$grouping : '';
+                       $this->revision = isset($revision) && $revision ? 
$revision : 1;
+                       $this->allrows = isset($allrows) && $allrows ? $allrows 
: '';
+                       $this->year = isset($year) && $year ? $year : date('Y');
+                       $this->month = isset($month) && $month ? $month : 0;
+                       $this->details = $details;
+
+                       if (isset($year) && !$this->year == $year && 
!$GLOBALS['phpgw_info']['menuaction'] == 'property.uibudget.obligations')
                        {
                                $this->grouping = '';
                                $this->revision = '';
                        }
                }
 
-               function save_sessiondata($data)
+               function save_sessiondata( $data )
                {
-                       if($this->use_session)
+                       if ($this->use_session)
                        {
                                
$GLOBALS['phpgw']->session->appsession('session_data', 'budget', $data);
                        }
@@ -145,16 +145,16 @@
                        $this->direction = isset($data['direction']) ? 
$data['direction'] : '';
                }
 
-               function check_perms($has, $needed)
+               function check_perms( $has, $needed )
                {
                        return (!!($has & $needed) == true);
                }
 
-               function read($data = array())
+               function read( $data = array() )
                {
                        /* $budget = $this->so->read(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                               'filter' => $this->filter,'cat_id' => 
$this->cat_id,'allrows'=>$this->allrows,
-                               'district_id' => $this->district_id,'year' => 
$this->year,'grouping' => $this->grouping,'revision' => $this->revision,
+                         'filter' => $this->filter,'cat_id' => 
$this->cat_id,'allrows'=>$this->allrows,
+                         'district_id' => $this->district_id,'year' => 
$this->year,'grouping' => $this->grouping,'revision' => $this->revision,
                          'cat_id' => $this->cat_id, 'dimb_id' => 
$this->dimb_id, 'org_unit_id' => $this->org_unit_id)); */
 
                        $budget = $this->so->read(array
@@ -174,12 +174,12 @@
                                'cat_id' => $this->cat_id,
                                'dimb_id' => $this->dimb_id,
                                'org_unit_id' => $this->org_unit_id
-                       )
+                               )
                        );
 
-                       $this->total_records            = 
$this->so->total_records;
-                       $this->sum_budget_cost          = 
$this->so->sum_budget_cost;
-                       foreach($budget as & $entry)
+                       $this->total_records = $this->so->total_records;
+                       $this->sum_budget_cost = $this->so->sum_budget_cost;
+                       foreach ($budget as & $entry)
                        {
 //                             $entry['entry_date']    = 
$GLOBALS['phpgw']->common->show_date($entry['entry_date'],$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                                $category = 
$this->cats->return_single($entry['cat_id']);
@@ -189,10 +189,10 @@
                        return $budget;
                }
 
-               function read_basis($data = array())
+               function read_basis( $data = array() )
                {
                        /* $budget = $this->so->read_basis(array('start' => 
$this->start,'query' => $this->query,'sort' => $this->sort,'order' => 
$this->order,
-                               'filter' => $this->filter,'cat_id' => 
$this->cat_id,'allrows'=>$this->allrows,
+                         'filter' => $this->filter,'cat_id' => 
$this->cat_id,'allrows'=>$this->allrows,
                          'district_id' => $this->district_id,'year' => 
$this->year,'grouping' => $this->grouping,'revision' => $this->revision,)); */
 
                        $budget = $this->so->read_basis(array
@@ -209,19 +209,19 @@
                                'year' => $this->year,
                                'grouping' => $this->grouping,
                                'revision' => $this->revision
-                       )
+                               )
                        );
 
                        $this->total_records = $this->so->total_records;
 
-                       for($i = 0; $i < count($budget); $i++)
+                       for ($i = 0; $i < count($budget); $i++)
                        {
                                $budget[$i]['entry_date'] = 
$GLOBALS['phpgw']->common->show_date($budget[$i]['entry_date'], 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
                        }
                        return $budget;
                }
 
-               function read_obligations($data = array())
+               function read_obligations( $data = array() )
                {
 
                        $obligations = $this->so->read_obligations(array
@@ -243,40 +243,40 @@
                                'dimb_id' => $this->dimb_id,
                                'org_unit_id' => $this->org_unit_id,
                                'direction' => $this->direction
-                       )
+                               )
                        );
 
-                       $this->total_records                    = 
$this->so->total_records;
-                       $this->sum_budget_cost                  = 
$this->so->sum_budget_cost;
-                       $this->sum_obligation_cost              = 
$this->so->sum_obligation_cost;
-                       $this->sum_actual_cost                  = 
$this->so->sum_actual_cost;
-                       $this->sum_actual_cost_period   = 
$this->so->sum_actual_cost_period;
-                       $this->sum_hits                                 = 
$this->so->sum_hits;
+                       $this->total_records = $this->so->total_records;
+                       $this->sum_budget_cost = $this->so->sum_budget_cost;
+                       $this->sum_obligation_cost = 
$this->so->sum_obligation_cost;
+                       $this->sum_actual_cost = $this->so->sum_actual_cost;
+                       $this->sum_actual_cost_period = 
$this->so->sum_actual_cost_period;
+                       $this->sum_hits = $this->so->sum_hits;
 
                        return $obligations;
                }
 
-               function read_single($budget_id)
+               function read_single( $budget_id )
                {
                        return $this->so->read_single($budget_id);
                }
 
-               function read_single_basis($budget_id)
+               function read_single_basis( $budget_id )
                {
                        return $this->so->read_single_basis($budget_id);
                }
 
-               function read_budget_name($budget_id)
+               function read_budget_name( $budget_id )
                {
                        return $this->so->read_budget_name($budget_id);
                }
 
-               function save($budget)
+               function save( $budget )
                {
 
-                       if($budget['budget_id'])
+                       if ($budget['budget_id'])
                        {
-                               if($budget['budget_id'] != 0)
+                               if ($budget['budget_id'] != 0)
                                {
                                        $budget_id = $budget['budget_id'];
                                        $receipt = $this->so->edit($budget);
@@ -289,11 +289,11 @@
                        return $receipt;
                }
 
-               function save_basis($values)
+               function save_basis( $values )
                {
-                       if($values['budget_id'])
+                       if ($values['budget_id'])
                        {
-                               if($values['budget_id'] != 0)
+                               if ($values['budget_id'] != 0)
                                {
                                        $budget_id = $values['budget_id'];
                                        $receipt = 
$this->so->edit_basis($values);
@@ -304,9 +304,9 @@
                                $receipt = $this->so->add_basis($values);
                        }
 
-                       if(is_array($values['distribute']) && 
is_array($values['distribute_year']) && (!isset($receipt['error']) || 
!$receipt['error']))
+                       if (is_array($values['distribute']) && 
is_array($values['distribute_year']) && (!isset($receipt['error']) || 
!$receipt['error']))
                        {
-                               if($values['distribute'][0] == 'new')
+                               if ($values['distribute'][0] == 'new')
                                {
                                        $values['distribute'][0] = 
$receipt['budget_id'];
                                }
@@ -315,14 +315,14 @@
                        return $receipt;
                }
 
-               function distribute($values, $receipt = '')
+               function distribute( $values, $receipt = '' )
                {
                        return $this->so->distribute($values, $receipt);
                }
 
-               function delete($params)
+               function delete( $params )
                {
-                       if(is_array($params))
+                       if (is_array($params))
                        {
                                $this->so->delete($params[0]);
                        }
@@ -332,9 +332,9 @@
                        }
                }
 
-               function delete_basis($params)
+               function delete_basis( $params )
                {
-                       if(is_array($params))
+                       if (is_array($params))
                        {
                                $this->so->delete_basis($params[0]);
                        }
@@ -344,25 +344,25 @@
                        }
                }
 
-               function get_distribute_year_list($selected = '')
+               function get_distribute_year_list( $selected = '' )
                {
                        $distribute_year_list = 
$this->so->get_distribute_year_list();
                        return $this->bocommon->select_multi_list($selected, 
$distribute_year_list);
                }
 
-               function get_b_group_list($selected = '')
+               function get_b_group_list( $selected = '' )
                {
                        $b_group_list = $this->so->get_b_group_list();
                        return $this->bocommon->select_list($selected, 
$b_group_list);
                }
 
-               function get_revision_list($selected = '', $year = '', $basis = 
'')
+               function get_revision_list( $selected = '', $year = '', $basis 
= '' )
                {
                        $revision_list = $this->so->get_revision_list($year, 
$basis);
                        return $this->bocommon->select_list($selected, 
$revision_list);
                }
 
-               function get_year_filter_list($selected = '', $basis = '')
+               function get_year_filter_list( $selected = '', $basis = '' )
                {
                        $year_list = $this->so->get_year_filter_list($basis);
                        return $this->bocommon->select_list($selected, 
$year_list);
@@ -372,13 +372,13 @@
                {
                        $year_list = $this->so->get_year_filter_list();
 
-                       if(!$year_list)
+                       if (!$year_list)
                        {
                                $year_list = array(array('id' => date('Y'), 
'name' => date('Y')));
                        }
                        $k = date('Y') - $year_list[0]['id'] + 5;
                        $j = count($year_list);
-                       for($i = 0; $i < $k; $i++)
+                       for ($i = 0; $i < $k; $i++)
                        {
                                // FIXME
                                //      if($year_list[$j-1]['id'] < date('Y') + 
3)
@@ -390,9 +390,9 @@
                        return $year_list;
                }
 
-               function get_revision_filter_list($selected = '', $basis = '')
+               function get_revision_filter_list( $selected = '', $basis = '' )
                {
-                       if(!isset($_GET['year']))
+                       if (!isset($_GET['year']))
                        {
                                $year = date('Y');
                                $this->year = $year;
@@ -408,9 +408,9 @@
                        return $this->bocommon->select_list($selected, 
$revision_list);
                }
 
-               function get_grouping_filter_list($selected = '', $basis = '')
+               function get_grouping_filter_list( $selected = '', $basis = '' )
                {
-                       if(!isset($_GET['year']))
+                       if (!isset($_GET['year']))
                        {
                                $year = date('Y');
                        }
@@ -421,4 +421,4 @@
                        $grouping_list = 
$this->so->get_grouping_filter_list($year, $basis);
                        return $this->bocommon->select_list($selected, 
$grouping_list);
                }
-       }
+       }
\ No newline at end of file

Modified: trunk/property/inc/class.bocommon.inc.php
===================================================================
--- trunk/property/inc/class.bocommon.inc.php   2016-02-11 15:47:31 UTC (rev 
14725)
+++ trunk/property/inc/class.bocommon.inc.php   2016-02-11 20:07:07 UTC (rev 
14726)
@@ -1,31 +1,31 @@
 <?php
        /**
-       * phpGroupWare - property: a Facilities Management System.
-       *
-       * @author Sigurd Nes <address@hidden>
-       * @copyright Copyright (C) 
2003,2004,2005,2006,2007,2008,2009,2010,2011,2012 Free Software Foundation, 
Inc. http://www.fsf.org/
-       * This file is part of phpGroupWare.
-       *
-       * phpGroupWare is free software; you can redistribute it and/or modify
-       * it under the terms of the GNU General Public License as published by
-       * the Free Software Foundation; either version 2 of the License, or
-       * (at your option) any later version.
-       *
-       * phpGroupWare is distributed in the hope that it will be useful,
-       * but WITHOUT ANY WARRANTY; without even the implied warranty of
-       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-       * GNU General Public License for more details.
-       *
-       * You should have received a copy of the GNU General Public License
-       * along with phpGroupWare; if not, write to the Free Software
-       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
-       *
-       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
-       * @package property
-       * @subpackage core
+        * phpGroupWare - property: a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 
2003,2004,2005,2006,2007,2008,2009,2010,2011,2012 Free Software Foundation, 
Inc. http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
+        * @package property
+        * @subpackage core
         * @version $Id$
-       */
+        */
        /**
         * Description
         * @package property
@@ -42,70 +42,70 @@
                var $order;
                var $cat_id;
                var $district_id;
-               var     $xsl_rootdir;
+               var $xsl_rootdir;
                protected $join;
                protected $left_join;
                protected $like;
                var $public_functions = array
                        (
-                               'confirm_session'       => true,
-                               'get_vendor_email'      => true
-                       );
+                       'confirm_session' => true,
+                       'get_vendor_email' => true
+               );
 
                function __construct()
                {
                        //_debug_array($bt = debug_backtrace());
-                       $this->socommon                 = 
CreateObject('property.socommon');
-                       $this->account          = 
$GLOBALS['phpgw_info']['user']['account_id'];
+                       $this->socommon = CreateObject('property.socommon');
+                       $this->account = 
$GLOBALS['phpgw_info']['user']['account_id'];
 
-                       if(!isset($GLOBALS['phpgw']->asyncservice))
+                       if (!isset($GLOBALS['phpgw']->asyncservice))
                        {
                                $GLOBALS['phpgw']->asyncservice = 
CreateObject('phpgwapi.asyncservice');
                        }
                        $this->async = &$GLOBALS['phpgw']->asyncservice;
 
-                       $this->join                     = $this->socommon->join;
-                       $this->left_join        = $this->socommon->left_join;
-                       $this->like                     = $this->socommon->like;
+                       $this->join = $this->socommon->join;
+                       $this->left_join = $this->socommon->left_join;
+                       $this->like = $this->socommon->like;
 
                        $this->xsl_rootdir = PHPGW_SERVER_ROOT . 
"/property/templates/{$GLOBALS['phpgw_info']['server']['template_set']}";
                }
 
-               function check_perms($rights, $required)
+               function check_perms( $rights, $required )
                {
                        return ($rights & $required);
                }
 
-               function create_preferences($app = '', $user_id = '')
+               function create_preferences( $app = '', $user_id = '' )
                {
                        return $this->socommon->create_preferences($app, 
$user_id);
                }
 
-               function get_lookup_entity($location = '')
+               function get_lookup_entity( $location = '' )
                {
                        return $this->socommon->get_lookup_entity($location);
                }
 
-               function get_start_entity($location = '')
+               function get_start_entity( $location = '' )
                {
                        return $this->socommon->get_start_entity($location);
                }
 
-               function msgbox_data($receipt)
+               function msgbox_data( $receipt )
                {
-                       $msgbox_data_error       = array();
+                       $msgbox_data_error = array();
                        $msgbox_data_message = array();
-                       if(isSet($receipt['error']) AND 
is_array($receipt['error']))
+                       if (isSet($receipt['error']) AND 
is_array($receipt['error']))
                        {
-                               foreach($receipt['error'] as $dummy => $error)
+                               foreach ($receipt['error'] as $dummy => $error)
                                {
                                        $msgbox_data_error[$error['msg']] = 
false;
                                }
                        }
 
-                       if(isSet($receipt['message']) AND 
is_array($receipt['message']))
+                       if (isSet($receipt['message']) AND 
is_array($receipt['message']))
                        {
-                               foreach($receipt['message'] as $dummy => 
$message)
+                               foreach ($receipt['message'] as $dummy => 
$message)
                                {
                                        $msgbox_data_message[$message['msg']] = 
true;
                                }
@@ -118,7 +118,7 @@
 
                function confirm_session()
                {
-                       if($GLOBALS['phpgw']->session->verify())
+                       if ($GLOBALS['phpgw']->session->verify())
                        {
                                header('Content-Type: application/json');
                                echo json_encode(array('sessionExpired' => 
false));
@@ -126,26 +126,26 @@
                        }
                }
 
-               function date_to_timestamp($date = array())
+               function date_to_timestamp( $date = array() )
                {
-                       return  phpgwapi_datetime::date_to_timestamp($date);
+                       return phpgwapi_datetime::date_to_timestamp($date);
                }
 
-               function select_multi_list($selected = '', $input_list)
+               function select_multi_list( $selected = '', $input_list )
                {
                        $j = 0;
-                       if(isset($input_list) AND is_array($input_list))
+                       if (isset($input_list) AND is_array($input_list))
                        {
-                               foreach($input_list as $entry)
+                               foreach ($input_list as $entry)
                                {
                                        $output_list[$j]['id'] = $entry['id'];
                                        $output_list[$j]['name'] = 
$entry['name'];
 
-                                       if(isset($selected) && 
is_array($selected))
+                                       if (isset($selected) && 
is_array($selected))
                                        {
-                                               for($i = 0; $i < 
count($selected); $i++)
+                                               for ($i = 0; $i < 
count($selected); $i++)
                                                {
-                                                       if($selected[$i] == 
$entry['id'])
+                                                       if ($selected[$i] == 
$entry['id'])
                                                        {
                                                                
$output_list[$j]['selected'] = 'selected';
                                                        }
@@ -157,13 +157,13 @@
                        return $output_list;
                }
 
-               function select_list($selected = '', $list = array())
+               function select_list( $selected = '', $list = array() )
                {
-                       if(is_array($list))
+                       if (is_array($list))
                        {
-                               foreach($list as &$entry)
+                               foreach ($list as &$entry)
                                {
-                                       if($entry['id'] == $selected)
+                                       if ($entry['id'] == $selected)
                                        {
                                                $entry['selected'] = 'selected';
                                        }
@@ -172,11 +172,11 @@
                        }
                }
 
-               function get_user_list($format = '', $selected = '', $extra = 
'', $default = '', $start = '', $sort = 'ASC', $order = 'account_lastname', 
$query = '', $offset = '', $enabled = false)
+               function get_user_list( $format = '', $selected = '', $extra = 
'', $default = '', $start = '', $sort = 'ASC', $order = 'account_lastname', 
$query = '', $offset = '', $enabled = false )
                {
                        $order = $order ? $order : 'account_lastname';
 
-                       switch($format)
+                       switch ($format)
                        {
                                case 'select':

@@ Diff output truncated at 153600 characters. @@



reply via email to

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