phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] setup/inc hook_config.inc.php, 1.2 functions.inc.php,


From: powerstat
Subject: [Phpgroupware-cvs] setup/inc hook_config.inc.php, 1.2 functions.inc.php, 1.50
Date: Fri, 15 Apr 2005 16:36:00 +0200

Update of setup/inc

Modified Files:
     Branch: MAIN
            hook_config.inc.php lines: +33 -16
            functions.inc.php lines: +60 -28

Log Message:
Converted to phpdoc.
Verified with phpdocumentor and php -l
Fixed to XHTML

====================================================
Index: setup/inc/hook_config.inc.php
diff -u setup/inc/hook_config.inc.php:1.1 setup/inc/hook_config.inc.php:1.2
--- setup/inc/hook_config.inc.php:1.1   Sat Dec  7 02:12:15 2002
+++ setup/inc/hook_config.inc.php       Fri Apr 15 14:36:20 2005
@@ -1,17 +1,21 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare                                                             *
-  * http://www.phpgroupware.org                                              *
-  * Written by Mark Peters <address@hidden>                        *
-  * --------------------------------------------                             *
-  *  This program is free software; you can redistribute it and/or modify it *
-  *  under the terms of the GNU General Public License as published by the   *
-  *  Free Software Foundation; either version 2 of the License, or (at your  *
-  *  option) any later version.                                              *
-  \**************************************************************************/
-
-  /* $Id$ */
-
+       /**
+       * Setup - configuration hook
+       *
+       * cConfiguration hook
+       * @author Mark Peters <address@hidden>
+       * @copyright Copyright (C) 2000-2002,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$
+       */
+
+       /**
+       * Get selectbox for supported encryption algorithms selectbox
+       *
+       * @param $config
+       * @return string HTML code for encryption algorithm selection
+       */
        function encryptalgo($config)
        {
                if(@function_exists('mcrypt_list_algorithms'))
@@ -33,7 +37,7 @@
                                {
                                        if($config['mcrypt_algo'] == $value)
                                        {
-                                               $selected = ' selected';
+                                               $selected = ' 
selected="selected"';
                                        }
                                        else
                                        {
@@ -58,6 +62,12 @@
                return $out;
        }

+       /**
+       * Get encryption modes selectbox
+       *
+       * @param $config
+       * @return string HTML select box
+       */
        function encryptmode($config)
        {
                if(@function_exists('mcrypt_list_modes'))
@@ -79,7 +89,7 @@
                                {
                                        if($config['mcrypt_mode'] == $value)
                                        {
-                                               $selected = ' selected';
+                                               $selected = ' 
selected="selected"';
                                        }
                                        else
                                        {
@@ -104,6 +114,13 @@
                return $out;
        }

+
+       /**
+       * Get HTML selectbox with supported hash algorithms
+       *
+       * @param $config
+       * @return string HTML select box
+       */
        function passwdhashes($config)
        {
                $hashes = array(
@@ -119,7 +136,7 @@
                {
                        if($config['ldap_encryption_type'] == $value)
                        {
-                               $selected = ' selected';
+                               $selected = ' selected="selected"';
                        }
                        else
                        {

====================================================
Index: setup/inc/functions.inc.php
diff -u setup/inc/functions.inc.php:1.49 setup/inc/functions.inc.php:1.50
--- setup/inc/functions.inc.php:1.49    Thu Dec 30 09:37:36 2004
+++ setup/inc/functions.inc.php Fri Apr 15 14:36:20 2005
@@ -1,22 +1,19 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare - Setup                                                     *
-  * http://www.phpgroupware.org                                              *
-  * --------------------------------------------                             *
-  * This file written by Joseph Engo<address@hidden>                 *
-  *  and Dan Kuykendall<address@hidden>                             *
-  *  and Mark Peters<address@hidden>                               *
-  *  and Miles Lott<address@hidden>                                *
-  * --------------------------------------------                             *
-  *  This program is free software; you can redistribute it and/or modify it *
-  *  under the terms of the GNU General Public License as published by the   *
-  *  Free Software Foundation; either version 2 of the License, or (at your  *
-  *  option) any later version.                                              *
-  \**************************************************************************/
-
-  /* $Id$ */
+       /**
+       * Setup - functions
+       *
+       * Setup functions
+       * @author Joseph Engo <address@hidden>
+       * @author Dan Kuykendall <address@hidden>
+       * @author Mark Peters <address@hidden>
+       * @author Miles Lott <address@hidden>
+       * @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package setup
+       * @version $Id$
+       */

-       /* ######## Start security check ########## */
+       // ######## Start security check ##########
        $d1 = 
strtolower(substr(@$GLOBALS['phpgw_info']['server']['api_inc'],0,3));
        $d2 = 
strtolower(substr(@$GLOBALS['phpgw_info']['server']['server_root'],0,3));
        $d3 = 
strtolower(substr(@$GLOBALS['phpgw_info']['server']['app_inc'],0,3));
@@ -30,7 +27,11 @@

        if(file_exists('../header.inc.php'))
        {
-               include('../header.inc.php');
+
+               /**
+               * Include phpgroupware header
+               */
+               include_once('../header.inc.php');
        }

        if (!function_exists('version_compare'))//version_compare() is only 
available in PHP4.1+
@@ -49,14 +50,36 @@
                define('PHPGW_INCLUDE_ROOT','..');
        }

+       /**
+       * Include common functions
+       */
        include(PHPGW_INCLUDE_ROOT . '/phpgwapi/inc/common_functions.inc.php');
+
+       /**
+       * Include log functions
+       */
        include(PHPGW_INCLUDE_ROOT . '/phpgwapi/inc/log_functions.inc.php');

+       /**
+       * Platform dependend file separator
+       */
        define('SEP',filesystem_separator());

-       /*!
-        @function lang
-        @abstract function to handle multilanguage support
+       /**
+       * Handle multilanguage support
+       *
+       * @param $key
+       * @param string|array $m1
+       * @param string $m2
+       * @param string $m3
+       * @param string $m4
+       * @param string $m5
+       * @param string $m6
+       * @param string $m7
+       * @param string $m8
+       * @param string $m9
+       * @param string $m10
+       * @return array
        */
        function 
lang($key,$m1='',$m2='',$m3='',$m4='',$m5='',$m6='',$m7='',$m8='',$m9='',$m10='')
        {
@@ -72,10 +95,10 @@
                return $value;
        }

-       /*!
-       @function get_langs
-       @abstract       returns array of languages we support, with enabled set
-                               to True if the lang file exists
+       /**
+       * Get supported languages
+       *
+       * @return array Supported languages
        */
        function get_langs()
        {
@@ -104,11 +127,17 @@
                return $languages;
        }

+       /**
+       * Create HTML select with available languages
+       *
+       * @param boolean $onChange Add JavaScript code for auto submit when true
+       * @return string HTML code for select box
+       */
        function lang_select($onChange=False)
        {
                $ConfigLang = get_var('ConfigLang',Array('POST','COOKIE'));

-               $select = '<select name="ConfigLang"'.($onChange ? ' 
onChange="this.form.submit();"' : '').'>' . "\n";
+               $select = '<select name="ConfigLang"'.($onChange ? ' 
onchange="this.form.submit();"' : '').'>' . "\n";
                $languages = get_langs();
                while(list($null,$data) = each($languages))
                {
@@ -118,7 +147,7 @@
                                $short = substr($data['lang'],0,2);
                                if ($short == $ConfigLang || empty($ConfigLang) 
&& $short == substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],0,2))
                                {
-                                       $selected = ' selected';
+                                       $selected = ' selected="selected"';
                                }
                                $select .= '<option value="' . $data['lang'] . 
'"' . $selected . '>' . $data['descr'] . '</option>' . "\n";
                        }
@@ -130,8 +159,11 @@

        if(file_exists(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'))
        {
+               /**
+               * Include API setup
+               */
                include(PHPGW_SERVER_ROOT.'/phpgwapi/setup/setup.inc.php'); /* 
To set the current core version */
-               /* This will change to just use setup_info */
+               // This will change to just use setup_info
                $GLOBALS['phpgw_info']['server']['versions']['current_header'] 
= $setup_info['phpgwapi']['versions']['current_header'];
        }
        else






reply via email to

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