phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] preferences/inc hook_settings.inc.php, 1.14 class.boc


From: powerstat
Subject: [Phpgroupware-cvs] preferences/inc hook_settings.inc.php, 1.14 class.bocategories.inc.php, 1.15 hook_preferences.inc.php, 1.16 hook_deleteaccount.inc.php, 1.6 class.uicategories.inc.php, 1.28 class.uiaclprefs.inc.php, 1.15 hook_manual.inc.php, 1.7
Date: Sun, 17 Apr 2005 17:14:00 +0200

Update of preferences/inc

Modified Files:
     Branch: MAIN
            hook_settings.inc.php lines: +8 -11
            class.bocategories.inc.php lines: +90 -12
            hook_preferences.inc.php lines: +9 -13
            hook_deleteaccount.inc.php lines: +9 -12
            class.uicategories.inc.php lines: +88 -27
            class.uiaclprefs.inc.php lines: +69 -29
            hook_manual.inc.php lines: +9 -12

Log Message:
Added phpdocs
checked with php -l and phpdocumentor.
Parses, but is still not complete.

Fixed one php -l syntax bug

====================================================
Index: preferences/inc/hook_settings.inc.php
diff -u preferences/inc/hook_settings.inc.php:1.13 
preferences/inc/hook_settings.inc.php:1.14
--- preferences/inc/hook_settings.inc.php:1.13  Thu Dec 30 11:19:04 2004
+++ preferences/inc/hook_settings.inc.php       Sun Apr 17 15:14:31 2005
@@ -1,15 +1,12 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare - Preferences                                            
   *
-       * http://www.phpgroupware.org                                           
   *
-       * --------------------------------------------                          
   *
-       *  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.                                           
   *
-       
\**************************************************************************/
-
-       /* $Id$ */
+       /**
+       * Preferences - settings hook
+       *
+       * @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$
+       */

        $templates = $GLOBALS['phpgw']->common->list_templates();
        while (list($var,$value) = each($templates))

====================================================
Index: preferences/inc/class.bocategories.inc.php
diff -u preferences/inc/class.bocategories.inc.php:1.14 
preferences/inc/class.bocategories.inc.php:1.15
--- preferences/inc/class.bocategories.inc.php:1.14     Thu Dec 30 11:19:04 2004
+++ preferences/inc/class.bocategories.inc.php  Sun Apr 17 15:14:31 2005
@@ -1,25 +1,52 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Preferences - categories                                  *
-  * http://www.phpgroupware.org                                              *
-  * Written by Bettina Gille address@hidden                          *
-  * -----------------------------------------------                          *
-  *  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.                                              *
-  \**************************************************************************/
-  /* $Id$ */
-
+       /**
+       * Preferences - business object categories
+       *
+       * @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$
+       */
+
+       /**
+        * Business object categories
+        *
+        * @package preferences
+        */
        class bocategories
        {
+               /**
+                * Categories
+                * @var unknown
+                */
                var $cats;

+               /**
+                *
+                * @var string
+                */
                var $start;
+               /**
+                *
+                * @var string
+                */
                var $query;
+               /**
+                *
+                * @var string
+                */
                var $sort;
+               /**
+                *
+                * @var string
+                */
                var $order;

+               /**
+                *
+                *
+                * @param $cats_app
+                */
                function bocategories($cats_app='')
                {
                        $this->cats           = 
CreateObject('phpgwapi.categories');
@@ -51,12 +78,23 @@
                        }
                }

+               /**
+                *
+                *
+                * @param $data
+                * @param $cats_app
+                */
                function save_sessiondata($data, $cats_app)
                {
                        $colum = $cats_app . '_cats';
                        
$GLOBALS['phpgw']->session->appsession('session_data',$column,$data);
                }

+               /**
+                *
+                *
+                * @param $cats_app
+                */
                function read_sessiondata($cats_app)
                {
                        $colum = $cats_app . '_cats';
@@ -68,11 +106,23 @@
                        $this->order  = $data['order'];
                }

+               /**
+                *
+                *
+                * @param $global_cats
+                * @return array
+                */
                function get_list($global_cats)
                {
                        return 
$this->cats->return_sorted_array($this->start,True,$this->query,$this->sort,$this->order,$global_cats);
                }

+               /**
+                *
+                *
+                * @param $values
+                * @return unknown
+                */
                function save_cat($values)
                {
                        if ($values['access'])
@@ -94,6 +144,12 @@
                        }
                }

+               /**
+                *
+                *
+                * @param $data
+                * @return unknown
+                */
                function exists($data)
                {
                        $data['type']   = $data['type'] ? $data['type'] : '';
@@ -101,16 +157,38 @@
                        return 
$this->cats->exists($data['type'],$data['cat_name'],$data['cat_id']);
                }

+               /**
+                *
+                *
+                * @param $format
+                * @param $type
+                * @param $cat_parent
+                * @param $global_cats
+                * @return unknown
+                */
                function formatted_list($format,$type,$cat_parent,$global_cats)
                {
                        return 
$this->cats->formated_list($format,$type,$cat_parent,$global_cats);
                }

+               /**
+                *
+                *
+                * @param $cat_id
+                * @param $subs
+                * @return unknown
+                */
                function delete($cat_id,$subs)
                {
                        return $this->cats->delete($cat_id,$subs);
                }

+               /**
+                *
+                *
+                * @param $values
+                * @return string Error message
+                */
                function check_values($values)
                {
                        if (strlen($values['descr']) >= 255)

====================================================
Index: preferences/inc/hook_preferences.inc.php
diff -u preferences/inc/hook_preferences.inc.php:1.15 
preferences/inc/hook_preferences.inc.php:1.16
--- preferences/inc/hook_preferences.inc.php:1.15       Thu Dec 30 11:19:04 2004
+++ preferences/inc/hook_preferences.inc.php    Sun Apr 17 15:14:31 2005
@@ -1,16 +1,13 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare                                                             *
-  * http://www.phpgroupware.org                                              *
-  * Written by Joseph Engo <address@hidden>                          *
-  * --------------------------------------------                             *
-  *  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.                                              *
-  \**************************************************************************/
-
-       /* $Id$ */
+       /**
+       * Preferences - preferences hook
+       *
+       * @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 preferences
+       * @version $Id$
+       */

        if ($GLOBALS['phpgw']->acl->check('changepassword',1))
        {
@@ -19,5 +16,4 @@
        $file['change your settings'] = 
$GLOBALS['phpgw']->link('/preferences/preferences.php','appname=preferences');

        display_section('preferences',$file);
-
 ?>

====================================================
Index: preferences/inc/hook_deleteaccount.inc.php
diff -u preferences/inc/hook_deleteaccount.inc.php:1.5 
preferences/inc/hook_deleteaccount.inc.php:1.6
--- preferences/inc/hook_deleteaccount.inc.php:1.5      Thu Dec 30 11:19:04 2004
+++ preferences/inc/hook_deleteaccount.inc.php  Sun Apr 17 15:14:31 2005
@@ -1,16 +1,13 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare                                                             *
-  * http://www.phpgroupware.org                                              *
-  * Written by Mark Peters <address@hidden>                        *
-  * --------------------------------------------                             *
-  *  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.                                              *
-  \**************************************************************************/
-
-  /* $Id$ */
+       /**
+       * Preferences - delete account hook
+       *
+       * @author Mark Peters <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 preferences
+       * @version $Id$
+       */

        // Delete all records for a user
        $table_locks = Array('phpgw_preferences');

====================================================
Index: preferences/inc/class.uicategories.inc.php
diff -u preferences/inc/class.uicategories.inc.php:1.27 
preferences/inc/class.uicategories.inc.php:1.28
--- preferences/inc/class.uicategories.inc.php:1.27     Thu Dec 30 11:19:04 2004
+++ preferences/inc/class.uicategories.inc.php  Sun Apr 17 15:14:31 2005
@@ -1,30 +1,67 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare - Preferences - categories                               
   *
-       * http://www.phpgroupware.org                                           
   *
-       * Written by Bettina Gille address@hidden                          *
-       * -----------------------------------------------                       
   *
-       * Copyright 2000 - 2003 Free Software Foundation, Inc                   
   *
-       *                                                                       
   *
-       * 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.                                            
   *
-       
\**************************************************************************/
-       /* $Id$ */
-
+       /**
+       * Preferences - categories user interface
+       *
+       * @author Bettina Gille address@hidden
+       * @copyright Copyright (C) 2000-2003,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$
+       */
+
+       /**
+        * Categories user interface
+        *
+        * @package preferences
+        */
        class uicategories
        {
+               /**
+                *
+                * @var object
+                */
                var $bo;

+               /**
+                *
+                * @var unknown
+                */
                var $start;
+
+               /**
+                *
+                * @var unknown
+                */
                var $query;
+
+               /**
+                *
+                * @var unknown
+                */
                var $sort;
+
+               /**
+                *
+                * @var unknown
+                */
                var $order;
+
+               /**
+                *
+                * @var string
+                */
                var $cat_id;

+               /**
+                *
+                * @var string
+                */
                var $cats_app;

+               /**
+                *
+                * @var array
+                */
                var $public_functions = array
                (
                        'index'  => True,
@@ -33,6 +70,9 @@
                        'delete' => True
                );

+               /**
+                * Constructor
+                */
                function uicategories()
                {
                        $cats_app                       = 
get_var('cats_app',array('GET','POST'));
@@ -48,6 +88,11 @@
                        $this->order = $this->bo->order;
                }

+               /**
+                * Save session data
+                *
+                * @param $cats_app
+                */
                function save_sessiondata($cats_app)
                {
                        $data = array
@@ -60,6 +105,9 @@
                        $this->bo->save_sessiondata($data,$cats_app);
                }

+               /**
+                * Set languages
+                */
                function set_langs()
                {
                        
$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
@@ -82,15 +130,25 @@
                        
$GLOBALS['phpgw']->template->set_var('lang_reset',lang('Clear Form'));
                }

+               /**
+                * Display data elements in td
+                *
+                * @param array $edata
+                * @param array $data
+                * @return string td element string
+                */
                function cat_data($edata,$data)
                {
-                       for ($j=0;$j<count($edata);$j++)
+                       for ($j=0; $j < count($edata); ++$j)
                        {
                                $td_data .= '<td>' . $data[$edata[$j]] . 
'</td>' . "\n";
                        }
                        return $td_data;
                }

+               /**
+                *
+                */
                function index()
                {
                        $cats_app    = get_var('cats_app',array('GET','POST'));
@@ -158,7 +216,7 @@

                        if (is_array($edata))
                        {
-                               for($i=0;$i<count($edata);$i++)
+                               for($i=0; $i < count($edata); ++$i)
                                {
                                        
$GLOBALS['phpgw']->template->set_var('th_data','<td bgcolor="' . 
$GLOBALS['phpgw_info']['theme']['th_bg'] . '">' . lang($edata[$i]) . '</td>');
                                        
$GLOBALS['phpgw']->template->fp('column','data_column',True);
@@ -171,9 +229,9 @@

 // -------------------------- end header declaration 
--------------------------------------

-                       for ($i=0;$i<count($cats);$i++)
+                       for ($i=0; $i < count($cats); ++$i)
                        {
-                               
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template);
+                               
$this->nextmatchs->template_alternate_row_color(&$GLOBALS['phpgw']->template); 
// pass-by-reference DEPRECATED

                                if ($cats[$i]['app_name'] == 'phpgw')
                                {
@@ -272,6 +330,9 @@
                        
$GLOBALS['phpgw']->template->pfp('out','cat_list_t',True);
                }

+               /**
+                *
+                */
                function add()
                {
                        $cats_app    = get_var('cats_app',array('GET','POST'));
@@ -358,15 +419,15 @@
                        
$GLOBALS['phpgw']->template->set_var('cat_description',$cat_description);

                        $GLOBALS['phpgw']->template->set_var('access','<input 
type="checkbox" name="cat_access" value="True"'
-                               . ($cat_access == True ?' checked':'') . '>');
+                               . ($cat_access == True ?' 
checked="checked"':'') . ' />');

                        if ($extra)
                        {
                                $edata = explode(',',$extra);
-                               for($i=0;$i<count($edata);$i++)
+                               for($i=0; $i < count($edata); ++$i)
                                {
                                        
$GLOBALS['phpgw']->template->set_var('tr_color',$GLOBALS['phpgw']->nextmatchs->alternate_row_color());
-                                       
$GLOBALS['phpgw']->template->set_var('td_data','<input name="cat_data[' . 
$edata[$i] . ']" size="50" value="' . $cat_data[$edata[$i]] . '">');
+                                       
$GLOBALS['phpgw']->template->set_var('td_data','<input name="cat_data[' . 
$edata[$i] . ']" size="50" value="' . $cat_data[$edata[$i]] . '" />');
                                        
$GLOBALS['phpgw']->template->set_var('lang_data',lang($edata[$i]));
                                        
$GLOBALS['phpgw']->template->fp('row','data_row',True);
                                }
@@ -484,16 +545,16 @@
                                                                                
                                                                                
                                        'globals' => $global_cats, 'self' => 
$cat_id)));

                        $GLOBALS['phpgw']->template->set_var('access','<input 
type="checkbox" name="cat_access" value="True"'
-                                                                               
                . ($cats[0]['access'] == private ?' checked':'') . '>');
+                                                                               
                . (($cats[0]['access'] == 'private') ? ' checked="checked"' : 
'') . ' />');

                        if ($extra)
                        {
                                $edata = explode(',',$extra);

                                $data = unserialize($cats[0]['data']);
-                               for($i=0;$i<count($edata);$i++)
+                               for($i=0; $i < count($edata); ++$i)
                                {
-                                       
$GLOBALS['phpgw']->template->set_var('td_data','<input name="cat_data[' . 
$edata[$i] . ']" size="50" value="' . $data[$edata[$i]] . '">');
+                                       
$GLOBALS['phpgw']->template->set_var('td_data','<input name="cat_data[' . 
$edata[$i] . ']" size="50" value="' . $data[$edata[$i]] . '" />');
                                        
$GLOBALS['phpgw']->template->set_var('lang_data',lang($edata[$i]));
                                        
$GLOBALS['phpgw']->template->fp('row','data_row',True);
                                }
@@ -502,8 +563,8 @@
                        if ($cats[0]['owner'] == $this->account)
                        {
                                $link_data['menuaction'] = 
'preferences.uicategories.delete';
-                               
$GLOBALS['phpgw']->template->set_var('delete','<form method="POST" action="' . 
$GLOBALS['phpgw']->link('/index.php',$link_data)
-                                       . '"><input type="submit" value="' . 
lang('Delete') .'"></form>');
+                               
$GLOBALS['phpgw']->template->set_var('delete','<form method="post" action="' . 
$GLOBALS['phpgw']->link('/index.php',$link_data)
+                                       . '"><input type="submit" value="' . 
lang('Delete') .'" /></form>');
                        }
                        else
                        {
@@ -571,7 +632,7 @@
                                if ($exists)
                                {
                                        
$GLOBALS['phpgw']->template->set_var('lang_subs',lang('Do you also want to 
delete all subcategories ?'));
-                                       
$GLOBALS['phpgw']->template->set_var('subs','<input type="checkbox" name="subs" 
value="True">');
+                                       
$GLOBALS['phpgw']->template->set_var('subs','<input type="checkbox" name="subs" 
value="True" />');
                                }
                                else
                                {

====================================================
Index: preferences/inc/class.uiaclprefs.inc.php
diff -u preferences/inc/class.uiaclprefs.inc.php:1.14 
preferences/inc/class.uiaclprefs.inc.php:1.15
--- preferences/inc/class.uiaclprefs.inc.php:1.14       Thu Dec 30 11:19:04 2004
+++ preferences/inc/class.uiaclprefs.inc.php    Sun Apr 17 15:14:31 2005
@@ -1,28 +1,50 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare - Preferences                                            
   *
-       * http://www.phpgroupware.org                                           
   *
-       * --------------------------------------------                          
   *
-       *  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.                                           
   *
-       
\**************************************************************************/
+       /**
+       * Preferences - User interface for ACL preferences
+       *
+       * @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$
+       */

-       /* $Id$ */

+       /**
+        * User interface for ACL preferences
+        *
+        * @package preferences
+        */
        class uiaclprefs
        {
+               /**
+                *
+                * @var unknown
+                */
                var $acl;
+
+               /**
+                *
+                * @var object
+                */
                var $template;

+               /**
+                *
+                * @var array
+                */
                var $public_functions = array('index' => True);

+               /**
+                * Constructor
+                */
                function uiaclprefs()
                {
                        $GLOBALS['phpgw']->nextmatchs = 
CreateObject('phpgwapi.nextmatchs');
                }

+               /**
+                *
+                */
                function index()
                {
                        $acl_app        = 
get_var('acl_app',array('POST','GET'));
@@ -98,7 +120,7 @@
                                $processed = $_POST['processed'];
                                $to_remove = unserialize(urldecode($processed));

-                               for($i=0;$i<count($to_remove);$i++)
+                               for($i=0; $i < count($to_remove); ++$i)
                                {
                                        
$this->acl->delete($GLOBALS['phpgw_info']['flags']['currentapp'],$to_remove[$i]);
                                }
@@ -220,18 +242,18 @@
                        }

                        $common_hidden_vars =
-                               '     <input type="hidden" name="s_groups" 
value="'.$s_groups.'">'."\n"
-                               . '     <input type="hidden" name="s_users" 
value="'.$s_users.'">'."\n"
-                               . '     <input type="hidden" name="maxm" 
value="'.$maxm.'">'."\n"
-                               . '     <input type="hidden" 
name="totalentries" value="'.$totalentries.'">'."\n"
-                               . '     <input type="hidden" name="start" 
value="'.$start.'">'."\n"
-                               . '     <input type="hidden" name="query" 
value="'.$query.'">'."\n"
-                               . '     <input type="hidden" name="owner" 
value="'.$owner.'">'."\n"
-                               . '     <input type="hidden" name="acl_app" 
value="'.$acl_app.'">'."\n";
+                               '     <input type="hidden" name="s_groups" 
value="' . $s_groups . '" />' . "\n"
+                               . '     <input type="hidden" name="s_users" 
value="' . $s_users . '" />' . "\n"
+                               . '     <input type="hidden" name="maxm" 
value="' . $maxm . '" />' . "\n"
+                               . '     <input type="hidden" 
name="totalentries" value="' . $totalentries.  '" />' . "\n"
+                               . '     <input type="hidden" name="start" 
value="' . $start . '" />' . "\n"
+                               . '     <input type="hidden" name="query" 
value="' . $query . '" />' . "\n"
+                               . '     <input type="hidden" name="owner" 
value="' . $owner . '" />' . "\n"
+                               . '     <input type="hidden" name="acl_app" 
value="' . $acl_app . '" />' . "\n";

                        $var = Array(
                                'errors'      => '',
-                               'title'       => '<br>',
+                               'title'       => '<br />',
                                'action_url'  => 
$GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uiaclprefs.index&acl_app='
 . $acl_app),
                                'bg_color'    => 
$GLOBALS['phpgw_info']['theme']['th_bg'],
                                'submit_lang' => lang('Save'),
@@ -242,7 +264,7 @@

                        if(isset($query_result) && $query_result)
                        {
-                               $common_hidden_vars .= '<input type="hidden" 
name="query_result" value="'.$query_result.'">'."\n";
+                               $common_hidden_vars .= '<input type="hidden" 
name="query_result" value="' . $query_result. '" />' . "\n";
                        }

                        
$this->template->set_var('common_hidden_vars',$common_hidden_vars);
@@ -265,7 +287,7 @@
                                
$this->template->parse('row','row_colspan',True);

                                reset($groups);
-                               for($k=$start;$k<count($groups);$k++)
+                               for($k=$start; $k < count($groups); ++$k)
                                {
                                        $group = $groups[$k];
                                        $go = True;
@@ -282,9 +304,9 @@
                                        {
                                                $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
                                                
$this->display_row($tr_color,'g_',$group['account_id'],$group['account_lid'],$is_group);
-                                               $s_groups++;
+                                               ++$s_groups;
                                                $processed[] = 
$group['account_id'];
-                                               $total++;
+                                               ++$total;
                                                if($total == $maxm)
                                                {
                                                        break;
@@ -300,10 +322,10 @@
                                        
$this->template->set_var('string',ucfirst(lang('Users')));
                                        
$this->template->parse('row','row_colspan',True);
                                        $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
-                                       for($k=$s_users;$k<$totalentries || 
$k==count($users);$k++)
+                                       for($k=$s_users; ($k < $totalentries) 
|| ($k == count($users)); ++$k)
                                        {
                                                $user = $users[$k];
-                                               //echo '<br>acctid: 
'.$user['account_id'];
+                                               //echo '<br />acctid: 
'.$user['account_id'];
                                                if ($user['account_id'])
                                                {
                                                        $go = True;
@@ -326,9 +348,9 @@
                                                        // or the admin can't 
get special grants from a group
                                                        $tr_color = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
                                                        
$this->display_row($tr_color,'u_',$user['account_id'],$GLOBALS['phpgw']->common->display_fullname($user['account_lid'],$user['account_firstname'],$user['account_lastname']),$is_group);
-                                                       $s_users++;
+                                                       ++$s_users;
                                                        $processed[] = 
$user['account_id'];
-                                                       $total++;
+                                                       ++$total;
                                                        if($total == $maxm)
                                                        {
                                                                break;
@@ -357,6 +379,16 @@
                        $this->template->pfp('out','preferences');
                }

+               /**
+                *
+                *
+                * @param $label
+                * @param $id
+                * @param $acl
+                * @param $rights
+                * @param $right
+                * @param boolean $is_group
+                */
                function 
check_acl($label,$id,$acl,$rights,$right,$is_group=False)
                {
                        
$this->template->set_var($acl,$label.$GLOBALS['phpgw_info']['flags']['currentapp'].'['.$id.'_'.$right.']');
@@ -369,6 +401,15 @@
                        $this->template->set_var($acl.'_selected',$rights_set);
                }

+               /**
+                *
+                *
+                * @param $bg_color
+                * @param $label
+                * @param $id
+                * @param $name
+                * @param boolean $is_group
+                */
                function display_row($bg_color,$label,$id,$name,$is_group)
                {
                        $this->template->set_var('row_color',$bg_color);
@@ -384,7 +425,6 @@
                                        $is_group_set = True;
                                }
                        }
-                       // ^^ This is new

                        
$this->check_acl($label,$id,'read',$rights,PHPGW_ACL_READ,($is_group_set && 
($rights & PHPGW_ACL_READ) && !$is_group?$is_group_set:False));
                        
$this->check_acl($label,$id,'add',$rights,PHPGW_ACL_ADD,($is_group_set && 
($rights & PHPGW_ACL_ADD && !$is_group)?$is_group_set:False));

====================================================
Index: preferences/inc/hook_manual.inc.php
diff -u preferences/inc/hook_manual.inc.php:1.6 
preferences/inc/hook_manual.inc.php:1.7
--- preferences/inc/hook_manual.inc.php:1.6     Mon May 14 00:18:12 2001
+++ preferences/inc/hook_manual.inc.php Sun Apr 17 15:14:31 2005
@@ -1,16 +1,13 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Calendar Holidays                                         *
-  * http://www.phpgroupware.org                                              *
-  * Written by Mark Peters <address@hidden>                        *
-  * --------------------------------------------                             *
-  *  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.                                              *
-  \**************************************************************************/
-
-       /* $Id$ */
+       /**
+       * Preferences - manual hook
+       *
+       * @author Mark Peters <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 preferences
+       * @version $Id$
+       */

 // Only Modify the $file variable.....
        $file = Array(






reply via email to

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