No Support > Scheduled for cpg1.5.x

Admin tools

(1/2) > >>

enquirer64:
Default might be 'No action...' would avoid accidental deletion of all viewer stats.

Hein Traag:
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

Hein Traag:

--- Code: ---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';

}
--- End code ---

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

Joachim Müller:
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.

enquirer64:
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

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.

Navigation

[0] Message Index

[#] Next page

Go to full version