mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Non-admins can use the component-install class
This commit is contained in:
parent
f099f4dc12
commit
2489a6f6fe
1 changed files with 3 additions and 9 deletions
|
@ -202,16 +202,10 @@ class component_installer {
|
||||||
|
|
||||||
$this->requisitesok = false;
|
$this->requisitesok = false;
|
||||||
|
|
||||||
/// Check for admin (this will be out in the future)
|
|
||||||
if (!isadmin()) {
|
|
||||||
$this->errorstring='onlyadmins';
|
|
||||||
return false;
|
|
||||||
} else {
|
|
||||||
/// Check for fopen remote enabled
|
/// Check for fopen remote enabled
|
||||||
if (!ini_get('allow_url_fopen')) {
|
if (!ini_get('allow_url_fopen')) {
|
||||||
$this->errorstring='remotedownloadnotallowed';
|
$this->errorstring='remotedownloadnotallowed';
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/// Check that everything we need is present
|
/// Check that everything we need is present
|
||||||
if (empty($this->sourcebase) || empty($this->zippath) || empty($this->zipfilename)) {
|
if (empty($this->sourcebase) || empty($this->zippath) || empty($this->zipfilename)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue