aboutsummaryrefslogtreecommitdiff
path: root/mod/logrotate
diff options
context:
space:
mode:
Diffstat (limited to 'mod/logrotate')
-rw-r--r--mod/logrotate/languages/en.php1
-rw-r--r--mod/logrotate/start.php7
-rw-r--r--mod/logrotate/views/default/plugins/logrotate/settings.php1
3 files changed, 7 insertions, 2 deletions
diff --git a/mod/logrotate/languages/en.php b/mod/logrotate/languages/en.php
index 27731d732..3af83e553 100644
--- a/mod/logrotate/languages/en.php
+++ b/mod/logrotate/languages/en.php
@@ -20,6 +20,7 @@ $english = array(
'logrotate:week' => 'week',
'logrotate:month' => 'month',
'logrotate:year' => 'year',
+ 'logrotate:never' => 'never',
'logrotate:logdeleted' => "Log deleted\n",
'logrotate:lognotdeleted' => "Error deleting log\n",
diff --git a/mod/logrotate/start.php b/mod/logrotate/start.php
index 28f14ad14..313cf1fd5 100644
--- a/mod/logrotate/start.php
+++ b/mod/logrotate/start.php
@@ -21,8 +21,11 @@ function logrotate_init() {
// Register cron hook for archival of logs
elgg_register_plugin_hook_handler('cron', $period, 'logrotate_archive_cron');
- // Register cron hook for deletion of selected archived logs
- elgg_register_plugin_hook_handler('cron', $delete, 'logrotate_delete_cron');
+
+ if ($delete != 'never') {
+ // Register cron hook for deletion of selected archived logs
+ elgg_register_plugin_hook_handler('cron', $delete, 'logrotate_delete_cron');
+ }
}
/**
diff --git a/mod/logrotate/views/default/plugins/logrotate/settings.php b/mod/logrotate/views/default/plugins/logrotate/settings.php
index bef8b308d..9fd3e08df 100644
--- a/mod/logrotate/views/default/plugins/logrotate/settings.php
+++ b/mod/logrotate/views/default/plugins/logrotate/settings.php
@@ -40,6 +40,7 @@ if (!$delete) {
'weekly' => elgg_echo('logrotate:week'),
'monthly' => elgg_echo('logrotate:month'),
'yearly' => elgg_echo('logrotate:year'),
+ 'never' => elgg_echo('logrotate:never'),
),
'value' => $delete,
));