Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge branch 'MDL-60634-32' of git://github.com/jleyva/moodle into MO…
- Loading branch information
Showing
with
2 additions
and
7 deletions.
-
+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')); |
|
|
} |
|
|
} |
|
|