From 0674776c4bc4ec35feecc7196e60c0d44dcd9294 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 18 Mar 2022 14:38:20 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#1513 --- .../modules/Process/ProcessModule/ProcessModuleInstall.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wire/modules/Process/ProcessModule/ProcessModuleInstall.php b/wire/modules/Process/ProcessModule/ProcessModuleInstall.php index c13d8da9..58d9096f 100644 --- a/wire/modules/Process/ProcessModule/ProcessModuleInstall.php +++ b/wire/modules/Process/ProcessModule/ProcessModuleInstall.php @@ -550,6 +550,13 @@ class ProcessModuleInstall extends Wire { public function installDisabledLabel($type) { $config = $this->wire()->config; $a = $config->moduleInstall; + + if(!is_writable($config->paths->siteModules)) { + return + sprintf($this->_('Your %s path is currently not writable.'), $config->urls->siteModules) . ' ' . + $this->_('It must be made writable to ProcessWire before you can enable this module installation option.'); + } + $debug = !empty($a[$type]) && $a[$type] === 'debug'; $opt1 = "`\$config->moduleInstall('$type', true);` " . $this->_('to enable always'); $opt2 = "`\$config->debug = true;` " . $this->_('temporarily');