Skip to content

Commit

Permalink
Merge branch 'MDL-60634-32' of git://github.com/jleyva/moodle into MO…
Browse files Browse the repository at this point in the history
…ODLE_32_STABLE
  • Loading branch information
David Monllao committed Nov 2, 2017
2 parents ed76eb0 + 590706d commit 5bd85d7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/adminlib.php
Expand Up @@ -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'));
}
}
Expand Down

0 comments on commit 5bd85d7

Please sign in to comment.