diff options
author | stfwi <cerberos@atwillys.de> | 2011-06-17 23:17:38 +0100 |
---|---|---|
committer | stfwi <cerberos@atwillys.de> | 2011-06-17 23:17:38 +0100 |
commit | a83028159c1e39c00224c61a076819a42c377e2f (patch) | |
tree | 35243c20dc947838364c3e477ef3c00424c3cb01 | |
parent | 9b33e3200a1ff714480190474125c097166519ca (diff) | |
download | drupal_htpasswdsync-a83028159c1e39c00224c61a076819a42c377e2f.tar.gz drupal_htpasswdsync-a83028159c1e39c00224c61a076819a42c377e2f.tar.bz2 drupal_htpasswdsync-a83028159c1e39c00224c61a076819a42c377e2f.zip |
filemods, info cleanup, permission display bugfix
-rw-r--r--[-rwxr-xr-x] | CHANGELOG.txt | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | HTPasswdSync.info | 6 | ||||
-rw-r--r--[-rwxr-xr-x] | HTPasswdSync.install | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | HTPasswdSync.module | 14 | ||||
-rw-r--r--[-rwxr-xr-x] | LICENSE.txt | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | README.txt | 1 |
6 files changed, 10 insertions, 12 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index fbb5559..b7a5a39 100755..100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,2 @@ -$Id: CHANGELOG.txt,v 1.0.0 2011/06/01 00:08:53 stfwi Exp $ v1.0 Initial release for DP7 diff --git a/HTPasswdSync.info b/HTPasswdSync.info index d890e3f..8ad669a 100755..100644 --- a/HTPasswdSync.info +++ b/HTPasswdSync.info @@ -1,9 +1,3 @@ -; $Id: HTPasswdSync.info, stfwi Exp $ name = HTPasswdSync description = Export user login data into htpasswd and htgroup files. core = 7.x - -version = "7.x-1.0-dev" -core = "7.x" -project = "htpasswdsync" - diff --git a/HTPasswdSync.install b/HTPasswdSync.install index 77e5112..77e5112 100755..100644 --- a/HTPasswdSync.install +++ b/HTPasswdSync.install diff --git a/HTPasswdSync.module b/HTPasswdSync.module index e563dec..f6fa48e 100755..100644 --- a/HTPasswdSync.module +++ b/HTPasswdSync.module @@ -118,6 +118,7 @@ function _htpasswdsync_crypt($password) { } } + /** * Checks if a file (given by path) exitsts and is writable. Returns false * on success, an error message on error. @@ -183,7 +184,7 @@ function _htpasswdsync_write_htfile(&$data, $file) { $content[] = "$u:$p"; } } - if(file_put_contents($file, implode("\n", $content) . "\n") === false) { + if(@file_put_contents($file, implode("\n", $content) . "\n") === false) { watchdog('HtPasswdSync', "Failed to write $file", WATCHDOG_ERROR); } } @@ -374,7 +375,7 @@ function htpasswdsync_help($path, $arg) { */ function htpasswdsync_permission() { return array( - 'user' => array( + 'administer htpasswdsync' => array( 'title' => t('Administer htpasswd synchronization'), 'restrict access' => true ) @@ -506,10 +507,13 @@ function htpasswdsync_admin() { ); // Small description ... + + $notewhitespaces = _htpasswdsync_names_lowercase() ? " Enter your login name without whitespaces and special characters." : ""; + $txt = t('This is how a simple .htaccess file could look like:') . "<pre>\t[...]\n" . "\tAuthType Basic\n" - . "\tAuthName \"Protected members area. Enter your login name without whitespaces and special characters.\"\n" + . "\tAuthName \"Protected members area.$notewhitespaces\"\n" ; if(_htpasswdsync_passfilename() != '') { @@ -583,11 +587,11 @@ function htpasswdsync_admin_validate($form, &$form_state) { function htpasswdsync_menu() { $items = array(); $items['admin/config/people/htpasswdsync'] = array( - 'title' => 'htasswd file synchronization', + 'title' => 'Htpasswd file synchronization', 'description' => 'Preferences for the HTPasswd Sync module', 'page callback' => 'drupal_get_form', 'page arguments' => array('htpasswdsync_admin'), - 'access arguments' => array('access administration pages'), + 'access arguments' => array('administer htpasswdsync'), ); return $items; } diff --git a/LICENSE.txt b/LICENSE.txt index 2c095c8..2c095c8 100755..100644 --- a/LICENSE.txt +++ b/LICENSE.txt diff --git a/README.txt b/README.txt index d2af52a..f468a5d 100755..100644 --- a/README.txt +++ b/README.txt @@ -73,3 +73,4 @@ None. Current maintainers: * Marc Furrer (m.fu) - http://drupal.org/user/310415 +* Stefan Wilhelm (7.x-xx) - http://drupal.org/user/1344522 |