Repository: openemr/openemr (language: php)

Issue:
Calendar Search Keywords Issue
### Describe the bug
Currently, it does not matter what you put in the Keywords field in calendar search, it does not change anything. 

### To Reproduce

Steps to reproduce the behavior:
1. Make sure you currently have events on the calendar that you can search for
2. Click on the magnifying glass button to search the calendar
3. Mess around with the Keywords field and notice no matter what you do, the results are the same when you search

### Expected behavior
Keywords field should work

### Client configuration

- Browser: All
- OpenEMR version: All
- Operating system: All

<!-- Love openemr? Please consider supporting our project:
👉  https://github.com/sponsors/openemr -->





Discussion / hints:
Currently working on a fix for this
Note: There is another issue with the 'OR' condition that I'm unsure about yet, but it seems like when you set the condition as 'OR', it does the exact same thing as 'AND'

So to test the Keyword issue, you can try a Keyword that doesn't match anything on the calendar. If you get no results, that means the Keyword issue is fixed. 

Fix patch:
diff --git a/interface/main/calendar/modules/PostCalendar/pnuser.php b/interface/main/calendar/modules/PostCalendar/pnuser.php
index ebf84895bc9..ead6eb4349f 100644
--- a/interface/main/calendar/modules/PostCalendar/pnuser.php
+++ b/interface/main/calendar/modules/PostCalendar/pnuser.php
@@ -122,7 +122,7 @@ function postcalendar_user_display($args)
 function postcalendar_user_search()
 {
     $tpl = new pcSmarty();
-    $k = isset($_REQUEST['pc_keywords']) ? pnVarCleanFromInput($_REQUEST['pc_keywords']) : '';
+    $k = pnVarCleanFromInput('pc_keywords') ?? '';
     $k_andor = pnVarCleanFromInput('pc_keywords_andor');
     $pc_category = pnVarCleanFromInput('pc_category');
     $pc_facility = pnVarCleanFromInput('pc_facility');


Test patch: