From aefce16b306505c6cfed8d87e975b2c9680559b4 Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 29 Nov 2010 02:53:32 +0000 Subject: cleaned up some of the other smaller plugins git-svn-id: http://code.elgg.org/elgg/trunk@7468 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/logrotate/languages/en.php | 35 ++++--- mod/logrotate/start.php | 101 ++++++++++----------- .../views/default/settings/logrotate/edit.php | 12 ++- 3 files changed, 76 insertions(+), 72 deletions(-) (limited to 'mod/logrotate') diff --git a/mod/logrotate/languages/en.php b/mod/logrotate/languages/en.php index 5efb51639..e60d1b841 100644 --- a/mod/logrotate/languages/en.php +++ b/mod/logrotate/languages/en.php @@ -1,20 +1,19 @@ 'How often should the system log be archived?', - - 'logrotate:weekly' => 'Once a week', - 'logrotate:monthly' => 'Once a month', - 'logrotate:yearly' => 'Once a year', - - 'logrotate:logrotated' => "Log rotated\n", - 'logrotate:lognotrotated' => "Error rotating log\n", - ); - - add_translation("en",$english); -?> \ No newline at end of file +$english = array( + 'logrotate:period' => 'How often should the system log be archived?', + + 'logrotate:weekly' => 'Once a week', + 'logrotate:monthly' => 'Once a month', + 'logrotate:yearly' => 'Once a year', + + 'logrotate:logrotated' => "Log rotated\n", + 'logrotate:lognotrotated' => "Error rotating log\n", +); + +add_translation("en", $english); \ No newline at end of file diff --git a/mod/logrotate/start.php b/mod/logrotate/start.php index 485f53f49..28c1694eb 100644 --- a/mod/logrotate/start.php +++ b/mod/logrotate/start.php @@ -1,56 +1,53 @@ \ No newline at end of file + + if (!archive_log($offset)) { + $resulttext = elgg_echo("logrotate:lognotrotated"); + } + + return $returnvalue . $resulttext; +} diff --git a/mod/logrotate/views/default/settings/logrotate/edit.php b/mod/logrotate/views/default/settings/logrotate/edit.php index 19b92c320..db439eaa0 100644 --- a/mod/logrotate/views/default/settings/logrotate/edit.php +++ b/mod/logrotate/views/default/settings/logrotate/edit.php @@ -1,6 +1,14 @@ period; - if (!$period) $period = 'monthly'; +/** + * Elgg log rotator plugin settings. + * + * @package ElggLogRotate + */ + +$period = $vars['entity']->period; +if (!$period) { + $period = 'monthly'; +} ?>

-- cgit v1.2.3