[Top][All Lists]
[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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] setup/inc hook_config.inc.php, 1.2 functions.inc.php, 1.50,
powerstat <=
- Prev by Date:
[Phpgroupware-cvs] phpgroupware soap.php, 1.9 index.php, 1.122 anon_wrapper.php, 1.7 set_box.php, 1.6 about.php, 1.26 notify.php, 1.14 login.php, 1.103 logout.php, 1.29 header.inc.php.template, 1.48 version.inc.php, 1.93 help.php, 1.4 home.php, 1.30 xmlrpc.php, 1.14 redirect.php, 1.3 notify_simple.php, 1.5
- Next by Date:
[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
- Previous by thread:
[Phpgroupware-cvs] phpgroupware soap.php, 1.9 index.php, 1.122 anon_wrapper.php, 1.7 set_box.php, 1.6 about.php, 1.26 notify.php, 1.14 login.php, 1.103 logout.php, 1.29 header.inc.php.template, 1.48 version.inc.php, 1.93 help.php, 1.4 home.php, 1.30 xmlrpc.php, 1.14 redirect.php, 1.3 notify_simple.php, 1.5
- Next by thread:
[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
- Index(es):