fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10808] mobilefrontend; home


From: Sigurd Nes
Subject: [Fmsystem-commits] [10808] mobilefrontend; home
Date: Wed, 13 Feb 2013 19:23:22 +0000

Revision: 10808
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10808
Author:   sigurdne
Date:     2013-02-13 19:23:21 +0000 (Wed, 13 Feb 2013)
Log Message:
-----------
mobilefrontend; home

Modified Paths:
--------------
    trunk/mobilefrontend/setup/setup.inc.php
    trunk/mobilefrontend/setup/tables_current.inc.php

Added Paths:
-----------
    trunk/mobilefrontend/home.php

Added: trunk/mobilefrontend/home.php
===================================================================
--- trunk/mobilefrontend/home.php                               (rev 0)
+++ trunk/mobilefrontend/home.php       2013-02-13 19:23:21 UTC (rev 10808)
@@ -0,0 +1,120 @@
+<?php
+       /**
+       * phpGroupWare
+       *
+       * phpgroupware base
+       * @author Joseph Engo <address@hidden>
+       * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package phpgroupware
+       * @version $Id: home.php 2094 2009-01-12 14:29:43Z sigurd $
+       */
+
+       /**
+       * @global array $phpgw_info
+       */
+       $GLOBALS['phpgw_info'] = array();
+
+       $GLOBALS['phpgw_info']['flags'] = array
+       (
+               'noheader'                => true,
+               'nonavbar'                => false,
+               'currentapp'              => 'home',
+               'enable_network_class'    => true,
+               'enable_contacts_class'   => true,
+               'enable_nextmatchs_class' => true
+       );
+
+       /**
+       * Include phpgroupware header
+       */
+       require_once 'header.inc.php';
+
+       // check if forward parameter is set
+       if ( isset($_GET['phpgw_forward']) && is_array($_GET['phpgw_forward']) )
+       {
+               foreach($_GET as $name => $value)
+               {
+                       // find phpgw_ in the $_GET parameters but skip 
phpgw_forward because of redirect call below
+                       if (ereg('phpgw_', $name) && ($name != 'phpgw_forward'))
+                       {
+                               $name = substr($name, 6); // cut 'phpgw_'
+                               $extra_vars[$name] = $value;
+                       }
+               }
+
+               $GLOBALS['phpgw']->redirect_link($_GET['phpgw_forward'], 
$extra_vars);
+               exit;
+       }
+
+       if ( isset($GLOBALS['phpgw_info']['server']['force_default_app'])
+               && $GLOBALS['phpgw_info']['server']['force_default_app'] != 
'user_choice')
+       {
+               
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] = 
$GLOBALS['phpgw_info']['server']['force_default_app'];
+       }
+
+       if (isset($_GET['cd']) && $_GET['cd']=='yes'
+               && 
isset($GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'])
+               && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']
+               && 
$GLOBALS['phpgw_info']['user']['apps'][$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app']])
+       {
+               $GLOBALS['phpgw']->redirect_link('/' . 
$GLOBALS['phpgw_info']['user']['preferences']['common']['default_app'] . '/' . 
'index.php');
+               exit;
+       }
+       else
+       {
+               $GLOBALS['phpgw']->common->phpgw_header();
+               echo parse_navbar();
+       }
+
+       $GLOBALS['phpgw']->translation->add_app('mainscreen');
+       if (lang('mainscreen_message') != '!mainscreen_message')
+       {
+               echo '<div class="msg">' . lang('mainscreen_message') . 
'</div>';
+       }
+
+
+       // This initializes the users portal_order preference if it does not 
exist.
+       if ( 
(!isset($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) || 
!is_array($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) )
+               && $GLOBALS['phpgw_info']['apps'] )
+       {
+               $GLOBALS['phpgw']->preferences->delete('portal_order');
+               $order = 0;
+               foreach ( $GLOBALS['phpgw_info']['apps'] as $p )
+               {
+                       if ( 
isset($GLOBALS['phpgw_info']['user']['apps'][$p['name']])
+                               && 
$GLOBALS['phpgw_info']['user']['apps'][$p['name']] )
+                       {
+                               
$GLOBALS['phpgw']->preferences->add('portal_order', ++$order, $p['id']);
+                       }
+               }
+               $GLOBALS['phpgw_info']['user']['preferences'] = 
$GLOBALS['phpgw']->preferences->save_repository();
+       }
+
+       if ( 
isset($GLOBALS['phpgw_info']['user']['preferences']['portal_order'])
+               && 
is_array($GLOBALS['phpgw_info']['user']['preferences']['portal_order']) )
+       {
+               $app_check = array();
+               
ksort($GLOBALS['phpgw_info']['user']['preferences']['portal_order']);
+               
foreach($GLOBALS['phpgw_info']['user']['preferences']['portal_order'] as $app)
+               {
+                       if(!isset($app_check[$app]) || !$app_check[$app])
+                       {
+                               $app_check[$app] = true;
+                               $sorted_apps[] = 
$GLOBALS['phpgw']->applications->id2name($app);
+                       }
+               }
+       }
+
+       $GLOBALS['phpgw']->hooks->process('home_mobilefrontend', $sorted_apps);
+
+       if ( isset($GLOBALS['portal_order']) && 
is_array($GLOBALS['portal_order']) )
+       {
+               $GLOBALS['phpgw']->preferences->delete('portal_order');
+               foreach ( $GLOBALS['portal_order']  as $app_order => $app_id )
+               {
+                       $GLOBALS['phpgw']->preferences->add('portal_order', 
$app_order, $app_id);
+               }
+               $GLOBALS['phpgw']->preferences->save_repository();
+       }
+       $GLOBALS['phpgw']->common->phpgw_footer();

Modified: trunk/mobilefrontend/setup/setup.inc.php
===================================================================
--- trunk/mobilefrontend/setup/setup.inc.php    2013-02-13 15:14:21 UTC (rev 
10807)
+++ trunk/mobilefrontend/setup/setup.inc.php    2013-02-13 19:23:21 UTC (rev 
10808)
@@ -44,7 +44,7 @@
        $setup_info['mobilefrontend']['note'] ='';
 
 
-       $setup_info['mobilefrontend']['tables'] = array();
+//     $setup_info['mobilefrontend']['tables'] = array();
 
        /* The hooks this app includes, needed for hooks registration */
        $setup_info['mobilefrontend']['hooks'] = array

Modified: trunk/mobilefrontend/setup/tables_current.inc.php
===================================================================
--- trunk/mobilefrontend/setup/tables_current.inc.php   2013-02-13 15:14:21 UTC 
(rev 10807)
+++ trunk/mobilefrontend/setup/tables_current.inc.php   2013-02-13 19:23:21 UTC 
(rev 10808)
@@ -11,4 +11,4 @@
        * @version $Id$
        */
 
-       $phpgw_baseline = array();
+//     $phpgw_baseline = array();




reply via email to

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