CMS MADE SIMPLE FORGE

ListItExtended

 

[#10804] If SSL is enabled on Admin, certain assets won't load for LI2 Modules [FIX INCLUDED]

avatar
Created By: Eduardo Martinez (hexdj)
Date Submitted: Thu Dec 31 19:17:47 -0500 2015

Assigned To:
Version: 1.4.1
CMSMS Version: 1.12
Severity: None
Resolution: None
State: Open
Summary:
If SSL is enabled on Admin, certain assets won't load for LI2 Modules [FIX INCLUDED]
Detailed Description:
LI2 1.4.1 fails to load certain assets, particularly  fields that require JS
assets, such as Date-Time/Color types, because it doesn't check if SSL is
enabled.

The solution is replace the entire function on Line 278 of file:
/ListIt2/lib/class.Listit2FielddefBase.php
to the following

	public final function GetURLPath() {
	
		$use_ssl = false;
		if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
			$use_ssl = true;	
		
		$config = cmsms()->GetConfig();
		
		$url = substr($this->GetPath(), strlen($config['root_path']));
		$url = str_replace(DIRECTORY_SEPARATOR, '/', $url);
		$url = ($use_ssl?$config['ssl_url']:$config['root_url']) . $url;
		
		return $url;
	}	


History