the smarty code tests the $_SERVER['HTTPS'] variable which is:
http://php.net/manual/en/reserved.variables.server.phpSet to a non-empty value if the script was queried through the HTTPS protocol.
Note: Note that when using ISAPI with IIS, the value will be off if the request was not made through the HTTPS protocol.