diff options
author | m.fu <m_fu@310415.no-reply.drupal.org> | 2009-03-25 19:24:10 +0000 |
---|---|---|
committer | m.fu <m_fu@310415.no-reply.drupal.org> | 2009-03-25 19:24:10 +0000 |
commit | 417906cee68e675b9ced096c458071aa4122682d (patch) | |
tree | e6441f098f8c612bc4fc60be56eaa3436a0ee02f /HTPasswdSync.module | |
parent | 4edb2a7d8b02df5ceda10fcbe30b2ad4cf9e4a12 (diff) | |
download | drupal_htpasswdsync-417906cee68e675b9ced096c458071aa4122682d.tar.gz drupal_htpasswdsync-417906cee68e675b9ced096c458071aa4122682d.tar.bz2 drupal_htpasswdsync-417906cee68e675b9ced096c458071aa4122682d.zip |
Fixed #409406 by fasdalf@fasdalf.ru : remove comma in htgroup file
Diffstat (limited to 'HTPasswdSync.module')
-rw-r--r-- | HTPasswdSync.module | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/HTPasswdSync.module b/HTPasswdSync.module index 2e1ed9d..7945816 100644 --- a/HTPasswdSync.module +++ b/HTPasswdSync.module @@ -1,5 +1,12 @@ -<?php +?php // $Id$ +/* + * $Log$ + * Revision 1.1.2.1 2009/03/25 19:24:10 mfu + * Fixed #409406 by fasdalf@fasdalf.ru : remove comma in htgroup file + * + * + */ /* @file * Synchronize users password and htpasswd file @@ -58,14 +65,11 @@ function _htpasswdsync_read_htfile(&$arr, $file) { $f = fopen($file, "r"); while ($l = fgets($f)) { - // _htpasswdsync_log("###########" . $l . "\n"); list($u, $p) = split(":", rtrim($l), 2); - // _htpasswdsync_log("###########" . $u . "__" . $p . "\n"); if ($u != "") { $arr[$u] = $p; } } - // _htpasswdsync_log("rrr\n" . print_r($arr, true) . "rrr\n"); fclose($f); } @@ -116,13 +120,10 @@ // add members to the group $res = db_query('SELECT name FROM {users} u, {users_roles} ur WHERE ur.rid = %d AND ur.uid = u.uid', $rid); while ($r = db_fetch_object($res)) { - $groups[$name] .= $r->name .", "; + $groups[$name] .= " ". $r->name; } - // get rid of tailing characters - $groups[$name] = rtrim($groups[$name], ", "); - } - _htpasswdsync_write_htfile($groups, $file); + } _htpasswdsync_write_htfile($groups, $file); } /* generate the htpasswd content from the database |