The current behaviour of protecting a folder only modifies adds the
relevant .htaccess configuration lines if the file doesn't already
exist. In the case that it exists, no change is made and it appears to
"not work" for users.
This commit improves the feedbackup to users about what is happening,
and gives them the necessary information to modify their custom
.htaccess file with the appropriate configuration lines.
Current error messages that are shown and logged when a problem occurs
when creating htaccess and htpasswd files for a protected dir are really
not helpful.
The messages don't even mention which file caused the error.
Sometimes when the files can't be created, it's not because they're
already present, for example when there's a permission error.
Also we've already verified that they are absent with file_exists so
the current error message is not accurate at all!
To empower users, we need to give them more details about the error. For
that we want to show the error that the file creation logged itself.
Finally, we've already verified that the htacces file already exists, so
there's no point in using touch beforehand. We should just let fopen try
to create the file and report whatever went wrong if anything happens.
Plus simple à gérer pour modifier le html, plus facile à surcharger dans l'optique
de permettre de mettre des préférences.
Active se souvenir pour la session des préférences de menu.
Passe le stockage dans la session de php serialize à json
- warning de variables non existantes
Un peu d'ergonomie :
- quelques mini-patchs de présentation
- quand on génére un mot de passe, ça le colle dans les textbox adéquats
Le problème se posait lorsque le répertoire qu’on voulait protéger contenait un espace dans son chemin.
Apache ne pouvait alors accéder un .htpasswd
L’ajout de double quote dans le .htaccess règle le pb.