From: nicolasconnault Date: Thu, 6 Aug 2009 02:51:41 +0000 (+0000) Subject: MDL-19814 Migrated calls to close_window_button() X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e087ee764a9630e22ee68a436740ec8cddd33b0d;p=moodle.git MDL-19814 Migrated calls to close_window_button() --- diff --git a/mod/resource/type/file/resource.class.php b/mod/resource/type/file/resource.class.php index 3493c82772..2dfc3523b6 100644 --- a/mod/resource/type/file/resource.class.php +++ b/mod/resource/type/file/resource.class.php @@ -344,7 +344,7 @@ class resource_file extends resource_base { } notify(get_string('notallowedlocalfileaccess', 'resource', '')); if ($inpopup) { - close_window_button(); + echo $OUTPUT->close_window_button(); } print_footer('none'); die; diff --git a/mod/resource/type/ims/resource.class.php b/mod/resource/type/ims/resource.class.php index 748eb84865..957777e846 100644 --- a/mod/resource/type/ims/resource.class.php +++ b/mod/resource/type/ims/resource.class.php @@ -315,7 +315,7 @@ class resource_ims extends resource_base { * @param CFG global object */ function display() { - global $CFG, $THEME, $USER, $PAGE; + global $CFG, $THEME, $USER, $PAGE, $OUTPUT; require_once($CFG->libdir.'/filelib.php'); @@ -397,7 +397,7 @@ class resource_ims extends resource_base { print_simple_box_end(); /// Close button if inpopup if ($inpopup) { - close_window_button(); + echo $OUTPUT->close_window_button(); } print_footer(); diff --git a/mod/resource/type/repository/hive/openhive.php b/mod/resource/type/repository/hive/openhive.php index 10f40c48cb..942d7a0236 100644 --- a/mod/resource/type/repository/hive/openhive.php +++ b/mod/resource/type/repository/hive/openhive.php @@ -12,7 +12,7 @@ if (empty($SESSION->HIVE_SESSION)) { print_header(); notify('You do not have access to the Hive repository. Moodle signs you into Hive when you log in. This process may have failed.'); - close_window_button(); + echo $OUTPUT->close_window_button(); print_footer(); die; } diff --git a/mod/resource/type/repository/hive/openlitebrowse.php b/mod/resource/type/repository/hive/openlitebrowse.php index 9eae448460..35fd13b8ff 100644 --- a/mod/resource/type/repository/hive/openlitebrowse.php +++ b/mod/resource/type/repository/hive/openlitebrowse.php @@ -12,7 +12,7 @@ if (empty($SESSION->HIVE_SESSION)) { print_header(); notify('You do not have access to the Hive repository. Moodle signs you into Hive when you log in. This process may have failed.'); - close_window_button(); + echo $OUTPUT->close_window_button(); print_footer(); die; } diff --git a/mod/resource/type/repository/hive/openlitepublish.php b/mod/resource/type/repository/hive/openlitepublish.php index d0fef9fab8..c905341194 100644 --- a/mod/resource/type/repository/hive/openlitepublish.php +++ b/mod/resource/type/repository/hive/openlitepublish.php @@ -12,7 +12,7 @@ if (empty($SESSION->HIVE_SESSION)) { print_header(); notify('You do not have access to the Hive repository. Moodle signs you into Hive when you log in. This process may have failed.'); - close_window_button(); + echo $OUTPUT->close_window_button(); print_footer(); die; } diff --git a/mod/resource/type/repository/hive/openlitesearch.php b/mod/resource/type/repository/hive/openlitesearch.php index 20ac598de2..f35f863302 100644 --- a/mod/resource/type/repository/hive/openlitesearch.php +++ b/mod/resource/type/repository/hive/openlitesearch.php @@ -12,7 +12,7 @@ if (empty($SESSION->HIVE_SESSION)) { print_header(); notify('You do not have access to the Hive repository. Moodle signs you into Hive when you log in. This process may have failed.'); - close_window_button(); + echo $OUTPUT->close_window_button(); print_footer(); die; } diff --git a/mod/resource/type/repository/resource.class.php b/mod/resource/type/repository/resource.class.php index 716b57478a..a115ec5b5f 100644 --- a/mod/resource/type/repository/resource.class.php +++ b/mod/resource/type/repository/resource.class.php @@ -181,7 +181,7 @@ function _postprocess(&$resource) { * @param CFG global object */ function display() { - global $CFG, $THEME, $SESSION; + global $CFG, $THEME, $SESSION, $OUTPUT; /// Set up generic stuff first, including checking for access parent::display(); @@ -271,7 +271,7 @@ function display() { } notify('You do not have access to HarvestRoad Hive. This resource is unavailable.'); if ($inpopup) { - close_window_button(); + echo $OUTPUT->close_window_button(); } print_footer('none'); die; @@ -290,7 +290,7 @@ function display() { } notify(get_string('notallowedlocalfileaccess', 'resource', '')); if ($inpopup) { - close_window_button(); + echo $OUTPUT->close_window_button(); } print_footer('none'); die;