From 3f308ae916c5e5f1312dddc179a7ecf219bd7d9c Mon Sep 17 00:00:00 2001 From: Jerome Mouneyrac Date: Mon, 22 Apr 2013 12:02:39 +0800 Subject: [PATCH] MDL-35666 remove uninstall protocol option --- admin/webservice/protocols.php | 3 --- lib/adminlib.php | 8 ++------ lib/pluginlib.php | 7 +------ 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/admin/webservice/protocols.php b/admin/webservice/protocols.php index c5cc1949bf4..76587f29e80 100644 --- a/admin/webservice/protocols.php +++ b/admin/webservice/protocols.php @@ -60,9 +60,6 @@ if (!confirm_sesskey()) { } switch ($action) { - case 'uninstall': - die('TODO: not implemented yet'); - break; case 'disable': // remove from enabled list diff --git a/lib/adminlib.php b/lib/adminlib.php index be26db438df..6144747f862 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -7791,7 +7791,6 @@ class admin_setting_managewebserviceprotocols extends admin_setting { $strenable = get_string('enable'); $strdisable = get_string('disable'); $strversion = get_string('version'); - $struninstall = get_string('uninstallplugin', 'admin'); $protocols_available = get_plugin_list('webservice'); $active_protocols = empty($CFG->webserviceprotocols) ? array() : explode(',', $CFG->webserviceprotocols); @@ -7807,7 +7806,7 @@ class admin_setting_managewebserviceprotocols extends admin_setting { $return .= $OUTPUT->box_start('generalbox webservicesui'); $table = new html_table(); - $table->head = array($strprotocol, $strversion, $strenable, $struninstall, $strsettings); + $table->head = array($strprotocol, $strversion, $strenable, $strsettings); $table->colclasses = array('leftalign', 'centeralign', 'centeralign', 'centeralign', 'centeralign'); $table->id = 'webserviceprotocols'; $table->attributes['class'] = 'admintable generaltable'; @@ -7835,9 +7834,6 @@ class admin_setting_managewebserviceprotocols extends admin_setting { $displayname = "$name"; } - // delete link - $uninstall = "$struninstall"; - // settings link if (file_exists($CFG->dirroot.'/webservice/'.$protocol.'/settings.php')) { $settings = "$strsettings"; @@ -7846,7 +7842,7 @@ class admin_setting_managewebserviceprotocols extends admin_setting { } // add a row to the table - $table->data[] = array($displayname, $version, $hideshow, $uninstall, $settings); + $table->data[] = array($displayname, $version, $hideshow, $settings); } $return .= html_writer::table($table); $return .= get_string('configwebserviceplugins', 'webservice'); diff --git a/lib/pluginlib.php b/lib/pluginlib.php index c426414a2b7..456b49c66b6 100644 --- a/lib/pluginlib.php +++ b/lib/pluginlib.php @@ -3924,12 +3924,7 @@ class plugininfo_webservice extends plugininfo_base { } public function is_uninstall_allowed() { - return true; - } - - public function get_uninstall_url() { - return new moodle_url('/admin/webservice/protocols.php', - array('sesskey' => sesskey(), 'action' => 'uninstall', 'webservice' => $this->name)); + return false; } }