lupo49 / dokuwiki-plugin-upload

Includes file upload into wikipages depending on the user rights.
0 stars 5 forks source link

Uploadfail error message on pages without upload-privilege (also when nothing uploaded) #2

Open loookin opened 10 years ago

loookin commented 10 years ago

Hi, I installed this great plugin (thanks for it ;-)), but all users, which have lower than upload privilege see uploadfail error message. It is on Firefox 26.0 + Apache and it is because _hook_function_upload is called every time the page is loaded, also when no file was send.

I think, it can be solved with simple checking _FILES variable for containing some sended file before checking privileges. When no file was send, it is not necessary to check privilege and have upload privilege.

Thanks! (and sorry for my bad english) ;-)