Skip to content

Commit e0f8e29

Browse files
authored
[4.3] Guided Tours search by note (#40607)
1 parent e29cb5f commit e0f8e29

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

administrator/components/com_guidedtours/src/Model/StepsModel.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function __construct($config = [])
5050
'created_by', 'a.created_by',
5151
'modified', 'a.modified',
5252
'modified_by', 'a.modified_by',
53+
'note', 'a.note',
5354
];
5455
}
5556

@@ -200,9 +201,10 @@ protected function getListQuery()
200201
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
201202
$query->where(
202203
'(' . $db->quoteName('a.title') . ' LIKE :search1'
203-
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search2)'
204+
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search2'
205+
. ' OR ' . $db->quoteName('a.note') . ' LIKE :search3)'
204206
)
205-
->bind([':search1', ':search2'], $search);
207+
->bind([':search1', ':search2', ':search3'], $search);
206208
}
207209
}
208210

administrator/components/com_guidedtours/src/Model/ToursModel.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public function __construct($config = [])
5151
'created_by', 'a.created_by',
5252
'modified', 'a.modified',
5353
'modified_by', 'a.modified_by',
54+
'note', 'a.note',
5455
];
5556
}
5657

@@ -220,9 +221,10 @@ public function getListQuery()
220221
$search = '%' . str_replace(' ', '%', trim($search)) . '%';
221222
$query->where(
222223
'(' . $db->quoteName('a.title') . ' LIKE :search1'
223-
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search2)'
224+
. ' OR ' . $db->quoteName('a.description') . ' LIKE :search2'
225+
. ' OR ' . $db->quoteName('a.note') . ' LIKE :search3)'
224226
)
225-
->bind([':search1', ':search2'], $search);
227+
->bind([':search1', ':search2', ':search3'], $search);
226228
}
227229
}
228230

administrator/language/en-GB/com_guidedtours.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ COM_GUIDEDTOURS_FIELD_VALUE_INTERACTIVESTEP_TYPE_TEXT_FIELD="Text Field"
2020
COM_GUIDEDTOURS_FIELD_VALUE_STEP_TYPE_INTERACTIVE="Interactive"
2121
COM_GUIDEDTOURS_FIELD_VALUE_STEP_TYPE_NEXT="Next"
2222
COM_GUIDEDTOURS_FIELD_VALUE_STEP_TYPE_REDIRECT="Redirect"
23-
COM_GUIDEDTOURS_FILTER_SEARCH_DESC="Search in title. Prefix with ID: to search for a tour ID or DESCRIPTION: to search in description."
23+
COM_GUIDEDTOURS_FILTER_SEARCH_DESC="Search in title and note. Prefix with ID: to search for a tour ID or DESCRIPTION: to search in description."
2424
COM_GUIDEDTOURS_FILTER_SEARCH_LABEL="Search Tours"
2525
COM_GUIDEDTOURS_GUIDEDTOURS_TABLE_CAPTION="Tours"
2626
COM_GUIDEDTOURS_MANAGER_STEP_EDIT="Guided Tours: Edit Step"
@@ -44,7 +44,7 @@ COM_GUIDEDTOURS_ORDER_TYPE_ASC="Type ascending"
4444
COM_GUIDEDTOURS_ORDER_TYPE_DESC="Type descending"
4545
COM_GUIDEDTOURS_STEP_DESCRIPTION_TRANSLATION="Description (%s)"
4646
COM_GUIDEDTOURS_STEP_EDIT_STEP="Edit Step"
47-
COM_GUIDEDTOURS_STEP_FILTER_SEARCH_DESC="Search in title. Prefix with ID: to search for a step ID or DESCRIPTION: to search in description."
47+
COM_GUIDEDTOURS_STEP_FILTER_SEARCH_DESC="Search in title and note. Prefix with ID: to search for a step ID or DESCRIPTION: to search in description."
4848
COM_GUIDEDTOURS_STEP_FILTER_SEARCH_LABEL="Search Steps"
4949
COM_GUIDEDTOURS_STEP_NEW_STEP="New Step"
5050
COM_GUIDEDTOURS_STEP_POSITION_DESC="Select the position of the step popup, relative to the element it points to."

0 commit comments

Comments
 (0)