fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16209] more on eventplanner


From: sigurdne
Subject: [Fmsystem-commits] [16209] more on eventplanner
Date: Mon, 30 Jan 2017 11:35:52 -0500 (EST)

Revision: 16209
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16209
Author:   sigurdne
Date:     2017-01-30 11:35:51 -0500 (Mon, 30 Jan 2017)
Log Message:
-----------
more on eventplanner

Modified Paths:
--------------
    trunk/eventplanner/inc/class.uicustomer.inc.php
    trunk/eventplanner/inc/class.uivendor.inc.php
    trunk/eventplanner/setup/phpgw_no.lang
    trunk/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
    trunk/phpgwapi/inc/class.login.inc.php
    trunk/phpgwapi/templates/frontend/head.inc.php

Modified: trunk/eventplanner/inc/class.uicustomer.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uicustomer.inc.php     2017-01-30 15:08:10 UTC 
(rev 16208)
+++ trunk/eventplanner/inc/class.uicustomer.inc.php     2017-01-30 16:35:51 UTC 
(rev 16209)
@@ -109,7 +109,7 @@
                                                                'list' =>  
$this->get_category_options()
                                                        ),
                                                        array(
-                                                               'type' => 
'checkbox',
+                                                               'type' =>  
$this->currentapp == 'eventplanner' ? 'checkbox' : 'hidden',
                                                                'name' => 
'filter_active',
                                                                'text' => 
lang('showall'),
                                                                'value' =>  1,

Modified: trunk/eventplanner/inc/class.uivendor.inc.php
===================================================================
--- trunk/eventplanner/inc/class.uivendor.inc.php       2017-01-30 15:08:10 UTC 
(rev 16208)
+++ trunk/eventplanner/inc/class.uivendor.inc.php       2017-01-30 16:35:51 UTC 
(rev 16209)
@@ -109,7 +109,7 @@
                                                                'list' =>  
$this->get_category_options()
                                                        ),
                                                        array(
-                                                               'type' => 
'checkbox',
+                                                               'type' =>  
$this->currentapp == 'eventplanner' ? 'checkbox' : 'hidden',
                                                                'name' => 
'filter_active',
                                                                'text' => 
lang('showall'),
                                                                'value' =>  1,

Modified: trunk/eventplanner/setup/phpgw_no.lang
===================================================================
--- trunk/eventplanner/setup/phpgw_no.lang      2017-01-30 15:08:10 UTC (rev 
16208)
+++ trunk/eventplanner/setup/phpgw_no.lang      2017-01-30 16:35:51 UTC (rev 
16209)
@@ -106,4 +106,5 @@
 please enter a valid account number    eventplanner    no      Angi et gyldig 
kontonummer
 program data   eventplanner    no      Om programmet
 booking        eventplanner    no      Booking
-customer contact email eventplanner    no      Epost
\ No newline at end of file
+customer contact email eventplanner    no      Epost
+showall        eventplanner    no      Vis alle
\ No newline at end of file

Modified: 
trunk/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
===================================================================
--- trunk/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php    
2017-01-30 15:08:10 UTC (rev 16208)
+++ trunk/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php    
2017-01-30 16:35:51 UTC (rev 16209)
@@ -35,7 +35,7 @@
        class eventplannerfrontend_external_user extends 
eventplannerfrontend_bouser
        {
 
-               var $debug = true;
+               var $debug = false;
                public function __construct()
                {
                        parent::__construct();

Modified: trunk/phpgwapi/inc/class.login.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.login.inc.php      2017-01-30 15:08:10 UTC (rev 
16208)
+++ trunk/phpgwapi/inc/class.login.inc.php      2017-01-30 16:35:51 UTC (rev 
16209)
@@ -36,7 +36,7 @@
        {
                public function __construct()
                {
-               
+
                }
 
                public function login($frontend = '')
@@ -70,7 +70,18 @@
                                $GLOBALS['phpgw_info']['login_left_message'] = 
'';
                                $GLOBALS['phpgw_info']['login_right_message'] = 
'';
                        }
-                       
+
+                       if(!phpgw::get_var('after','raw', 'COOKIE'))
+                       {
+                               $after = phpgw::get_var('after', 'string');
+                               
$GLOBALS['phpgw']->session->phpgw_setcookie('after',phpgw::get_var('after', 
'raw'),$cookietime=0);
+                       }
+                       else
+                       {
+                               $after = true;
+                       }
+
+
                        if (isset($_REQUEST['skip_remote']) && 
$_REQUEST['skip_remote']) // In case a user failed logged in via SSO - get 
another try
                        {
                                $GLOBALS['phpgw_info']['server']['auth_type'] = 
$GLOBALS['phpgw_remote_user_fallback'];
@@ -168,7 +179,14 @@
                                $extra_vars['cd'] = 'yes';
 
                                $GLOBALS['phpgw']->hooks->process('login');
-                               
$GLOBALS['phpgw']->redirect_link("{$frontend}/home.php", $extra_vars);
+                               if ($after)
+                               {
+                                       $this->redirect_after($frontend);
+                               }
+                               else
+                               {
+                                       
$GLOBALS['phpgw']->redirect_link("{$frontend}/home.php", $extra_vars);
+                               }
 
                        //----------------- End login ntlm
                        }
@@ -245,7 +263,14 @@
                                $extra_vars['cd'] = 'yes';
 
                                $GLOBALS['phpgw']->hooks->process('login');
-                               
$GLOBALS['phpgw']->redirect_link("{$frontend}/home.php", $extra_vars);
+                               if ($after)
+                               {
+                                       $this->redirect_after($frontend);
+                               }
+                               else
+                               {
+                                       
$GLOBALS['phpgw']->redirect_link("{$frontend}/home.php", $extra_vars);
+                               }
                        }
 
 
@@ -329,7 +354,14 @@
                                }
                                else
                                {
-                                       
$GLOBALS['phpgw']->redirect_link("{$frontend}/home.php", $extra_vars);
+                                       if ($after)
+                                       {
+                                               
$this->redirect_after($frontend);
+                                       }
+                                       else
+                                       {
+                                               
$GLOBALS['phpgw']->redirect_link("{$frontend}/home.php", $extra_vars);
+                                       }
                                }
                        }
 
@@ -346,4 +378,34 @@
 
                        $uilogin->phpgw_display_login($variables);
                }
+
+               function redirect_after($frontend = '')
+               {
+                       $redirect = json_decode(phpgw::get_var('after','raw', 
'COOKIE'),true);
+               //      _debug_array($_COOKIE);
+               //      _debug_array($after);
+               //      die();
+                       if ( is_array($redirect) && count($redirect) )
+                       {
+                               foreach($redirect as $key => $value)
+                               {
+                                       $redirect_data[$key] = 
phpgw::clean_value($value);
+                               }
+
+                               $sessid = phpgw::get_var('sessionid', 'string', 
'GET');
+                               if ( $sessid )
+                               {
+                                       $redirect_data['sessionid'] = $sessid;
+                                       $redirect_data['kp3'] = 
phpgw::get_var('kp3', 'string', 'GET');
+                               }
+
+                               
$GLOBALS['phpgw']->session->phpgw_setcookie('after', false, 0);
+                               
$GLOBALS['phpgw']->redirect_link("{$frontend}/index.php", $redirect_data);
+                       }
+                       else
+                       {
+                               //failsafe
+                               
$GLOBALS['phpgw']->redirect_link("{$frontend}/home.php");
+                       }
+               }
        }

Modified: trunk/phpgwapi/templates/frontend/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/frontend/head.inc.php      2017-01-30 15:08:10 UTC 
(rev 16208)
+++ trunk/phpgwapi/templates/frontend/head.inc.php      2017-01-30 16:35:51 UTC 
(rev 16209)
@@ -202,7 +202,7 @@
        {
                $tpl_vars['login_text_org'] = '';
                $tpl_vars['login_text'] = lang('Login');
-               $tpl_vars['login_url'] = 
'login.php?after='.urlencode($_SERVER['QUERY_STRING']);
+               $tpl_vars['login_url'] = 'login.php?after='. 
urlencode(json_encode($_GET));
                $login_parameter = !empty($config_frontend['login_parameter']) 
? $config_frontend['login_parameter'] : '';
                $custom_login_url = 
!empty($config_frontend['custom_login_url']) ? 
$config_frontend['custom_login_url'] : '';
                if($login_parameter)




reply via email to

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