Skip to content

Commit

Permalink
PHP 8.1: Subject website - Deprecated error #677931
Browse files Browse the repository at this point in the history
  • Loading branch information
sammarshallou authored and timhunt committed Dec 13, 2023
1 parent ad05d24 commit a97a9e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function report_customsql_generate_csv($report, $timenow) {
}
}
if ($report->singlerow) {
array_unshift($data, strftime('%Y-%m-%d', $timenow));
array_unshift($data, \core_date::strftime('%Y-%m-%d', $timenow));
}
report_customsql_write_csv_row($handle, $data);
$count += 1;
Expand Down Expand Up @@ -201,15 +201,15 @@ function report_customsql_temp_cvs_name($reportid, $timestamp) {
global $CFG;
$path = 'admin_report_customsql/temp/'.$reportid;
make_upload_directory($path);
return array($CFG->dataroot.'/'.$path.'/'.strftime('%Y%m%d-%H%M%S', $timestamp).'.csv',
return array($CFG->dataroot.'/'.$path.'/'.\core_date::strftime('%Y%m%d-%H%M%S', $timestamp).'.csv',
$timestamp);
}

function report_customsql_scheduled_cvs_name($reportid, $timestart) {
global $CFG;
$path = 'admin_report_customsql/'.$reportid;
make_upload_directory($path);
return array($CFG->dataroot.'/'.$path.'/'.strftime('%Y%m%d-%H%M%S', $timestart).'.csv',
return array($CFG->dataroot.'/'.$path.'/'.\core_date::strftime('%Y%m%d-%H%M%S', $timestart).'.csv',
$timestart);
}

Expand Down Expand Up @@ -608,7 +608,7 @@ function report_customsql_delete_old_temp_files($upto) {
global $CFG;

$count = 0;
$comparison = strftime('%Y%m%d-%H%M%S', $upto).'csv';
$comparison = \core_date::strftime('%Y%m%d-%H%M%S', $upto).'csv';

$files = glob($CFG->dataroot.'/admin_report_customsql/temp/*/*.csv');
if (empty($files)) {
Expand Down

0 comments on commit a97a9e5

Please sign in to comment.