phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] setup applications.php index.php lang.php manag...


From: Dave Hall
Subject: [Phpgroupware-cvs] setup applications.php index.php lang.php manag...
Date: Sun, 01 Oct 2006 13:45:34 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    setup
Changes by:     Dave Hall <skwashd>     06/10/01 13:45:34

Modified files:
        .              : applications.php index.php lang.php 
                         manageheader.php setup_demo.php 

Log message:
        notices and other little cleanups

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/setup/applications.php?cvsroot=phpgroupware&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/setup/index.php?cvsroot=phpgroupware&r1=1.122&r2=1.123
http://cvs.savannah.gnu.org/viewcvs/setup/lang.php?cvsroot=phpgroupware&r1=1.54&r2=1.55
http://cvs.savannah.gnu.org/viewcvs/setup/manageheader.php?cvsroot=phpgroupware&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/setup/setup_demo.php?cvsroot=phpgroupware&r1=1.37&r2=1.38

Patches:
Index: applications.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/applications.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- applications.php    15 Aug 2006 14:06:21 -0000      1.29
+++ applications.php    1 Oct 2006 13:45:34 -0000       1.30
@@ -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.29 2006/08/15 14:06:21 skwashd Exp 
$
+       * @version $Id: applications.php,v 1.30 2006/10/01 13:45:34 skwashd Exp 
$
        */
 
        $DEBUG = $_POST['debug'] || $_GET['debug'];
@@ -169,11 +169,12 @@
                                $terror = array();
                                $terror[] = $setup_info[$appname];
 
-                               if ($setup_info[$appname]['tables'])
+                               if ( isset($setup_info[$appname]['tables'])
+                                       && 
is_array($setup_info[$appname]['tables']) )
                                {
                                        $terror = 
$GLOBALS['phpgw_setup']->process->current($terror,$DEBUG);
                                        $terror = 
$GLOBALS['phpgw_setup']->process->default_records($terror,$DEBUG);
-                                       echo '<br />' . 
$setup_info[$appname]['title'] . ' '
+                                       echo '<br />' . 
$setup_info[$appname]['name'] . ' '
                                                . lang('tables installed, 
unless there are errors printed above') . '.';
                                }
                                else
@@ -186,12 +187,13 @@
                                        {
                                                
$GLOBALS['phpgw_setup']->register_app($setup_info[$appname]['name']);
                                        }
-                                       echo '<br />' . 
$setup_info[$appname]['title'] . ' ' . lang('registered') . '.';
+                                       echo '<br />' . 
$setup_info[$appname]['name'] . ' ' . lang('registered') . '.';
 
-                                       if ($setup_info[$appname]['hooks'])
+                                       if ( 
isset($setup_info[$appname]['hooks'])
+                                               && 
is_array($setup_info[$appname]['hooks']) )
                                        {
                                                
$GLOBALS['phpgw_setup']->register_hooks($setup_info[$appname]['name']);
-                                               echo '<br />' . 
$setup_info[$appname]['title'] . ' ' . lang('hooks registered') . '.';
+                                               echo '<br />' . 
$setup_info[$appname]['name'] . ' ' . lang('hooks registered') . '.';
                                        }
                                }
                                $force_en = False;
@@ -200,7 +202,7 @@
                                        $force_en = True;
                                }
                                $terror = 
$GLOBALS['phpgw_setup']->process->add_langs($terror,$DEBUG,$force_en);
-                               echo '<br />' . $setup_info[$appname]['title'] 
. ' ' . lang('Translations added') . '.';
+                               echo '<br />' . $setup_info[$appname]['name'] . 
' ' . lang('Translations added') . '.';
                        }
                }
 
@@ -254,12 +256,12 @@
                $setup_tpl->set_var('bg_color', 'th');
                $setup_tpl->pparse('out','detail');
        
+               $i = 1;
                foreach($setup_info[$detail] as $key => $val)
                {
                        if($key != 'title' && $key != 'name')
                        {
-                               $i = ($i ? 0 : 1);
-                       
+                               $i = $i % 2;
 
                                if ($key == 'tables')
                                {
@@ -292,7 +294,7 @@
 
                if(get_var('post',Array('GET')))
                {
-                       echo '"' . $setup_info[$resolve]['title'] . '" ' . 
lang('may be broken') . ' ';
+                       echo '"' . $setup_info[$resolve]['name'] . '" ' . 
lang('may be broken') . ' ';
                        echo lang('because an application it depends upon was 
upgraded');
                        echo '<br />';
                        echo lang('to a version it does not know about') . '.';
@@ -301,7 +303,7 @@
                }
                elseif(get_var('badinstall',Array('GET')))
                {
-                       echo '"' . $setup_info[$resolve]['title'] . '" ' . 
lang('is broken') . ' ';
+                       echo '"' . $setup_info[$resolve]['name'] . '" ' . 
lang('is broken') . ' ';
                        echo lang('because of a failed upgrade or install') . 
'.';
                        echo '<br />';
                        echo lang('Some or all of its tables are missing') . 
'.';
@@ -312,11 +314,11 @@
                {
                        if($setup_info[$resolve]['enabled'])
                        {
-                               echo '"' . $setup_info[$resolve]['title'] . '" 
' . lang('is broken') . ' ';
+                               echo '"' . $setup_info[$resolve]['name'] . '" ' 
. lang('is broken') . ' ';
                        }
                        else
                        {
-                               echo '"' . $setup_info[$resolve]['title'] . '" 
' . lang('is disabled') . ' ';
+                               echo '"' . $setup_info[$resolve]['name'] . '" ' 
. lang('is disabled') . ' ';
                        }
 
                        if (!$notables)
@@ -361,7 +363,7 @@
                }
                else
                {
-                       echo $setup_info[$resolve]['title'] . ' ' . lang('has a 
version mismatch') . ' ';
+                       echo $setup_info[$resolve]['name'] . ' ' . lang('has a 
version mismatch') . ' ';
                        echo lang('because of a failed upgrade, or the database 
is newer than the installed version of this app') . '.';
                        echo '<br />';
                        echo lang('If the application has no defined tables, 
selecting upgrade should remedy the problem') . '.';
@@ -378,7 +380,7 @@
                $setup_tpl->pparse('out','header');
 
                
-               $name = ($setup_info[$detail]['title'] ? 
$setup_info[$detail]['title'] 
+               $name = (isset($setup_info[$detail]['title']) ? 
$setup_info[$detail]['title'] 
                         : lang($setup_info[$detail]['name']));
                $setup_tpl->set_var('name',lang('application'));
                $setup_tpl->set_var('details', $name);
@@ -457,9 +459,11 @@
                                                        }
                                                        else
                                                        {
-                                                               if 
($value['tables'][0] != '')
+                                                               $notables = '';
+                                                               if ( 
isset($value['tables'][0]) 
+                                                                       && 
$value['tables'][0] != '')
                                                                {
-                                                                       
$notables = '&notables=True';
+                                                                       
$notables = '&amp;notables=True';
                                                                }
                                                                
$setup_tpl->set_var('bg_color','row_err_gen');
                                                                
$setup_tpl->set_var('resolution',
@@ -472,9 +476,9 @@
                                        case 'U':
                                                
$setup_tpl->set_var('instimg','incomplete.png');
                                                
$setup_tpl->set_var('instalt',lang('Not Completed'));
-                                               if (address@hidden'currentver'])
+                                               if ( 
!isset($value['currentver']) || !$value['currentver'] )
                                                {
-                                                       if ($value['tables'] && 
$GLOBALS['phpgw_setup']->detection->check_app_tables($value['name'],True))
+                                                       if ( 
isset($value['tables']) && is_array($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'] . ']" />');

Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/index.php,v
retrieving revision 1.122
retrieving revision 1.123
diff -u -b -r1.122 -r1.123
--- index.php   19 Jul 2006 04:16:32 -0000      1.122
+++ index.php   1 Oct 2006 13:45:34 -0000       1.123
@@ -5,7 +5,7 @@
        * @copyright Portions 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: index.php,v 1.122 2006/07/19 04:16:32 skwashd Exp $
+       * @version $Id: index.php,v 1.123 2006/10/01 13:45:34 skwashd Exp $
        */
 
        /*
@@ -13,7 +13,7 @@
         forward them right to index.php.  Create a session for them and have a 
nice little intro
         page explaining what to do from there (e.g., create their own account).
        */
-       $GLOBALS['DEBUG'] = False;
+       $GLOBALS['DEBUG'] = isset($_REQUEST['DEBUG']) && $_REQUEST['DEBUG'];
 
        $GLOBALS['phpgw_info'] = array();
        $GLOBALS['phpgw_info']['flags'] = array
@@ -260,7 +260,7 @@
                                        
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
                                        break;
                                case 'oldversion':
-                                       $setup_info = 
$GLOBALS['phpgw_setup']->process->pass($GLOBALS['setup_info'],'upgrade',$_REQUEST['DEBUG']);
+                                       $setup_info = 
$GLOBALS['phpgw_setup']->process->pass($GLOBALS['setup_info'],'upgrade',$GLOBALS['DEBUG']);
                                        
$GLOBALS['phpgw_info']['setup']['currentver']['phpgwapi'] = 'oldversion';
                                        break;
                        }
@@ -441,6 +441,11 @@
 
        $setup_tpl->set_var('apps_step_text',lang('Step 4 - Advanced 
Application Management'));
 //     $GLOBALS['phpgw_info']['setup']['stage']['apps'] = 
$GLOBALS['phpgw_setup']->check_apps();
+       if ( !isset($GLOBALS['phpgw_info']['setup']['stage']['db']) )
+       {
+               $GLOBALS['phpgw_info']['setup']['stage']['db'] = 0;
+       }
+
        switch($GLOBALS['phpgw_info']['setup']['stage']['db'])
        {
                case 10:
@@ -459,6 +464,11 @@
                        $setup_tpl->set_var('apps_table_data',lang('Not ready 
for this stage yet'));
        }
 
+       if ( !isset($GLOBALS['phpgw_info']['setup']['header_msg']) )
+       {
+               $GLOBALS['phpgw_info']['setup']['header_msg'] = '';
+       }
+
        $GLOBALS['phpgw_setup']->html->show_header(
                $GLOBALS['phpgw_info']['setup']['header_msg'],
                False,

Index: lang.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/lang.php,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -b -r1.54 -r1.55
--- lang.php    29 Sep 2006 11:44:44 -0000      1.54
+++ lang.php    1 Oct 2006 13:45:34 -0000       1.55
@@ -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: lang.php,v 1.54 2006/09/29 11:44:44 skwashd Exp $
+       * @version $Id: lang.php,v 1.55 2006/10/01 13:45:34 skwashd Exp $
        */
 
        $phpgw_info = array();
@@ -58,7 +58,8 @@
 
        if (isset($_POST['submit']) && $_POST['submit'] )
        {
-               if(!is_object($GLOBALS['phpgw']->shm))
+               if ( !isset($GLOBALS['phpgw']->shm) 
+                       || !is_object($GLOBALS['phpgw']->shm) )
                {
                        $GLOBALS['phpgw']->shm = CreateObject('phpgwapi.shm');
                }
@@ -120,7 +121,7 @@
                                                        foreach($lines as $line)
                                                        {
                                                                
list($message_id,$app_name,,$content) = explode("\t",$line);
-                                                               /* XXX Caeies 
Get incalid lang files ... 
+                                                               /* XXX Caeies 
Get invalid lang files ... 
                                                                
if(empty($content))
                                                                {
                                                                        
_debug_array('Invalid lang line : '.$line);
@@ -157,7 +158,7 @@
                                                                }
                                                        }
 
-                                                       if ($addit || 
$newinstall || $upgrademethod == 'addonlynew' || $upgrademethod == 'dumpold')
+                                                       if ($addit || 
(isset($newinstall) && $newinstall) || $upgrademethod == 'addonlynew' || 
$upgrademethod == 'dumpold')
                                                        {
                                                                if($message_id 
&& $content)
                                                                {

Index: manageheader.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/manageheader.php,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- manageheader.php    15 May 2005 11:59:36 -0000      1.53
+++ manageheader.php    1 Oct 2006 13:45:34 -0000       1.54
@@ -5,7 +5,7 @@
        * @copyright Portions 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: manageheader.php,v 1.53 2005/05/15 11:59:36 skwashd Exp 
$
+       * @version $Id: manageheader.php,v 1.54 2006/10/01 13:45:34 skwashd Exp 
$
        */
 
        $phpgw_info = array();
@@ -199,6 +199,18 @@
                                $detected .= '<br /><form 
action="manageheader.php" method="post">Please Select your language ' . 
lang_select(True) . "</form>\n";
                        }
 
+                       if 
(!function_exists('html_entity_decode'))//html_entity_decode() is only 
available in PHP4.3+
+                       {
+                               $detected .= '<b><p align="center" class="msg">'
+                                       . lang('You appear to be using PHP %1, 
phpGroupWare requires 4.3.0 or later', PHP_VERSION). "\n"
+                                       . 
'</p></b><td></tr></table></body></html>';
+                               die($detected);
+                       }
+                       
+                       $detected .= lang('You appear to be using PHP 4.3+') . 
'<br />' . "\n";
+                       $supported_sessions_type[] = 'db';
+                       $supported_sessions_type[] = 'php';
+
                        $detected .= '<table border="0" width="100%" 
cellspacing="0" cellpadding="0" style="{ border: 1px solid #000000; }">' . "\n";
 
                        $detected .= '<tr><td colspan="2"><p>' . 
$GLOBALS['phpgw_info']['setup']['PageMSG'] . '<br />&nbsp;</p></td></tr>';
@@ -272,21 +284,6 @@
                                exit;
                        }
 
-                       if (!function_exists('version_compare'))
-                       {
-                               $detected .= '<b><p align="center" class="msg">'
-                                       . lang('You appear to be using PHP 
earlier than 4.1.0. phpGroupWare now requires 4.1.0 or later'). "\n"
-                                       . 
'</p></b><td></tr></table></body></html>';
-                               echo $detected;
-                               exit;
-                       }
-                       else
-                       {
-                               $detected .= lang('You appear to be using PHP4. 
Enabling PHP4 sessions support') . '<br />' . "\n";
-                               $supported_sessions_type[] = 'db';
-                               $supported_sessions_type[] = 'php4';
-                       }
-
                        /*
                        if (extension_loaded('xml') || 
function_exists('xml_parser_create'))
                        {

Index: setup_demo.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/setup_demo.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- setup_demo.php      7 Jul 2006 09:32:40 -0000       1.37
+++ setup_demo.php      1 Oct 2006 13:45:34 -0000       1.38
@@ -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: setup_demo.php,v 1.37 2006/07/07 09:32:40 sigurdne Exp $
+       * @version $Id: setup_demo.php,v 1.38 2006/10/01 13:45:34 skwashd Exp $
        */
 
        // Little file to setup a demo install
@@ -150,47 +150,49 @@
                {
                        $config[$GLOBALS['phpgw_setup']->db->f('config_name')] 
= $GLOBALS['phpgw_setup']->db->f('config_value');
                }
-               $GLOBALS['phpgw_info']['server']['ldap_host']          = 
$config['ldap_host'];
-               $GLOBALS['phpgw_info']['server']['ldap_context']       = 
$config['ldap_context'];
-               $GLOBALS['phpgw_info']['server']['ldap_group_context'] = 
$config['ldap_group_context'];
-               $GLOBALS['phpgw_info']['server']['ldap_root_dn']       = 
$config['ldap_root_dn'];
-               $GLOBALS['phpgw_info']['server']['ldap_root_pw']       = 
$config['ldap_root_pw'];
-               $GLOBALS['phpgw_info']['server']['ldap_extra_attributes'] = 
$config['ldap_extra_attributes'];
-               $GLOBALS['phpgw_info']['server']['ldap_account_home']     = 
$config['ldap_account_home'];
-               $GLOBALS['phpgw_info']['server']['ldap_account_shell']    = 
$config['ldap_account_shell'];
-               $GLOBALS['phpgw_info']['server']['ldap_encryption_type']  = 
$config['ldap_encryption_type'];
-               $GLOBALS['phpgw_info']['server']['account_repository']    = 
$config['account_repository'];
-               $GLOBALS['phpgw_info']['server']['account_min_id']        = 
$config['account_min_id'];
-               $GLOBALS['phpgw_info']['server']['account_max_id']        = 
$config['account_max_id'];
-               $GLOBALS['phpgw_info']['server']['group_min_id']          = 
$config['group_min_id'];
-               $GLOBALS['phpgw_info']['server']['group_max_id']          = 
$config['group_max_id'];
+               $GLOBALS['phpgw_info']['server']['ldap_host']                   
        = isset($config['ldap_host']) ? $config['ldap_host'] : '';
+               $GLOBALS['phpgw_info']['server']['ldap_context']                
        = isset($config['ldap_context']) ? $config['ldap_context'] : '';
+               $GLOBALS['phpgw_info']['server']['ldap_group_context']          
= isset($config['ldap_group_context']) ? $config['ldap_group_content'] : '';
+               $GLOBALS['phpgw_info']['server']['ldap_root_dn']                
        = isset($config['ldap_root_dn']) ? $config['ldap_root_dn'] : '';
+               $GLOBALS['phpgw_info']['server']['ldap_root_pw']                
        = isset($config['ldap_root_pw']) ? $config['ldap_root_pw'] : '';
+               $GLOBALS['phpgw_info']['server']['ldap_extra_attributes']       
= isset($config['ldap_extra_attributes']) ? $config['ldap_extra_attributes'] : 
'';
+               $GLOBALS['phpgw_info']['server']['ldap_account_home']           
= isset($config['ldap_account_home']) ? $config['ldap_account_home'] : '';
+               $GLOBALS['phpgw_info']['server']['ldap_account_shell']          
= isset($config['ldap_account_shell']) ? $config['ldap_account_shell'] : '';
+               $GLOBALS['phpgw_info']['server']['ldap_encryption_type']        
= isset($config['ldap_encryption_type']) ? $config['ldap_encryption_type'] : '';
+               $GLOBALS['phpgw_info']['server']['account_repository']          
= isset($config['account_repository']) ? $config['account_repository'] : '';
+               $GLOBALS['phpgw_info']['server']['account_min_id']              
        = isset($config['account_min_id']) ? $config['account_min_id'] : 1000;
+               $GLOBALS['phpgw_info']['server']['account_max_id']              
        = isset($config['account_max_id']) ? $config['account_max_id'] : 65535;
+               $GLOBALS['phpgw_info']['server']['group_min_id']                
        = isset($config['group_min_id']) ? $config['group_min_id'] : 500;
+               $GLOBALS['phpgw_info']['server']['group_max_id']                
        = isset($config['group_max_id']) ? $config['group_max_id'] : 999;
                unset($config);
 
+
                /**
                * 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;




reply via email to

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