diff --git a/wire/core/WireHooks.php b/wire/core/WireHooks.php index 74746ee9..566aa692 100644 --- a/wire/core/WireHooks.php +++ b/wire/core/WireHooks.php @@ -138,11 +138,10 @@ class WireHooks { * * @param Wire $object * @param string $method Optional method that hooks will be limited to. Or specify '*' to return all hooks everywhere. - * @param int $type Type of hooks to return: 0=all, 1=local only, 2=static only * @param int $type Type of hooks to return, specify one of the following constants: - * - WireHooks::getHooksAll returns all hooks (default) - * - WireHooks::getHooksLocal returns local hooks only - * - WireHooks::getHooksStatic returns static hooks only + * - WireHooks::getHooksAll returns all hooks [0] (default) + * - WireHooks::getHooksLocal returns local hooks [1] only + * - WireHooks::getHooksStatic returns static hooks [2] only * @return array * */ diff --git a/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module b/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module index 1f8b7bf8..5638c00e 100644 --- a/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module +++ b/wire/modules/Inputfield/InputfieldFile/InputfieldFile.module @@ -20,6 +20,7 @@ * @property bool|int $noCollapseItem Set to true to disable collapsed items (like for LanguageTranslator tool or other things that add tools to files) * @property bool|int $noShortName Set to true to disable shortened filenames in output * @property bool|int $noCustomButton Set to true to disable use of the styled + * @property Pagefiles|Pagefile|null $value * * @method string renderItem($pagefile, $id, $n) * @method string renderList($value) @@ -490,6 +491,13 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel return $out; } + /** + * Wrap output of files list item + * + * @param string $out + * @return string + * + */ protected function renderItemWrap($out) { // note: using currentItem rather than a new argument since there are now a few modules extending // this one and if they implement their own calls to this method or version of this method then @@ -498,7 +506,15 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel $id = $item && !$this->renderValueMode ? " id='file_$item->hash'" : ""; return "$out"; } - + + /** + * Render files list ready + * + * @param Pagefiles|null $value + * @throws WireException + * @throws WirePermissionException + * + */ protected function renderListReady($value) { if(!$this->renderValueMode) { // if just rendering the files list (as opposed to saving it), delete any temp files that may have accumulated @@ -511,6 +527,13 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel } } + /** + * Render files list + * + * @param Pagefiles|null $value + * @return string + * + */ protected function ___renderList($value) { if(!$value) return ''; @@ -534,6 +557,13 @@ class InputfieldFile extends Inputfield implements InputfieldItemList, Inputfiel return $out; } + /** + * Render upload area + * + * @param Pagefiles|null $value + * @return string + * + */ protected function ___renderUpload($value) { if($value) {} if($this->noUpload || $this->renderValueMode) return ''; diff --git a/wire/modules/LanguageSupport/LanguageSupportPageNames.module b/wire/modules/LanguageSupport/LanguageSupportPageNames.module index 54ea8581..e551a8e9 100644 --- a/wire/modules/LanguageSupport/LanguageSupportPageNames.module +++ b/wire/modules/LanguageSupport/LanguageSupportPageNames.module @@ -277,6 +277,9 @@ class LanguageSupportPageNames extends WireData implements Module, ConfigurableM } else { // inactive status only applies to the page itself $active = $page->get("status$setLanguage") > 0; + + // https://github.com/processwire/processwire-issues/issues/463 + // $active = $page->get("status$setLanguage") > 0 || $page->template->noLang; } // if page is inactive for a language, and it's not editable, send a 404 if(!$active && !$page->editable() && $page->id != $config->http404PageID) {