Public Member Functions | |
ilHTTPS () | |
checkPort () | |
__readProtectedScripts () | |
__readProtectedClasses () | |
_checkHTTPS () | |
static method to check if https connections are possible for this server public | |
_checkHTTP () | |
static method to check if http connections are possible for this server | |
Data Fields | |
$enabled = false | |
$protected_scripts = array() |
Definition at line 34 of file class.ilHTTPS.php.
ilHTTPS::__readProtectedClasses | ( | ) |
Definition at line 83 of file class.ilHTTPS.php.
Referenced by ilHTTPS().
{ $this->protected_classes[] = 'ilstartupgui'; $this->protected_classes[] = 'ilregistrationgui'; }
ilHTTPS::__readProtectedScripts | ( | ) |
Definition at line 73 of file class.ilHTTPS.php.
Referenced by ilHTTPS().
{ $this->protected_scripts[] = 'login.php'; $this->protected_scripts[] = 'index.php'; $this->protected_scripts[] = 'start_bmf.php'; $this->protected_scripts[] = 'register.php'; return true; }
ilHTTPS::_checkHTTP | ( | ) |
static method to check if http connections are possible for this server
public
Definition at line 112 of file class.ilHTTPS.php.
Referenced by ilObjSystemFolderGUI::saveSettingsObject().
{ $port = 80; if(($sp = @fsockopen($_SERVER["SERVER_NAME"],$port,$errno,$error)) === false) { return false; } fclose($sp); return true; }
ilHTTPS::_checkHTTPS | ( | ) |
static method to check if https connections are possible for this server public
Definition at line 94 of file class.ilHTTPS.php.
Referenced by ilObjSystemFolderGUI::saveSettingsObject().
{ // only check standard port in the moment $port = 443; if(($sp = @fsockopen($_SERVER["SERVER_NAME"],$port,$errno,$error)) === false) { return false; } fclose($sp); return true; }
ilHTTPS::checkPort | ( | ) |
Definition at line 50 of file class.ilHTTPS.php.
{ if(!$this->enabled) { return true; } if((in_array(basename($_SERVER["SCRIPT_NAME"]),$this->protected_scripts) or in_array($_GET['cmdClass'],$this->protected_classes)) and $_SERVER["HTTPS"] != 'on') { header("location: https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); exit; } if((!in_array(basename($_SERVER["SCRIPT_NAME"]),$this->protected_scripts) and !in_array($_GET['cmdClass'],$this->protected_classes)) and $_SERVER["HTTPS"] == 'on') { header("location: http://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]); exit; } return true; }
ilHTTPS::ilHTTPS | ( | ) |
Definition at line 39 of file class.ilHTTPS.php.
References $ilias, __readProtectedClasses(), and __readProtectedScripts().
{ global $ilias; if($this->enabled = (bool) $ilias->getSetting('https')) { $this->__readProtectedScripts(); $this->__readProtectedClasses(); } }
ilHTTPS::$enabled = false |
Definition at line 36 of file class.ilHTTPS.php.
ilHTTPS::$protected_scripts = array() |
Definition at line 37 of file class.ilHTTPS.php.