aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorm.fu <m_fu@310415.no-reply.drupal.org>2009-03-25 19:24:10 +0000
committerm.fu <m_fu@310415.no-reply.drupal.org>2009-03-25 19:24:10 +0000
commit417906cee68e675b9ced096c458071aa4122682d (patch)
treee6441f098f8c612bc4fc60be56eaa3436a0ee02f
parent4edb2a7d8b02df5ceda10fcbe30b2ad4cf9e4a12 (diff)
downloaddrupal_htpasswdsync-417906cee68e675b9ced096c458071aa4122682d.tar.gz
drupal_htpasswdsync-417906cee68e675b9ced096c458071aa4122682d.tar.bz2
drupal_htpasswdsync-417906cee68e675b9ced096c458071aa4122682d.zip
Fixed #409406 by fasdalf@fasdalf.ru : remove comma in htgroup file
-rw-r--r--CHANGELOG.txt6
-rw-r--r--HTPasswdSync.install8
-rw-r--r--HTPasswdSync.module19
-rw-r--r--README.txt2
4 files changed, 25 insertions, 10 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
new file mode 100644
index 0000000..b4cc73c
--- /dev/null
+++ b/CHANGELOG.txt
@@ -0,0 +1,6 @@
+$Id$
+
+v1.1-Dev bug fix release
+Fixed #409406 by fasdalf@fasdalf.ru : remove comma in htgroup file
+
+v1.0 Initial release \ No newline at end of file
diff --git a/HTPasswdSync.install b/HTPasswdSync.install
index 6689436..a973a70 100644
--- a/HTPasswdSync.install
+++ b/HTPasswdSync.install
@@ -1,6 +1,12 @@
<?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
* installation declaration for htpasswdsync module
*
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
diff --git a/README.txt b/README.txt
index 9d99291..dc79cc1 100644
--- a/README.txt
+++ b/README.txt
@@ -11,6 +11,8 @@ For a full description of the module, visit the project page:
To submit bug reports and feature suggestions, or to track changes:
http://drupal.org/project/issues/htpasswdsync
+The way password are encrypted it only compatible with *nix version of Apache.
+
-- REQUIREMENTS --

© 2014-2024 Faster IT GmbH | imprint | privacy policy