I'm using zenphoto version 1.2.5_RC2 [4019] since about one year.
I'm very happy with it and I want to thanks again all the developers for their work.
Now I've found a small problem in this plugin.
I had a look to the latest version of ZP and it seems still present, so I bring it to your attention.
If you remove your rating without insert a new value the total_votes in database remains the same as it was before, so next time you (or someone else) vote the value is divided by actual total votes + 1.
The solution I found is to add this line in update.php:
if (!$rating) {$voting = -1;}
at line 71 in my version of the plugin or at line 78 in the latest (official) version.
Thank you for your report. Unfortunately, my copy of the current version of the plugin script file does not go to line 78 (or even line 71) so I fear there is no action we can take on your report.
Just FYI, 1.2.5_RC2 is not even an official release of the 1.2.5 version of Zenphoto much less a curent version (1.2.9, soon to be 1.3.0.)
Yes, I know I should update. I want to test the new version of ZP on my local server but I have no time atm.
Anyway if you want to check what I am sayng the line in the latest SVN is N. 41.
Near the end of the script, after
35 if ($oldrating) { 36 $voting = 0; 37 $valuechange = $rating-$oldrating; 38 if ($valuechange>=0) { 39 $valuechange = '+'.$valuechange; 40 }
and before
41 } else { 42 $voting = 1; 43 $valuechange = '+'.$rating; 44 } ..
To me the issue is still present. I've installed the latest SVN on local server just to check this. The solution works here too.
Note that this appens only if you retire your vote, not if you just change it.