MDL-35442 Add settings and uninstall link for local plugins
This commit is contained in:
committed by
Dan Poltawski
parent
daccc92d9e
commit
3e8d7ca16e
@@ -2504,3 +2504,22 @@ class plugininfo_report extends plugininfo_base {
|
||||
return new moodle_url('/admin/reports.php', array('delete' => $this->name, 'sesskey' => sesskey()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Class for local plugins
|
||||
*/
|
||||
class plugininfo_local extends plugininfo_base {
|
||||
|
||||
public function get_uninstall_url() {
|
||||
return new moodle_url('/admin/localplugins.php', array('delete' => $this->name, 'sesskey' => sesskey()));
|
||||
}
|
||||
|
||||
public function get_settings_url() {
|
||||
if (file_exists($this->full_path('settings.php'))) {
|
||||
return new moodle_url('/admin/settings.php', array('section' => 'local_' . $this->name));
|
||||
} else {
|
||||
return parent::get_settings_url();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user