diff options
author | stfwi <cerberos@atwillys.de> | 2011-06-27 13:02:15 +0100 |
---|---|---|
committer | stfwi <cerberos@atwillys.de> | 2011-06-27 13:02:15 +0100 |
commit | 00083c1f9c6bee2207afd4bd38c601bc3a64e959 (patch) | |
tree | 5cf717cda1e16d6df2856981a250630be0a59ff4 /HTPasswdSync.module | |
parent | cb77f9e5f444f088c9c9dc49e7110aeaea6db3de (diff) | |
download | drupal_htpasswdsync-00083c1f9c6bee2207afd4bd38c601bc3a64e959.tar.gz drupal_htpasswdsync-00083c1f9c6bee2207afd4bd38c601bc3a64e959.tar.bz2 drupal_htpasswdsync-00083c1f9c6bee2207afd4bd38c601bc3a64e959.zip |
Help text now read from README.txt and exposed in help pages
Diffstat (limited to 'HTPasswdSync.module')
-rw-r--r-- | HTPasswdSync.module | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/HTPasswdSync.module b/HTPasswdSync.module index 29a2e35..9777d1e 100644 --- a/HTPasswdSync.module +++ b/HTPasswdSync.module @@ -343,12 +343,12 @@ function _htpasswdsync_delete($account) { * @return none */ function _htpasswdsync_validate($edit, $account) { - if(isset($edit['name'])) { - if (ereg('[:[:space:]]', $edit['name'])) { - form_set_error('htpasswdsync', - t('The username contains an illegal character, like <space>, :')); + if(isset($edit['name'])) { + if (ereg('[:[:space:]]', $edit['name'])) { + form_set_error('htpasswdsync', + t('The username contains an illegal character, like <space>, :')); + } } - } } @@ -359,13 +359,8 @@ function _htpasswdsync_validate($edit, $account) { * @return string */ function htpasswdsync_help($path, $arg) { - $output = ''; //declare your output variable - switch ($path) { - case "admin/help#htpasswdsync": - $output = '<p>'. t("synchronize password with a htpasswd file") .'</p>'; - break; - } - return $output; + if($path != 'admin/help#htpasswdsync') return ''; + return '<pre>' . htmlspecialchars(@file_get_contents(dirname(__FILE__) . '/README.txt'), null, 'UTF-8') . '</pre>'; } |