jam...@te... wrote:
>
>>The reason that is happening is that you have not called
>>&create_user_config_dirs() before &header() , which creates
>>the ~/.usermin/modulename directory in which per-user preferences
>>are saved.
>>
>>I have to admit that this isn't documented anywhere :) So I'll add
>>a note to the module writer's docs about it ..
>>
>
> Hi Jamie,
>
> I wonder if it might be better to have create_user_config_dirs() called as
> part
> of init_config()? This way writers of webmin modules just inherit this
> functionality. I have not looked closely at the above function so this is
> only a comment based on instinct.
I considered that, but not all modules need the .usermin/modulename directory
created so it would be an unncessary expense to check for it in every module.
In mine, what I usually do is include a call to it in the module-lib.pl just after
&init_config and possibly &switch_to_remote_user
- Jamie
|