HEX
Server: Apache/2
System: Linux ns65.hostinglotus.net 4.18.0-553.16.1.el8_10.x86_64 #1 SMP Thu Aug 8 07:11:46 EDT 2024 x86_64
User: newsnnno (1225)
PHP: 8.2.20
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/newsnnno/domains/newsnnnonline.com/public_html/wp-content/plugins/file-manager/inc/logger.php
<?php
/**
 *
 * @file logger.php
 * @description This file will hold the logging functionality of the plugin
 *
 * */

// Security check
defined('ABSPATH') || die();

if(!function_exists('fm_logger')):

/**
 *
 * @function logger
 *
 * Logs file library file manager actions
 *
 * */
function fm_logger($cmd, $result, $args, $elfinder) {

	global $FileManager;

	$log = sprintf("[%s] %s: \n", date('r'), strtoupper($cmd));

	foreach ($result as $key => $value) {
		if (empty($value)) {
			continue;
		}
		$data = array();
		if (in_array($key, array('error', 'warning'))) {
			array_push($data, implode(' ', $value)); // logs only error and warning.
		}
		$log .= sprintf(' %s(%s)', $key, implode(', ', $data));
	}
	$log .= "\n";

	$log = get_option('fm_log', '') . $log;
	update_option('fm_log', $log);

}

endif;