mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 08:17:12 +02:00
Various minor updates
This commit is contained in:
@@ -632,7 +632,10 @@ class Fieldgroup extends WireArray implements Saveable, Exportable, HasLookupIte
|
|||||||
if(!$inputfield) continue;
|
if(!$inputfield) continue;
|
||||||
if($inputfield->collapsed == Inputfield::collapsedHidden) continue;
|
if($inputfield->collapsed == Inputfield::collapsedHidden) continue;
|
||||||
|
|
||||||
if(!$page instanceof NullPage) $inputfield->setAttribute('value', $page->get($field->name));
|
if(!$page instanceof NullPage) {
|
||||||
|
$value = $page->get($field->name);
|
||||||
|
$inputfield->setAttribute('value', $value);
|
||||||
|
}
|
||||||
|
|
||||||
if($multiMode) {
|
if($multiMode) {
|
||||||
$fieldInputfields[$field->id] = $inputfield;
|
$fieldInputfields[$field->id] = $inputfield;
|
||||||
|
@@ -330,6 +330,7 @@ class WireUpload extends Wire {
|
|||||||
$extension = strtolower($pathInfo['extension']);
|
$extension = strtolower($pathInfo['extension']);
|
||||||
|
|
||||||
if(in_array($extension, $this->badExtensions)) return false;
|
if(in_array($extension, $this->badExtensions)) return false;
|
||||||
|
if(strpos($extension, 'php') === 0) return false;
|
||||||
if(in_array($extension, $this->validExtensions)) return true;
|
if(in_array($extension, $this->validExtensions)) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@@ -50,8 +50,8 @@ class FieldtypePageTitleLanguage extends FieldtypeTextLanguage implements Fieldt
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getInputfield(Page $page, Field $field) {
|
public function getInputfield(Page $page, Field $field) {
|
||||||
$inputField = $this->modules->get('InputfieldPageTitle');
|
$inputfield = $this->modules->get('InputfieldPageTitle');
|
||||||
return $inputField;
|
return $inputfield;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -182,7 +182,7 @@ class MarkupRSS extends WireData implements Module, ConfigurableModule {
|
|||||||
|
|
||||||
$description = $page->get($this->itemDescriptionField);
|
$description = $page->get($this->itemDescriptionField);
|
||||||
$description = $description === null ? '' : $this->ent1($this->truncateDescription($description));
|
$description = $description === null ? '' : $this->ent1($this->truncateDescription($description));
|
||||||
$description = '<![CDATA[' . $description . ']]';
|
$description = '<![CDATA[' . $description . ']]>';
|
||||||
|
|
||||||
$out =
|
$out =
|
||||||
"\t<item>\n" .
|
"\t<item>\n" .
|
||||||
@@ -390,7 +390,7 @@ class MarkupRSS extends WireData implements Module, ConfigurableModule {
|
|||||||
$f1->addOption($field->name);
|
$f1->addOption($field->name);
|
||||||
$f2->addOption($field->name);
|
$f2->addOption($field->name);
|
||||||
|
|
||||||
} else if($field->type instanceof FieldtypeDate) {
|
} else if($field->type instanceof FieldtypeDatetime) {
|
||||||
$f3->addOption($field->name);
|
$f3->addOption($field->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -79,8 +79,8 @@ class ProcessPageType extends Process implements ConfigurableModule, WirePageEdi
|
|||||||
*/
|
*/
|
||||||
public function init() {
|
public function init() {
|
||||||
|
|
||||||
$this->config->scripts->add($this->config->urls->ProcessPageType . 'ProcessPageType.js');
|
$this->config->scripts->add($this->config->urls('ProcessPageType') . 'ProcessPageType.js');
|
||||||
$this->config->styles->add($this->config->urls->ProcessPageType . 'ProcessPageType.css');
|
$this->config->styles->add($this->config->urls('ProcessPageType') . 'ProcessPageType.css');
|
||||||
|
|
||||||
$this->pages = $this->wire($this->page->name);
|
$this->pages = $this->wire($this->page->name);
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ class ProcessPageType extends Process implements ConfigurableModule, WirePageEdi
|
|||||||
// $this->error("Unable to find API variable named '{$this->page->name}' (of type: PagesType)", Notice::debug);
|
// $this->error("Unable to find API variable named '{$this->page->name}' (of type: PagesType)", Notice::debug);
|
||||||
$this->pages = $this->wire('pages');
|
$this->pages = $this->wire('pages');
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->pages instanceof PagesType) {
|
if($this->pages instanceof PagesType) {
|
||||||
$this->template = $this->pages->getTemplate();
|
$this->template = $this->pages->getTemplate();
|
||||||
}
|
}
|
||||||
@@ -332,6 +332,7 @@ class ProcessPageType extends Process implements ConfigurableModule, WirePageEdi
|
|||||||
public function ___executeAdd() {
|
public function ___executeAdd() {
|
||||||
$pageTitle = $this->page->get('title|name');
|
$pageTitle = $this->page->get('title|name');
|
||||||
$this->breadcrumb('../', $pageTitle);
|
$this->breadcrumb('../', $pageTitle);
|
||||||
|
/** @var ProcessPageAdd $editor */
|
||||||
$editor = $this->getEditor("ProcessPageAdd");
|
$editor = $this->getEditor("ProcessPageAdd");
|
||||||
$editor->template = $this->template;
|
$editor->template = $this->template;
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user