forum.coppermine-gallery.net

No Support => Feature requests => Scheduled for cpg1.5.x => Topic started by: enquirer64 on November 13, 2006, 02:05:43 pm

Title: Admin tools
Post by: enquirer64 on November 13, 2006, 02:05:43 pm
Default might be 'No action...' would avoid accidental deletion of all viewer stats.
Title: Re: Admin tools
Post by: Hein Traag on November 13, 2006, 02:12:31 pm
Would you mind telling what happened. I use Admin Tools regularly but never had trouble
with user viewer stats being deleted by accident.

Cheers!
Hein
Title: Re: Admin tools
Post by: Hein Traag on November 13, 2006, 05:09:53 pm
Code: [Select]
function reset_views()
{
        global $CONFIG, $lang_util_php;

        $albumid = (isset($_POST['albumid'])) ? $_POST['albumid'] : 0;
        $albstr = ($albumid) ? "WHERE aid = $albumid" : '';

        if (cpg_db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET hits ='0' $albstr")) echo 'Reset successful';

}

Indeed this function is selected automaticly, i did not check good enough (my bad). Is the above code adjustable to turn the radio button into a box which you can tick if you want to delete views ?

Cheers!
Hein
Title: Re: Admin tools
Post by: Joachim Müller on November 13, 2006, 05:47:47 pm
I marked this thread as being "valid" and moved it to the "scheduled for cpg1.5.x" sub-board, which means that the admin tools will be overhauled in future versions.
Please keep in mind that there's no support on the feature requests board. It should be pretty straightforward though to hack the file util.php to have no default action pre-selected.
Title: Re: Admin tools
Post by: enquirer64 on November 13, 2006, 08:37:11 pm
Thanks some helpful input for which I lost 2 Karma points though.

The thing is this:

We all try and be vigilant when using Admin Tools. The thing is that sometimes one is tired or, I admit, not concentrating fully - baby crying or whatever - and instead of hitting a back button one hits 'Submit' knowing that one has engaged nothing and changed nothing. Then suddenly - hey presto - all one's stats are zeroed....

Explained in this post: http://forum.coppermine-gallery.net/index.php?topic=34002.0 (http://forum.coppermine-gallery.net/index.php?topic=34002.0)

I intend to hack the file... as a human failing is that one forgets... one is tired... and then... all one's views are lost which could be very depressing to say the least/ Thanks for the input.
Title: Re: Admin tools
Post by: Joachim Müller on November 13, 2006, 11:05:30 pm
You didn't get negative karma rating for starting this thread, but for your postings on other threads. Karma rating is a tool for supporters to mark users who do not respect board rules. It's entirely up to us to give karma rating - after all, you're a guest here who gets free support and who is allowed to voice your opinion if you respect board rules. Cluttering this thread with a meta discussion about karma will not improve your karma, nor is it helpful to improve Coppermine. Review the threads that contain previous karma discussions if you're interessted to find out more about it, but please leave this discussion out of this thread.
I understand that you want to see the behaviour of the admin tools changed and I already told you that your request is valid and the behaviour is going to be changed in future versions. What else could I possibly say? As suggested, there's no support on the feature requests board. You request got noted and approved, that's it. Locking.
Title: Re: Admin tools
Post by: Tranz on November 15, 2006, 04:03:45 am
Personally, I see this as a flaw in the html code, so could the fix (http://forum.coppermine-gallery.net/index.php?topic=34002.msg181573#msg181573) not be implemented in 1.4?