| 1 |
<?php |
<?php |
| 2 |
// $Id: search_keywords.module,v 1.14 2006/09/14 09:03:07 sugree Exp $ |
// $Id: search_keywords.module,v 1.17 2007/01/03 01:48:51 sugree Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 43 |
* Implementation of hook_perm(). |
* Implementation of hook_perm(). |
| 44 |
*/ |
*/ |
| 45 |
function search_keywords_perm() { |
function search_keywords_perm() { |
| 46 |
return array('view search keywords'); |
return array('access search keywords'); |
| 47 |
} |
} |
| 48 |
|
|
| 49 |
/** |
/** |
| 52 |
function search_keywords_menu($may_cache) { |
function search_keywords_menu($may_cache) { |
| 53 |
$items = array(); |
$items = array(); |
| 54 |
|
|
| 55 |
$access = user_access('access search_keywords'); |
$access = user_access('access search keywords'); |
| 56 |
if ($may_cache) { |
if ($may_cache) { |
| 57 |
$items[] = array('path' => 'admin/logs/search_keywords', 'title' => t('recent keywords'), |
$items[] = array('path' => 'admin/logs/search_keywords', 'title' => t('recent keywords'), |
| 58 |
'callback' => 'search_keywords_recent_keywords', 'access' => $access, |
'callback' => 'search_keywords_recent_keywords', 'access' => $access, |
| 117 |
*/ |
*/ |
| 118 |
function search_keywords_cron() { |
function search_keywords_cron() { |
| 119 |
/* clean expired access logs */ |
/* clean expired access logs */ |
| 120 |
db_query('DELETE FROM {accesslog} WHERE timestamp < %d', time() - variable_get('search_keywords_flush_accesslog_timer', 259200)); |
db_query('DELETE FROM {search_keywords_log} WHERE timestamp < %d', time() - variable_get('search_keywords_flush_accesslog_timer', 259200)); |
| 121 |
} |
} |
| 122 |
|
|
| 123 |
/** |
/** |