diff --git a/e107_admin/banlist.php b/e107_admin/banlist.php
index f53a6e6e5..b7dde2a4c 100644
--- a/e107_admin/banlist.php
+++ b/e107_admin/banlist.php
@@ -263,7 +263,7 @@ else
/**
* Create dropdown with options for ban time - uses internal fixed list of reasonable values
*/
-function ban_time_dropdown($click_js = '', $zero_text = BANLAN_21, $curval = -1, $drop_name = 'ban_time')
+function ban_time_dropdown($click_js = '', $zero_text = LAN_NEVER, $curval = -1, $drop_name = 'ban_time')
{
global $frm;
$intervals = array(0, 1, 2, 3, 6, 8, 12, 24, 36, 48, 72, 96, 120, 168, 336, 672);
@@ -274,7 +274,7 @@ function ban_time_dropdown($click_js = '', $zero_text = BANLAN_21, $curval = -1,
{
if ($i == 0)
{
- $words = $zero_text ? $zero_text : BANLAN_21;
+ $words = $zero_text ? $zero_text : LAN_NEVER;
}
elseif (($i % 24) == 0)
{
@@ -656,7 +656,7 @@ switch ($action)
if ($action == 'edit' || $action == 'add')
{
- $inhelp = (($action == 'edit') ? '
'.BANLAN_26.($banlist_banexpires ? strftime($pref['ban_date_format'], $banlist_banexpires) : BANLAN_21).'
' : '');
+ $inhelp = (($action == 'edit') ? ''.BANLAN_26.($banlist_banexpires ? strftime($pref['ban_date_format'], $banlist_banexpires) : LAN_NEVER).'
' : '');
$text .= "
@@ -897,7 +897,7 @@ switch ($action)
$val = e107::getIPHandler()->ipDecode($row['banlist_ip'])."
".$fv.": ".$row['banlist_reason'];
break;
case 'banlist_banexpires':
- $val = ($row['banlist_banexpires'] ? strftime($pref['ban_date_format'], $row['banlist_banexpires']).(($row['banlist_banexpires'] < time()) ? ' ('.BANLAN_34.')' : '') : BANLAN_21)."
".ban_time_dropdown("onchange=\"e107Helper.urlJump('".e_SELF."?newtime-{$row['banlist_ip']}-'+this.value)\"");
+ $val = ($row['banlist_banexpires'] ? strftime($pref['ban_date_format'], $row['banlist_banexpires']).(($row['banlist_banexpires'] < time()) ? ' ('.BANLAN_34.')' : '') : LAN_NEVER)."
".ban_time_dropdown("onchange=\"e107Helper.urlJump('".e_SELF."?newtime-{$row['banlist_ip']}-'+this.value)\"");
break;
case 'ban_options':
$row_class = ' class="center"';
diff --git a/e107_admin/cron.php b/e107_admin/cron.php
index 78a00d7c0..0757c40dd 100644
--- a/e107_admin/cron.php
+++ b/e107_admin/cron.php
@@ -74,16 +74,13 @@ class cron_admin_ui extends e_admin_ui
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
'cron_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> FALSE, 'nolist'=>TRUE),
'cron_category' => array('title'=> LAN_CATEGORY, 'type' => 'method', 'data' => 'str', 'width'=>'auto','readonly' => 1, 'thclass' => '', 'batch' => TRUE, 'filter'=>TRUE),
-
- 'cron_name' => array('title'=> "Name", 'type' => 'text', 'width' => 'auto', 'readonly' => 1),
-
- 'cron_description' => array('title'=> "Description", 'type' => 'text', 'width' => '35%', 'readonly' => 1),
-
- 'cron_function' => array('title'=> "Function", 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'readonly' => 1),
- 'cron_tab' => array('title'=> "Tab", 'type' => 'method', 'width' => 'auto'), // Display name
- 'cron_lastrun' => array('title'=> "Last-run", 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'readonly' => 2),
- 'cron_active' => array('title'=> "Active", 'type' => 'boolean', 'data'=> 'int', 'thclass' => 'center', 'class'=>'center', 'filter' => true, 'batch' => true, 'width' => 'auto'),
- 'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'data'=> null, 'noedit'=>TRUE, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center')
+ 'cron_name' => array('title'=> LAN_CRON_1, 'type' => 'text', 'width' => 'auto', 'readonly' => 1),
+ 'cron_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'text', 'width' => '35%', 'readonly' => 1),
+ 'cron_function' => array('title'=> LAN_CRON_2, 'type' => 'text', 'width' => 'auto', 'thclass' => 'left first', 'readonly' => 1),
+ 'cron_tab' => array('title'=> LAN_CRON_3, 'type' => 'method', 'width' => 'auto'), // Display name
+ 'cron_lastrun' => array('title'=> LAN_CRON_4, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'readonly' => 2),
+ 'cron_active' => array('title'=> LAN_CRON_5, 'type' => 'boolean', 'data'=> 'int', 'thclass' => 'center', 'class'=>'center', 'filter' => true, 'batch' => true, 'width' => 'auto'),
+ 'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'data'=> null, 'noedit'=>TRUE, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center')
);
@@ -126,36 +123,36 @@ class cron_admin_ui extends e_admin_ui
$cronDefaults['_system'] = array(
0 => array(
- 'name' => 'Test Email',
+ 'name' => LAN_CRON_01_2,
'function' => 'sendEmail',
'category' => 'mail',
- 'description' => 'Send a test email to '.$pref['siteadminemail'].'
Recommended to test the scheduling system.'
+ 'description' => str_replace("[eml]",$pref['siteadminemail'],LAN_CRON_01_2) ."
". LAN_CRON_01_3
),
1 => array(
- 'name' => 'Mail Queue',
+ 'name' => LAN_CRON_02_1,
'category' => 'mail',
'function' => 'procEmailQueue',
- 'description' => 'Process mail queue'
+ 'description' => LAN_CRON_02_2
),
2 => array(
- 'name' => 'Mail Bounce Check',
+ 'name' => LAN_CRON_03_1,
'category' => 'mail',
'function' => 'procEmailBounce',
- 'description' => 'Check for bounced emails',
+ 'description' => LAN_CRON_03_2
// 'available' => vartrue($pref['mail_bounce_auto'])
),
3 => array(
- 'name' => 'Ban Retrigger Check',
+ 'name' => LAN_CRON_04_1,
'category' => 'user',
'function' => 'procBanRetrigger',
- 'description' => 'Process bounce retriggers
Only needed if retriggering of bans enabled.',
+ 'description' => LAN_CRON_04_2 ."
". LAN_CRON_04_3,
'available' => e107::getPref('ban_retrigger')
),
4 => array(
- 'name' => 'Database Backup',
+ 'name' => LAN_CRON_05_1,
'category' => 'backup',
'function' => 'dbBackup',
- 'description' => 'Backup the system database to '.e_SYSTEM.'backups/',
+ 'description' => LAN_CRON_05_1 . '.e_SYSTEM.'."backups/",
'available' => e107::getPref('ban_retrigger')
),
);
@@ -251,11 +248,11 @@ class cron_admin_ui extends e_admin_ui
if(!$sql->db_Insert('cron',$insert))
{
- e107::getMessage()->add("Couldn't Import Prefs", E_MESSAGE_ERROR);
+ e107::getMessage()->add(LAN_CRON_6, E_MESSAGE_ERROR);
}
else
{
- e107::getMessage()->add("Imported: ".$insert['cron_function'], E_MESSAGE_INFO);
+ e107::getMessage()->add(LAN_CRON_8.":".$insert['cron_function'], E_MESSAGE_INFO);
}
}
@@ -268,7 +265,7 @@ class cron_admin_ui extends e_admin_ui
{
// print_a($insert);
// return;
-//
+
$sql = e107::getDb();
$cron_function = $insert['cron_function'];
@@ -276,11 +273,11 @@ class cron_admin_ui extends e_admin_ui
if($sql->db_Update('cron',$insert)===FALSE)
{
- e107::getMessage()->add("Couldn't Import Timing Settings", E_MESSAGE_ERROR);
+ e107::getMessage()->add(LAN_CRON_7, E_MESSAGE_ERROR);
}
else
{
- e107::getMessage()->add("Imported Timing Settings for: ".$cron_function, E_MESSAGE_INFO);
+ e107::getMessage()->add(LAN_CRON_8.$cron_function, E_MESSAGE_INFO);
}
}
@@ -325,16 +322,19 @@ class cron_admin_ui extends e_admin_ui
$mins = floor($ago / 60);
$secs = $ago % 60;
+
+ $srch = array("[x]","[y]");
+ $repl = array($mins,$secs);
- $lastRun = ($mins) ? $mins." minutes and ".$secs." seconds ago." : $secs." seconds ago.";
+ $lastRun = ($mins) ? str_replace($srch,$repl,LAN_CRON_10) : str_replace($srch,$repl,LAN_CRON_11); // FIX: check syntax
+
+ $lastRefresh = ($ago < 10000) ? $lastRun : LAN_NEVER;
- $lastRefresh = ($ago < 10000) ? $lastRun : 'Never';
-
- $mes->add("Status: ".$status."", E_MESSAGE_INFO);
+ $mes->add(LAN_STATUS.":".$status."", E_MESSAGE_INFO);
- $mes->add("Active Crons: ".$this->activeCrons."", E_MESSAGE_INFO);
- $mes->add("Last cron refresh: ".$lastRefresh, E_MESSAGE_INFO);
+ $mes->add(LAN_CRON_12.": ".$this->activeCrons."", E_MESSAGE_INFO);
+ $mes->add(LAN_CRON_13.": ".$lastRefresh, E_MESSAGE_INFO);
//FIXME: for Windows, the is_executable() function only checks the file
// extensions of exe, com, bat and cmd.
@@ -343,16 +343,15 @@ class cron_admin_ui extends e_admin_ui
$actualPerm = substr(decoct(fileperms(e_BASE."cron.php")),3);
if($isWin)
{
- $mes->add("Please be sure cron.php is executable.", E_MESSAGE_WARNING);
+ $mes->add(LAN_CRON_14, E_MESSAGE_WARNING);
}
if (!$isWin && $actualPerm != 755) // is_executable() is not reliable.
{
- $mes->add("Please CHMOD /cron.php to 755 ", E_MESSAGE_WARNING);
+ $mes->add(LAN_CRON_15, E_MESSAGE_WARNING);
}
elseif (!$active) // show instructions
{
- $setpwd_message = "Use the following Cron Command: ".rtrim($_SERVER['DOCUMENT_ROOT'], '/').e_HTTP."cron.php ".$pref['e_cron_pwd']."
- Using your server control panel (eg. cPanel,Plesk etc.) please create a crontab to run this command on your server every minute.";
+ $setpwd_message = LAN_CRON_16.": ".rtrim($_SERVER['DOCUMENT_ROOT'], '/').e_HTTP."cron.php ".$pref['e_cron_pwd']."
". LAN_CRON_17;
$mes->add($setpwd_message, E_MESSAGE_INFO);
}
@@ -388,7 +387,7 @@ class cron_admin_ui extends e_admin_ui
}
$class_name .= '_cron';
$status = $this->cronExecuteMethod($class_name, $method_name) ? E_MESSAGE_SUCCESS : E_MESSAGE_ERROR;
- $mes->add("Running ".$cron_name."", $status);
+ $mes->add(LAN_CRON_RUNNING.":".$cron_name."", $status);
}
@@ -427,30 +426,30 @@ class cron_admin_form_ui extends e_admin_form_ui
{
var $min_options = array(
- "*" => LAN_CRON_11,
- "0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58" => LAN_CRON_12,
- "0,5,10,15,20,25,30,35,40,45,50,55" => LAN_CRON_13,
- "0,10,20,30,40,50" => LAN_CRON_14,
- "0,15,30,45" => LAN_CRON_10,
- "0,30" => LAN_CRON_15
+ "*" => LAN_CRON_30,
+ "0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58" => LAN_CRON_31,
+ "0,5,10,15,20,25,30,35,40,45,50,55" => LAN_CRON_32,
+ "0,10,20,30,40,50" => LAN_CRON_33,
+ "0,15,30,45" => LAN_CRON_34,
+ "0,30" => LAN_CRON_35
);
var $hour_options = array(
- "*" => LAN_CRON_16,
- "0,2,4,6,8,10,12,14,16,18,20,22" => LAN_CRON_17,
- "0,3,6,9,12,15,18,21" => LAN_CRON_18,
- "0,6,12,18" => LAN_CRON_19
+ "*" => LAN_CRON_36,
+ "0,2,4,6,8,10,12,14,16,18,20,22" => LAN_CRON_37,
+ "0,3,6,9,12,15,18,21" => LAN_CRON_38,
+ "0,6,12,18" => LAN_CRON_39
);
var $cronCategories = array(
- 'backup' => 'Backup',
+ 'backup' => LAN_CRON_BACKUP,
'content' => ADLAN_CL_3,
- 'log' => 'Logging',
+ 'log' => LAN_CRON_LOGGING,
'mail' => ADLAN_136,
'notify' => ADLAN_149,
'user' => LAN_USER,
- 'plugin' => 'Plugins'
+ 'plugin' => ADLAN_CL_7
);
/**
@@ -462,15 +461,15 @@ class cron_admin_form_ui extends e_admin_form_ui
{
$sep = array();
list($min, $hour, $day, $month, $weekday) = explode(" ", $curVal);
- $text = (isset($this->min_options[$min])) ? $this->min_options[$min] : LAN_CRON_3.$min;
+ $text = (isset($this->min_options[$min])) ? $this->min_options[$min] : LAN_CRON_50.$min;
$text .= "
";
- $text .= (isset($this->hour_options[$hour])) ? $this->hour_options[$hour] : LAN_CRON_4.$hour;
+ $text .= (isset($this->hour_options[$hour])) ? $this->hour_options[$hour] : LAN_CRON_51.$hour;
$text .= "
";
- $text .= ($day != '*') ? LAN_CRON_5.$day : LAN_CRON_20;
+ $text .= ($day != '*') ? LAN_CRON_52.$day : LAN_CRON_40;
$text .= "
";
- $text .= ($month != '*') ? strftime("%B", mktime(00, 00, 00, $month, 1, 2000)) : LAN_CRON_21;
+ $text .= ($month != '*') ? strftime("%B", mktime(00, 00, 00, $month, 1, 2000)) : LAN_CRON_41;
$text .= "
";
- $text .= ($weekday != '*') ? strftime("%A", mktime(00, 00, 00, 5, $weekday, 2000)) : LAN_CRON_22;
+ $text .= ($weekday != '*') ? strftime("%A", mktime(00, 00, 00, 5, $weekday, 2000)) : LAN_CRON_42;
return $text;
}
@@ -605,7 +604,7 @@ class cron_admin_form_ui extends e_admin_form_ui
$sel_day = ($day[0] == "*") ? "selected='selected'" : "";
- $text .= "\n"; // Every Day
+ $text .= "\n"; // Every Day
for ($i = 1; $i <= 31; $i++)
{
$sel = (in_array($i, $day)) ? "selected='selected'" : "";
@@ -616,7 +615,7 @@ class cron_admin_form_ui extends e_admin_form_ui