[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] setup/inc hook_config.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] setup/inc hook_config.inc.php |
Date: |
Mon, 25 Sep 2006 02:15:13 +0000 |
CVSROOT: /cvsroot/phpgroupware
Module name: setup
Changes by: Dave Hall <skwashd> 06/09/25 02:15:13
Modified files:
inc : hook_config.inc.php
Log message:
notice
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/setup/inc/hook_config.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
Patches:
Index: hook_config.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/inc/hook_config.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- hook_config.inc.php 3 Sep 2006 16:51:54 -0000 1.3
+++ hook_config.inc.php 25 Sep 2006 02:15:13 -0000 1.4
@@ -7,7 +7,7 @@
* @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: hook_config.inc.php,v 1.3 2006/09/03 16:51:54 Caeies
Exp $
+ * @version $Id: hook_config.inc.php,v 1.4 2006/09/25 02:15:13 skwashd
Exp $
*/
/**
@@ -123,28 +123,22 @@
*/
function passwdhashes($config)
{
- $hashes = array(
- 'des' => 'des',
- 'md5' => 'md5'
- );
- if(@function_exists('mhash'))
+ $hashes = array('des', 'md5');
+ if ( function_exists('mhash') )
{
- $hashes += array('sha' => 'sha');
+ $hashes[] = 'sha';
}
+
$out = '';
- while(list($key, $value) = each($hashes))
+ foreach ( $hashes as $hash )
{
- if($config['ldap_encryption_type'] == $value)
+ $selected = '';
+ if ( isset($config['ldap_encryption_type']) &&
$config['ldap_encryption_type'] == $hash)
{
$selected = ' selected="selected"';
}
- else
- {
- $selected = '';
- }
- $descr = strtoupper($value);
- $out .= '<option value="' . $value . '"' . $selected .
'>' . $descr . '</option>' . "\n";
+ $out .= '<option value="' . $hash . '"' . $selected .
'>' . strtoupper($hash) . "</option>\n";
}
return $out;
}