| 1 |
<?php |
<?php |
| 2 |
// $Id: user_stats.module,v 1.2.2.19 2008/11/16 18:38:36 liammcdermott Exp $ |
// $Id: user_stats.module,v 1.2.2.20 2009/02/01 03:44:11 liammcdermott Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 40 |
'type' => MENU_NORMAL_ITEM, |
'type' => MENU_NORMAL_ITEM, |
| 41 |
); |
); |
| 42 |
$items[] = array( |
$items[] = array( |
| 43 |
'path' => 'admin/settings/user_stats/reset', |
'path' => 'admin/settings/user_stats/reset_post_count', |
| 44 |
'title' => t('reset user post stats'), |
'title' => t('reset user post stats'), |
| 45 |
'callback' => 'user_stats_reset_post_count', |
'callback' => 'user_stats_reset_post_count', |
|
//'callback arguments' => array('user_stats_reset_postcount_confirm'), |
|
| 46 |
'access' => user_access('administer user stats'), |
'access' => user_access('administer user stats'), |
| 47 |
'type' => MENU_CALLBACK, |
'type' => MENU_CALLBACK, |
| 48 |
); |
); |
| 49 |
$items[] = array( |
$items[] = array( |
| 50 |
'path' => 'admin/settings/user_stats/reset_logins', |
'path' => 'admin/settings/user_stats/reset_login_count', |
| 51 |
'title' => t('reset user login stats'), |
'title' => t('reset user login stats'), |
| 52 |
'callback' => 'user_stats_reset_login_count', |
'callback' => 'user_stats_reset_login_count', |
|
//'callback arguments' => array('user_stats_reset_logincount_confirm'), |
|
| 53 |
'access' => user_access('administer user stats'), |
'access' => user_access('administer user stats'), |
| 54 |
'type' => MENU_CALLBACK, |
'type' => MENU_CALLBACK, |
| 55 |
); |
); |
| 179 |
/** |
/** |
| 180 |
* Reset post count handler. |
* Reset post count handler. |
| 181 |
*/ |
*/ |
| 182 |
function user_stats_reset_post_count_confirm_submit() { |
function user_stats_reset_post_count() { |
| 183 |
variable_set('user_stats_rebuild_stats', TRUE); |
variable_set('user_stats_rebuild_stats', TRUE); |
| 184 |
user_stats_reset_counts('user_post_count'); |
user_stats_reset_counts('user_post_count'); |
| 185 |
drupal_set_message(t('Post counts have been reset.')); |
drupal_set_message(t('Post counts have been reset.')); |