fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16315] table: Merge 16306:16314 from trunk


From: sigurdne
Subject: [Fmsystem-commits] [16315] table: Merge 16306:16314 from trunk
Date: Wed, 15 Feb 2017 13:20:11 -0500 (EST)

Revision: 16315
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16315
Author:   sigurdne
Date:     2017-02-15 13:20:11 -0500 (Wed, 15 Feb 2017)
Log Message:
-----------
table: Merge 16306:16314 from trunk

Modified Paths:
--------------
    
branches/Version-2_0-branch/booking/inc/class.socompleted_reservation_export.inc.php
    branches/Version-2_0-branch/bookingfrontend/inc/class.bouser.inc.php
    branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId.php
    branches/Version-2_0-branch/eventplannerfrontend/inc/class.bouser.inc.php
    
branches/Version-2_0-branch/eventplannerfrontend/inc/class.hook_helper.inc.php
    branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php
    
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205.php
    
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205_BK.php
    branches/Version-2_0-branch/property/setup/phpgw_no.lang
    branches/Version-2_0-branch/registration/inc/class.uireg.inc.php
    branches/Version-2_0-branch/registration/templates/base/loginid_select.tpl
    branches/Version-2_0-branch/registration/templates/base/lostpw_select.tpl

Removed Paths:
-------------
    
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/MinId.php

Property Changed:
----------------
    branches/Version-2_0-branch/
    branches/Version-2_0-branch/booking/
    branches/Version-2_0-branch/bookingfrontend/

Index: branches/Version-2_0-branch
===================================================================
--- branches/Version-2_0-branch 2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch 2017-02-15 18:20:11 UTC (rev 16315)

Property changes on: branches/Version-2_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,4 ##
 /branches/dev-syncromind:13653
 /branches/dev-syncromind-2:14933-16300
 /branches/stavangerkommune:12743-12875,12986
-/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305
\ No newline at end of property
+/trunk:14721-14732,14734-14735,14737,14739,14741,14743-14744,14746-14749,14751,14753,14755-14757,14759,14761-14764,14766-14768,14770-14783,14785-14792,14794-14813,14815-14816,14818,14820-14822,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14847,14849-14866,14868-14869,14871,14873-14875,14877-14878,14880-14884,14886-14896,14898,14900-14902,14904,14906-14909,14911-14915,14917-14919,14921-14922,14924-14978,14980-15258,15260-15261,15263-15264,15266-15285,15287-15288,15290-15291,15293,15295,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15356,15358,15360-15541,15543-15566,15568-15569,15571,15573-15581,15583,15585-15617,15619,15621-15630,15632-15635,15637-15639,15641-15643,15645,15647-15665,15667-15668,15670-15671,15673-15693,15695-15712,15714-15764,15766-15767,15769-15787,15789-15802,15804-15811,15813-15814,15816-15818,15820-15849,15851-15887,15889-15900,15902-16046,16048-16051,16053,16055,16057-16063,16065-16071,16073-16077,16079-16081,16083-16099,16101-16130,16132-16140,16142,16144-16212,16214-16219,16221,16223-16224,16226,16228-16229,16231,16233,16235,16237,16239-16240,16242,16244-16246,16248,16250-16251,16253-16255,16257-16259,16261,16263,16265,16267,16269-16276,16278,16280-16283,16285,16287-16288,16290,16292-16295,16297-16305,16307-16314
\ No newline at end of property
Index: branches/Version-2_0-branch/booking
===================================================================
--- branches/Version-2_0-branch/booking 2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/booking 2017-02-15 18:20:11 UTC (rev 16315)

Property changes on: branches/Version-2_0-branch/booking
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /branches/dev-syncromind-2/booking:14933-16300
 /branches/stavangerkommune/booking:9468-12740,12743-12875,12986
-/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305
\ No newline at end of property
+/trunk/booking:14721-14732,14824-14825,14827-14829,14831-14834,14836,14838,14840-14842,14844-14845,14871,14886-14896,14900-14902,14917-14919,14924-14978,14980-15258,15266-15285,15287-15288,15297,15299-15305,15307-15310,15312-15335,15337-15352,15354,15360-15541,15543-15566,15568-15569,15585-15617,15621-15630,15637-15639,15641-15643,15645,15647-15665,15667-15668,15695-15712,15714-15764,15820-15849,15889-15900,15902-16046,16055,16101-16130,16144-16212,16297-16305,16307-16314
\ No newline at end of property
Modified: 
branches/Version-2_0-branch/booking/inc/class.socompleted_reservation_export.inc.php
===================================================================
--- 
branches/Version-2_0-branch/booking/inc/class.socompleted_reservation_export.inc.php
        2017-02-15 18:15:27 UTC (rev 16314)
+++ 
branches/Version-2_0-branch/booking/inc/class.socompleted_reservation_export.inc.php
        2017-02-15 18:20:11 UTC (rev 16315)
@@ -1077,7 +1077,20 @@
                                        $log_cost = $reservation['cost'];
                                        $log_varelinjer_med_dato = 
$reservation['article_description'] . ' - ' . $reservation['description'];
 
-                                       $log[] = $reservation['id'] . ';' . 
$reservation['reservation_type'] . ';' . $log_order_id . ';' . 
$log_customer_name . ' - ' . $log_customer_nr . ';' . $log_varelinjer_med_dato 
. ';' . $log_buidling . ';' . $log_cost;
+                                       $line_field = array();
+
+                                       $line_field[] = 
"\"{$reservation['id']}\"";
+                                       $line_field[] = 
"\"{$reservation['reservation_type']}\"";
+                                       $line_field[] = "\"{$log_order_id}\"";
+                                       $line_field[] = 
"\"{$log_customer_name}\"";
+                                       $line_field[] = 
"\"{$log_customer_nr}\"";
+                                       $line_field[] = 
"\"{$log_varelinjer_med_dato}\"";
+                                       $line_field[] = "\"{$log_buidling}\"";
+                                       $line_field[] = "\"{$log_cost}\"";
+
+                                       $log[] = implode(';',  $line_field);
+
+                       //              $log[] = $reservation['id'] . ';' . 
$reservation['reservation_type'] . ';' . $log_order_id . ';' . 
$log_customer_name . ' - ' . $log_customer_nr . ';' . $log_varelinjer_med_dato 
. ';' . $log_buidling . ';' . $log_cost;
                                }
                        }
 
@@ -1313,8 +1326,21 @@
                                $log_cost = $reservation['cost'];
                                $log_varelinjer_med_dato = 
$reservation['article_description'] . ' - ' . $reservation['description'];
 
-                               $log[] = $reservation['id'] . ';' . 
$reservation['reservation_type'] . ';' . $log_order_id . ';' . 
$log_customer_name . ' - ' . $log_customer_nr . ';' . $log_varelinjer_med_dato 
. ';' . $log_buidling . ';' . $log_cost;
+                               $line_field = array();
 
+                               $line_field[] = "\"{$reservation['id']}\"";
+                               $line_field[] = 
"\"{$reservation['reservation_type']}\"";
+                               $line_field[] = "\"{$log_order_id}\"";
+                               $line_field[] = "\"{$log_customer_name}\"";
+                               $line_field[] = "\"{$log_customer_nr}\"";
+                               $line_field[] = 
"\"{$log_varelinjer_med_dato}\"";
+                               $line_field[] = "\"{$log_buidling}\"";
+                               $line_field[] = "\"{$log_cost}\"";
+
+                               $log[] = implode(';',  $line_field);
+
+               //              $log[] = $reservation['id'] . ';' . 
$reservation['reservation_type'] . ';' . $log_order_id . ';' . 
$log_customer_name . ' - ' . $log_customer_nr . ';' . $log_varelinjer_med_dato 
. ';' . $log_buidling . ';' . $log_cost;
+
                                $output[] = implode('', str_replace(array("\n", 
"\r"), '', $startpost));
                                $output[] = implode('', str_replace(array("\n", 
"\r"), '', $fakturalinje));
                                $output[] = implode('', str_replace(array("\n", 
"\r"), '', $linjetekst));

Index: branches/Version-2_0-branch/bookingfrontend
===================================================================
--- branches/Version-2_0-branch/bookingfrontend 2017-02-15 18:15:27 UTC (rev 
16314)
+++ branches/Version-2_0-branch/bookingfrontend 2017-02-15 18:20:11 UTC (rev 
16315)

Property changes on: branches/Version-2_0-branch/bookingfrontend
___________________________________________________________________
Modified: svn:mergeinfo
## -1,3 +1,3 ##
 /branches/dev-syncromind-2/bookingfrontend:14933-16300
 /branches/stavangerkommune/bookingfrontend:9468-12740,12986
-/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630,15714-15764,15813-15814,15820-15849,15889-15900,15902-16046,16101-16130,16144-16212,16297-16305
\ No newline at end of property
+/trunk/bookingfrontend:14721-14732,14770-14783,14794-14808,14824-14825,14838,14886-14894,14906-14909,14917-14919,14924-14978,14980-15258,15297,15312-15335,15585-15617,15621-15630,15714-15764,15813-15814,15820-15849,15889-15900,15902-16046,16101-16130,16144-16212,16297-16305,16307-16314
\ No newline at end of property
Modified: branches/Version-2_0-branch/bookingfrontend/inc/class.bouser.inc.php
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/inc/class.bouser.inc.php        
2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/bookingfrontend/inc/class.bouser.inc.php        
2017-02-15 18:20:11 UTC (rev 16315)
@@ -238,130 +238,45 @@
 
                protected function get_breg_orgs( $fodselsnr )
                {
-                       $breg_conn = pg_connect("host=" . 
$GLOBALS['phpgw_domain']['default']['db_host'] . " port=5432 dbname=breg user=" 
. $GLOBALS['phpgw_domain']['default']['db_user'] . " password=" . 
$GLOBALS['phpgw_domain']['default']['db_pass']) or die('connection failed');
-                       $sql = "SELECT distinct orgnr FROM breg.personcurrent 
WHERE fodselsnr ='" . $fodselsnr . "'";
-                       $results = pg_query($breg_conn, $sql);
-                       $orgs = pg_fetch_all($results);
-                       print_r($sql);
-                       print_r($orgs);
-                       pg_close($breg_conn);
-                       return $orgs;
-               }
+                       $db = createObject('phpgwapi.db', null, null, true);
 
-               protected function get_user_orgnr_from_auth_header()
-               {
-                       $config = CreateObject('phpgwapi.config', 
'bookingfrontend');
-                       $config->read();
-                       if ($config->config_data['authentication_method'] === 
'MinId.php')
+                       $db->Host = 
$GLOBALS['phpgw_domain']['default']['db_host'];
+                       $db->Port = '5432';
+                       $db->Type = 'postgres';
+                       $db->Database = 'breg';
+                       $db->User = 
$GLOBALS['phpgw_domain']['default']['db_user'];
+                       $db->Password = 
$GLOBALS['phpgw_domain']['default']['db_pass'];
+
+                       try
                        {
-                               $ipdp = sha1($_SERVER['HTTP_UID']);
-                               $bregorgs = $this->get_breg_orgs($ipdp);
-                               $myorgnr = array();
-                               if ($bregorgs == array())
-                               {
-                                       $external_user = (object)'ciao';
-                                       $external_user->login = '000000000';
-                               }
-                               else
-                               {
-                                       foreach ($bregorgs as $org)
-                                       {
-                                               $myorgnr[] = $org['orgnr'];
-                                       }
-                                       if (count($myorgnr) > 1)
-                                       {
-                                               $external_user = (object)'ciao';
-                                               $external_user->login = 
$myorgnr[0];
-                                               $orgs = array();
-                                               foreach ($myorgnr as $org)
-                                               {
-                                                       $orgs[] = 
array('orgnumber' => $org, 'orgname' => $this->get_orgname_from_db($org));
-                                               }
-                                               
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY, 
$orgs);
-                                       }
-                                       elseif (count($myorgnr) > 0)
-                                       {
-                                               
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY, 
NULL);
-                                               $external_user = (object)'ciao';
-                                               $external_user->login = 
$myorgnr[0];
-                                       }
-                               }
+                               $db->connect();
+                               $this->connected = true;
                        }
-                       else
+                       catch (Exception $e)
                        {
-
-                               $header_key = 
isset($config->config_data['header_key']) && $config->config_data['header_key'] 
? $config->config_data['header_key'] : 'Osso-User-Dn';
-                               $header_regular_expression = 
isset($config->config_data['header_regular_expression']) && 
$config->config_data['header_regular_expression'] ? 
$config->config_data['header_regular_expression'] : '/^cn=(.*),cn=users.*$/';
-
-                               $headers = getallheaders();
-
-                               if (isset($config->config_data['debug']) && 
$config->config_data['debug'])
-                               {
-                                       $this->debug = true;
-                                       echo 'headers:<br>';
-                                       _debug_array($headers);
-                               }
-
-                               if (isset($headers[$header_key]) && 
$headers[$header_key])
-                               {
-                                       $matches = array();
-                                       
preg_match_all($header_regular_expression, $headers[$header_key], $matches);
-                                       $userid = $matches[1][0];
-
-                                       if ($this->debug)
-                                       {
-                                               echo 'matches:<br>';
-                                               _debug_array($matches);
-                                       }
-                               }
-
-                               $options = array();
-                               $options['soap_version'] = SOAP_1_1;
-                               $options['location'] = 
isset($config->config_data['soap_location']) && 
$config->config_data['soap_location'] ? $config->config_data['soap_location'] : 
'';// 'http://soat1a.srv.bergenkom.no:8888/gateway/services/BrukerService-v1';
-                               $options['uri'] = 
isset($config->config_data['soap_uri']) && $config->config_data['soap_uri'] ? 
$config->config_data['soap_uri'] : '';// 'http://soat1a.srv.bergenkom.no';
-                               $options['trace'] = 1;
-
-                               if 
(isset($config->config_data['soap_proxy_host']) && 
$config->config_data['soap_proxy_host'])
-                               {
-                                       $options['proxy_host'] = 
$config->config_data['soap_proxy_host'];
-                               }
-
-                               if 
(isset($config->config_data['soap_proxy_port']) && 
$config->config_data['soap_proxy_port'])
-                               {
-                                       $options['proxy_port'] = 
$config->config_data['soap_proxy_port'];
-                               }
-                               $options['encoding'] = 
isset($config->config_data['soap_encoding']) && 
$config->config_data['soap_encoding'] ? $config->config_data['soap_encoding'] : 
'UTF-8';
-                               $options['login'] = 
isset($config->config_data['soap_login']) && $config->config_data['soap_login'] 
? $config->config_data['soap_login'] : '';
-                               $options['password'] = 
isset($config->config_data['soap_password']) && 
$config->config_data['soap_password'] ? $config->config_data['soap_password'] : 
'';
-
-                               $wsdl = 
isset($config->config_data['soap_wsdl']) && $config->config_data['soap_wsdl'] ? 
$config->config_data['soap_wsdl'] : '';// 
'http://soat1a.srv.bergenkom.no:8888/gateway/services/BrukerService-v1?wsdl';
-
-                               $authentication_method = 
isset($config->config_data['authentication_method']) && 
$config->config_data['authentication_method'] ? 
$config->config_data['authentication_method'] : '';
-
-                               require_once PHPGW_SERVER_ROOT . 
"/bookingfrontend/inc/custom/default/{$authentication_method}";
-
-                               $external_user = new 
booking_external_user($wsdl, $options, $userid, $this->debug);
-                               // test values
-                               //$external_user = (object) 'ciao'; 
$external_user->login = 994239929;
+                               $status = lang('unable_to_connect_to_database');
                        }
 
-                       if ($this->debug)
+                       $sql = "SELECT DISTINCT orgnr FROM personcurrent WHERE 
fodselsnr ='{$fodselsnr}'";
+                       $results = array();
+                       $db = & $GLOBALS['phpgw']->db;
+                       $db->query($sql, __LINE__, __FILE__);
+                       while ($db->next_record())
                        {
-                               echo 'External user:<br>';
-                               _debug_array($external_user);
+                               $results[] = $db->f('orgnr', true);
                        }
-                       try
-                       {
-                               return 
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean($external_user->login);
-                       }
-                       catch (sfValidatorError $e)
-                       {
-                               if ($this->debug)
-                               {
-                                       echo $e->getMessage();
-                                       die();
-                               }
-                               return null;
-                       }
+                       return $results;
                }
+
+      protected function get_breg_orgs_old($fodselsnr) {
+            $breg_conn = 
pg_connect("host=".$GLOBALS['phpgw_domain']['default']['db_host']." port=5432 
dbname=breg user=".$GLOBALS['phpgw_domain']['default']['db_user']." 
password=".$GLOBALS['phpgw_domain']['default']['db_pass']) or die('connection 
failed');
+            $sql = "SELECT distinct orgnr FROM breg.personcurrent WHERE 
fodselsnr ='".$fodselsnr."'";
+            $results = pg_query($breg_conn, $sql);
+            $orgs = pg_fetch_all($results);
+            print_r($sql);
+            print_r($orgs);
+            pg_close($breg_conn);
+            return $orgs;
+        }
+
        }
\ No newline at end of file

Modified: 
branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId.php
===================================================================
--- branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId.php    
2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/bookingfrontend/inc/custom/default/MinId.php    
2017-02-15 18:20:11 UTC (rev 16315)
@@ -36,269 +36,67 @@
        /**
         * START WRAPPER
         */
-       class booking_external_user
+       class bookingfrontend_external_user extends bookingfrontend_bouser
        {
 
-               /**
-                * The resulting external user
-                * @access public
-                * @var string
-                */
-               public $login = 0;
+               public function __construct()
+               {
+                       parent::__construct();
+               }
 
-               /**
-                * Debug for testing
-                * @access public
-                * @var bool
-                */
-               public $debug = false;
-               public $orgs = array();
-
-               public function __construct( $wsdl, $options, $userid, $debug = 
false )
+               protected function get_user_org_id()
                {
-                       if ($debug)
+                       $ipdp = sha1($_SERVER['HTTP_UID']);
+                       $bregorgs = $this->get_breg_orgs($ipdp);
+                       $myorgnr = array();
+                       if ($bregorgs == array())
                        {
-                               $this->debug = true;
+                               $external_user = (object)'ciao';
+                               $external_user->login = '000000000';
                        }
-                       try
+                       else
                        {
-                               $BrukerService = new BrukerService($wsdl, 
$options);
-                       }
-                       catch (Exception $e)
-                       {
-                               if ($this->debug)
+                               foreach ($bregorgs as $org)
                                {
-                                       echo $e->getMessage();
-                                       echo '<br>wsdl: ' . $wsdl;
-                                       echo '<br>options:';
-                                       _debug_array($options);
+                                       $myorgnr[] = $org['orgnr'];
                                }
+                               if (count($myorgnr) > 1)
+                               {
+                                       $external_user = (object)'ciao';
+                                       $external_user->login = $myorgnr[0];
+                                       $orgs = array();
+                                       foreach ($myorgnr as $org)
+                                       {
+                                               $orgs[] = array('orgnumber' => 
$org, 'orgname' => $this->get_orgname_from_db($org));
+                                       }
+                                       
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY, 
$orgs);
+                               }
+                               elseif (count($myorgnr) > 0)
+                               {
+                                       
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY, 
NULL);
+                                       $external_user = (object)'ciao';
+                                       $external_user->login = $myorgnr[0];
+                               }
                        }
 
-                       if (isset($BrukerService) && $BrukerService)
+
+                       if ($this->debug)
                        {
-                               $ctx = new UserContext();
-
-                               $ctx->appid = 'portico';
-                               $ctx->onBehalfOfId = $userid;
-                               $ctx->userid = $userid;
-                               $ctx->transactionid = 
$GLOBALS['phpgw_info']['server']['install_id']; // KAN UTELATES. BENYTTES I.F.M 
SUPPORT. LEGG INN EN FOR DEG UNIK ID.
-
-                               $request = new retrieveBruker();
-                               $request->userContext = $ctx;
-                               $request->userid = $userid;
-
-                               $response = 
$BrukerService->retrieveBruker($request);
-                               $Bruker = $response->return;
-                               $this->login = $Bruker->ou; // organisasjons nr
+                               echo 'External user:<br>';
+                               _debug_array($external_user);
                        }
-               }
-       }
-       /**
-        * END WRAPPER - custom code beyond this point
-        */
-       /**
-        * soap client for altinn supported external login service at Bergen 
Kommune
-        * this code is generated by the 
http://code.google.com/p/wsdl2php-interpreter/ 
-        *
-        * @package phpgroupware
-        * @subpackage bookingfrontend
-        */
-
-       /**
-        * Bruker
-        */
-       class Bruker
-       {
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $uid;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $mail;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $preferedLocal;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $givenName;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $sn;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $cn;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $ou;
-
-       }
-
-       /**
-        * UserContext
-        */
-       class UserContext
-       {
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $userid;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $onBehalfOfId;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $appid;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $transactionid;
-
-       }
-
-       /**
-        * retrieveBruker
-        */
-       class retrieveBruker
-       {
-
-               /**
-                * @access public
-                * @var UserContext
-                */
-               public $userContext;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $userid;
-
-       }
-
-       /**
-        * retrieveBrukerResponse
-        */
-       class retrieveBrukerResponse
-       {
-
-               /**
-                * @access public
-                * @var Bruker
-                */
-               public $return;
-
-       }
-
-       /**
-        * BrukerService
-        * @author WSDLInterpreter
-        */
-       class BrukerService extends SoapClient
-       {
-
-               /**
-                * Default class map for wsdl=>php
-                * @access private
-                * @var array
-                */
-               private static $classmap = array
-                       (
-                       "Bruker" => "Bruker",
-                       "UserContext" => "UserContext",
-                       "retrieveBruker" => "retrieveBruker",
-                       "retrieveBrukerResponse" => "retrieveBrukerResponse",
-               );
-
-               /**
-                * Constructor using wsdl location and options array
-                * @param string $wsdl WSDL location for this service
-                * @param array $options Options for the SoapClient
-                */
-               public function __construct( $wsdl = '', $options = array() )
-               {
-                       foreach (self::$classmap as $wsdlClassName => 
$phpClassName)
+                       try
                        {
-                               if 
(!isset($options['classmap'][$wsdlClassName]))
-                               {
-                                       $options['classmap'][$wsdlClassName] = 
$phpClassName;
-                               }
+                               return 
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean($external_user->login);
                        }
-                       parent::__construct($wsdl, $options);
-               }
-
-               /**
-                * Checks if an argument list matches against a valid argument 
type list
-                * @param array $arguments The argument list to check
-                * @param array $validParameters A list of valid argument types
-                * @return boolean true if arguments match against 
validParameters
-                * @throws Exception invalid function signature message
-                */
-               public function _checkArguments( $arguments, $validParameters )
-               {
-                       $variables = "";
-                       foreach ($arguments as $arg)
+                       catch (sfValidatorError $e)
                        {
-                               $type = gettype($arg);
-                               if ($type == "object")
+                               if ($this->debug)
                                {
-                                       $type = get_class($arg);
+                                       echo $e->getMessage();
+                                       die();
                                }
-                               $variables .= "(" . $type . ")";
+                               return null;
                        }
-                       if (!in_array($variables, $validParameters))
-                       {
-                               throw new Exception("Invalid parameter types: " 
. str_replace(")(", ", ", $variables));
-                       }
-                       return true;
                }
-
-               /**
-                * Service Call: retrieveBruker
-                * Parameter options:
-                * (retrieveBruker) parameters
-                * @param mixed,... See function description for parameter 
options
-                * @return retrieveBrukerResponse
-                * @throws Exception invalid function signature message
-                */
-               public function retrieveBruker( $mixed = null )
-               {
-                       $validParameters = array(
-                               "(retrieveBruker)",
-                       );
-                       $args = func_get_args();
-                       $this->_checkArguments($args, $validParameters);
-                       return $this->__soapCall("retrieveBruker", $args);
-               }
        }
\ No newline at end of file

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.bouser.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplannerfrontend/inc/class.bouser.inc.php   
2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/eventplannerfrontend/inc/class.bouser.inc.php   
2017-02-15 18:20:11 UTC (rev 16315)
@@ -254,120 +254,4 @@
                        return $results;
                }
 
-               protected function get_user_orgnr_from_auth_header()
-               {
-                       $config = CreateObject('phpgwapi.config', 
'eventplannerfrontend');
-                       $config->read();
-                       if ($config->config_data['authentication_method'] === 
'MinId.php')
-                       {
-                               $ipdp = sha1($_SERVER['HTTP_UID']);
-                               $bregorgs = $this->get_breg_orgs($ipdp);
-                               $myorgnr = array();
-                               if ($bregorgs == array())
-                               {
-                                       $external_user = (object)'ciao';
-                                       $external_user->login = '000000000';
-                               }
-                               else
-                               {
-                                       foreach ($bregorgs as $org)
-                                       {
-                                               $myorgnr[] = $org['orgnr'];
-                                       }
-                                       if (count($myorgnr) > 1)
-                                       {
-                                               $external_user = (object)'ciao';
-                                               $external_user->login = 
$myorgnr[0];
-                                               $orgs = array();
-                                               foreach ($myorgnr as $org)
-                                               {
-                                                       $orgs[] = 
array('orgnumber' => $org, 'orgname' => $this->get_orgname_from_db($org));
-                                               }
-                                               
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY, 
$orgs);
-                                       }
-                                       elseif (count($myorgnr) > 0)
-                                       {
-                                               
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY, 
NULL);
-                                               $external_user = (object)'ciao';
-                                               $external_user->login = 
$myorgnr[0];
-                                       }
-                               }
-                       }
-                       else
-                       {
-
-                               $header_key = 
isset($config->config_data['header_key']) && $config->config_data['header_key'] 
? $config->config_data['header_key'] : 'Osso-User-Dn';
-                               $header_regular_expression = 
isset($config->config_data['header_regular_expression']) && 
$config->config_data['header_regular_expression'] ? 
$config->config_data['header_regular_expression'] : '/^cn=(.*),cn=users.*$/';
-
-                               $headers = getallheaders();
-
-                               if (isset($config->config_data['debug']) && 
$config->config_data['debug'])
-                               {
-                                       $this->debug = true;
-                                       echo 'headers:<br>';
-                                       _debug_array($headers);
-                               }
-
-                               if (isset($headers[$header_key]) && 
$headers[$header_key])
-                               {
-                                       $matches = array();
-                                       
preg_match_all($header_regular_expression, $headers[$header_key], $matches);
-                                       $userid = $matches[1][0];
-
-                                       if ($this->debug)
-                                       {
-                                               echo 'matches:<br>';
-                                               _debug_array($matches);
-                                       }
-                               }
-
-                               $options = array();
-                               $options['soap_version'] = SOAP_1_1;
-                               $options['location'] = 
isset($config->config_data['soap_location']) && 
$config->config_data['soap_location'] ? $config->config_data['soap_location'] : 
'';// 'http://soat1a.srv.bergenkom.no:8888/gateway/services/BrukerService-v1';
-                               $options['uri'] = 
isset($config->config_data['soap_uri']) && $config->config_data['soap_uri'] ? 
$config->config_data['soap_uri'] : '';// 'http://soat1a.srv.bergenkom.no';
-                               $options['trace'] = 1;
-
-                               if 
(isset($config->config_data['soap_proxy_host']) && 
$config->config_data['soap_proxy_host'])
-                               {
-                                       $options['proxy_host'] = 
$config->config_data['soap_proxy_host'];
-                               }
-
-                               if 
(isset($config->config_data['soap_proxy_port']) && 
$config->config_data['soap_proxy_port'])
-                               {
-                                       $options['proxy_port'] = 
$config->config_data['soap_proxy_port'];
-                               }
-                               $options['encoding'] = 
isset($config->config_data['soap_encoding']) && 
$config->config_data['soap_encoding'] ? $config->config_data['soap_encoding'] : 
'UTF-8';
-                               $options['login'] = 
isset($config->config_data['soap_login']) && $config->config_data['soap_login'] 
? $config->config_data['soap_login'] : '';
-                               $options['password'] = 
isset($config->config_data['soap_password']) && 
$config->config_data['soap_password'] ? $config->config_data['soap_password'] : 
'';
-
-                               $wsdl = 
isset($config->config_data['soap_wsdl']) && $config->config_data['soap_wsdl'] ? 
$config->config_data['soap_wsdl'] : '';// 
'http://soat1a.srv.bergenkom.no:8888/gateway/services/BrukerService-v1?wsdl';
-
-                               $authentication_method = 
isset($config->config_data['authentication_method']) && 
$config->config_data['authentication_method'] ? 
$config->config_data['authentication_method'] : '';
-
-                               require_once PHPGW_SERVER_ROOT . 
"/eventplannerfrontend/inc/custom/default/{$authentication_method}";
-
-                               $external_user = new 
booking_external_user($wsdl, $options, $userid, $this->debug);
-                               // test values
-                               //$external_user = (object) 'ciao'; 
$external_user->login = 994239929;
-                       }
-
-                       if ($this->debug)
-                       {
-                               echo 'External user:<br>';
-                               _debug_array($external_user);
-                       }
-                       try
-                       {
-                               return 
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean($external_user->login);
-                       }
-                       catch (sfValidatorError $e)
-                       {
-                               if ($this->debug)
-                               {
-                                       echo $e->getMessage();
-                                       die();
-                               }
-                               return null;
-                       }
-               }
        }
\ No newline at end of file

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.hook_helper.inc.php
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.hook_helper.inc.php  
    2017-02-15 18:15:27 UTC (rev 16314)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.hook_helper.inc.php  
    2017-02-15 18:20:11 UTC (rev 16315)
@@ -195,7 +195,7 @@
                /**
                * hook to add account
                *
-               * this function is a wrapper function for emailadmin
+               * this function is a wrapper function for eventplanner
                *
                * @param _hookValues contains the hook values as array
                * @returns nothing

Modified: 
branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php
===================================================================
--- branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php     
2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/eventplannerfrontend/inc/class.menu.inc.php     
2017-02-15 18:20:11 UTC (rev 16315)
@@ -79,6 +79,25 @@
                                );
                        }
        
+                       if 
(isset($GLOBALS['phpgw_info']['user']['apps']['preferences']))
+                       {
+                               $menus['preferences'] = array
+                                       (
+                                       array(
+                                               'text' => 
$GLOBALS['phpgw']->translation->translate('Grant Access', array(), true),
+                                               'url' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'preferences.uiadmin_acl.aclprefs',
+                                                       'acl_app' => 
'eventplanner'))
+                                       )
+                               );
+
+                               $menus['toolbar'][] = array
+                                       (
+                                       'text' => 
$GLOBALS['phpgw']->translation->translate('Preferences', array(), true),
+                                       'url' => 
$GLOBALS['phpgw']->link('/preferences/preferences.php', array('appname' => 
'eventplanner')),
+                                       'image' => array('eventplanner', 
'preferences')
+                               );
+                       }
+
                        $menus['navigation'] = array(
                                'application' => array(
                                        'text' => lang('application'),

Deleted: 
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/MinId.php
===================================================================
--- 
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/MinId.php   
    2017-02-15 18:15:27 UTC (rev 16314)
+++ 
branches/Version-2_0-branch/eventplannerfrontend/inc/custom/default/MinId.php   
    2017-02-15 18:20:11 UTC (rev 16315)
@@ -1,304 +0,0 @@
-<?php
-       /**
-        * phpGroupWare
-        *
-        * @author Sigurd Nes <address@hidden>
-        * @copyright Copyright (C) 2010 Free Software Foundation, Inc. 
http://www.fsf.org/
-        * @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 phpgroupware
-        * @subpackage communication
-        * @category core
-        * @version $Id: Altinn_Bergen_kommune.php 4887 2010-02-23 10:33:44Z 
sigurd $
-        */
-       /*
-         This program 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.
-
-         This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
-        */
-
-       /**
-        * Wrapper for custom methods
-        *
-        * @package phpgroupware
-        * @subpackage bookingfrontend
-        */
-
-       /**
-        * START WRAPPER
-        */
-       class booking_external_user
-       {
-
-               /**
-                * The resulting external user
-                * @access public
-                * @var string
-                */
-               public $login = 0;
-
-               /**
-                * Debug for testing
-                * @access public
-                * @var bool
-                */
-               public $debug = false;
-               public $orgs = array();
-
-               public function __construct( $wsdl, $options, $userid, $debug = 
false )
-               {
-                       if ($debug)
-                       {
-                               $this->debug = true;
-                       }
-                       try
-                       {
-                               $BrukerService = new BrukerService($wsdl, 
$options);
-                       }
-                       catch (Exception $e)
-                       {
-                               if ($this->debug)
-                               {
-                                       echo $e->getMessage();
-                                       echo '<br>wsdl: ' . $wsdl;
-                                       echo '<br>options:';
-                                       _debug_array($options);
-                               }
-                       }
-
-                       if (isset($BrukerService) && $BrukerService)
-                       {
-                               $ctx = new UserContext();
-
-                               $ctx->appid = 'portico';
-                               $ctx->onBehalfOfId = $userid;
-                               $ctx->userid = $userid;
-                               $ctx->transactionid = 
$GLOBALS['phpgw_info']['server']['install_id']; // KAN UTELATES. BENYTTES I.F.M 
SUPPORT. LEGG INN EN FOR DEG UNIK ID.
-
-                               $request = new retrieveBruker();
-                               $request->userContext = $ctx;
-                               $request->userid = $userid;
-
-                               $response = 
$BrukerService->retrieveBruker($request);
-                               $Bruker = $response->return;
-                               $this->login = $Bruker->ou; // organisasjons nr
-                       }
-               }
-       }
-       /**
-        * END WRAPPER - custom code beyond this point
-        */
-       /**
-        * soap client for altinn supported external login service at Bergen 
Kommune
-        * this code is generated by the 
http://code.google.com/p/wsdl2php-interpreter/ 
-        *
-        * @package phpgroupware
-        * @subpackage bookingfrontend
-        */
-
-       /**
-        * Bruker
-        */
-       class Bruker
-       {
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $uid;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $mail;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $preferedLocal;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $givenName;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $sn;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $cn;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $ou;
-
-       }
-
-       /**
-        * UserContext
-        */
-       class UserContext
-       {
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $userid;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $onBehalfOfId;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $appid;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $transactionid;
-
-       }
-
-       /**
-        * retrieveBruker
-        */
-       class retrieveBruker
-       {
-
-               /**
-                * @access public
-                * @var UserContext
-                */
-               public $userContext;
-
-               /**
-                * @access public
-                * @var string
-                */
-               public $userid;
-
-       }
-
-       /**
-        * retrieveBrukerResponse
-        */
-       class retrieveBrukerResponse
-       {
-
-               /**
-                * @access public
-                * @var Bruker
-                */
-               public $return;
-
-       }
-
-       /**
-        * BrukerService
-        * @author WSDLInterpreter
-        */
-       class BrukerService extends SoapClient
-       {
-
-               /**
-                * Default class map for wsdl=>php
-                * @access private
-                * @var array
-                */
-               private static $classmap = array
-                       (
-                       "Bruker" => "Bruker",
-                       "UserContext" => "UserContext",
-                       "retrieveBruker" => "retrieveBruker",
-                       "retrieveBrukerResponse" => "retrieveBrukerResponse",
-               );
-
-               /**
-                * Constructor using wsdl location and options array
-                * @param string $wsdl WSDL location for this service
-                * @param array $options Options for the SoapClient
-                */
-               public function __construct( $wsdl = '', $options = array() )
-               {
-                       foreach (self::$classmap as $wsdlClassName => 
$phpClassName)
-                       {
-                               if 
(!isset($options['classmap'][$wsdlClassName]))
-                               {
-                                       $options['classmap'][$wsdlClassName] = 
$phpClassName;
-                               }
-                       }
-                       parent::__construct($wsdl, $options);
-               }
-
-               /**
-                * Checks if an argument list matches against a valid argument 
type list
-                * @param array $arguments The argument list to check
-                * @param array $validParameters A list of valid argument types
-                * @return boolean true if arguments match against 
validParameters
-                * @throws Exception invalid function signature message
-                */
-               public function _checkArguments( $arguments, $validParameters )
-               {
-                       $variables = "";
-                       foreach ($arguments as $arg)
-                       {
-                               $type = gettype($arg);
-                               if ($type == "object")
-                               {
-                                       $type = get_class($arg);
-                               }
-                               $variables .= "(" . $type . ")";
-                       }
-                       if (!in_array($variables, $validParameters))
-                       {
-                               throw new Exception("Invalid parameter types: " 
. str_replace(")(", ", ", $variables));
-                       }
-                       return true;
-               }
-
-               /**
-                * Service Call: retrieveBruker
-                * Parameter options:
-                * (retrieveBruker) parameters
-                * @param mixed,... See function description for parameter 
options
-                * @return retrieveBrukerResponse
-                * @throws Exception invalid function signature message
-                */
-               public function retrieveBruker( $mixed = null )
-               {
-                       $validParameters = array(
-                               "(retrieveBruker)",
-                       );
-                       $args = func_get_args();
-                       $this->_checkArguments($args, $validParameters);
-                       return $this->__soapCall("retrieveBruker", $args);
-               }
-       }
\ No newline at end of file

Modified: 
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205.php
===================================================================
--- 
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205.php
   2017-02-15 18:15:27 UTC (rev 16314)
+++ 
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205.php
   2017-02-15 18:20:11 UTC (rev 16315)
@@ -45,6 +45,7 @@
                protected $default_kostra_id = 9999; //dummy
                protected $debug = false;
                protected $skip_import = false;
+               protected $skip_email = false;
                protected $export;
                protected $skip_update_voucher_id = false;
 
@@ -64,10 +65,21 @@
                        $this->dateformat = $this->db->date_format();
                        $this->datetimeformat = $this->db->datetime_format();
                        $this->config = CreateObject('admin.soconfig', 
$GLOBALS['phpgw']->locations->get_id('property', '.invoice'));
+                       $this->send = CreateObject('phpgwapi.send');
 
                        include (PHPGW_SERVER_ROOT . 
"/property/inc/export/{$GLOBALS['phpgw_info']['user']['domain']}/Agresso_X114");
                        $this->export = new export_conv;
 
+                       $now = time() + 
(int)$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] * 
3600;
+
+                       $now_hour = date('G', $now);
+                       $now_day = date('N', $now);
+
+                       if (($now_hour < 6 || $now_hour > 17) || $now_day > 5)
+                       {
+
+                               $this->skip_email = true;
+                       }
                }
 
                public function execute()
@@ -146,6 +158,8 @@
                        {
                                $this->receipt['error'][] = array('msg' => 
"Arkiv katalog '{$dirname}/archive/' ikke er ikke skrivbar - kontakt 
systemadminstrator for å korrigere");
                        }
+
+                       $this->remind();
                }
 
                protected function check_archive()
@@ -201,6 +215,72 @@
                        }
                }
 
+               protected function remind()
+               {
+                       if 
(!isset($GLOBALS['phpgw_info']['server']['smtp_server']) || 
!$GLOBALS['phpgw_info']['server']['smtp_server'])
+                       {
+                               return;
+                       }
+
+                       if ($this->skip_email || $this->debug)
+                       {
+                               return;
+                       }
+
+                       // max. one mail each day
+                       if 
((int)$GLOBALS['phpgw_info']['server']['invoice_mail_reminder_time'] < (time() 
- (3600 * 24)))
+                       {
+                               $toarray = array();
+                               $sql = 'SELECT DISTINCT oppsynsmannid as 
responsible FROM fm_ecobilag WHERE oppsynsigndato IS NULL AND oppsynsmannid IS 
NOT NULL AND saksigndato IS NULL';
+                               $this->db->query($sql, __LINE__, __FILE__);
+                               while ($this->db->next_record())
+                               {
+                                       $toarray[$this->db->f('responsible')] = 
true;
+                               }
+                               $sql = 'SELECT DISTINCT saksbehandlerid as 
responsible FROM fm_ecobilag WHERE saksigndato IS NULL AND saksbehandlerid IS 
NOT NULL AND oppsynsigndato IS NULL';
+                               $this->db->query($sql, __LINE__, __FILE__);
+                               while ($this->db->next_record())
+                               {
+                                       $toarray[$this->db->f('responsible')] = 
true;
+                               }
+                               $sql = 'SELECT DISTINCT budsjettansvarligid as 
responsible FROM fm_ecobilag WHERE saksigndato IS NOT NULL AND budsjettsigndato 
IS NULL AND budsjettansvarligid IS NOT NULL';
+                               $this->db->query($sql, __LINE__, __FILE__);
+
+                               while ($this->db->next_record())
+                               {
+                                       $toarray[$this->db->f('responsible')] = 
true;
+                               }
+
+                               $subject = 'Du har faktura til behandling';
+
+
+                               $from = "Ikke svar<address@hidden>";
+
+                               foreach ($toarray as $lid => $dummy)
+                               {
+                                       $prefs = 
$this->bocommon->create_preferences('property', 
$GLOBALS['phpgw']->accounts->name2id($lid));
+                                       if (isset($prefs['email']) && 
$prefs['email'])
+                                       {
+                                               $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice2.index',
+                                                               'voucher_id' => 
$bilagsnr, 'user_lid' => $lid), false, true) . '">Link til 
fakturabehandling</a>';
+                                               try
+                                               {
+                                                       $rc = 
$this->send->msg('email', $prefs['email'], $subject, stripslashes($body), '', 
'', '', $from, '', 'html');
+                                               }
+                                               catch (phpmailerException $e)
+                                               {
+                                                       
$this->receipt['error'][] = array('msg' => $e->getMessage());
+                                               }
+                                       }
+                               }
+                               // save time of mail, to not send to many mails
+                               $config = createObject('phpgwapi.config', 
'phpgwapi');
+                               $config->read_repository();
+                               $config->value('invoice_mail_reminder_time', 
time());
+                               $config->save_repository();
+                       }
+               }
+
                protected function get_files()
                {
                        $server = $this->config->config_data['common']['host'];
@@ -491,7 +571,29 @@
                                {
                                        $this->receipt['error'][] = array('msg' 
=> "Importeres ikke: Ikke gyldig LeverandørId: {$_data['SUPPLIER.CODE']}, 
Skanningreferanse: {$_data['SCANNINGNO']}, FakturaNr: {$fakturanr}, fil: 
{$file}");
                                        $this->skip_import = true;
-               
+
+                                       $to = 
isset($this->config->config_data['import']['email_on_error']) && 
$this->config->config_data['import']['email_on_error'] ? 
$this->config->config_data['import']['email_on_error'] : '';
+
+                                       if ($to && !$this->skip_email)
+                                       {
+                                               $from = "Ikke 
svar<address@hidden>";
+                                               $body = "Ikke gyldig 
leverandør, id: {$_data['SUPPLIER.CODE']}</br>";
+                                               $body .= '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.edit',
+                                                               'appname' => 
'property', 'type' => 'vendor'), false, true) . '">Link til å legge inn ny 
leverandør</a>';
+
+                                               try
+                                               {
+                                                       $rc = 
$this->send->msg('email', $to, 'Ikke gyldig leverandør ved import av faktura 
til Portico', $body, '', '', '', $from, '', 'html');
+                                                       if ($rc)
+                                                       {
+                                                               
$this->receipt['message'][] = array('msg' => "epost sendt til {$to}");
+                                                       }
+                                               }
+                                               catch (phpmailerException $e)
+                                               {
+                                                       
$this->receipt['error'][] = array('msg' => $e->getMessage());
+                                               }
+                                       }
                                }
                                else if ($order_info['vendor_id'] != $vendor_id)
                                {
@@ -561,6 +663,34 @@
                                        }
                                }
 
+                               if ($order_info['toarray'] && 
(!$this->skip_email || !$this->debug))
+                               {
+
+                                       $from = "Ikke svar<address@hidden>";
+
+                                       $to = implode(';', 
$order_info['toarray']);
+
+                                       if 
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) && 
$GLOBALS['phpgw_info']['server']['smtp_server'])
+                                       {
+                                               $subject = 'Ny faktura venter 
på behandling';
+                                               $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice2.index',
+                                                               'voucher_id' => 
$bilagsnr, 'query' => $bilagsnr, 'user_lid' => 'all'), false, true) . '">Link 
til fakturabehandling</a>';
+
+                                               try
+                                               {
+                                                       $rc = 
$this->send->msg('email', $to, $subject, stripslashes($body), '', $cc, $bcc, 
$from, '', 'html');
+                                               }
+                                               catch (phpmailerException $e)
+                                               {
+                                                       
$this->receipt['error'][] = array('msg' => $e->getMessage());
+                                               }
+                                       }
+                                       else
+                                       {
+                                               $this->receipt['error'][] = 
array('msg' => lang('SMTP server is not set! (admin section)'));
+                                       }
+                               }
+
                                $GLOBALS['phpgw']->db->Exception_On_Error = 
true;
 
                                try

Modified: 
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205_BK.php
===================================================================
--- 
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205_BK.php
        2017-02-15 18:15:27 UTC (rev 16314)
+++ 
branches/Version-2_0-branch/property/inc/cron/default/Import_fra_agresso_X205_BK.php
        2017-02-15 18:20:11 UTC (rev 16315)
@@ -65,18 +65,6 @@
                        $this->dateformat = $this->db->date_format();
                        $this->datetimeformat = $this->db->datetime_format();
                        $this->config = CreateObject('admin.soconfig', 
$GLOBALS['phpgw']->locations->get_id('property', '.invoice'));
-                       $this->send = CreateObject('phpgwapi.send');
-
-                       $now = time() + 
(int)$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] * 
3600;
-
-                       $now_hour = date('G', $now);
-                       $now_day = date('N', $now);
-
-                       if (($now_hour < 6 || $now_hour > 17) || $now_day > 5)
-                       {
-
-                               $this->skip_email = true;
-                       }
                }
 
                public function execute()
@@ -154,77 +142,9 @@
                                $this->receipt['error'][] = array('msg' => 
"Arkiv katalog '{$dirname}/arkiv/' ikke er ikke skrivbar - kontakt 
systemadminstrator for å korrigere");
                        }
 
-                       $this->remind();
                }
 
 
-               protected function remind()
-               {
-                       if 
(!isset($GLOBALS['phpgw_info']['server']['smtp_server']) || 
!$GLOBALS['phpgw_info']['server']['smtp_server'])
-                       {
-                               return;
-                       }
-
-                       if ($this->skip_email || $this->debug)
-                       {
-                               return;
-                       }
-
-                       // max. one mail each day
-                       if 
((int)$GLOBALS['phpgw_info']['server']['invoice_mail_reminder_time'] < (time() 
- (3600 * 24)))
-                       {
-                               $toarray = array();
-                               $sql = 'SELECT DISTINCT oppsynsmannid as 
responsible FROM fm_ecobilag WHERE oppsynsigndato IS NULL AND oppsynsmannid IS 
NOT NULL AND saksigndato IS NULL';
-                               $this->db->query($sql, __LINE__, __FILE__);
-                               while ($this->db->next_record())
-                               {
-                                       $toarray[$this->db->f('responsible')] = 
true;
-                               }
-/*
-                               $sql = 'SELECT DISTINCT saksbehandlerid as 
responsible FROM fm_ecobilag WHERE saksigndato IS NULL AND saksbehandlerid IS 
NOT NULL AND oppsynsigndato IS NULL';
-                               $this->db->query($sql, __LINE__, __FILE__);
-                               while ($this->db->next_record())
-                               {
-                                       $toarray[$this->db->f('responsible')] = 
true;
-                               }
-                               $sql = 'SELECT DISTINCT budsjettansvarligid as 
responsible FROM fm_ecobilag WHERE saksigndato IS NOT NULL AND budsjettsigndato 
IS NULL AND budsjettansvarligid IS NOT NULL';
-                               $this->db->query($sql, __LINE__, __FILE__);
-
-                               while ($this->db->next_record())
-                               {
-                                       $toarray[$this->db->f('responsible')] = 
true;
-                               }
-*/
-                               $subject = 'Du har faktura til behandling';
-
-
-                               $from = "Ikke svar<address@hidden>";
-
-                               foreach ($toarray as $lid => $dummy)
-                               {
-                                       $prefs = 
$this->bocommon->create_preferences('property', 
$GLOBALS['phpgw']->accounts->name2id($lid));
-                                       if (isset($prefs['email']) && 
$prefs['email'])
-                                       {
-                                               $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice2.index',
-                                                               'voucher_id' => 
$bilagsnr, 'user_lid' => $lid), false, true) . '">Link til 
fakturabehandling</a>';
-                                               try
-                                               {
-                                                       $rc = 
$this->send->msg('email', $prefs['email'], $subject, stripslashes($body), '', 
'', '', $from, '', 'html');
-                                               }
-                                               catch (phpmailerException $e)
-                                               {
-                                                       
$this->receipt['error'][] = array('msg' => $e->getMessage());
-                                               }
-                                       }
-                               }
-                               // save time of mail, to not send to many mails
-                               $config = createObject('phpgwapi.config', 
'phpgwapi');
-                               $config->read_repository();
-                               $config->value('invoice_mail_reminder_time', 
time());
-                               $config->save_repository();
-                       }
-               }
-
                protected function get_files()
                {
                        $method = 
$this->config->config_data['common']['method'];
@@ -315,119 +235,6 @@
                        }
                }
 
-               protected function get_files_old()
-               {
-                       $method = 
$this->config->config_data['common']['method'];
-                       if($method == 'local')
-                       {
-                               return;
-                       }
-
-                       $server = $this->config->config_data['common']['host'];
-                       $user = $this->config->config_data['common']['user'];
-                       $password = 
$this->config->config_data['common']['password'];
-                       $directory_remote = 
rtrim($this->config->config_data['import']['remote_basedir'], '/');
-                       $directory_local = 
rtrim($this->config->config_data['import']['local_path'], '/');
-                       $port = 22;
-
-                       if (!function_exists("ssh2_connect"))
-                       {
-                               die("function ssh2_connect doesn't exist");
-                       }
-                       if (!($connection = ssh2_connect($server, $port)))
-                       {
-                               echo "fail: unable to establish connection\n";
-                       }
-                       else
-                       {
-                               // try to authenticate with username root, 
password secretpassword
-                               if (!ssh2_auth_password($connection, $user, 
$password))
-                               {
-                                       echo "fail: unable to authenticate\n";
-                               }
-                               else
-                               {
-                                       // allright, we're in!
-                                       echo "okay: logged in...<br/>";
-
-                                       // Enter "sftp" mode
-                                       $sftp = @ssh2_sftp($connection);
-
-                                       // Scan directory
-                                       $files = array();
-                                       echo "Scanning 
{$directory_remote}<br/>";
-                                       $dir = 
"ssh2.sftp://$sftp$directory_remote";;
-                                       $handle = opendir($dir);
-                                       while (false !== ($file = 
readdir($handle)))
-                                       {
-                                               if (is_dir($file))
-                                               {
-                                                       echo "Directory: 
$file<br/>";
-                                                       continue;
-                                               }
-
-                                               /*                              
                if ($this->debug)
-                                                 {
-                                                 $size = 
filesize("ssh2.sftp://$sftp$directory_remote/$file";);
-                                                 echo "File $file Size: 
$size<br/>";
-
-                                                 $stream = 
@fopen("ssh2.sftp://$sftp$directory_remote/$file";, 'r');
-                                                 $contents = fread($stream, 
filesize("ssh2.sftp://$sftp$directory_remote/$file";));
-                                                 @fclose($stream);
-                                                 echo "CONTENTS: 
$contents<br/><br/>";
-                                                 }
-                                                */
-                                               $files[] = $file;
-                                       }
-
-                                       if ($this->debug)
-                                       {
-                                               _debug_array($files);
-                                       }
-                                       else
-                                       {
-                                               foreach ($files as $file_name)
-                                               {
-                                                       
if(preg_match('/^X205/i', (string)$file_name ))
-                                                       {
-                                               //              
_debug_array($file_name);
-                                                               $file_remote = 
"{$directory_remote}/{$file_name}";
-                                                               $file_local = 
"{$directory_local}/{$file_name}";
-
-                                                               $stream = 
fopen("ssh2.sftp://$sftp$file_remote";, 'r');
-                                                               $contents = 
fread($stream, filesize("ssh2.sftp://$sftp$file_remote";));
-                                                               fclose($stream);
-
-                                                               $fp = 
fopen($file_local, "wb");
-                                                               fwrite($fp, 
$contents);
-
-                                                               if (fclose($fp))
-                                                               {
-                                                                       echo 
"File remote: {$file_remote} was copied to local: $file_local<br/>";
-                                                                       if 
(ssh2_sftp_unlink($sftp, "{$directory_remote}/arkiv/{$file_name}"))
-                                                                       {
-                                                                               
echo "Deleted duplicate File remote: 
{$directory_remote}/arkiv/{$file_name}<br/>";
-                                                                       }
-                                                                       if 
(ssh2_sftp_rename($sftp, $file_remote, 
"{$directory_remote}/arkiv/{$file_name}"))
-                                                                       {
-                                                                               
echo "File remote: {$file_remote} was moved to remote: 
{$directory_remote}/arkiv/{$file_name}<br/>";
-                                                                       }
-                                                                       else
-                                                                       {
-                                                                               
echo "ERROR! File remote: {$file_remote} failed to move to remote: 
{$directory_remote}/arkiv/{$file_name}<br/>";
-                                                                               
if (unlink($file_local))
-                                                                               
{
-                                                                               
        echo "Lokal file was deleted: {$file_local}<br/>";
-                                                                               
}
-                                                                       }
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               }
-                       }
-               }
-
                protected function check_storage_dir($files_path)
                {
                        if (is_dir($files_path) && is_writable($files_path) && 
is_readable($files_path) )
@@ -644,28 +451,6 @@
                                        $this->receipt['error'][] = array('msg' 
=> "Importeres ikke: Ikke gyldig LeverandørId: {$_data['SUPPLIER.CODE']}, 
Skanningreferanse: {$_data['SCANNINGNO']}, FakturaNr: {$fakturanr}, fil: 
{$file}");
                                        $this->skip_import = true;
 
-                                       $to = 
isset($this->config->config_data['import']['email_on_error']) && 
$this->config->config_data['import']['email_on_error'] ? 
$this->config->config_data['import']['email_on_error'] : '';
-
-                                       if ($to && !$this->skip_email)
-                                       {
-                                               $from = "Ikke 
svar<address@hidden>";
-                                               $body = "Ikke gyldig 
leverandør, id: {$_data['SUPPLIER.CODE']}</br>";
-                                               $body .= '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uigeneric.edit',
-                                                               'appname' => 
'property', 'type' => 'vendor'), false, true) . '">Link til å legge inn ny 
leverandør</a>';
-
-                                               try
-                                               {
-                                                       $rc = 
$this->send->msg('email', $to, 'Ikke gyldig leverandør ved import av faktura 
til Portico', $body, '', '', '', $from, '', 'html');
-                                                       if ($rc)
-                                                       {
-                                                               
$this->receipt['message'][] = array('msg' => "epost sendt til {$to}");
-                                                       }
-                                               }
-                                               catch (phpmailerException $e)
-                                               {
-                                                       
$this->receipt['error'][] = array('msg' => $e->getMessage());
-                                               }
-                                       }
                                }
                                else if ($order_info['vendor_id'] != $vendor_id)
                                {
@@ -735,34 +520,6 @@
                                        }
                                }
 
-                               if ($order_info['toarray'] && 
(!$this->skip_email || !$this->debug))
-                               {
-
-                                       $from = "Ikke svar<address@hidden>";
-
-                                       $to = implode(';', 
$order_info['toarray']);
-
-                                       if 
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) && 
$GLOBALS['phpgw_info']['server']['smtp_server'])
-                                       {
-                                               $subject = 'Ny faktura venter 
på behandling';
-                                               $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiinvoice2.index',
-                                                               'voucher_id' => 
$bilagsnr, 'query' => $bilagsnr, 'user_lid' => 'all'), false, true) . '">Link 
til fakturabehandling</a>';
-
-                                               try
-                                               {
-                                                       $rc = 
$this->send->msg('email', $to, $subject, stripslashes($body), '', $cc, $bcc, 
$from, '', 'html');
-                                               }
-                                               catch (phpmailerException $e)
-                                               {
-                                                       
$this->receipt['error'][] = array('msg' => $e->getMessage());
-                                               }
-                                       }
-                                       else
-                                       {
-                                               $this->receipt['error'][] = 
array('msg' => lang('SMTP server is not set! (admin section)'));
-                                       }
-                               }
-
                                $GLOBALS['phpgw']->db->Exception_On_Error = 
true;
 
                                try

Modified: branches/Version-2_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-02-15 
18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/property/setup/phpgw_no.lang    2017-02-15 
18:20:11 UTC (rev 16315)
@@ -2075,4 +2075,25 @@
 missing recipient for order %1 property        no      Mangler mottaker for 
ordre %1
 export property        no      Eksport
 simplified     property        no      Forenklet
-implicitly from project        property        no      Implisitt fra prosjekt
\ No newline at end of file
+implicitly from project        property        no      Implisitt fra prosjekt
+generic import property        no      Generisk import
+import components      property        no      Importer FDV-dokumentasjon
+relations      property        no      Koblinger
+components     property        no      Komponenter
+locations      property        no      Lokasjoner
+choose profile property        no      Velg profil
+attributes template    property        no      Mal for feltmapping
+preview        property        no      Forhåndsvis
+start upload   property        no      Start opplasting
+cancel upload  property        no      Kanseller opplasting
+add files      property        no      Legg til filer
+start import   property        no      Start import
+choose attribute       property        no      Velg datafelt
+choose attribute name for component id property        no      Velg datafelt 
som skal representere komponent Id
+number files   property        no      Antall filer
+without components     property        no      Uten komponenter
+with components        property        no      Med komponenter
+uncompressed   property        no      Ukomprimert
+compressed     property        no      Komprimert
+file name      property        no      Filnavn
+row    property        no      Rad

Modified: branches/Version-2_0-branch/registration/inc/class.uireg.inc.php
===================================================================
--- branches/Version-2_0-branch/registration/inc/class.uireg.inc.php    
2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/registration/inc/class.uireg.inc.php    
2017-02-15 18:20:11 UTC (rev 16315)
@@ -154,8 +154,9 @@
 
                                $lang_domain = lang('domain');
                                $domain_select = <<<HTML
-               <td>{$lang_domain}</td>
-               <td>
+
+       <div class="pure-control-group">
+               <label>{$lang_domain}</label>
                        <select name="logindomain" id="logindomain" 
class="inputbox">
 HTML;
 
@@ -178,7 +179,7 @@
                                $domain_select .= <<<HTML
                                {$options}
                        </select>
-               </td>
+               </div>
 HTML;
 
                                $values = array
@@ -335,8 +336,19 @@
                                $this->template->set_var('errors', 
$GLOBALS['phpgw']->common->error_list($errors));
                        }
 
+                       if($this->config['username_is'] == 'email')
+                       {
+                               $input_type = 'email';
+                       }
+                       else
+                       {
+                               $input_type = 'text';
+                               
+                       }
+
                        $this->template->set_var('form_action', 
$GLOBALS['phpgw']->link('/registration/main.php', array(
                                        'menuaction' => 
'registration.boreg.lostpw1', 'logindomain' => $_REQUEST['logindomain'])));
+                       $this->template->set_var('input_type', $input_type);
                        $this->template->set_var('lang_explain', lang('After 
you enter your username, instructions to change your password will be sent to 
you by e-mail to the address you gave when you registered.'));
                        $this->template->set_var('lang_username', 
lang('Username'));
                        $this->template->set_var('lang_submit', lang('Submit'));

Modified: 
branches/Version-2_0-branch/registration/templates/base/loginid_select.tpl
===================================================================
--- branches/Version-2_0-branch/registration/templates/base/loginid_select.tpl  
2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/registration/templates/base/loginid_select.tpl  
2017-02-15 18:20:11 UTC (rev 16315)
@@ -2,22 +2,19 @@
 <center>{errors}</center>
 
 <!-- BEGIN input -->
-<form action="{form_action}" method="POST" id="form">
-       <table border="0" width="40%" align="center">
+<form action="{form_action}" method="POST" id="form" class="pure-form 
pure-form-aligned">
+       <fieldset border="0" width="40%" align="center">
 
-               <tr>
-                       {domain_select}
-               </tr>
-               <tr>
-                       <td>{lang_username}</td>
-                       <td>{domain_from_host}<input name="r_reg[loginid]" 
value="{value_username}" data-validation="length alphanumeric" 
data-validation-length="3-10"/>
-                       </td>
-               </tr>
+               {domain_select}
+               <div class="pure-control-group">
+                       <label>{lang_username}</label>
+                       {domain_from_host}<input name="r_reg[loginid]" 
value="{value_username}" data-validation="length alphanumeric" 
data-validation-length="3-10"/>
+               </div>
 
-               <tr>
-                       <td colspan="2"><input type="submit" name="submit" 
value="{lang_submit}"></td>
-               </tr>
-       </table>
+               <div class="pure-controls">
+                       <button type="submit" class="pure-button 
pure-button-primary" name="submit">{lang_submit}</button>
+        </div>
+       </fieldset>
 </form>
 <!-- END input -->
 <!-- END form -->

Modified: 
branches/Version-2_0-branch/registration/templates/base/lostpw_select.tpl
===================================================================
--- branches/Version-2_0-branch/registration/templates/base/lostpw_select.tpl   
2017-02-15 18:15:27 UTC (rev 16314)
+++ branches/Version-2_0-branch/registration/templates/base/lostpw_select.tpl   
2017-02-15 18:20:11 UTC (rev 16315)
@@ -7,7 +7,7 @@
        <fieldset>
                <div class="pure-control-group">
                        <label>{lang_username}</label>
-                       <input name="r_reg[loginid]" value="{value_username}" 
required="required" type="email">
+                       <input name="r_reg[loginid]" value="{value_username}" 
required="required" type="{input_type}">
                </div>
 
                <div class="pure-controls">




reply via email to

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