diff --git a/wire/config.php b/wire/config.php index 857649d8..1201d5aa 100644 --- a/wire/config.php +++ b/wire/config.php @@ -621,6 +621,8 @@ $config->fileContentTypes = array( * #property string sharpening Sharpening mode, enter one of: none, soft, medium, strong * #property int quality Image quality, enter a value between 1 and 100, where 100 is highest quality (and largest files) * #property float defaultGamma Default gamma of 0.5 to 4.0 or -1 to disable gamma correction (default=2.0) + * #property bool webpAdd Create a WEBP copy with every new image variation? (default=false) + * #property int webpQuality Quality setting of 1-100 where higher is better but bigger (default=90) * * @var array * diff --git a/wire/core/InputfieldWrapper.php b/wire/core/InputfieldWrapper.php index b4cf5abc..b79cde74 100644 --- a/wire/core/InputfieldWrapper.php +++ b/wire/core/InputfieldWrapper.php @@ -708,6 +708,7 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre * */ public function ___renderValue() { + if(!count($this->children)) return ''; $this->addClass('InputfieldRenderValueMode'); $this->set('renderValueMode', true); $out = $this->render(); @@ -806,7 +807,7 @@ class InputfieldWrapper extends Inputfield implements \Countable, \IteratorAggre $inputfield->resetTrackChanges(); } if(is_null($out)) return ''; - if(!strlen($out)) $out = ' '; // prevent output from being skipped over + if(!strlen($out) && !$inputfield instanceof InputfieldWrapper) $out = ' '; // prevent output from being skipped over return $out; } diff --git a/wire/core/Modules.php b/wire/core/Modules.php index 3fc8fdac..5a202254 100644 --- a/wire/core/Modules.php +++ b/wire/core/Modules.php @@ -310,6 +310,7 @@ class Modules extends WireArray { * */ public function __construct($path) { + parent::__construct(); $this->addPath($path); $this->coreModulesDir = '/' . $this->wire('config')->urls->data('modules'); } @@ -2690,9 +2691,8 @@ class Modules extends WireArray { * - `minify` (bool): Remove non-applicable and properties that match defaults? (default=false, or true when getting `all`) * - `noCache` (bool): prevents use of cache to retrieve the module info. (default=false) * @return array Associative array of module information - * @throws WireException when a module exists but has no means of returning module info * @see Modules::getModuleInfoVerbose() - * @todo move all getModuleInfo methods to their own ModuleInfo class and break this method down further. + * @todo move all getModuleInfo methods to their own ModuleInfo class and break this method down further. * */ public function getModuleInfo($class, array $options = array()) { @@ -3014,7 +3014,6 @@ class Modules extends WireArray { * - `noCache` (bool): prevents use of cache to retrieve the module info * - `noInclude` (bool): prevents include() of the module file, applicable only if it hasn't already been included * @return array Associative array of module information - * @throws WireException when a module exists but has no means of returning module info * @see Modules::getModuleInfo() * */ diff --git a/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.css b/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.css index 4d8700a9..f7b3d624 100644 --- a/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.css +++ b/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.css @@ -1 +1 @@ -.Inputfields .InputfieldRepeater>.InputfieldContent>ul.Inputfields{margin-bottom:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader{line-height:1em;padding:.5em 0 .5em .4em;white-space:nowrap;overflow:hidden;position:relative}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader .InputfieldRepeaterItemLabel,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader .InputfieldRepeaterItemControls{display:none}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemLabel{display:inline-block;padding-left:.25em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls{display:block;padding-right:.5em;padding-left:.5em;margin-top:.5em;position:absolute;top:0;right:0;z-index:1;display:block;white-space:nowrap;height:100%}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterSettingsToggle,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterClone,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterToggle,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterTrash,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .toggle-icon{cursor:pointer;float:right}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterTrash{padding-right:3px}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterToggle{margin-right:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterClone{margin-right:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterSettingsToggle{margin-right:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .pw-icon-disabled{opacity:.3}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .toggle-icon{line-height:1em;margin-right:.5em}.Inputfields .InputfieldRepeater .InputfieldStateCollapsed .InputfieldRepeaterSettingsToggle{display:none}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldStateCollapsed>.InputfieldHeader{opacity:.9}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldStateCollapsed>.InputfieldHeader:hover{opacity:1}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldRepeaterUnpublished>.InputfieldHeader{opacity:.7}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldRepeaterOff>.InputfieldHeader{opacity:.5}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldRepeaterOff>.InputfieldHeader:not(:hover)>.InputfieldRepeaterItemLabel{text-decoration:line-through}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem.InputfieldRepeaterDeletePending>.InputfieldHeader>.InputfieldRepeaterItemLabel{text-decoration:line-through}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem.InputfieldRepeaterItemLoading{margin-bottom:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem.InputfieldStateCollapsed>.InputfieldContent{display:none !important}.Inputfields .InputfieldRepeater .InputfieldRepeaterNewItem{display:none}.Inputfields .InputfieldRepeater .InputfieldRepeaterDelete{display:none}.Inputfields .InputfieldRepeater.InputfieldRepeaterSingle>.InputfieldContent>.Inputfields{margin-bottom:0}.Inputfields .InputfieldRepeater.InputfieldRepeaterSingle>.InputfieldContent>.Inputfields>.InputfieldRepeaterItem{margin-bottom:0}.Inputfields .InputfieldRepeater.InputfieldRepeaterSingle>.InputfieldContent>.Inputfields>.InputfieldRepeaterItem>.InputfieldHeader{display:none}.InputfieldRepeater{z-index:1}.InputfieldRepeater .InputfieldWrapper,.InputfieldRepeater .InputfieldWrapper>.Inputfields{margin-top:0 !important}.InputfieldRepeater ul.ui-sortable>.InputfieldRepeaterItem>.InputfieldHeader{position:relative}.InputfieldRepeater .InputfieldRepeaterAddItem input{display:none !important}.InputfieldRepeater ul.Inputfields+.InputfieldRepeaterAddItem{margin-top:0}.InputfieldRepeater .InputfieldRepeaterDrag{display:inline-block;cursor:ns-resize;opacity:.7;line-height:1em}.InputfieldRepeater .InputfieldRepeaterDrag:hover{cursor:move;opacity:1}.InputfieldRepeater.InputfieldRenderValueMode .InputfieldRepeaterDrag{margin-right:.25em;opacity:.5}.InputfieldRepeater.InputfieldRenderValueMode .InputfieldRepeaterDrag:hover{cursor:not-allowed;opacity:.5}.AdminThemeReno .InputfieldRepeaterItem>.InputfieldHeader .ui-priority-secondary{color:rgba(255,255,255,.8) !important} +.Inputfields .InputfieldRepeater>.InputfieldContent>ul.Inputfields{margin-bottom:1em}.Inputfields .InputfieldRepeater>.InputfieldContent>ul.Inputfields:last-child{margin-bottom:0}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader{line-height:1em;padding:.5em 0 .5em .4em;white-space:nowrap;overflow:hidden;position:relative}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader .InputfieldRepeaterItemLabel,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader .InputfieldRepeaterItemControls{display:none}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemLabel{display:inline-block;padding-left:.25em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls{display:block;padding-right:.5em;padding-left:.5em;margin-top:.5em;position:absolute;top:0;right:0;z-index:1;display:block;white-space:nowrap;height:100%}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterSettingsToggle,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterClone,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterToggle,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterTrash,.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .toggle-icon{cursor:pointer;float:right}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterTrash{padding-right:3px}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterToggle{margin-right:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterClone{margin-right:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .InputfieldRepeaterSettingsToggle{margin-right:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .InputfieldRepeaterItemControls .pw-icon-disabled{opacity:.3}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem>.InputfieldHeader.InputfieldRepeaterHeaderInit .toggle-icon{line-height:1em;margin-right:.5em}.Inputfields .InputfieldRepeater .InputfieldStateCollapsed .InputfieldRepeaterSettingsToggle{display:none}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldStateCollapsed>.InputfieldHeader{opacity:.9}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldStateCollapsed>.InputfieldHeader:hover{opacity:1}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldRepeaterUnpublished>.InputfieldHeader{opacity:.7}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldRepeaterOff>.InputfieldHeader{opacity:.5}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem:not(.InputfieldRepeaterDeletePending).InputfieldRepeaterOff>.InputfieldHeader:not(:hover)>.InputfieldRepeaterItemLabel{text-decoration:line-through}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem.InputfieldRepeaterDeletePending>.InputfieldHeader>.InputfieldRepeaterItemLabel{text-decoration:line-through}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem.InputfieldRepeaterItemLoading{margin-bottom:1em}.Inputfields .InputfieldRepeater .InputfieldRepeaterItem.InputfieldStateCollapsed>.InputfieldContent{display:none !important}.Inputfields .InputfieldRepeater .InputfieldRepeaterNewItem{display:none}.Inputfields .InputfieldRepeater .InputfieldRepeaterDelete{display:none}.Inputfields .InputfieldRepeater.InputfieldRepeaterSingle>.InputfieldContent>.Inputfields{margin-bottom:0}.Inputfields .InputfieldRepeater.InputfieldRepeaterSingle>.InputfieldContent>.Inputfields>.InputfieldRepeaterItem{margin-bottom:0}.Inputfields .InputfieldRepeater.InputfieldRepeaterSingle>.InputfieldContent>.Inputfields>.InputfieldRepeaterItem>.InputfieldHeader{display:none}.InputfieldRepeater{z-index:1}.InputfieldRepeater .InputfieldWrapper,.InputfieldRepeater .InputfieldWrapper>.Inputfields{margin-top:0 !important}.InputfieldRepeater ul.ui-sortable>.InputfieldRepeaterItem>.InputfieldHeader{position:relative}.InputfieldRepeater .InputfieldRepeaterAddItem input{display:none !important}.InputfieldRepeater ul.Inputfields+.InputfieldRepeaterAddItem{margin-top:0}.InputfieldRepeater .InputfieldRepeaterDrag{display:inline-block;cursor:ns-resize;opacity:.7;line-height:1em}.InputfieldRepeater .InputfieldRepeaterDrag:hover{cursor:move;opacity:1}.InputfieldRepeater.InputfieldRenderValueMode .InputfieldRepeaterDrag{margin-right:.25em;opacity:.5}.InputfieldRepeater.InputfieldRenderValueMode .InputfieldRepeaterDrag:hover{cursor:not-allowed;opacity:.5}.AdminThemeReno .InputfieldRepeaterItem>.InputfieldHeader .ui-priority-secondary{color:rgba(255,255,255,.8) !important} diff --git a/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.scss b/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.scss index 3f04d784..9c03455b 100644 --- a/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.scss +++ b/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.scss @@ -2,6 +2,9 @@ & > .InputfieldContent > ul.Inputfields { margin-bottom: 1em; + &:last-child { + margin-bottom: 0; + } } .InputfieldRepeaterItem > .InputfieldHeader { diff --git a/wire/modules/Image/ImageSizerEngineIMagick/ImageSizerEngineIMagick.module b/wire/modules/Image/ImageSizerEngineIMagick/ImageSizerEngineIMagick.module index b0275bb0..f8112073 100755 --- a/wire/modules/Image/ImageSizerEngineIMagick/ImageSizerEngineIMagick.module +++ b/wire/modules/Image/ImageSizerEngineIMagick/ImageSizerEngineIMagick.module @@ -115,7 +115,8 @@ class ImageSizerEngineIMagick extends ImageSizerEngine { * */ protected function validSourceImageFormats() { - return array('JPG', 'JPEG', 'PNG24', 'PNG8', 'PNG', 'GIF', 'GIF87'); + // 2019/06/07: “PNG8” removed because some versions of ImageMagick have some bug, may be able to add back later + return array('JPG', 'JPEG', 'PNG24', 'PNG', 'GIF', 'GIF87'); //return array( // 'PNG', 'PNG8', 'PNG24', // 'JPG', 'JPEG', diff --git a/wire/modules/Process/ProcessModule/ProcessModule.module b/wire/modules/Process/ProcessModule/ProcessModule.module index bc7187e0..3a67dac1 100644 --- a/wire/modules/Process/ProcessModule/ProcessModule.module +++ b/wire/modules/Process/ProcessModule/ProcessModule.module @@ -11,7 +11,7 @@ * This version also lifts several pieces of code from Soma's Modules Manager * specific to the parts involved with downloading modules from the directory. * - * ProcessWire 3.x, Copyright 2018 by Ryan Cramer + * ProcessWire 3.x, Copyright 2019 by Ryan Cramer * https://processwire.com * * @todo add support for module configuration inputfields with useLanguages option @@ -123,7 +123,7 @@ class ProcessModule extends Process { public function __construct() { $this->labels['download'] = $this->_('Download'); - if($this->input->get->update) { + if($this->input->get('update')) { $this->labels['download_install'] = $this->_('Download and Update'); } else { $this->labels['download_install'] = $this->_('Download and Install'); @@ -263,9 +263,9 @@ class ProcessModule extends Process { } ksort($this->modulesArray); - if($this->input->post->install) { + if($this->input->post('install')) { $this->session->CSRF->validate(); - $name = $this->wire('sanitizer')->name($this->input->post->install); + $name = $this->wire('sanitizer')->name($this->input->post('install')); if($name && isset($this->modulesArray[$name]) && !$this->modulesArray[$name]) { $module = $this->modules->install($name, array('force' => true)); if($module) { @@ -279,9 +279,9 @@ class ProcessModule extends Process { } } - if($this->input->post->delete) { + if($this->input->post('delete')) { $this->session->CSRF->validate(); - $name = $this->input->post->delete; + $name = $this->input->post('delete'); if($name && isset($this->modulesArray[$name])) { $info = $this->modules->getModuleInfoVerbose($name); try { @@ -295,24 +295,24 @@ class ProcessModule extends Process { } } - if($this->input->post->download && $this->input->post->download_name) { + if($this->input->post('download') && $this->input->post('download_name')) { $this->session->CSRF->validate(); - return $this->downloadConfirm($this->input->post->download_name); - } else if($this->input->get->download_name) { - return $this->downloadConfirm($this->input->get->download_name); + return $this->downloadConfirm($this->input->post('download_name')); + } else if($this->input->get('download_name')) { + return $this->downloadConfirm($this->input->get('download_name')); } - if($this->input->post->upload) { + if($this->input->post('upload')) { $this->session->CSRF->validate(); $this->executeUpload('upload_module'); } - if($this->input->post->download_zip && $this->input->post->download_zip_url) { + if($this->input->post('download_zip') && $this->input->post('download_zip_url')) { $this->session->CSRF->validate(); - $this->executeDownloadURL($this->input->post->download_zip_url); + $this->executeDownloadURL($this->input->post('download_zip_url')); } - if($this->input->post->clear_file_compiler) { + if($this->input->post('clear_file_compiler')) { $this->session->CSRF->validate(); $compiler = new FileCompiler($this->wire('config')->paths->siteModules); $compiler->clearCache(true); @@ -320,15 +320,15 @@ class ProcessModule extends Process { $this->session->redirect('./'); } - if($this->input->get->update) { - $name = $this->sanitizer->name($this->input->get->update); + if($this->input->get('update')) { + $name = $this->sanitizer->name($this->input->get('update')); if(isset($this->modulesArray[$name])) return $this->downloadConfirm($name, true); } - if($this->input->get->reset == 1) { + if($this->input->get('reset') == 1) { $this->modules->resetCache(); $this->message(sprintf($this->_('Modules cache refreshed (%d modules)'), count($this->modules))); - $edit = $this->input->get->edit; + $edit = $this->input->get->fieldName('edit'); $duplicates = $this->modules->duplicates()->getDuplicates(); foreach($duplicates as $className => $files) { $dup = $this->modules->duplicates()->getDuplicates($className); @@ -341,8 +341,11 @@ class ProcessModule extends Process { } $this->message("$msg", Notice::allowMarkup); } - if($edit) $this->session->redirect("./edit?name=" . $this->sanitizer->fieldName($edit) . "&reset=2"); - else $this->session->redirect("./?reset=2"); + if($edit) { + $this->session->redirect("./edit?name=$edit&reset=2"); + } else { + $this->session->redirect("./?reset=2"); + } } return $this->renderList(); @@ -425,7 +428,8 @@ class ProcessModule extends Process { $button->attr('value', $this->_('Clear compiled files')); $button->addClass('ui-priority-secondary'); $button->icon = 'trash-o'; - + + /** @var InputfieldMarkup $markup */ $markup = $this->modules->get('InputfieldMarkup'); $markup->label = $this->_('/site/modules/ - Modules specific to your site'); $markup->icon = 'folder-open-o'; @@ -439,12 +443,14 @@ class ProcessModule extends Process { $form->add($tab); // core - + + /** @var InputfieldWrapper $tab */ $tab = $this->wire(new InputfieldWrapper()); $tab->attr('id', 'tab_core_modules'); $tab->attr('title', $this->labels['core']); $tab->attr('class', 'WireTab'); - + + /** @var InputfieldMarkup $markup */ $markup = $this->modules->get('InputfieldMarkup'); $markup->value = $this->renderListTable($coreModulesArray); $markup->label = $this->_('/wire/modules/ - Modules included with the ProcessWire core'); @@ -535,20 +541,23 @@ class ProcessModule extends Process { $f->attr('placeholder', $this->_('ModuleClassName')); // placeholder $f->required = false; $fieldset->add($f); - + + /** @var InputfieldSubmit $f */ $f = $this->modules->get('InputfieldSubmit'); $f->attr('id+name', 'download'); $f->value = $this->labels['get_module_info']; $f->icon = $fieldset->icon; $fieldset->add($f); $tab->add($fieldset); - + + /** @var InputfieldFieldset $fieldset */ $fieldset = $this->modules->get('InputfieldFieldset'); $fieldset->label = $this->labels['download_zip']; $fieldset->icon = 'download'; $fieldset->collapsed = Inputfield::collapsedYes; $trustNote = $this->_('Be absolutely certain that you trust the source of the ZIP file.'); - + + /** @var InputfieldURL $f */ $f = $this->modules->get('InputfieldURL'); $f->attr('id+name', 'download_zip_url'); $f->label = $this->_('Module ZIP file URL'); @@ -558,17 +567,21 @@ class ProcessModule extends Process { $f->required = false; $fieldset->add($f); + /** @var InputfieldSubmit $f */ $f = $this->modules->get('InputfieldSubmit'); $f->attr('id+name', 'download_zip'); $f->value = $this->labels['download']; $f->icon = $fieldset->icon; $fieldset->add($f); $tab->add($fieldset); - + + /** @var InputfieldFieldset $fieldset */ $fieldset = $this->modules->get('InputfieldFieldset'); $fieldset->label = $this->labels['upload_zip']; $fieldset->icon = 'upload'; $fieldset->collapsed = Inputfield::collapsedYes; + + /** @var InputfieldFile $f */ $f = $this->modules->get('InputfieldFile'); $f->extensions = 'zip'; $f->maxFiles = 1; @@ -610,7 +623,7 @@ class ProcessModule extends Process { $form->add($tab); // if($this->input->get->reset == 2 && !$this->numFound) $this->message($this->_("No new modules found")); - $this->session->ModulesUninstalled = $uninstalledNames; + $this->session->set('ModulesUninstalled', $uninstalledNames); return $form->render(); } @@ -634,7 +647,7 @@ class ProcessModule extends Process { static $numCalls = 0; $numCalls++; - $uninstalledPrev = is_array($this->session->ModulesUninstalled) ? $this->session->ModulesUninstalled : array(); + $uninstalledPrev = is_array($this->session->get('ModulesUninstalled')) ? $this->session->get('ModulesUninstalled') : array(); $section = 'none'; $tableHeader = array( $this->_x('Module', 'list'), // Modules list table header for 'Module' column @@ -710,7 +723,7 @@ class ProcessModule extends Process { $class = 'not_installed'; if(count($uninstalledPrev) && !in_array($name, $uninstalledPrev)) { $class .= " new_module"; - if(!$this->input->get->uninstalled) $this->message($this->_("Found new module") . " - $name"); // Message that precedes module name when new module is found + if(!$this->input->get('uninstalled')) $this->message($this->_("Found new module") . " - $name"); // Message that precedes module name when new module is found $newModules[$name] = time(); $this->numFound++; } @@ -729,7 +742,7 @@ class ProcessModule extends Process { $icon = 'fa-sign-in'; } $buttons .= - "