phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] setup ldapexport.php, 1.10 index.php, 1.119 schematoy


From: powerstat
Subject: [Phpgroupware-cvs] setup ldapexport.php, 1.10 index.php, 1.119 schematoy.php, 1.15 sqltoarray.php, 1.14 manageheader.php, 1.52 applist.php, 1.11 bulk.php, 1.4 setup_demo.php, 1.35 ldapimport.php, 1.14 config.php, 1.84 applications.php, 1.24 lang.php, 1.51 ldap.php, 1.57 ldapmodify.php, 1.14
Date: Sun, 17 Apr 2005 15:18:00 +0200

Update of setup

Modified Files:
     Branch: MAIN
            ldapexport.php lines: +36 -11
            index.php lines: +15 -17
            schematoy.php lines: +20 -11
            sqltoarray.php lines: +41 -15
            manageheader.php lines: +28 -25
            applist.php lines: +17 -12
            bulk.php lines: +12 -11
            setup_demo.php lines: +53 -16
            ldapimport.php lines: +52 -17
            config.php lines: +52 -27
            applications.php lines: +23 -15
            lang.php lines: +18 -12
            ldap.php lines: +12 -11
            ldapmodify.php lines: +49 -25

Log Message:
Added phpdocs
checked with php -l and phpdocumentor.
versions.inc.php is NO php file and should be renamed
README.inc should also be renamed

====================================================
Index: setup/ldapexport.php
diff -u setup/ldapexport.php:1.9 setup/ldapexport.php:1.10
--- setup/ldapexport.php:1.9    Thu Dec 30 11:59:24 2004
+++ setup/ldapexport.php        Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $phpgw_info = array();
        $phpgw_info["flags"] = array(
@@ -18,6 +15,10 @@
                'currentapp' => 'home',
                'noapi'      => True
        );
+
+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');

        // Authorize the user to use setup app and load the database
@@ -31,11 +32,35 @@
        //This stops timeout problems for larger conversions
        @set_time_limit(0);

+       /**
+       * phpGroupWare class
+       * @package setup
+       * @ignore
+       */
        class phpgw
        {
+               /**
+                * Common
+                * @var object
+                */
                var $common;
+
+               /**
+                * Accounts
+                * @var object
+                */
                var $accounts;
+
+               /**
+                * Applications
+                * @var object
+                */
                var $applications;
+
+               /**
+                * Database
+                * @var object
+                */
                var $db;
        }
        $phpgw = new phpgw;

====================================================
Index: setup/index.php
diff -u setup/index.php:1.118 setup/index.php:1.119
--- setup/index.php:1.118       Thu Mar  3 19:28:13 2005
+++ setup/index.php     Sun Apr 17 13:18:24 2005
@@ -1,14 +1,12 @@
 <?php
-       
/**************************************************************************\
-       * phpGroupWare                                                          
   *
-       * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        /*
         Idea:  This is so I don't forget.  When they are performing a new 
install, after config,
@@ -26,6 +24,10 @@
                'noapi'                 => True,
                'nocachecontrol'        => True
        );
+
+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');

        @set_time_limit(0);
@@ -75,8 +77,8 @@

        $GLOBALS['phpgw_setup']->loaddb();

-       /* Add cleaning of app_sessions per skeeter, but with a check for the 
table being there, just in case */
-       /* $GLOBALS['phpgw_setup']->clear_session_cache(); */
+       // Add cleaning of app_sessions per skeeter, but with a check for the 
table being there, just in case
+       // $GLOBALS['phpgw_setup']->clear_session_cache();

        // Database actions
        $setup_info = $GLOBALS['phpgw_setup']->detection->get_versions();
@@ -247,7 +249,7 @@
                                        $setup_info = 
$GLOBALS['phpgw_setup']->process->droptables($setup_info);
                                        break;
                                case 'new':
-                                       /* process all apps and langs(last 
param True), excluding apps with the no_mass_update flag set. */
+                                       // process all apps and langs(last 
param True), excluding apps with the no_mass_update flag set.
                                        $setup_info = 
$GLOBALS['phpgw_setup']->detection->upgrade_exclude($setup_info);
                                        $setup_info = 
$GLOBALS['phpgw_setup']->process->pass($setup_info,'new',$GLOBALS['DEBUG'],True);

@@ -285,7 +287,6 @@
                        
$setup_tpl->parse('V_db_stage_default','B_db_stage_default');
                        $db_filled_block = 
$setup_tpl->get_var('V_db_stage_default');
                        
$setup_tpl->set_var('V_db_filled_block',$db_filled_block);
-                       break;
        }

        // Config Section
@@ -389,7 +390,6 @@
                        $setup_tpl->set_var('config_status_alt',lang('not 
completed'));
                        $setup_tpl->set_var('config_table_data',lang('Not ready 
for this stage yet'));
                        $setup_tpl->set_var('ldap_table_data','&nbsp;');
-                       break;
        }

        // Lang Section
@@ -435,7 +435,6 @@
                        $setup_tpl->set_var('lang_status_img',$incomplete);
                        $setup_tpl->set_var('lang_status_alt',lang('not 
completed'));
                        $setup_tpl->set_var('lang_table_data',lang('Not ready 
for this stage yet'));
-                       break;
        }

        $setup_tpl->set_var('apps_step_text',lang('Step 4 - Advanced 
Application Management'));
@@ -456,7 +455,6 @@
                        $setup_tpl->set_var('apps_status_img',$incomplete);
                        $setup_tpl->set_var('apps_status_alt',lang('not 
completed'));
                        $setup_tpl->set_var('apps_table_data',lang('Not ready 
for this stage yet'));
-                       break;
        }

        $GLOBALS['phpgw_setup']->html->show_header(

====================================================
Index: setup/schematoy.php
diff -u setup/schematoy.php:1.14 setup/schematoy.php:1.15
--- setup/schematoy.php:1.14    Thu Dec 30 11:59:24 2004
+++ setup/schematoy.php Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup - Developer tools                                   *
-  * 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$ */
+       /**
+       * Setup - developer tools
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $GLOBALS['DEBUG'] = True;

@@ -20,6 +17,10 @@
                'currentapp' => 'home',
                'noapi' => True
        );
+
+       /**
+        * Include setup functions
+        */
        include ('./inc/functions.inc.php');

        // Check header and authentication
@@ -56,6 +57,14 @@

        $bgcolor = array('DDDDDD','EEEEEE');

+       /**
+        * Parse dependencies
+        *
+        * @param array $depends
+        * @param boolean $main Return a string when true otherwise an array
+        * @return string|array Dependency string or array
+        * @ignore
+        */
        function parsedep($depends,$main=True)
        {
                $depstring = '(';

====================================================
Index: setup/sqltoarray.php
diff -u setup/sqltoarray.php:1.13 setup/sqltoarray.php:1.14
--- setup/sqltoarray.php:1.13   Thu Dec 30 11:59:24 2004
+++ setup/sqltoarray.php        Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $phpgw_info = array();
        $GLOBALS['phpgw_info']['flags'] = array(
@@ -18,9 +15,13 @@
                'currentapp' => 'home',
                'noapi' => True
        );
+
+       /**
+        * Include setup functions
+        */
        include ('./inc/functions.inc.php');

-       /* Check header and authentication */
+       // Check header and authentication
        if (!$GLOBALS['phpgw_setup']->auth('Config'))
        {
                Header('Location: index.php');
@@ -72,6 +73,12 @@

        $GLOBALS['phpgw_setup']->loaddb();

+       /**
+        * Parse variables
+        *
+        * @param string $table
+        * @param string $term
+        */
        function parse_vars($table,$term)
        {
                $GLOBALS['setup_tpl']->set_var('table', $table);
@@ -132,6 +139,12 @@
                }
        }

+       /**
+        *
+        *
+        * @param string $template
+        * @return string
+        */
        function printout($template)
        {
                global $download,$appname,$table,$showall;
@@ -153,6 +166,13 @@
                return $string;
        }

+
+       /**
+        * Download handler
+        *
+        * @param string $dlstring
+        * @param string $fn
+        */
        function download_handler($dlstring,$fn='tables_current.inc.php')
        {
                //include( PHPGW_SERVER_ROOT . 
'/phpgwapi/inc/class.browser.inc.php');
@@ -201,12 +221,18 @@
                        if(!$setup_info[$appname]['tables'])
                        {
                                $f = PHPGW_SERVER_ROOT . '/' . $appname . 
'/setup/setup.inc.php';
-                               if (file_exists ($f)) { include($f); }
+                               if (file_exists ($f))
+                               {
+                                       /**
+                                        * Include existing file
+                                        */
+                                       include($f);
+                                }
                        }

                        //$tables = 
explode(',',$setup_info[$appname]['tables']);
                        $tables = $setup_info[$appname]['tables'];
-                       /* $i = 1; */
+                       // $i = 1;
                        while(list($key,$table) = @each($tables))
                        {
                                /*
@@ -217,7 +243,7 @@
                                */
                                parse_vars($table,$term);
                                $dlstring .= printout('sqlbody');
-                               /* $i++; */
+                               // ++$i;
                        }
                        $dlstring .= printout('sqlfooter');
                }

====================================================
Index: setup/manageheader.php
diff -u setup/manageheader.php:1.51 setup/manageheader.php:1.52
--- setup/manageheader.php:1.51 Thu Mar  3 19:28:13 2005
+++ setup/manageheader.php      Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare                                                             *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $phpgw_info = array();
        $GLOBALS['phpgw_info']['flags'] = array(
@@ -19,6 +16,10 @@
                'currentapp' => 'home',
                'noapi' => True
        );
+
+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');

        $GLOBALS['phpgw_info']['server']['versions']['current_header'] = 
$setup_info['phpgwapi']['versions']['current_header'];
@@ -30,6 +31,9 @@
        {
        }

+       /**
+        * Check form values
+        */
        function check_form_values()
        {
                $errors = '';
@@ -149,8 +153,8 @@
                        echo '</pre><hr />';
                        echo '<form action="index.php" method="post">';
                        echo '<br />' . lang('After retrieving the file, put it 
into place as the header.inc.php.  Then, click "continue".') . '<br />';
-                       echo '<input type="hidden" name="FormLogout" 
value="header">';
-                       echo '<input type="submit" name="junk" 
value="'.lang('Continue').'">';
+                       echo '<input type="hidden" name="FormLogout" 
value="header" />';
+                       echo '<input type="submit" name="junk" value="' . 
lang('Continue') . '" />';
                        echo '</form>';
                        echo '</body></html>';
                        break;
@@ -166,8 +170,8 @@
                                
$GLOBALS['phpgw_setup']->html->show_header('Saved header.inc.php', False, 
'header');
                                echo '<form action="index.php" method="post">';
                                echo '<br />Created header.inc.php! ';
-                               echo '<input type="hidden" name="FormLogout" 
value="header">';
-                               echo '<input type="submit" name="junk" 
value="'.lang('Continue').'">';
+                               echo '<input type="hidden" name="FormLogout" 
value="header" />';
+                               echo '<input type="submit" name="junk" value="' 
. lang('Continue') . '" />';
                                echo '</form>';
                                echo '</body></html>';
                                break;
@@ -188,7 +192,7 @@
                        if (!$ConfigLang)
                        {
                                $_POST['ConfigLang'] = 'en';
-                               $detected .= '<br /><form 
action="manageheader.php" method="Post">Please Select your language 
'.lang_select(True)."</form>\n";
+                               $detected .= '<br /><form 
action="manageheader.php" method="post">Please Select your language ' . 
lang_select(True) . "</form>\n";
                        }

                        $detected .= '<table border="0" width="100%" 
cellspacing="0" cellpadding="0" style="{ border: 1px solid #000000; }">' . "\n";
@@ -351,7 +355,7 @@
                                                {
                                                        if($v == 
$GLOBALS['phpgw_domain'][$key]['db_type'])
                                                        {
-                                                               $selected = ' 
selected ';
+                                                               $selected = ' 
selected="selected" ';
                                                                $found_dbtype = 
true;
                                                        }
                                                        else
@@ -424,7 +428,7 @@
                                        
'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'
                                );

-                               for($i=0; $i<30; $i++)
+                               for($i=0; $i < 30; ++$i)
                                {
                                        
$GLOBALS['phpgw_info']['server']['mcrypt_iv'] .= 
$random_char[rand(1,count($random_char))];
                                }
@@ -462,7 +466,7 @@
                        {
                                if($v == 
@$GLOBALS['phpgw_info']['server']['sessions_type'])
                                {
-                                       $selected = ' selected ';
+                                       $selected = ' selected="selected" ';
                                }
                                else
                                {
@@ -518,15 +522,15 @@
                        if(is_writeable('../header.inc.php') ||
                                (!file_exists('../header.inc.php') && 
is_writeable('../')))
                        {
-                               $errors .= '<br /><input type="submit" 
name="action[write]" value="'.lang('Write config').'">&nbsp;'
-                                       . lang('or') . '&nbsp;<input 
type="submit" name="action[download]" value="'.lang('Download').'">&nbsp;'
-                                       . lang('or') . '&nbsp;<input 
type=submit name="action[view]" value="'.lang('View').'"> '.lang('the 
file').'.</form>';
+                               $errors .= '<br /><input type="submit" 
name="action[write]" value="' . lang('Write config') . '" />&nbsp;'
+                                       . lang('or') . '&nbsp;<input 
type="submit" name="action[download]" value="' . lang('Download') . '" />&nbsp;'
+                                       . lang('or') . '&nbsp;<input 
type=submit name="action[view]" value="' . lang('View') . '" /> ' . lang('the 
file') . '.</form>';
                        }
                        else
                        {
                                $errors .= '<br />'
                                        . lang('Cannot create the 
header.inc.php due to file permission restrictions.<br /> Instead you can %1 
the file.',
-                                       '<input type="submit" 
name="action[download]" value="'.lang('Download').'">' . lang('or') . 
'&nbsp;<input type="submit" name="action[view]" value="'.lang('View').'">')
+                                       '<input type="submit" 
name="action[download]" value="' . lang('Download') . '" />' . lang('or') . 
'&nbsp;<input type="submit" name="action[view]" value="' . lang('View') . '" 
/>')
                                        . '</form>';
                        }

@@ -565,7 +569,6 @@
                        $setup_tpl->set_var('lang_continue',lang('Continue'));

                        $setup_tpl->pfp('out','manageheader');
-                       break; // ending the switch default
+                       // ending the switch default
        }
 ?>
-

====================================================
Index: setup/applist.php
diff -u setup/applist.php:1.10 setup/applist.php:1.11
--- setup/applist.php:1.10      Thu Dec 30 11:59:24 2004
+++ setup/applist.php   Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-/**************************************************************************\
-* phpGroupWare - XML-RPC Test App                                          *
-* 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $phpgw_info = array();
        $GLOBALS['phpgw_info']['flags'] = array(
@@ -18,10 +15,18 @@
                'currentapp' => 'home',
                'noapi' => True
        );
+
+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');
+
+       /**
+        * Include XML functions
+        */
        include(PHPGW_SERVER_ROOT . 'phpgwapi/inc/xml_functions.inc.php');

-       /* Check header and authentication */
+       // Check header and authentication
        if (!$GLOBALS['phpgw_setup']->auth('Config'))
        {
                Header('Location: index.php');

====================================================
Index: setup/bulk.php
diff -u setup/bulk.php:1.3 setup/bulk.php:1.4
--- setup/bulk.php:1.3  Thu Dec 30 09:37:36 2004
+++ setup/bulk.php      Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $DEBUG = $_POST['debug'] || $_GET['debug'];

@@ -26,6 +23,10 @@
                'currentapp' => 'home',
                'noapi' => True
        );
+
+       /**
+        * Include setup functions
+        */
        include ('./inc/functions.inc.php');

        set_time_limit(0);

====================================================
Index: setup/setup_demo.php
diff -u setup/setup_demo.php:1.34 setup/setup_demo.php:1.35
--- setup/setup_demo.php:1.34   Thu Dec 30 11:59:24 2004
+++ setup/setup_demo.php        Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare                                                             *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        // Little file to setup a demo install

@@ -19,6 +16,10 @@
                'currentapp' => 'home',
                'noapi'      => True
        );
+
+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');

        // Authorize the user to use setup app and load the database
@@ -29,6 +30,16 @@
                exit;
        }

+       /**
+        * Add account
+        *
+        * @param string $username Username to add
+        * @param string $first First name ow new user
+        * @param string $last Last name of new user
+        * @param string $passwd Password for new user
+        * @param string $type Account type; u = user
+        * @return string Account ID
+        */
        function add_account($username, $first, $last, $passwd, $type='u')
        {
                if($type=='u')
@@ -154,13 +165,32 @@
                $GLOBALS['phpgw_info']['server']['group_max_id']          = 
$config['group_max_id'];
                unset($config);

-               /* Create dummy class, then accounts object */
+               /**
+               * phpGroupWare dummy class
+               * @package setup
+               * @ignore
+               */
                class phpgw
                {
+                       /**
+                       * Database
+                       * @var object
+                       */
                        var $db;
+
+                       /**
+                       * Common
+                       * @var object
+                        */
                        var $common;
+
+                       /**
+                        * Accounts
+                        * @var object
+                        */
                        var $accounts;
                }
+
                $GLOBALS['phpgw'] = new phpgw;
                $GLOBALS['phpgw']->db       = $GLOBALS['phpgw_setup']->db;
                $GLOBALS['phpgw']->common   = CreateObject('phpgwapi.common');
@@ -172,10 +202,10 @@
                        exit;
                }

-               /* Begin transaction for acl, etc */
+               // Begin transaction for acl, etc
                $GLOBALS['phpgw_setup']->db->transaction_begin();

-               /* Now, clear out existing tables */
+               // Now, clear out existing tables
                $contacts_to_delete = 
$GLOBALS['phpgw']->accounts->get_account_with_contact();
 //             $GLOBALS['phpgw_setup']->db->query('SELECT person_id from 
phpgw_accounts WHERE person_id is not null');
 //             $contacts_to_delete=array();
@@ -199,10 +229,10 @@
                $defaultgroupid = 
intval(add_account('Default','Default','Group',$passwd,'g'));
                $admingroupid   = intval(add_account('Admins','Admin', 
'Group',$passwd,'g'));

-               /* Create the addressmaster record */
+               // Create the addressmaster record
                
//add_account('addressmaster','addressmaster','addressmaster','addressmaster');

-               /* Group perms for the default group */
+               // Group perms for the default group
                $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) 
VALUES('addressbook','run'," . $defaultgroupid . ", 1)");
                $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) 
VALUES('filemanager','run'," . $defaultgroupid . ", 1)");
                $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) 
VALUES('calendar','run'," . $defaultgroupid . ", 1)");
@@ -212,6 +242,11 @@
                $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) 
VALUES('manual','run'," . $defaultgroupid . ", 1)");
                $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
phpgw_acl(acl_appname,acl_location,acl_account,acl_rights) 
VALUES('preferences','run'," . $defaultgroupid . ", 1)");

+               /**
+                * Insert default preferences
+                *
+                * @param $accountid
+                */
                function insert_default_prefs($accountid)
                {
                        $defaultprefs = 
unserialize('a:3:{s:6:"common";a:10:{s:9:"maxmatchs";s:2:"15";s:12:"template_set";s:8:"verdilak";s:5:"theme";s:9:"submarine";s:13:"navbar_format";s:5:"icons";s:9:"tz_offset";s:0:"";s:10:"dateformat";s:5:"Y/m/d";s:10:"timeformat";s:2:"24";s:4:"lang";s:2:"en";s:11:"default_app";s:0:"";s:8:"currency";s:1:"$";}s:11:"addressbook";a:1:{s:0:"";s:4:"True";}s:8:"calendar";a:4:{s:13:"workdaystarts";s:1:"9";s:11:"workdayends";s:2:"17";s:13:"weekdaystarts";s:6:"Monday";s:15:"defaultcalendar";s:9:"month.php";}}');
@@ -224,6 +259,8 @@
                                $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
phpgw_preferences(preference_owner,preference_app,preference_value) 
VALUES($accountid,'$app','$prefs')",__FILE__,__LINE__);
                        }
                }
+
+
                insert_default_prefs(-2);       // set some default prefs

                /* Creation of the demo accounts is optional - the checkbox is 
on by default. */

====================================================
Index: setup/ldapimport.php
diff -u setup/ldapimport.php:1.13 setup/ldapimport.php:1.14
--- setup/ldapimport.php:1.13   Thu Dec 30 11:59:24 2004
+++ setup/ldapimport.php        Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $GLOBALS['phpgw_info'] = array();
        $GLOBALS['phpgw_info']['flags'] = array(
@@ -18,6 +15,10 @@
                'currentapp' => 'home',
                'noapi'      => True
        );
+
+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');

        // Authorize the user to use setup app and load the database
@@ -28,13 +29,47 @@
        }
        // Does not return unless user is authorized

+       /**
+       * phpGroupWare class
+       * @package setup
+       * @ignore
+       */
        class phpgw
        {
+               /**
+                * Common
+                * @var object
+                */
                var $common;
+
+               /**
+                * Accounts
+                * @var object
+                */
                var $accounts;
+
+               /**
+                * Applications
+                * @var object
+                */
                var $applications;
+
+               /**
+                * Database
+                * @var object
+                */
                var $db;
+
+               /**
+                * Hooks
+                * @var object
+                */
                var $hooks;
+
+               /**
+                * Access control list
+                * @var object
+                */
                var $acl;
        }
        $GLOBALS['phpgw'] = new phpgw;
@@ -96,7 +131,7 @@
        $info = ldap_get_entries($ldap, $sr);
        $tmp = '';

-       for ($i=0; $i<$info['count']; $i++)
+       for ($i=0; $i<$info['count']; ++$i)
        {
                if (! 
$GLOBALS['phpgw_info']['server']['global_denied_users'][$info[$i]['uid'][0]])
                {
@@ -115,7 +150,7 @@
                $info = ldap_get_entries($ldap, $srg);
                $tmp = '';

-               for ($i=0; $i<$info['count']; $i++)
+               for ($i=0; $i<$info['count']; ++$i)
                {
                        if (! 
$GLOBALS['phpgw_info']['server']['global_denied_groups'][$info[$i]['cn'][0]] &&
                                ! $account_info[$i][$info[$i]['cn'][0]])
@@ -204,14 +239,14 @@

                                                // Insert default acls for this 
user.
                                                // Since the group has app 
rights, we don't need to give users
-                                               //  these rights.  Instead, we 
make the user a member of the Default group
-                                               //  below.
+                                               // these rights.  Instead, we 
make the user a member of the Default group
+                                               // below.
                                                
$GLOBALS['phpgw']->acl->acl($thisacctid);
                                                
$GLOBALS['phpgw']->acl->read_repository();

                                                // Only give them admin if we 
asked for them to have it.
                                                // This is typically an 
exception to apps for run rights
-                                               //  as a group member.
+                                               // as a group member.
                                                $cnt_admins = 
count($_POST['admins']);
                                                for ($a = 0; $a < $cnt_admins; 
++$a)
                                                {
@@ -261,7 +296,7 @@
                                                // Check if the account is 
already there.
                                                // If so, we won't try to 
create it again.
                                                $acct_exist = 
$groups->name2id($thisacctlid);
-                                               /* echo '<br<group: ' . 
$acct_exist; */
+                                               /* echo '<br />group: ' . 
$acct_exist; */
                                                if ($acct_exist)
                                                {
                                                        $thisacctid = 
$acct_exist;

====================================================
Index: setup/config.php
diff -u setup/config.php:1.83 setup/config.php:1.84
--- setup/config.php:1.83       Sun Jan  9 00:32:07 2005
+++ setup/config.php    Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $phpgw_info = array();
        $GLOBALS['phpgw_info']['flags'] = array(
@@ -18,12 +15,14 @@
                'currentapp' => 'home',
                'noapi' => True
        );
+
+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');

-       /*
-       Authorize the user to use setup app and load the database
-       Does not return unless user is authorized
-       */
+       // Authorize the user to use setup app and load the database
+       // Does not return unless user is authorized
        if(!$GLOBALS['phpgw_setup']->auth('Config'))
        {
                Header('Location: index.php');
@@ -33,8 +32,12 @@
        $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
        $setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);

-       // test if $path lies within the webservers document-root
-       //
+       /**
+        * Test if $path lies within the webservers document-root
+        *
+        * @param string $path File/directory path
+        * @return boolean True when path is within webservers document-root; 
otherwise false
+        */
        function in_docroot($path)
        {
                $docroots = 
array(PHPGW_SERVER_ROOT,$GLOBALS['HTTP_SERVER_VARS']['DOCUMENT_ROOT']);
@@ -64,12 +67,12 @@
                'T_config_post_script' => 'config_post_script.tpl'
        ));

-       /* Following to ensure windows file paths are saved correctly */
+       // Following to ensure windows file paths are saved correctly
        set_magic_quotes_runtime(0);

        $GLOBALS['phpgw_setup']->loaddb();

-       /* Guessing default values. */
+       // Guessing default values.
        $GLOBALS['current_config']['hostname']  = $_SERVER['HTTP_HOST'];
        // files-dir is not longer allowed in document root, for security 
reasons !!!
        $GLOBALS['current_config']['files_dir'] = '/outside/webserver/docroot';
@@ -94,7 +97,7 @@
                exit;
        }

-       /* Check api version, use correct table */
+       // Check api version, use correct table
        $setup_info = $GLOBALS['phpgw_setup']->detection->get_db_versions();

        
if($GLOBALS['phpgw_setup']->alessthanb($setup_info['phpgwapi']['currentver'], 
'0.9.10pre7'))
@@ -128,7 +131,7 @@
                print_debug('TZ_OFFSET',$newsettings['tz_offset']);

                $GLOBALS['phpgw_setup']->db->transaction_begin();
-               /* This is only temp: */
+               // This is only temp:
                $GLOBALS['phpgw_setup']->db->query("DELETE FROM $configtbl 
WHERE config_name='useframes'");
                $GLOBALS['phpgw_setup']->db->query("INSERT INTO $configtbl 
(config_app,config_name, config_value) values 
('phpgwapi','useframes','never')");

@@ -148,7 +151,7 @@
                }
                $GLOBALS['phpgw_setup']->db->transaction_commit();

-               /* Add cleaning of app_sessions per skeeter, but with a check 
for the table being there, just in case */
+               // Add cleaning of app_sessions per skeeter, but with a check 
for the table being there, just in case
                $tablenames = $GLOBALS['phpgw_setup']->db->table_names();
                while(list($key,$val) = @each($tablenames))
                {
@@ -198,20 +201,43 @@

        if($GLOBALS['error'] == 'badldapconnection')
        {
-               /* Please check the number and dial again :) */
+               // Please check the number and dial again :)
                $GLOBALS['phpgw_setup']->html->show_alert_msg('Error',
                        lang('There was a problem trying to connect to your 
LDAP server. <br />'
                                .'please check your LDAP server configuration') 
. '.');
        }

        $setup_tpl->pparse('out','T_config_pre_script');
-
-       /* Now parse each of the templates we want to show here */
+       // Now parse each of the templates we want to show here
+
+       /**
+        * phpGroupWare class
+       * @package setup
+        */
        class phpgw
        {
+               /**
+                * Common
+                * @var object
+                */
                var $common;
+
+               /**
+                * Accounts
+                * @var object
+                */
                var $accounts;
+
+               /**
+                * Applications
+                * @var object
+                */
                var $applications;
+
+               /**
+                * Database
+                * @var object
+                */
                var $db;
        }
        $GLOBALS['phpgw'] = new phpgw;
@@ -263,7 +289,7 @@
                                        $config  = '';
                                        $newvals = explode(' ',$newval);
                                        $setting = end($newvals);
-                                       for($i=0;$i<(count($newvals) - 1); $i++)
+                                       for($i=0;$i<(count($newvals) - 1); ++$i)
                                        {
                                                $configs[] = $newvals[$i];
                                        }
@@ -298,4 +324,3 @@

        $GLOBALS['phpgw_setup']->html->show_footer();
 ?>
-

====================================================
Index: setup/applications.php
diff -u setup/applications.php:1.23 setup/applications.php:1.24
--- setup/applications.php:1.23 Thu Dec 30 09:37:36 2004
+++ setup/applications.php      Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $DEBUG = $_POST['debug'] || $_GET['debug'];
        /*
@@ -25,6 +22,10 @@
                'currentapp' => 'home',
                'noapi' => True
        );
+
+       /**
+        * Include setup functions
+        */
        include ('./inc/functions.inc.php');

        @set_time_limit(0);
@@ -65,6 +66,13 @@

        $bgcolor = array('row_on', 'row_off');

+       /**
+        * Parse dependencies
+        *
+        * @param array $depends
+        * @param boolean $main Return a string when true otherwise an array
+        * @return string|array Dependency string or array
+        */
        function parsedep($depends,$main=True)
        {
                $depstring = '(';
@@ -316,7 +324,7 @@
                                        echo lang('because it depends upon') . 
':<br />' . "\n";
                                        list($depapp,$depver) = 
parsedep($setup_info[$resolve]['depends'],False);
                                 $depapp_count = count($depapp);
-                                       for ($i=0; $i<$depapp_count; $i++)
+                                       for ($i=0; $i<$depapp_count; ++$i)
                                        {
                                                echo '<br />' . $depapp[$i] . 
': ';
                                                $list = '';
@@ -427,7 +435,7 @@
                                switch($value['status'])
                                {
                                        case 'C':
-                                               
$setup_tpl->set_var('remove','<input type="checkbox" name="remove[' . 
$value['name'] . ']">');
+                                               
$setup_tpl->set_var('remove','<input type="checkbox" name="remove[' . 
$value['name'] . ']" />');
                                                
$setup_tpl->set_var('upgrade','&nbsp;');
                                                if 
(!$GLOBALS['phpgw_setup']->detection->check_app_tables($value['name']))
                                                {
@@ -470,7 +478,7 @@
                                                        if ($value['tables'] && 
$GLOBALS['phpgw_setup']->detection->check_app_tables($value['name'],True))
                                                        {
                                                                // Some tables 
missing
-                                                               
$setup_tpl->set_var('remove','<input type="checkbox" name="remove[' . 
$value['name'] . ']">');
+                                                               
$setup_tpl->set_var('remove','<input type="checkbox" name="remove[' . 
$value['name'] . ']" />');
                                                                
$setup_tpl->set_var('resolution','<a href="applications.php?resolve=' . 
$value['name'] . '&badinstall=True">' . lang('Potential Problem') . '</a>');
                                                                $status = 
lang('Requires reinstall or manual repair') . ' - ' . $value['status'];
                                                        }
@@ -481,7 +489,7 @@
                                                                $status = 
lang('Requires upgrade') . ' - ' . $value['status'];
                                                        }
                                                        
$setup_tpl->set_var('bg_color','row_install');
-                                                       
$setup_tpl->set_var('install','<input type="checkbox" name="install[' . 
$value['name'] . ']">');
+                                                       
$setup_tpl->set_var('install','<input type="checkbox" name="install[' . 
$value['name'] . ']" />');
                                                        
$setup_tpl->set_var('upgrade','&nbsp;');
                                                        $status = lang('Please 
install') . ' - ' . $value['status'];
                                                }

====================================================
Index: setup/lang.php
diff -u setup/lang.php:1.50 setup/lang.php:1.51
--- setup/lang.php:1.50 Thu Dec 30 09:37:36 2004
+++ setup/lang.php      Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $phpgw_info = array();
        if (address@hidden)
@@ -20,7 +17,12 @@
                        'currentapp' => 'home',
                        'noapi' => True
                );
+
+               /**
+                * Include setup functions
+                */
                include('./inc/functions.inc.php');
+
                // Authorize the user to use setup app and load the database
                // Does not return unless user is authorized
                if (!$GLOBALS['phpgw_setup']->auth('Config'))
@@ -30,7 +32,11 @@
                }
                $GLOBALS['phpgw_setup']->loaddb();

+               /**
+                * Include API Common class
+                */
                include(PHPGW_API_INC.'/class.common.inc.php');
+
                $common = new common;
                // this is not used
                //$sep = $common->filesystem_separator();
@@ -215,7 +221,7 @@
                                $select_box_langs =
                                        @$select_box_langs
                                        .'<option value="' . $id . '"'
-                                       
.(@$GLOBALS['phpgw_info']['setup']['installed_langs'][$id]?' SELECTED':'').'>'
+                                       . 
(@$GLOBALS['phpgw_info']['setup']['installed_langs'][$id] ? ' 
selected="selected"' : '') . '>'
                                        . 
$GLOBALS['phpgw_setup']->db->f('lang_name') . '</option>'
                                        ."\n";
                                
if(strtoupper($GLOBALS['phpgw_setup']->db->f('available')) != 'YES')

====================================================
Index: setup/ldap.php
diff -u setup/ldap.php:1.56 setup/ldap.php:1.57
--- setup/ldap.php:1.56 Mon Jan  3 07:47:22 2005
+++ setup/ldap.php      Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $GLOBALS['phpgw_info'] = array();
        $GLOBALS['phpgw_info']['flags'] = array(
@@ -18,6 +15,10 @@
                'currentapp' => 'home',
                'noapi'      => True
        );
+
+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');

        // Authorize the user to use setup app and load the database

====================================================
Index: setup/ldapmodify.php
diff -u setup/ldapmodify.php:1.13 setup/ldapmodify.php:1.14
--- setup/ldapmodify.php:1.13   Thu Dec 30 11:59:24 2004
+++ setup/ldapmodify.php        Sun Apr 17 13:18:24 2005
@@ -1,15 +1,12 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * 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$ */
+       /**
+       * Setup
+       *
+       * @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 setup
+       * @version $Id$
+       */

        $GLOBALS['phpgw_info'] = array();
        $GLOBALS['phpgw_info']['flags'] = array(
@@ -19,6 +16,9 @@
                        'noapi'      => True
                );

+       /**
+        * Include setup functions
+        */
        include('./inc/functions.inc.php');

        /* Authorize the user to use setup app and load the database */
@@ -28,13 +28,37 @@
                exit;
        }

-       /* Does not return unless user is authorized */
+       // Does not return unless user is authorized

+       /**
+       * phpGroupWare class
+       * @package setup
+       * @ignore
+       */
        class phpgw
        {
+               /**
+                * Common
+                * @var object
+                */
                var $common;
+
+               /**
+                * Accounts
+                * @var object
+                */
                var $accounts;
+
+               /**
+                * Applications
+                * @var object
+                */
                var $applications;
+
+               /**
+                * Database
+                * @var object
+                */
                var $db;
        }
        $GLOBALS['phpgw'] = new phpgw;
@@ -67,7 +91,7 @@

        $acct   = $GLOBALS['phpgw']->accounts   = 
CreateObject('phpgwapi.accounts');

-       /* connect to ldap server */
+       // connect to ldap server
        if (! $ldap = $common->ldapConnect())
        {
                $noldapconnection = True;
@@ -97,7 +121,7 @@
                $info = ldap_get_entries($ldap, $srg);
                $tmp = '';

-               for ($i=0; $i<$info['count']; $i++)
+               for ($i=0; $i<$info['count']; ++$i)
                {
                        if (! 
$GLOBALS['phpgw_info']['server']['global_denied_groups'][$info[$i]['cn'][0]] &&
                                ! $account_info[$i][$info[$i]['cn'][0]])
@@ -146,7 +170,7 @@
                                $thismembers   = 
$group_info[$groupid]['memberuid'];
                                $thisdn        = $group_info[$groupid]['dn'];

-                               /* Do some checks before we try to import the 
data. */
+                               // Do some checks before we try to import the 
data.
                                if (!empty($thisacctid) && !empty($thisacctlid))
                                {
                                        $groups->account_id = 
intval($thisacctid);
@@ -168,14 +192,14 @@
                                        {
                                                reset($entry[0]['objectclass']);
                                                $replace['objectclass'] = 
$entry[0]['objectclass'];
-                                               
unset($replace['objectclass']['count']);//breaks things
+                                               
unset($replace['objectclass']['count']); // breaks things
                                                $replace['objectclass'][]       
= 'phpgwGroup';

-                                               //We add this here as it is 
mandatory
+                                               // We add this here as it is 
mandatory
                                                $replace['phpgwGroupID'] = 
$thisacctlid;

                                                $ok = 
ldap_mod_replace($ldap,$thisdn,$replace);
-                                               if (!$ok)//give user some 
feedback
+                                               if (!$ok) // give user some 
feedback
                                                {
                                                        echo lang('failed to 
modify: %1', $thisdn) . '<br />';
                                                }
@@ -186,7 +210,7 @@
                                        }
                                        unset($add);

-                                       /* Now make the members a member of 
this group in phpgw. */
+                                       // Now make the members a member of 
this group in phpgw.
                                        while (list($key,$members) = 
each($thismembers))
                                        {
                                                if ($key == 'count')
@@ -206,7 +230,7 @@
                                                }
                                                // Insert acls for this group 
based on memberuid field.
                                                // Since the group has app 
rights, we don't need to give users
-                                               //  these rights.  Instead, we 
maintain group membership here.
+                                               // these rights.  Instead, we 
maintain group membership here.
                                                if($tmpid)
                                                {
                                                        $acl->account_id = 
intval($tmpid);
@@ -222,7 +246,7 @@
                                                        $acl->save_repository();
                                                }
                                        }
-                                       /* Now give this group some rights */
+                                       // Now give this group some rights
                                        
$GLOBALS['phpgw_info']['user']['account_id'] = $thisacctid;
                                        $acl->account_id = intval($thisacctid);
                                        $acl->read_repository();
@@ -292,7 +316,7 @@
                                        {
                                                $ok = 
ldap_mod_replace($ldap,$thisdn,$addmod);

-                                               if (!$ok)//give user some 
feedback
+                                               if (!$ok) // give user some 
feedback
                                                {
                                                        echo lang('failed to 
modify: ', $thisdn) . '<br />';
                                                }
@@ -337,7 +361,7 @@
                                        This is typically an exception to apps 
for run rights
                                        as a group member.
                                        */
-                                       for ($a=0;$a<count($admins);$a++)
+                                       for ($a=0; $a < count($admins); ++$a)
                                        {
                                                if ($admins[$a] == $thisacctid)
                                                {
@@ -390,7 +414,7 @@
                $group_list .= '<option value="' . $group['gidnumber'][0] . 
'">' . $group['cn'][0]  . '</option>';
        }

-       while(list($appname,$apptitle) = each($apps))//TODO: IMHO This needs to 
go - skwashd Jul-04
+       while(list($appname,$apptitle) = each($apps)) // TODO: IMHO This needs 
to go - skwashd Jul-04
        {
                if($appname == 'admin' ||
                        $appname == 'skel' ||
@@ -405,7 +429,7 @@
                }
                else
                {
-                       $app_list .= '<option value="' . $appname . '" 
selected>' . $apptitle . '</option>';
+                       $app_list .= '<option value="' . $appname . '" 
selected="selected">' . $apptitle . '</option>';
                }
        }







reply via email to

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