From b5c4980b3b7c490b6f0b2fbb9da6f79af318d7f2 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Fri, 1 May 2020 16:34:03 -0400 Subject: [PATCH] Various minor adjustments --- wire/modules/Inputfield/InputfieldForm.module | 5 +++-- wire/modules/PagePaths.module | 11 +++++++++-- .../SystemNotifications/SystemNotifications.module | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/wire/modules/Inputfield/InputfieldForm.module b/wire/modules/Inputfield/InputfieldForm.module index d913dbfc..2f367d61 100644 --- a/wire/modules/Inputfield/InputfieldForm.module +++ b/wire/modules/Inputfield/InputfieldForm.module @@ -93,7 +93,8 @@ class InputfieldForm extends InputfieldWrapper { } public function ___render() { - + + $markup = self::getMarkup(); $classes = self::getClasses(); if(!empty($classes['form'])) $this->addClass($classes['form']); @@ -118,7 +119,7 @@ class InputfieldForm extends InputfieldWrapper { } $description = $this->getSetting('description'); - if($description) $description = "\n

" . $this->entityEncode($description) . "

"; + if($description) $description = str_replace('{out}', $this->entityEncode($description), $markup['item_head']); $attrStr = $this->getAttributesString($attrs); diff --git a/wire/modules/PagePaths.module b/wire/modules/PagePaths.module index e7cc13c2..1a01d5b4 100644 --- a/wire/modules/PagePaths.module +++ b/wire/modules/PagePaths.module @@ -80,6 +80,7 @@ class PagePaths extends WireData implements Module { * */ public function hookModulesRefresh(HookEvent $event) { + if($event) {} // ignore if($this->getLanguages()) { $this->wire('session')->warning( $this->_('Please uninstall the Core > PagePaths module (it is not compatible with LanguageSupportPageNames)') @@ -89,6 +90,8 @@ class PagePaths extends WireData implements Module { /** * Hook called when a page is moved or renamed + * + * @param HookEvent $event * */ public function hookPageMoved(HookEvent $event) { @@ -99,6 +102,8 @@ class PagePaths extends WireData implements Module { /** * When a page is deleted + * + * @param HookEvent $event * */ public function hookPageDeleted(HookEvent $event) { @@ -164,7 +169,7 @@ class PagePaths extends WireData implements Module { $table = self::dbTableName; $alias = "$table$n"; $value = $selector->value; - $joinType = $selector->not ? 'leftjoin' : 'join'; + // $joinType = $selector->not ? 'leftjoin' : 'join'; $query->join("$table AS $alias ON pages.id=$alias.pages_id"); @@ -188,6 +193,7 @@ class PagePaths extends WireData implements Module { $error = "NOT mode isn't yet supported with path/url and '$selector->operator' operator"; throw new PageFinderSyntaxException($error); } + /** @var DatabaseQuerySelectFulltext $ft */ $ft = $this->wire(new DatabaseQuerySelectFulltext($query)); $ft->match($alias, 'path', $selector->operator, trim($value, '/')); } @@ -265,7 +271,8 @@ class PagePaths extends WireData implements Module { ") ENGINE=$engine DEFAULT CHARSET=$charset"; $database->query($sql); - $numUpdated = $this->updatePagePath(1, '/'); + $numUpdated = $this->updatePagePath(1, '/'); + if($numUpdated) {} // ignore } /** diff --git a/wire/modules/System/SystemNotifications/SystemNotifications.module b/wire/modules/System/SystemNotifications/SystemNotifications.module index a44b4479..4895a772 100644 --- a/wire/modules/System/SystemNotifications/SystemNotifications.module +++ b/wire/modules/System/SystemNotifications/SystemNotifications.module @@ -664,7 +664,7 @@ class SystemNotifications extends WireData implements Module { $field->label = 'Notifications'; $field->type = $fieldtype; $field->collapsed = Inputfield::collapsedBlank; - $field->flags = Field::flagSystem | Field::flagPermanent; + $field->flags = Field::flagSystem; $field->save(); } $fieldgroup = $this->wire('fieldgroups')->get('user');