phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] admin/inc/class.boaccounts.inc.php admin/inc/cl...


From: Dave Hall
Subject: [Phpgroupware-cvs] admin/inc/class.boaccounts.inc.php admin/inc/cl...
Date: Sun, 06 Aug 2006 10:03:24 +0000

CVSROOT:        /sources/phpgroupware
Module name:    sms
Changes by:     Dave Hall <skwashd>     06/08/06 10:03:24

Modified files:
        admin/inc      : class.boaccounts.inc.php 
                         class.uiaccounts.inc.php 
                         hook_sidebox_menu.inc.php 
        admin/setup    : setup.inc.php 
        admin/templates/base: groups.xsl 
        calendar/inc   : class.uicalendar.inc.php 
        phpgroupware   : index.php 
        property/inc   : class.boworkorder.inc.php 
        setup          : applications.php config.php 
        setup/templates/base: applications.tpl config.tpl 
        setup/bin      : phpgwsmsd 

Log message:
        E_NOTICES, cleanups, general housekeeping as we move to stablize HEAD 
for 18

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.boaccounts.inc.php?cvsroot=phpgroupware&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/admin/inc/class.uiaccounts.inc.php?cvsroot=phpgroupware&r1=1.61&r2=1.62
http://cvs.savannah.gnu.org/viewcvs/admin/inc/hook_sidebox_menu.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/admin/setup/setup.inc.php?cvsroot=phpgroupware&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/admin/templates/base/groups.xsl?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/calendar/inc/class.uicalendar.inc.php?cvsroot=phpgroupware&r1=1.124&r2=1.125
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/index.php?cvsroot=phpgroupware&r1=1.125&r2=1.126
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boworkorder.inc.php?cvsroot=phpgroupware&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/setup/applications.php?cvsroot=phpgroupware&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/setup/config.php?cvsroot=phpgroupware&r1=1.86&r2=1.87
http://cvs.savannah.gnu.org/viewcvs/setup/templates/base/applications.tpl?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/setup/templates/base/config.tpl?cvsroot=phpgroupware&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/sms/setup/bin/phpgwsmsd?cvsroot=phpgroupware&r1=1.4&r2=1.5

Patches:
Index: admin/inc/class.boaccounts.inc.php
===================================================================
RCS file: /sources/phpgroupware/admin/inc/class.boaccounts.inc.php,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- admin/inc/class.boaccounts.inc.php  8 Jul 2006 06:51:16 -0000       1.48
+++ admin/inc/class.boaccounts.inc.php  6 Aug 2006 10:03:24 -0000       1.49
@@ -9,7 +9,7 @@
        *  Free Software Foundation; either version 2 of the License, or (at 
your  *
        *  option) any later version.                                           
   *
        
\**************************************************************************/
-       /* $Id: class.boaccounts.inc.php,v 1.48 2006/07/08 06:51:16 skwashd Exp 
$ */
+       /* $Id: class.boaccounts.inc.php,v 1.49 2006/08/06 10:03:24 skwashd Exp 
$ */
 
        //FIXME define constants for rights so we can fuck all these magic 
numbers
        
@@ -99,8 +99,7 @@
 
                function edit_group($values)
                {
-                       //TODO switch to PHPGW_ACL_EDIT (4) for this test
-                       if 
($GLOBALS['phpgw']->acl->check('group_access',16,'admin'))
+                       if ($GLOBALS['phpgw']->acl->check('group_access', 
PHPGW_ACL_EDIT,'admin'))
                        {
                                $error[] = lang('no permission to create 
groups');
                                
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.list_groups');
@@ -127,19 +126,20 @@
                                                                                
         ));
 
                        $id = $values['account_id'];
-                       if ( !$values['account_id'] ) // add new group?
+                       if ( $id == 0 ) // add new group?
                        {
                                $new_group_values = array
                                                                        (
-                                                                               
'type'                  => 'g',
+                                                                               
'account_type'  => 'g',
                                                                                
'account_lid'   => $values['account_name'],
                                                                                
'passwd'                => '',
                                                                                
'firstname'             => $values['account_name'],
-                                                                               
'lastname'              => 'Group',
+                                                                               
'lastname'              => lang('group'),
                                                                                
'status'                => 'A',
                                                                                
'expires'               => -1
                                                                        );
                                $id = $new_group->create($new_group_values, 
false);
+                               //echo "bo::edit_group id == {$id}";
                        }
                        else //edit group
                        {
@@ -256,8 +256,8 @@
                                        'account_firstname'             => 
$values['account_firstname'],
                                        'account_lastname'              => 
$values['account_lastname'],
                                        'passwd'                                
=> $values['account_passwd'],
-                                       'status'                                
=> ($values['account_status'] ? 'A' : ''),
-                                       'old_loginid'                   => 
($values['old_loginid']?rawurldecode($_GET['old_loginid']):''),
+                                       'status'                                
=> $values['account_status'] ? 'A' : '',
+                                       'old_loginid'                   => 
$values['old_loginid'] ? rawurldecode($_GET['old_loginid']) : '',
                                        'account_id'                    => 
$values['account_id'],
                                        'account_passwd_2'              => 
$values['account_passwd_2'],
                                        'groups'                                
=> $values['account_groups'],
@@ -343,7 +343,7 @@
                        $group =& 
CreateObject('phpgwapi.accounts',$values['account_id'],'g');
                        $group->read_repository();
 
-                       if (!$values['account_id'] && 
$GLOBALS['phpgw']->acl->check('group_access',4,'admin'))
+                       if ( $values['account_id'] == 0 && 
$GLOBALS['phpgw']->acl->check('group_access', PHPGW_ACL_ADD,'admin'))
                        {
                                $error[] = lang('no permission to add groups');
                        }
@@ -647,13 +647,17 @@
                {
                        $account =& CreateObject('phpgwapi.accounts', $id, 'u');
                        $allGroups = $account->get_list('groups');
-                       if ($groups)
+                       if ( is_array($groups) )
                        {
-                               while (list($key,$value) = each($groups))
+                               foreach ( $groups as $group )
                                {
-                                       $newGroups[$value] = $value;
+                                       $newGroups[$group] = $group;
                                }
                        }
+                       else
+                       {
+                               $groups = array();
+                       }
 
                        $acl =& CreateObject('phpgwapi.acl',$id);
                        while (list($key,$groupData) = each($allGroups)) 

Index: admin/inc/class.uiaccounts.inc.php
===================================================================
RCS file: /sources/phpgroupware/admin/inc/class.uiaccounts.inc.php,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- admin/inc/class.uiaccounts.inc.php  8 Jul 2006 06:51:16 -0000       1.61
+++ admin/inc/class.uiaccounts.inc.php  6 Aug 2006 10:03:24 -0000       1.62
@@ -9,7 +9,7 @@
        *  Free Software Foundation; either version 2 of the License, or (at 
your  *
        *  option) any later version.                                           
   *
        
\**************************************************************************/
-       /* $Id: class.uiaccounts.inc.php,v 1.61 2006/07/08 06:51:16 skwashd Exp 
$ */
+       /* $Id: class.uiaccounts.inc.php,v 1.62 2006/08/06 10:03:24 skwashd Exp 
$ */
 
        class uiaccounts
        {
@@ -48,17 +48,17 @@
 
                function list_groups()
                {
-                       if ($_POST['done'] || 
$GLOBALS['phpgw']->acl->check('group_access',1,'admin'))
+                       if ($_POST['done'] || 
$GLOBALS['phpgw']->acl->check('group_access', PHPGW_ACL_READ,'admin'))
                        {
                                
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uimainscreen.mainscreen');
                        }
 
                        if($_POST['add'])
                        {
-                               
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.edit_group');
+                               $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'admin.uiaccounts.edit_group', 'account_id' => 0) );
                        }
 
-                       $start = 
(isset($_POST['start'])?intval($_POST['start']):'');
+                       $start = (int) isset($_REQUEST['start']) ? 
$_REQUEST['start']: 0;
 
                        if(isset($_GET['order']))
                        {
@@ -89,6 +89,7 @@
                        $GLOBALS['phpgw']->xslttpl->add_file('groups');
 
                        $account_info = 
$GLOBALS['phpgw']->accounts->get_list('groups',$start,$sort, $order, $query, 
$total);
+                       //echo '<pre>' . print_r($account_info, true) . 
'</pre>';
                        $total = $GLOBALS['phpgw']->accounts->total;
 
                        $link_data = array
@@ -111,7 +112,7 @@
                                'lang_sort_statustext'  => lang('sort the 
entries')
                        );
 
-                       while (list($null,$account) = each($account_info))
+                       foreach ( $account_info as $account )
                        {
                                $group_data[] = Array
                                (
@@ -291,25 +292,29 @@
 
                function edit_group()
                {
-                       $account_apps   = $_REQUEST['account_apps'];
+                       $account_apps   = array();
                        $account_id             = (int) $_REQUEST['account_id'];
-                       $account_user   = $_REQUEST['account_user'];
                        $error_list             = '';
-                       $group_manager  = (int) $_REQUEST['group_manager'];
-                       $values                 = $_REQUEST['values'];
+                       $values                 = isset($_POST['values']) ? 
$_POST['values'] : array();
 
                        if ( (isset($values['cancel']) && $values['cancel']) || 
(!$account_id && $GLOBALS['phpgw']->acl->check('group_access',4,'admin')) || 
($account_id && $GLOBALS['phpgw']->acl->check('group_access',16,'admin')))
                        {
                                
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.list_groups');
                        }
 
+                       //echo 'POST variables<pre>' . print_r($values, true) . 
'</pre>';
                        if ( isset($values['save']) && $values['save'] )
                        {
+                               $account_apps   = $_REQUEST['account_apps'];
+                               $account_user   = $_REQUEST['account_user'];
+                               $group_manager  = (int) 
$_REQUEST['group_manager'];
+                               
                                $error = $this->bo->validate_group($values);
 
                                if (is_array($error))
                                {
                                        $error_list = 
$GLOBALS['phpgw']->common->error_list($error);
+                                       echo 'FIXME errors are not displayed 
with idots :(<pre>' . print_r($error, true) . '</pre>';
                                }
                                else
                                {
@@ -348,7 +353,6 @@
                        $group_members = $group->get_members();
                        $group_apps = $this->bo->load_group_apps($account_id);
                        
-                       
                        $group_manager = 
$GLOBALS['phpgw']->acl->get_ids_for_location($account_id, 
PHPGW_ACL_GROUP_MANAGERS, 'phpgw_group');
 
                        if ( !is_array($group_members) )
@@ -359,27 +363,25 @@
                        // this information should be provided by the app itself
                        $apps_with_acl = array
                        (
-                               'addressbook'   => array('top_grant' =>True),
-                               'bookmarks'             => array('top_grant' 
=>True),
-                               'calendar'              => array('top_grant' 
=>True),
-                               'filemanager'   => array('top_grant' =>True),
-                               'hrm'                   => array('top_grant' 
=>False),
-                               'img'                   => array('top_grant' 
=>True),
-                               'infolog'               => array('top_grant' 
=>True),
-                               'inv'                   => array('top_grant' 
=>True),
-                               'netsaint'              => array('top_grant' 
=>True),
-                               'notes'                 => array('top_grant' 
=>True),
-                               'phonelog'              => array('top_grant' 
=>True),
-                               'phpwebhosting' => array('top_grant' =>True),
-                               'projects'              => array('top_grant' 
=>True),
-                               'property'              => array('top_grant' 
=>False),
-                               'todo'                  => array('top_grant' 
=>True),
-                               'tts'                   => array('top_grant' 
=>True),
+                               'addressbook'   => array('top_grant' => true),
+                               'bookmarks'             => array('top_grant' => 
true),
+                               'calendar'              => array('top_grant' => 
true),
+                               'filemanager'   => array('top_grant' => true),
+                               'img'                   => array('top_grant' => 
true),
+                               'infolog'               => array('top_grant' => 
true),
+                               'inv'                   => array('top_grant' => 
true),
+                               'netsaint'              => array('top_grant' => 
true),
+                               'notes'                 => array('top_grant' => 
true),
+                               'phonelog'              => array('top_grant' => 
true),
+                               'phpwebhosting' => array('top_grant' => true),
+                               'projects'              => array('top_grant' => 
true),
+                               'todo'                  => array('top_grant' => 
true),
+                               'tts'                   => array('top_grant' => 
true),
                        );
 
                        $GLOBALS['phpgw']->acl->verify_location($apps_with_acl);
                        
-                       $accounts =& CreateObject('phpgwapi.accounts');
+                       $accounts =& $GLOBALS['phpgw']->accounts;
                        $account_list = $accounts->get_list('accounts');
                        $account_num = count($account_list);
                        
@@ -454,6 +456,7 @@
                        $GLOBALS['phpgw']->xslttpl->add_file('groups');
                        $GLOBALS['phpgw_info']['flags']['app_header'] =  
$account_id > 0 ? lang('edit group') : lang('add group');
 
+                       echo "ui::edit_group account_id == $account_id <br>";
                        $data = array
                        (
                                'account_id'            => $account_id,
@@ -856,7 +859,8 @@
                                
$GLOBALS['phpgw']->redirect_link('/index.php','menuaction=admin.uiaccounts.list_groups');
                        }
 
-                       
$GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'app_delete'));
+                       $GLOBALS['phpgw']->xslttpl->set_root(PHPGW_APP_TPL);    
                
+                       $GLOBALS['phpgw']->xslttpl->add_file('app_delete');
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('administration') . ': ' . lang('delete group');
 
                        $data = array

Index: admin/inc/hook_sidebox_menu.inc.php
===================================================================
RCS file: /sources/phpgroupware/admin/inc/hook_sidebox_menu.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- admin/inc/hook_sidebox_menu.inc.php 11 May 2005 06:59:37 -0000      1.3
+++ admin/inc/hook_sidebox_menu.inc.php 6 Aug 2006 10:03:24 -0000       1.4
@@ -7,7 +7,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package admin
        * @subpackage hooks
-       * @version $Id: hook_sidebox_menu.inc.php,v 1.3 2005/05/11 06:59:37 
powerstat Exp $
+       * @version $Id: hook_sidebox_menu.inc.php,v 1.4 2006/08/06 10:03:24 
skwashd Exp $
        */
 
        {
@@ -29,11 +29,13 @@
                                                        'url'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=admin'));
                }
 
+               /*
                if (! 
$GLOBALS['phpgw']->acl->check('peer_server_access',1,'admin'))
                {
                        $file[] = array('text'  => 'Peer Servers',
                                                        'url'   => 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiserver.list_servers'));
                }
+               */
 
                if (! $GLOBALS['phpgw']->acl->check('account_access',1,'admin'))
                {

Index: admin/setup/setup.inc.php
===================================================================
RCS file: /sources/phpgroupware/admin/setup/setup.inc.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- admin/setup/setup.inc.php   11 Mar 2006 23:20:47 -0000      1.27
+++ admin/setup/setup.inc.php   6 Aug 2006 10:03:24 -0000       1.28
@@ -9,7 +9,7 @@
        *  option) any later version.                                           
   *
        
\**************************************************************************/
 
-       /* $Id: setup.inc.php,v 1.27 2006/03/11 23:20:47 skwashd Exp $ */
+       /* $Id: setup.inc.php,v 1.28 2006/08/06 10:03:24 skwashd Exp $ */
 
        $setup_info['admin']['name']            = 'admin';
        $setup_info['admin']['version']         = '0.9.17.001';
@@ -45,6 +45,7 @@
                'config',
                'deleteaccount',
                'manual',
+               'sidebox_menu',
                'view_user'
        );
 

Index: admin/templates/base/groups.xsl
===================================================================
RCS file: /sources/phpgroupware/admin/templates/base/groups.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- admin/templates/base/groups.xsl     26 Mar 2006 07:10:57 -0000      1.3
+++ admin/templates/base/groups.xsl     6 Aug 2006 10:03:24 -0000       1.4
@@ -1,4 +1,4 @@
-<!-- $Id: groups.xsl,v 1.3 2006/03/26 07:10:57 sigurdne Exp $ -->
+<!-- $Id: groups.xsl,v 1.4 2006/08/06 10:03:24 skwashd Exp $ -->
 
        <xsl:template name="groups">
                <xsl:choose>
@@ -150,7 +150,7 @@
                                                <tr>
                                                        <td><xsl:value-of 
select="lang_group_manager"/></td>
                                                        <td>
-                                                               <select 
name="group_manager">
+                                                               <select 
name="group_manager" id="group_manager">
                                                                        
<xsl:apply-templates select="group_manager"/>
                                                                </select>
                                                        </td>
@@ -158,7 +158,7 @@
                                                <tr>
                                                        <td><xsl:value-of 
select="lang_include_user"/></td>
                                                        <td>
-                                                               <select 
name="account_user[]" multiple="multiple" size="{$select_size}">
+                                                               <select 
name="account_user[]" id="account_user" multiple="multiple" 
size="{$select_size}" onchange="updateManager()">
                                                                        
<xsl:apply-templates select="guser_list"/>
                                                                </select>
                                                        </td>

Index: calendar/inc/class.uicalendar.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -b -r1.124 -r1.125
--- calendar/inc/class.uicalendar.inc.php       28 Jul 2006 03:21:07 -0000      
1.124
+++ calendar/inc/class.uicalendar.inc.php       6 Aug 2006 10:03:24 -0000       
1.125
@@ -12,7 +12,7 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-       /* $Id: class.uicalendar.inc.php,v 1.124 2006/07/28 03:21:07 skwashd 
Exp $ */
+       /* $Id: class.uicalendar.inc.php,v 1.125 2006/08/06 10:03:24 skwashd 
Exp $ */
 
        class uicalendar
        {
@@ -2386,22 +2386,17 @@
                        $menuaction = $GLOBALS['phpgw_info']['menuaction'];
                        list(,,$method) = explode('.',$menuaction);
                
-                       if (@$this->bo->printer_friendly)
-                       {
-                          return;
-                       }
-
                        $p = $GLOBALS['phpgw']->template;
        
-                       $p->set_file(
-                               array(
-                                       'footer'        => 'footer.tpl',
+                       $p->set_file(array
+                               (
+                                       'foot'          => 'footer.tpl',
                                        'form_button'   => 
'form_button_script.tpl'
                                )
                        );
-                       $p->set_block('footer','footer_table','footer_table');
-                       $p->set_block('footer','footer_row','footer_row');
-                       $p->set_block('footer','blank_row','blank_row');
+                       $p->set_block('foot','footer_table','footer_table');
+                       $p->set_block('foot','footer_row','footer_row');
+                       $p->set_block('foot','blank_row','blank_row');
 
                        $m = $this->bo->month;
                        $y = $this->bo->year;

Index: phpgroupware/index.php
===================================================================
RCS file: /sources/phpgroupware/phpgroupware/index.php,v
retrieving revision 1.125
retrieving revision 1.126
diff -u -b -r1.125 -r1.126
--- phpgroupware/index.php      6 Aug 2006 01:48:02 -0000       1.125
+++ phpgroupware/index.php      6 Aug 2006 10:03:24 -0000       1.126
@@ -6,7 +6,7 @@
        * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgroupware
-       * @version $Id: index.php,v 1.125 2006/08/06 01:48:02 skwashd Exp $
+       * @version $Id: index.php,v 1.126 2006/08/06 10:03:24 skwashd Exp $
        */
 
        $phpgw_info = array();
@@ -113,7 +113,7 @@
                */
        }
 
-       if (!isset($GLOBALS['phpgw_info']['nofooter']) || 
!$GLOBALS['phpgw_info']['nofooter'] )
+       if (! $GLOBALS['phpgw_info']['nofooter'])
        {
                $GLOBALS['phpgw']->common->phpgw_footer();
        }

Index: property/inc/class.boworkorder.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boworkorder.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- property/inc/class.boworkorder.inc.php      3 Aug 2006 12:43:41 -0000       
1.18
+++ property/inc/class.boworkorder.inc.php      6 Aug 2006 10:03:24 -0000       
1.19
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage project
-       * @version $Id: class.boworkorder.inc.php,v 1.18 2006/08/03 12:43:41 
sigurdne Exp $
+       * @version $Id: class.boworkorder.inc.php,v 1.19 2006/08/06 10:03:24 
skwashd Exp $
        */
 
        /**
@@ -105,7 +105,7 @@
                        {
                                $this->search_vendor = $search_vendor;
                        }
-                       if(isset($wo_hour_cat_id))
+                       if(array_key_exists('wo_hour_cat_id',$_POST))
                        {
                                $this->wo_hour_cat_id = $wo_hour_cat_id;
                        }

Index: setup/applications.php
===================================================================
RCS file: /sources/phpgroupware/setup/applications.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- setup/applications.php      22 Mar 2006 09:44:20 -0000      1.26
+++ setup/applications.php      6 Aug 2006 10:03:24 -0000       1.27
@@ -5,7 +5,7 @@
        * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package setup
-       * @version $Id: applications.php,v 1.26 2006/03/22 09:44:20 sigurdne 
Exp $
+       * @version $Id: applications.php,v 1.27 2006/08/06 10:03:24 skwashd Exp 
$
        */
 
        $DEBUG = $_POST['debug'] || $_GET['debug'];
@@ -422,13 +422,10 @@
                $i = 0;
                foreach($setup_info as $key => $value)
                {
-                       if(@$value['name'] && @$value['name'] != 'phpgwapi' && 
@$value['name'] != 'notifywindow')
+                       if( isset($value['name']) && $value['name'] != 
'phpgwapi' && $value['name'] != 'notifywindow')
                        {
-                               $i = ($i ? 0 : 1); 
-                               $value['title'] = (! trim($value['title']) 
-                                       ? $value['title'] 
-                                       : str_replace('*', '', 
lang($value['name']) )
-                               );
+                               $i = $i % 2;
+                               $value['title'] = !isset($value['title']) || 
$value['title'] ? $value['title'] : str_replace('*', '', lang($value['name']) );
                                $setup_tpl->set_var('apptitle',$value['title']);
                                
$setup_tpl->set_var('currentver',@$value['currentver']);
                                
$setup_tpl->set_var('version',$value['version']);
@@ -549,16 +546,10 @@
                                                $status = '';
                                                break;
                                }
-                               $setup_tpl->set_var('appinfo',$value['name'] . 
'-' . $status . ' -<br />register_globals = '
-                                               . ($value['globals_checked'] 
-                                                       ? '<a 
href="applications.php?globals=off" target="_blank">off'
-                                                       : '<a 
href="applications.php?globals=on" target="_blank">on'
-                                                       )
-                                               . '</a>'
-                                               );
-                               $setup_tpl->set_var('appname',$value['name']);
+                               $setup_tpl->set_var('appinfo',"{$value['name']} 
- {$status}");
+                               $setup_tpl->set_var('appname', $value['name']);
 
-                               $setup_tpl->pparse('out','apps',True);
+                               $setup_tpl->pparse('out','apps');
                        }
                }
 

Index: setup/config.php
===================================================================
RCS file: /sources/phpgroupware/setup/config.php,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -b -r1.86 -r1.87
--- setup/config.php    19 May 2006 07:27:08 -0000      1.86
+++ setup/config.php    6 Aug 2006 10:03:24 -0000       1.87
@@ -5,7 +5,7 @@
        * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package setup
-       * @version $Id: config.php,v 1.86 2006/05/19 07:27:08 sigurdne Exp $
+       * @version $Id: config.php,v 1.87 2006/08/06 10:03:24 skwashd Exp $
        */
 
        if ( isset($_POST['cancel']) && $_POST['cancel'] )
@@ -36,7 +36,7 @@
        }
 
        $tpl_root = $GLOBALS['phpgw_setup']->html->setup_tpl_dir('setup');
-       $setup_tpl = CreateObject('phpgwapi.Template',$tpl_root);
+       $setup_tpl =& CreateObject('phpgwapi.Template',$tpl_root);
 
        /**
         * Test if $path lies within the webservers document-root
@@ -91,7 +91,7 @@
        }
        elseif( @is_dir('C:\\TEMP') )
        {
-               $GLOBALS['current_config']['temp_dir'] = 'C:\\TEMP'; //be nice 
to windoze users too
+               $GLOBALS['current_config']['temp_dir'] = 'C:\\TEMP';
        }
        else
        {
@@ -114,18 +114,8 @@
        
        $GLOBALS['current_config']['encryptkey'] = md5(time() . 
$_SERVER['HTTP_HOST']); // random enough
 
-       // 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'))
-       {
-               $configtbl = 'config';
-       }
-       else
-       {
-               $configtbl = 'phpgw_config';
-       }
 
+       $setup_info = $GLOBALS['phpgw_setup']->detection->get_db_versions();
        $newsettings = get_var('newsettings',Array('POST'));
        $files_in_docroot = in_docroot($_POST['newsettings']['files_dir']);
        if(@get_var('submit',Array('POST')) && @$newsettings && 
!$files_in_docroot)
@@ -149,8 +139,8 @@
 
                $GLOBALS['phpgw_setup']->db->transaction_begin();
                // 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')");
+               $GLOBALS['phpgw_setup']->db->query("DELETE FROM phpgw_config 
WHERE config_name='useframes'");
+               $GLOBALS['phpgw_setup']->db->query("INSERT INTO phpgw_config 
(config_app,config_name, config_value) values 
('phpgwapi','useframes','never')");
 
                while(list($setting,$value) = @each($newsettings))
                {
@@ -158,11 +148,11 @@
                        /* Don't erase passwords, since we also do not print 
them below */
                        if($value || (!ereg('passwd',$setting) && 
!ereg('password',$setting) && !ereg('root_pw',$setting)))
                        {
-                               @$GLOBALS['phpgw_setup']->db->query("DELETE 
FROM $configtbl WHERE config_name='" . $setting . "'");
+                               @$GLOBALS['phpgw_setup']->db->query("DELETE 
FROM phpgw_config WHERE config_name='" . $setting . "'");
                        }
                        if($value)
                        {
-                               $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
$configtbl (config_app,config_name, config_value) VALUES ('phpgwapi','" . 
$GLOBALS['phpgw_setup']->db->db_addslashes($setting)
+                               $GLOBALS['phpgw_setup']->db->query("INSERT INTO 
phpgw_config (config_app,config_name, config_value) VALUES ('phpgwapi','" . 
$GLOBALS['phpgw_setup']->db->db_addslashes($setting)
                                        . "','" . 
$GLOBALS['phpgw_setup']->db->db_addslashes($value) . "')");
                        }
                }
@@ -199,8 +189,8 @@
                
$GLOBALS['phpgw_setup']->html->show_header(lang('Configuration'),False,'config',$ConfigDomain
 . '(' . $phpgw_domain[$ConfigDomain]["db_type"] . ')');
        }
 
-       @$GLOBALS['phpgw_setup']->db->query("SELECT * FROM $configtbl");
-       while(@$GLOBALS['phpgw_setup']->db->next_record())
+       $GLOBALS['phpgw_setup']->db->query('SELECT * FROM phpgw_config');
+       while($GLOBALS['phpgw_setup']->db->next_record())
        {
                
$GLOBALS['current_config'][$GLOBALS['phpgw_setup']->db->f('config_name')] = 
$GLOBALS['phpgw_setup']->db->f('config_value');
        }
@@ -258,12 +248,8 @@
                var $db;
        }
        $GLOBALS['phpgw'] = new phpgw;
-       $GLOBALS['phpgw']->common = CreateObject('phpgwapi.common');
-       $GLOBALS['phpgw']->db     = $GLOBALS['phpgw_setup']->db;
-
-       /*$cfg_apps = array('phpgwapi','admin','preferences');
-       while(list(,$cfg_app) = each($cfg_apps))
-       {*/
+       $GLOBALS['phpgw']->common =& CreateObject('phpgwapi.common');
+       $GLOBALS['phpgw']->db     =& $GLOBALS['phpgw_setup']->db;
 
                $setup_tpl->set_unknowns('keep');
                $setup_tpl->set_file(array('config' => 'config.tpl'));
@@ -272,22 +258,25 @@
                $vars = $setup_tpl->get_undefined('body');
                $GLOBALS['phpgw_setup']->hook('config','setup');
 
-               while(list($null,$value) = each($vars))
+       if ( !is_array($vars) )
                {
-                       $valarray = explode('_',$value);
-                       $type = $valarray[0];
-                       $new = $newval = '';
+               $vars = array();
+       }
 
-                       while($chunk = next($valarray))
+       foreach ( $vars as $value )
                        {
-                               $new[] = $chunk;
-                       }
-                       $newval = implode(' ',$new);
+               $valarray = explode('_',$value);
+
+               $var_type = $valarray[0];
+               unset($valarray[0]);
 
-                       switch ($type)
+               $newval = implode(' ', $valarray);
+               unset($valarray);
+
+               switch ($var_type)
                        {
                                case 'lang':
-                                       
$setup_tpl->set_var($value,lang($newval));
+                               $setup_tpl->set_var($value, lang($newval));
                                        break;
                                case 'value':
                                        $newval = ereg_replace(' ','_',$newval);
@@ -312,7 +301,8 @@
                                        }
                                        $config = implode('_',$configs);
                                        /* echo $config . '=' . 
$current_config[$config]; */
-                                       if(@$current_config[$config] == 
$setting)
+                               if( isset($current_config[$config])
+                                       && $current_config[$config] == $setting)
                                        {
                                                $setup_tpl->set_var($value,' 
selected');
                                        }
@@ -323,7 +313,7 @@
                                        break;
                                case 'hook':
                                        $newval = ereg_replace(' ','_',$newval);
-                                       
$setup_tpl->set_var($value,$newval($current_config));
+                               $setup_tpl->set_var($value, 
$newval($current_config) );
                                        break;
                                default:
                                        $setup_tpl->set_var($value,'');
@@ -331,8 +321,6 @@
                        }
                }
                $setup_tpl->pfp('out','body');
-       //}
-
        $setup_tpl->set_var('more_configs',lang('Please login to phpgroupware 
and run the admin application for additional site configuration') . '.');
 
        $setup_tpl->set_var('lang_submit',lang('Save'));

Index: setup/templates/base/applications.tpl
===================================================================
RCS file: /sources/phpgroupware/setup/templates/base/applications.tpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- setup/templates/base/applications.tpl       15 May 2005 14:36:08 -0000      
1.2
+++ setup/templates/base/applications.tpl       6 Aug 2006 10:03:24 -0000       
1.3
@@ -1,5 +1,5 @@
 <!-- BEGIN header -->
-<script>
+<script type="text/javascript">
 function check_all(which)
 {
   for (i=0; i<document.apps.elements.length; i++)

Index: setup/templates/base/config.tpl
===================================================================
RCS file: /sources/phpgroupware/setup/templates/base/config.tpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- setup/templates/base/config.tpl     22 Mar 2005 14:56:23 -0000      1.2
+++ setup/templates/base/config.tpl     6 Aug 2006 10:03:24 -0000       1.3
@@ -1,4 +1,4 @@
-<!-- $Id: config.tpl,v 1.2 2005/03/22 14:56:23 fipsfuchs Exp $ -->
+<!-- $Id: config.tpl,v 1.3 2006/08/06 10:03:24 skwashd Exp $ -->
 
 <!-- BEGIN header -->
  
@@ -20,17 +20,17 @@
    
    </tr>
    <tr class="row_off">
-    
<td>{lang_Enter_the_full_path_for_temporary_files.<br>Examples:_/tmp,_C:\TEMP}:</td>
+    <td>{lang_Enter_the_full_path_for_temporary_files}.<br>{lang_Examples} 
/tmp, C:\TEMP</td>
     <td><input name="newsettings[temp_dir]" value="{value_temp_dir}" 
size="40"></td>
    </tr>
 
    <tr class="row_on">
-    
<td>{lang_Enter_the_full_path_for_users_and_group_files.<br>Examples:_/files,_E:\FILES}:<br><b>{lang_This_has_to_be_outside_the_webservers_document-root!!!}</b><br>{lang_or_http://webdav.domain.com_(WebDAV)}:</td>
+    
<td>{lang_Enter_the_full_path_for_users_and_group_files}.<br>{lang_Examples} 
/files, 
_E:\FILES}<br><strong>{lang_This_has_to_be_outside_the_webservers_document_root}</strong><br>{lang_or}
 http://webdav.domain.com (WebDAV):</td>
     <td><input name="newsettings[files_dir]" value="{value_files_dir}" 
size="40"></td>
    </tr>
    
    <tr class="row_off">
-    
<td>{lang_Enter_the_location_of_phpGroupWare's_URL.<br>Example:_http://www.domain.com/phpgroupware_&nbsp;_or_&nbsp;_/phpgroupware<br><b>No_trailing_slash</b>}:</td>
+    <td>{lang_Enter_the_location_of_phpGroupWare's_URL}.<br>{lang_Example:} 
http://www.domain.com/phpgroupware {lang_or} 
/phpgroupware<br><b>{lang_No_trailing_slash}</b>:</td>
     <td><input name="newsettings[webserver_url]" value="{value_webserver_url}" 
size="40"></td>
    </tr>
 
@@ -84,7 +84,7 @@
    </tr>
 
    <tr class="row_on">
-    
<td>{lang_Datetime_port.<br>If_using_port_13,_please_set_firewall_rules_appropriately_before_submitting_this_page.<br>(Port:_13_/_Host:_129.6.15.28)}</td>
+    
<td>{lang_Datetime_port}.<br>{lang_If_using_port_13,_please_set_firewall_rules_appropriately_before_submitting_this_page}.({lang_Host}:
 time-a.nist.gov {lang_Port}: 13)</td>
     <td>
       <select name="newsettings[daytime_port]">
        <option 
value="00"{selected_daytime_port_00}>{lang_00_(disable)}</option>
@@ -103,7 +103,7 @@
     <td>{lang_Enter_your_HTTP_proxy_server_port}:</td>
     <td><input name="newsettings[httpproxy_port]" 
value="{value_httpproxy_port}"></td>
    </tr>
-
+<!--
    <tr class="row_off">
     <td>{lang_Enter_the_site_username_for_peer_servers}.</td>
     <td><input name="newsettings[site_username]" 
value="{value_site_username}"></td>
@@ -113,7 +113,7 @@
     <td>{lang_Enter_the_site_password_for_peer_servers}.</td>
     <td><input type="password" name="newsettings[site_password]" 
value="{value_site_password}"></td>
    </tr>
- 
+ -->
   <tr class="row_off">
     <td colspan="2">&nbsp;</td>
    </tr>

Index: sms/setup/bin/phpgwsmsd
===================================================================
RCS file: /sources/phpgroupware/sms/setup/bin/phpgwsmsd,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- sms/setup/bin/phpgwsmsd     2 Aug 2006 12:12:06 -0000       1.4
+++ sms/setup/bin/phpgwsmsd     6 Aug 2006 10:03:24 -0000       1.5
@@ -9,7 +9,7 @@
 
 $DAEMON_PROCESS = true;
 chdir($PHPGWSMS_PATH);
-if (!is_object($sms))
+if (!function_exists("validatelogin"))
 {
     include_once("init.php");
     $sms = CreateObject('sms.sms');




reply via email to

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