aboutsummaryrefslogtreecommitdiff
path: root/mod/logrotate/start.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2013-03-20 17:46:50 -0700
committerCash Costello <cash.costello@gmail.com>2013-03-20 17:46:50 -0700
commit866c7ec71b9c2ef24cde71d03f52501c6ccad086 (patch)
tree7614401eabf8323de9978fc132d2c2421abacce9 /mod/logrotate/start.php
parent45cf92ffe7ae503c5fea447dba1f1ab9815f4f7f (diff)
parentde9e434c2b1e606873beaee4d6e8b851a8f59fdb (diff)
downloadelgg-866c7ec71b9c2ef24cde71d03f52501c6ccad086.tar.gz
elgg-866c7ec71b9c2ef24cde71d03f52501c6ccad086.tar.bz2
Merge pull request #5254 from beck24/log-rotate-no-delete
Allow logs to rotate without being deleted
Diffstat (limited to 'mod/logrotate/start.php')
-rw-r--r--mod/logrotate/start.php7
1 files changed, 5 insertions, 2 deletions
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');
+ }
}
/**