changes done
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -60,17 +60,17 @@ if($isadmin) { | ... | @@ -60,17 +60,17 @@ if($isadmin) { |
60 | $files = scandir($split_path); | 60 | $files = scandir($split_path); |
61 | foreach($files as $file) { | 61 | foreach($files as $file) { |
62 | if($file === '.' || $file === '..') {continue;} | 62 | if($file === '.' || $file === '..') {continue;} |
63 | if( (str_contains($file, $date)) && (str_contains($file, '.log'))) { | 63 | if( (strpos($file, $date) !== false) && (strpos($file, '.log')) ) { |
64 | $array = array(); | 64 | $array = array(); |
65 | $array['sno'] = $i; | 65 | $array['sno'] = $i; |
66 | $array['name'] = $file; | 66 | $array['name'] = $file; |
67 | $array['log'] = file_get_contents($split_path.'/'.$file); | 67 | $array['log'] = file_get_contents($split_path.'/'.$file); |
68 | $table_content_array[] = $array; | 68 | $table_content_array[] = $array; |
69 | $i = $i+1; | ||
69 | } | 70 | } |
70 | } | 71 | } |
71 | } | 72 | } |
72 | 73 | ||
73 | |||
74 | $templatecontext['tablecontents'] = $table_content_array; | 74 | $templatecontext['tablecontents'] = $table_content_array; |
75 | 75 | ||
76 | echo $OUTPUT->render_from_template('block_log/cron_logs_view', $templatecontext); | 76 | echo $OUTPUT->render_from_template('block_log/cron_logs_view', $templatecontext); | ... | ... |
-
Please register or sign in to post a comment