From eee2ae0cadf312176f90ee926acf940310661dc6 Mon Sep 17 00:00:00 2001 From: camer0n Date: Sat, 4 Nov 2023 08:15:44 -0700 Subject: [PATCH] Issue #6 - LAN_CRON_61 modified to 'token'. Minor styling improvements to cron admin area. --- e107_admin/cron.php | 20 ++++++++++---------- e107_languages/English/admin/lan_cron.php | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/e107_admin/cron.php b/e107_admin/cron.php index 32a8a494b3..4f6721594c 100644 --- a/e107_admin/cron.php +++ b/e107_admin/cron.php @@ -68,7 +68,7 @@ class cron_admin_ui extends e_admin_ui 'cron_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'text', 'data'=>'str', 'width' => '35%', 'readonly' => 1), 'cron_function' => array('title'=> LAN_CRON_2, 'type' => 'text', 'data'=>'str', '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, 'readParms'=>['mask'=>'dd MM yyyy hh:ii:ss']), + 'cron_lastrun' => array('title'=> LAN_CRON_4, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'readonly' => 2, 'readParms'=>['mask'=>'dd M yyyy hh:ii:ss']), 'cron_active' => array('title'=> LAN_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' => 'right') ); @@ -371,7 +371,7 @@ function lastRefresh() $ago = (time() - $lastload); $active = ($ago < 1200) ? true : false; // longer than 20 minutes, so lets assume it's inactive. - $status = ($active) ? LAN_ENABLED : LAN_DISABLED; // "Enabled" : "Offline"; + $status = ($active) ? "".LAN_ENABLED."" : "".LAN_DISABLED.""; // "Enabled" : "Offline"; $mins = floor($ago / 60); $secs = $ago % 60; @@ -381,12 +381,12 @@ function lastRefresh() $lastRun = ($mins) ? str_replace($srch,$repl,LAN_CRON_9) : str_replace($srch,$repl,LAN_CRON_10); // FIX: check syntax - $lastRefresh = ($ago < 10000) ? $lastRun : LAN_NEVER; + $lastRefresh = ($ago < 10000) ? "

$lastRun(".date('g:i A',$lastload).")" : "".LAN_NEVER.""; - $mes->addInfo(LAN_STATUS.": ".$status.""); - $mes->addInfo(LAN_CRON_11.": ".$this->activeCrons.""); - $mes->addInfo(LAN_CRON_12.": ".$lastRefresh."

"); - + $mes->addInfo('

'.LAN_STATUS.":".$status."

"); + $mes->addInfo('

'.LAN_CRON_11.":".$this->activeCrons."


"); + $mes->addInfo(LAN_CRON_12.":".$lastRefresh."

"); + // extensions of exe, com, bat and cmd. @@ -403,10 +403,10 @@ function lastRefresh() } elseif (!$active) // show instructions { - $setpwd_message = $frm->open("generate")."" - .LAN_CRON_15.":
".e_ROOT."cron.php token=".$pref['e_cron_pwd'].' >/dev/null 2>&1';
+				$setpwd_message = $frm->open("generate").LAN_CRON_15.":
+				
".e_ROOT."cron.php token=".$pref['e_cron_pwd'].' >/dev/null 2>&1';
 				
-				$setpwd_message .= "
". LAN_CRON_16.""; + $setpwd_message .= "
". LAN_CRON_16; if(e_DOMAIN && file_exists("/usr/local/cpanel/version")) { $setpwd_message .= "
".LAN_CRON_60."
"; diff --git a/e107_languages/English/admin/lan_cron.php b/e107_languages/English/admin/lan_cron.php index 47f85e3a8f..3adc68d2b6 100644 --- a/e107_languages/English/admin/lan_cron.php +++ b/e107_languages/English/admin/lan_cron.php @@ -92,7 +92,7 @@ define("LAN_CRON_56", "Database Backup Complete"); define("LAN_CRON_60", "Go to cPanel"); -define("LAN_CRON_61", "Generate new cron password"); +define("LAN_CRON_61", "Generate new cron token"); define("LAN_CRON_62", "Executing config function [b][x][/b]"); define("LAN_CRON_63", "Config function [b][x][/b] NOT found."); define("LAN_CRON_64", "An administrator can automate tasks using e107 Schedule Tasks. [br]