diff --git a/admin/lang.php b/admin/lang.php
index 1bf52f880e7..d0856d6f214 100644
--- a/admin/lang.php
+++ b/admin/lang.php
@@ -841,7 +841,9 @@
echo '';
$preview_url = lang_help_preview_url($currentfile, !$uselocal);
if ($preview_url) {
- link_to_popup_window($preview_url, 'popup', get_string('preview'));
+ $link = html_link::make($preview_url, get_string('preview'));
+ $link->add_action(new popup_action('click', $link->url));
+ echo $OUTPUT->link($link);
}
echo '';
}
@@ -859,7 +861,9 @@
echo "\n\n";
$preview_url = lang_help_preview_url($currentfile, $uselocal);
if ($preview_url) {
- link_to_popup_window($preview_url, 'popup', get_string('preview'));
+ $link = html_link::make($preview_url, get_string('preview'));
+ $link->add_action(new popup_action('click', $link->url));
+ echo $OUTPUT->link($link);
}
echo '';
}
@@ -881,7 +885,9 @@
echo "\n\n";
$preview_url = lang_help_preview_url($currentfile, true, 'en_utf8'); // do not display en_utf8_local
if ($preview_url) {
- link_to_popup_window($preview_url, 'popup', get_string('preview'));
+ $link = html_link::make($preview_url, get_string('preview'));
+ $link->add_action(new popup_action('click', $link->url));
+ echo $OUTPUT->link($link);
}
echo '';
}
diff --git a/admin/mnet/mnet_themes.html b/admin/mnet/mnet_themes.html
index 67de832256a..f7b5d9d34c9 100644
--- a/admin/mnet/mnet_themes.html
+++ b/admin/mnet/mnet_themes.html
@@ -67,10 +67,14 @@ print_tabs(array($tabs), 'mnetthemes');
if (file_exists($CFG->themedir.'/'.$theme.'/README.html')) {
$readme = '
'.
- link_to_popup_window($CFG->themewww .'/'. $theme .'/README.html', $theme, $strinfo, 400, 500, '', 'none', true).'';
+ $link = html_link::make($CFG->themewww .'/'. $theme .'/README.html', $strinfo);
+ $link->add_action(new popup_action('click', $link->url, $theme, array('height' => 400, 'width' => 500)));
+ echo $OUTPUT->link($link);
} else if (file_exists($CFG->themedir.'/'.$theme.'/README.txt')) {
$readme = ''.
- link_to_popup_window($CFG->themewww .'/'. $theme .'/README.txt', $theme, $strinfo, 400, 500, '', 'none', true).'';
+ $link = html_link::make($CFG->themewww .'/'. $theme .'/README.txt', $strinfo);
+ $link->add_action(new popup_action('click', $link->url, $theme, array('height' => 400, 'width' => 500)));
+ echo $OUTPUT->link($link);
}
if (file_exists("$theme/screenshot.png")) {
$screenshotpath = "$theme/screenshot.png";
diff --git a/admin/roles/lib.php b/admin/roles/lib.php
index ef8e1595e4d..5264bd552dc 100644
--- a/admin/roles/lib.php
+++ b/admin/roles/lib.php
@@ -238,6 +238,7 @@ class explain_capability_table extends capability_table_base {
}
protected function add_row_cells($capability) {
+ global $OUTPUT;
if ($this->hascap) {
$result = $this->stryes;
$tooltip = 'whydoesuserhavecap';
@@ -251,8 +252,12 @@ class explain_capability_table extends capability_table_base {
$a->context = $this->contextname;
echo '' . $result . ' | ';
echo '';
- link_to_popup_window($this->baseurl . $capability->name, 'hascapabilityexplanation',
- $this->strexplanation, 600, 600, get_string($tooltip, 'role', $a));
+
+ $link = html_link::make($this->baseurl . $capability->name, $this->strexplanation);
+ $link->add_action(new popup_action('click', $link->url, 'hascapabilityexplanation', array('height' => 600, 'width' => 600)));
+ $link->title = get_string($tooltip, 'role', $a);
+ echo $OUTPUT->link($link);
+
echo ' | ';
}
}
@@ -417,9 +422,12 @@ abstract class capability_table_with_risks extends capability_table_base {
global $OUTPUT;
if (!isset($this->riskicons[$type])) {
$iconurl = $OUTPUT->old_icon_url('i/' . str_replace('risk', 'risk_', $type));
- $this->riskicons[$type] = link_to_popup_window($this->risksurl, 'docspopup',
- '
',
- 0, 0, get_string($type, 'admin'), null, true);
+
+ $link = html_link::make($this->risksurl, 'docspopup', '
');
+ $link->add_action(new popup_action('click', $link->url, 'docspopup'));
+ $link->title = get_string($type, 'admin');
+
+ $this->riskicons[$type] = $OUTPUT->link($link);
}
return $this->riskicons[$type];
}
@@ -658,6 +666,7 @@ class define_role_table_advanced extends capability_table_with_risks {
}
protected function print_field($name, $caption, $field) {
+ global $OUTPUT;
// Attempt to generate HTML like formslib.
echo '';
echo '
';
@@ -676,7 +685,7 @@ class define_role_table_advanced extends capability_table_with_risks {
}
echo '';