Skip to content

Commit 0cf1a1f

Browse files
committed
Patterns fix
1 parent ae06393 commit 0cf1a1f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

modules/patterns/patterns.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ function buildTree_patterns($res, $parent_id = 0, $level = 0)
833833

834834
function processSubscription($event, &$details)
835835
{
836-
if ($event == 'SAY' || $event == 'COMMAND') {
836+
if ($event == 'SAY' || $event == 'SAYTO' || $event == 'COMMAND' || $event == 'ASK') {
837837
$member_id = (int)$details['member_id'];
838838

839839
global $context_user_id;
@@ -859,6 +859,8 @@ function install($data = '')
859859
{
860860
parent::install();
861861
subscribeToEvent($this->name, 'SAY');
862+
subscribeToEvent($this->name, 'SAYTO');
863+
subscribeToEvent($this->name, 'ASK');
862864
subscribeToEvent($this->name, 'COMMAND');
863865
}
864866

modules/patterns/patterns_edit.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
$out['PARENT_ID'] = gr('$parent_id');
3+
$out['PARENT_ID'] = gr('parent_id');
44

55
if (defined('SETTINGS_CODEEDITOR_TURNONSETTINGS')) {
66
$out['SETTINGS_CODEEDITOR_TURNONSETTINGS'] = SETTINGS_CODEEDITOR_TURNONSETTINGS;
@@ -115,7 +115,7 @@
115115
}
116116

117117

118-
$rec['PARENT_ID'] = (int)$parent_id;
118+
$rec['PARENT_ID'] = gr('parent_id','int');
119119

120120
if ($rec['PATTERN_TYPE'] == 1) {
121121
$rec['PARENT_ID'] = 0;

0 commit comments

Comments
 (0)