mirror of
https://github.com/moodle/moodle.git
synced 2025-03-23 00:50:15 +01:00
Merge branch 'MDL-68714-master' of https://github.com/andrewnicols/moodle
This commit is contained in:
commit
5a3b9d64dd
@ -154,7 +154,7 @@ function cli_get_params(array $longoptions, array $shortmapping=null) {
|
||||
* @param string $suffix process suffix
|
||||
*/
|
||||
function cli_set_process_title_suffix(string $suffix) {
|
||||
if (defined('CLI_SCRIPT') && isset($_SERVER['argv'])) {
|
||||
if (CLI_SCRIPT && function_exists('cli_set_process_title') && isset($_SERVER['argv'])) {
|
||||
$command = join(' ', $_SERVER['argv']);
|
||||
@cli_set_process_title("php $command ($suffix)");
|
||||
}
|
||||
|
@ -383,7 +383,7 @@ function cron_run_inner_adhoc_task(\core\task\adhoc_task $task) {
|
||||
*/
|
||||
function cron_set_process_title(string $title) {
|
||||
global $CFG;
|
||||
if (defined('CLI_SCRIPT')) {
|
||||
if (CLI_SCRIPT) {
|
||||
require_once($CFG->libdir . '/clilib.php');
|
||||
$datetime = userdate(time(), '%b %d, %H:%M:%S');
|
||||
cli_set_process_title_suffix("$datetime $title");
|
||||
|
Loading…
x
Reference in New Issue
Block a user