Project

General

Profile

« Previous | Next » 

Revision 2d51537f

Added by Viktor Gurov over 4 years ago

Captive Portal custom logo fix. Issue #11360

View differences:

src/etc/inc/captiveportal.inc
54 54
	$bg_src = "linear-gradient(135deg, #1475CF, #2B40B5, #1C1275)";
55 55
	// Check if customlogo is set and if the element exists
56 56
	// Check if the image is in the directory
57
	if (isset($config['captiveportal'][$cpzone]['customlogo'])) {
57
	if (isset($config['captiveportal'][$cpzone]['customlogo']) &&
58
	    is_array($config['captiveportal'][$cpzone]['element']) &&
59
	    !empty($config['captiveportal'][$cpzone]['element'])) {
58 60
		foreach ($config['captiveportal'][$cpzone]['element'] as $element) {
59 61
			if (strpos($element['name'], "captiveportal-logo.") !== false) {
60 62
				if (file_exists("{$g['captiveportal_path']}/{$element['name']}")) {
......
65 67
		}
66 68
	}
67 69
	// check if custombg is set and if the element exists
68
	if (isset($config['captiveportal'][$cpzone]['custombg'])) {
70
	if (isset($config['captiveportal'][$cpzone]['custombg']) &&
71
	    is_array($config['captiveportal'][$cpzone]['element']) &&
72
	    !empty($config['captiveportal'][$cpzone]['element'])) { 
69 73
		foreach ($config['captiveportal'][$cpzone]['element'] as $element) {
70 74
			if (strpos($element['name'],"captiveportal-background.") !== false) {
71 75
				if( file_exists("{$g['captiveportal_path']}/{$element['name']}")) {

Also available in: Unified diff