Permalink
Browse files

Merge branch 'MDL-60634-32' of git://github.com/jleyva/moodle into MO…

…ODLE_32_STABLE
  • Loading branch information...
dmonllao committed Nov 2, 2017
2 parents ed76eb0 + 590706d commit 5bd85d7f4ffbaa5a86ecdd15148ef4008ec61b71
Showing with 2 additions and 7 deletions.
  1. +2 −7 lib/adminlib.php
@@ -8440,16 +8440,11 @@ private function set_protocol_cap($status) {
* @return string XHTML
*/
public function output_html($data, $query='') {
global $CFG, $OUTPUT;
global $OUTPUT;
$html = parent::output_html($data, $query);
if ((string)$data === $this->yes) {
require_once($CFG->dirroot . "/lib/filelib.php");
$curl = new curl();
$httpswwwroot = str_replace('http:', 'https:', $CFG->wwwroot); //force https url
$curl->head($httpswwwroot . "/login/index.php");
$info = $curl->get_info();
if (empty($info['http_code']) or ($info['http_code'] >= 400)) {
if (!is_https()) {
$html .= $OUTPUT->notification(get_string('nohttpsformobilewarning', 'admin'));
}
}

0 comments on commit 5bd85d7

Please sign in to comment.