phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] ged/inc/hook_preferences.inc.php preferences/in...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] ged/inc/hook_preferences.inc.php preferences/in...
Date: Fri, 24 Nov 2006 19:50:50 +0000

CVSROOT:        /sources/phpgroupware
Module name:    tts
Changes by:     Sigurd Nes <sigurdne>   06/11/24 19:50:50

Modified files:
        ged/inc        : hook_preferences.inc.php 
        preferences    : index.php preferences.php 
        preferences/inc: hook_preferences.inc.php 
        projects/inc   : class.soconfig.inc.php hook_preferences.inc.php 
        inc            : hook_preferences.inc.php 

Log message:
        notice and link

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/inc/hook_preferences.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/preferences/index.php?cvsroot=phpgroupware&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/preferences/preferences.php?cvsroot=phpgroupware&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/preferences/inc/hook_preferences.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/projects/inc/class.soconfig.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/projects/inc/hook_preferences.inc.php?cvsroot=phpgroupware&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/tts/inc/hook_preferences.inc.php?cvsroot=phpgroupware&r1=1.8&r2=1.9

Patches:
Index: ged/inc/hook_preferences.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/hook_preferences.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ged/inc/hook_preferences.inc.php    17 Jun 2006 18:25:07 -0000      1.3
+++ ged/inc/hook_preferences.inc.php    24 Nov 2006 19:50:49 -0000      1.4
@@ -17,7 +17,7 @@
                $title=$appname;
                $file=Array
                (
-                       
'Preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php','appname='.$appname),
+                       
'Preferences'=>$GLOBALS['phpgw']->link('/preferences/preferences.php',array('appname'=>$appname)),
                );
 
 //Do not modify below this line

Index: preferences/index.php
===================================================================
RCS file: /sources/phpgroupware/preferences/index.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- preferences/index.php       19 Sep 2006 15:25:30 -0000      1.36
+++ preferences/index.php       24 Nov 2006 19:50:49 -0000      1.37
@@ -6,7 +6,7 @@
        * @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 preferences
-       * @version $Id: index.php,v 1.36 2006/09/19 15:25:30 sigurdne Exp $
+       * @version $Id: index.php,v 1.37 2006/11/24 19:50:49 sigurdne Exp $
        */
 
        $phpgw_info = array();
@@ -85,7 +85,7 @@
        {
                global $pref_tpl;
 
-               
$pref_tpl->set_var('icon_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
+               
$pref_tpl->set_var('icon_backcolor',(isset($GLOBALS['phpgw_info']['theme']['row_off'])?$GLOBALS['phpgw_info']['theme']['row_off']:''));
 //             
$pref_tpl->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
                $pref_tpl->set_var('a_name',$appname);
                
$pref_tpl->set_var('app_name',$GLOBALS['phpgw_info']['apps'][$appname]['title']);

Index: preferences/preferences.php
===================================================================
RCS file: /sources/phpgroupware/preferences/preferences.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- preferences/preferences.php 25 Sep 2006 13:08:19 -0000      1.41
+++ preferences/preferences.php 24 Nov 2006 19:50:49 -0000      1.42
@@ -5,7 +5,7 @@
        * @copyright Copyright (C) 2000-2006 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package preferences
-       * @version $Id: preferences.php,v 1.41 2006/09/25 13:08:19 skwashd Exp $
+       * @version $Id: preferences.php,v 1.42 2006/11/24 19:50:49 sigurdne Exp 
$
        */
 
        $GLOBALS['phpgw_info']['flags'] = array
@@ -122,7 +122,7 @@
        function create_input_box($label, $name, $help = '', $default = '', 
$size = '',$maxsize = '', $type = '', $run_lang = true)
        {
                global $t, $prefs;
-
+               $def_text ='';
                $_appname = check_app();
                if (is_forced_value($_appname,$name))
                {
@@ -151,7 +151,7 @@
                
                if ($GLOBALS['type'] == 'user')
                {
-                       $def_text = 
!$GLOBALS['phpgw']->preferences->user[$_appname][$name] ? 
$GLOBALS['phpgw']->preferences->data[$_appname][$name] : 
$GLOBALS['phpgw']->preferences->default[$_appname][$name];
+                       $def_text = 
(!isset($GLOBALS['phpgw']->preferences->user[$_appname][$name]) || 
!$GLOBALS['phpgw']->preferences->user[$_appname][$name]) ? 
$GLOBALS['phpgw']->preferences->data[$_appname][$name] : 
$GLOBALS['phpgw']->preferences->default[$_appname][$name];
 
                        if (isset($notifys[$name]))     // translate the 
substitution names
                        {
@@ -267,7 +267,7 @@
                
                if (isset($prefs[$name]) || $GLOBALS['type'] != 'user')
                {
-                       $default = $prefs[$name];
+                       $default = (isset($prefs[$name])?$prefs[$name]:'');
                }
 
                switch ($GLOBALS['type'])
@@ -287,7 +287,7 @@
                if ($GLOBALS['type'] == 'user' && 
isset($GLOBALS['phpgw']->preferences->default[$_appname][$name]) )
                {
                        $def_text = 
$GLOBALS['phpgw']->preferences->default[$_appname][$name];
-                       $def_text = $def_text != '' ? ' 
<i>'.lang('default').':&nbsp;'.$values[$def_text].'</i>' : '';
+                       $def_text = $def_text != '' ? ' 
<i>'.lang('default').':&nbsp;'.(isset($values[$def_text])?$values[$def_text]:'').'</i>'
 : '';
                }
                $t->set_var('row_value',"<select 
name=\"${GLOBALS['type']}[$name]\">$s</select>$def_text");
                $t->set_var('row_name',lang($label));
@@ -503,7 +503,7 @@
 
        $session_data = 
$GLOBALS['phpgw']->session->appsession('session_data','preferences');
 
-       $prefix = get_var('prefix',array('GET'),$session_data['appname'] == 
$_GET['appname'] ? $session_data['prefix'] : '');
+       $prefix = 
get_var('prefix',array('GET'),(isset($session_data['appname']) && 
$session_data['appname'] == $_GET['appname']) ? $session_data['prefix'] : '');
        
        if (is_admin())
        {
@@ -659,7 +659,7 @@
        $t->set_var('help_button',$has_help ? '<input type="submit" 
name="toggle_help" value="'.
                ($show_help ? lang('help off') : lang('help')).'" />' : '');
 
-       if (!$list_shown)
+       if (!isset($list_shown) || !$list_shown)
        {
                show_list();
        }

Index: preferences/inc/hook_preferences.inc.php
===================================================================
RCS file: /sources/phpgroupware/preferences/inc/hook_preferences.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- preferences/inc/hook_preferences.inc.php    3 Oct 2006 14:04:58 -0000       
1.18
+++ preferences/inc/hook_preferences.inc.php    24 Nov 2006 19:50:49 -0000      
1.19
@@ -6,14 +6,14 @@
        * @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 preferences
-       * @version $Id: hook_preferences.inc.php,v 1.18 2006/10/03 14:04:58 
Caeies Exp $
+       * @version $Id: hook_preferences.inc.php,v 1.19 2006/11/24 19:50:49 
sigurdne Exp $
        */
 
        if ($GLOBALS['phpgw']->acl->check('changepassword',1))
        {
                $file['Change your Password'] = 
$GLOBALS['phpgw']->link('/preferences/changepassword.php');
        }
-       if($GLOBALS['phpgw_info']['server']['auth_type'] == 'remoteuser' || 
$GLOBALS['phpgw_info']['server']['half_remote_user'] == 'remoteuser')
+       if((isset($GLOBALS['phpgw_info']['server']['auth_type']) && 
$GLOBALS['phpgw_info']['server']['auth_type'] == 'remoteuser') || 
(isset($GLOBALS['phpgw_info']['server']['half_remote_user']) && 
$GLOBALS['phpgw_info']['server']['half_remote_user'] == 'remoteuser'))
        {
                if($GLOBALS['phpgw_info']['server']['mapping'] == 'table' || 
$GLOBALS['phpgw_info']['server']['mapping'] == 'all')
                {

Index: projects/inc/class.soconfig.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- projects/inc/class.soconfig.inc.php 8 Apr 2005 15:52:57 -0000       1.20
+++ projects/inc/class.soconfig.inc.php 24 Nov 2006 19:50:49 -0000      1.21
@@ -6,7 +6,7 @@
        * @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 projects
-       * @version $Id: class.soconfig.inc.php,v 1.20 2005/04/08 15:52:57 ceb 
Exp $
+       * @version $Id: class.soconfig.inc.php,v 1.21 2006/11/24 19:50:49 
sigurdne Exp $
        * $Source: /sources/phpgroupware/projects/inc/class.soconfig.inc.php,v $
        */
 
@@ -283,6 +283,7 @@
                                $action = 'project_admin';
                        }
 
+                       $typeselect = '';
                        if($type != '')
                        {
                                $typeselect = " AND acl_location='" . $type . 
"'";
@@ -291,6 +292,7 @@
                        $sql = "select acl_account, acl_location from phpgw_acl 
WHERE acl_appname='" . $action . "'";
                        $this->db->query($sql . $typeselect,__LINE__,__FILE__);
                        $this->total_records = $this->db->num_rows();
+                       $admins = array();
                        while ($this->db->next_record())
                        {
                                $admins[] = array('account_id' => 
$this->db->f('acl_account'),

Index: projects/inc/hook_preferences.inc.php
===================================================================
RCS file: /sources/phpgroupware/projects/inc/hook_preferences.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- projects/inc/hook_preferences.inc.php       9 Apr 2005 22:36:30 -0000       
1.27
+++ projects/inc/hook_preferences.inc.php       24 Nov 2006 19:50:49 -0000      
1.28
@@ -6,7 +6,7 @@
        * @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 projects
-       * @version $Id: hook_preferences.inc.php,v 1.27 2005/04/09 22:36:30 ceb 
Exp $
+       * @version $Id: hook_preferences.inc.php,v 1.28 2006/11/24 19:50:49 
sigurdne Exp $
        * $Source: 
/sources/phpgroupware/projects/inc/hook_preferences.inc.php,v $
        */
 
@@ -14,9 +14,9 @@
                $title = $appname;
                $file = Array
                (
-                       'Preferences'     => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.preferences'),
-                       'Grant Access'    => 
$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='.$appname),
-                       'Edit categories' => 
$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=projects&cats_level=True&global_cats=True')
+                       'Preferences'     => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiconfig.preferences')),
+                       'Grant Access'    => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'preferences.uiaclprefs.index','acl_app'=>$appname)),
+                       'Edit categories' => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'preferences.uicategories.index','cats_app'=>'projects','cats_level'=>'True','global_cats'=>'True'))
                );
 
                $pro_soconfig = CreateObject('projects.soconfig');
@@ -24,14 +24,14 @@
                {
                        $afile = Array
                        (
-                               'roles'                 => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_roles&action=role'),
-                               'events'                => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_events'),
-                               'surcharges'    => 
$GLOBALS['phpgw']->link('/index.php','menuaction=projects.uiconfig.list_surcharges')
+                               'roles'                 => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiconfig.list_roles','action'=>'role')),
+                               'events'                => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiconfig.list_events')),
+                               'surcharges'    => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'projects.uiconfig.list_surcharges'))
                        );
                        unset($pro_soconfig);
                }
 
-               if(is_array($afile))
+               if(isset($afile) && is_array($afile))
                {
                        $file += $afile;
                }

Index: tts/inc/hook_preferences.inc.php
===================================================================
RCS file: /sources/phpgroupware/tts/inc/hook_preferences.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- tts/inc/hook_preferences.inc.php    10 May 2005 16:12:38 -0000      1.8
+++ tts/inc/hook_preferences.inc.php    24 Nov 2006 19:50:50 -0000      1.9
@@ -7,12 +7,12 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package tts
        * @subpackage hooks
-       * @version $Id: hook_preferences.inc.php,v 1.8 2005/05/10 16:12:38 
powerstat Exp $
+       * @version $Id: hook_preferences.inc.php,v 1.9 2006/11/24 19:50:50 
sigurdne Exp $
        */
 
        $values = array(
-               'Preferences'           => 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=tts'),
-               'Edit Categories'       => 
$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app='.$appname.'&cats_level=True&global_cats=True')
+               'Preferences'           => 
$GLOBALS['phpgw']->link('/preferences/preferences.php',array('appname'=>'tts')),
+               'Edit Categories'       => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=>'preferences.uicategories.index','cats_app'=>$appname,'cats_level'=>'True','global_cats'=>'True'))
        );
        display_section('tts','Trouble Ticket System',$values);
 ?>
\ No newline at end of file




reply via email to

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