Fixed: FS#1305 - Webdav user information is not written to domains vhost file.
| | |
| | | */ |
| | | private function _writeHtDigestFile($filename, $username, $authname, $pwdhash ) { |
| | | $changed = false; |
| | | if(is_file($filename)) { |
| | | $in = fopen($filename, 'r'); |
| | | $output = ''; |
| | | /* |
| | |
| | | $output .= $line . "\n"; |
| | | } |
| | | } |
| | | fclose($in); |
| | | } |
| | | /* |
| | | * if we didn't change anything, we have to add the new user at the end of the file |
| | | */ |
| | | if (!$changed) { |
| | | $output .= $username . ':' . $authname . ':' . $pwdhash . "\n"; |
| | | } |
| | | fclose($in); |
| | | |
| | | |
| | | /* |
| | | * Now lets write the new file |