mirror of
https://github.com/processwire/processwire.git
synced 2025-08-15 11:14:12 +02:00
Various minor adjustments
This commit is contained in:
@@ -94,6 +94,7 @@ class InputfieldForm extends InputfieldWrapper {
|
|||||||
|
|
||||||
public function ___render() {
|
public function ___render() {
|
||||||
|
|
||||||
|
$markup = self::getMarkup();
|
||||||
$classes = self::getClasses();
|
$classes = self::getClasses();
|
||||||
if(!empty($classes['form'])) $this->addClass($classes['form']);
|
if(!empty($classes['form'])) $this->addClass($classes['form']);
|
||||||
|
|
||||||
@@ -118,7 +119,7 @@ class InputfieldForm extends InputfieldWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$description = $this->getSetting('description');
|
$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);
|
$attrStr = $this->getAttributesString($attrs);
|
||||||
|
|
||||||
|
@@ -80,6 +80,7 @@ class PagePaths extends WireData implements Module {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function hookModulesRefresh(HookEvent $event) {
|
public function hookModulesRefresh(HookEvent $event) {
|
||||||
|
if($event) {} // ignore
|
||||||
if($this->getLanguages()) {
|
if($this->getLanguages()) {
|
||||||
$this->wire('session')->warning(
|
$this->wire('session')->warning(
|
||||||
$this->_('Please uninstall the Core > PagePaths module (it is not compatible with LanguageSupportPageNames)')
|
$this->_('Please uninstall the Core > PagePaths module (it is not compatible with LanguageSupportPageNames)')
|
||||||
@@ -90,6 +91,8 @@ class PagePaths extends WireData implements Module {
|
|||||||
/**
|
/**
|
||||||
* Hook called when a page is moved or renamed
|
* Hook called when a page is moved or renamed
|
||||||
*
|
*
|
||||||
|
* @param HookEvent $event
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public function hookPageMoved(HookEvent $event) {
|
public function hookPageMoved(HookEvent $event) {
|
||||||
$page = $event->arguments[0];
|
$page = $event->arguments[0];
|
||||||
@@ -100,6 +103,8 @@ class PagePaths extends WireData implements Module {
|
|||||||
/**
|
/**
|
||||||
* When a page is deleted
|
* When a page is deleted
|
||||||
*
|
*
|
||||||
|
* @param HookEvent $event
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
public function hookPageDeleted(HookEvent $event) {
|
public function hookPageDeleted(HookEvent $event) {
|
||||||
$page = $event->arguments[0];
|
$page = $event->arguments[0];
|
||||||
@@ -164,7 +169,7 @@ class PagePaths extends WireData implements Module {
|
|||||||
$table = self::dbTableName;
|
$table = self::dbTableName;
|
||||||
$alias = "$table$n";
|
$alias = "$table$n";
|
||||||
$value = $selector->value;
|
$value = $selector->value;
|
||||||
$joinType = $selector->not ? 'leftjoin' : 'join';
|
// $joinType = $selector->not ? 'leftjoin' : 'join';
|
||||||
|
|
||||||
$query->join("$table AS $alias ON pages.id=$alias.pages_id");
|
$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";
|
$error = "NOT mode isn't yet supported with path/url and '$selector->operator' operator";
|
||||||
throw new PageFinderSyntaxException($error);
|
throw new PageFinderSyntaxException($error);
|
||||||
}
|
}
|
||||||
|
/** @var DatabaseQuerySelectFulltext $ft */
|
||||||
$ft = $this->wire(new DatabaseQuerySelectFulltext($query));
|
$ft = $this->wire(new DatabaseQuerySelectFulltext($query));
|
||||||
$ft->match($alias, 'path', $selector->operator, trim($value, '/'));
|
$ft->match($alias, 'path', $selector->operator, trim($value, '/'));
|
||||||
}
|
}
|
||||||
@@ -266,6 +272,7 @@ class PagePaths extends WireData implements Module {
|
|||||||
|
|
||||||
$database->query($sql);
|
$database->query($sql);
|
||||||
$numUpdated = $this->updatePagePath(1, '/');
|
$numUpdated = $this->updatePagePath(1, '/');
|
||||||
|
if($numUpdated) {} // ignore
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -664,7 +664,7 @@ class SystemNotifications extends WireData implements Module {
|
|||||||
$field->label = 'Notifications';
|
$field->label = 'Notifications';
|
||||||
$field->type = $fieldtype;
|
$field->type = $fieldtype;
|
||||||
$field->collapsed = Inputfield::collapsedBlank;
|
$field->collapsed = Inputfield::collapsedBlank;
|
||||||
$field->flags = Field::flagSystem | Field::flagPermanent;
|
$field->flags = Field::flagSystem;
|
||||||
$field->save();
|
$field->save();
|
||||||
}
|
}
|
||||||
$fieldgroup = $this->wire('fieldgroups')->get('user');
|
$fieldgroup = $this->wire('fieldgroups')->get('user');
|
||||||
|
Reference in New Issue
Block a user