1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-15 03:05:26 +02:00

Various minor adjustments

This commit is contained in:
Ryan Cramer
2020-05-01 16:34:03 -04:00
parent d07ba2661d
commit b5c4980b3b
3 changed files with 13 additions and 5 deletions

View File

@@ -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<h2>" . $this->entityEncode($description) . "</h2>";
if($description) $description = str_replace('{out}', $this->entityEncode($description), $markup['item_head']);
$attrStr = $this->getAttributesString($attrs);

View File

@@ -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
}
/**

View File

@@ -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');