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->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) {
|
||||
$fieldInputfields[$field->id] = $inputfield;
|
||||
|
@@ -330,6 +330,7 @@ class WireUpload extends Wire {
|
||||
$extension = strtolower($pathInfo['extension']);
|
||||
|
||||
if(in_array($extension, $this->badExtensions)) return false;
|
||||
if(strpos($extension, 'php') === 0) return false;
|
||||
if(in_array($extension, $this->validExtensions)) return true;
|
||||
|
||||
return false;
|
||||
|
@@ -50,8 +50,8 @@ class FieldtypePageTitleLanguage extends FieldtypeTextLanguage implements Fieldt
|
||||
}
|
||||
|
||||
public function getInputfield(Page $page, Field $field) {
|
||||
$inputField = $this->modules->get('InputfieldPageTitle');
|
||||
return $inputField;
|
||||
$inputfield = $this->modules->get('InputfieldPageTitle');
|
||||
return $inputfield;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -182,7 +182,7 @@ class MarkupRSS extends WireData implements Module, ConfigurableModule {
|
||||
|
||||
$description = $page->get($this->itemDescriptionField);
|
||||
$description = $description === null ? '' : $this->ent1($this->truncateDescription($description));
|
||||
$description = '<![CDATA[' . $description . ']]';
|
||||
$description = '<![CDATA[' . $description . ']]>';
|
||||
|
||||
$out =
|
||||
"\t<item>\n" .
|
||||
@@ -390,7 +390,7 @@ class MarkupRSS extends WireData implements Module, ConfigurableModule {
|
||||
$f1->addOption($field->name);
|
||||
$f2->addOption($field->name);
|
||||
|
||||
} else if($field->type instanceof FieldtypeDate) {
|
||||
} else if($field->type instanceof FieldtypeDatetime) {
|
||||
$f3->addOption($field->name);
|
||||
}
|
||||
}
|
||||
|
@@ -79,8 +79,8 @@ class ProcessPageType extends Process implements ConfigurableModule, WirePageEdi
|
||||
*/
|
||||
public function init() {
|
||||
|
||||
$this->config->scripts->add($this->config->urls->ProcessPageType . 'ProcessPageType.js');
|
||||
$this->config->styles->add($this->config->urls->ProcessPageType . 'ProcessPageType.css');
|
||||
$this->config->scripts->add($this->config->urls('ProcessPageType') . 'ProcessPageType.js');
|
||||
$this->config->styles->add($this->config->urls('ProcessPageType') . 'ProcessPageType.css');
|
||||
|
||||
$this->pages = $this->wire($this->page->name);
|
||||
|
||||
@@ -332,6 +332,7 @@ class ProcessPageType extends Process implements ConfigurableModule, WirePageEdi
|
||||
public function ___executeAdd() {
|
||||
$pageTitle = $this->page->get('title|name');
|
||||
$this->breadcrumb('../', $pageTitle);
|
||||
/** @var ProcessPageAdd $editor */
|
||||
$editor = $this->getEditor("ProcessPageAdd");
|
||||
$editor->template = $this->template;
|
||||
try {
|
||||
|
Reference in New Issue
Block a user