File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ class Rest extends WebService
32
32
const POST_USER_MESSAGE_UNREAD = 'user_message_unread ' ;
33
33
const SAVE_USER_MESSAGE = 'save_user_message ' ;
34
34
const GET_MESSAGE_USERS = 'message_users ' ;
35
+ const VIEW_MESSAGE = 'view_message ' ;
35
36
36
37
const GET_USER_COURSES = 'user_courses ' ;
37
38
const GET_USER_SESSIONS = 'user_sessions ' ;
@@ -2925,6 +2926,14 @@ public function viewSurveyTool()
2925
2926
exit ;
2926
2927
}
2927
2928
2929
+ public function viewMessage (int $ messageId )
2930
+ {
2931
+ $ url = api_get_path (WEB_CODE_PATH ).'messages/view_message.php? ' .http_build_query (['id ' => $ messageId ]);
2932
+
2933
+ header ("Location: $ url " );
2934
+ exit ;
2935
+ }
2936
+
2928
2937
public static function isAllowedByRequest (bool $ inpersonate = false ): bool
2929
2938
{
2930
2939
$ username = $ _GET ['username ' ] ?? null ;
Original file line number Diff line number Diff line change 151
151
$ data = $ restApi ->getMessageUsers ($ search );
152
152
$ restResponse ->setData ($ data );
153
153
break ;
154
+ case Rest::VIEW_MESSAGE :
155
+ $ messageId = isset ($ _GET ['message ' ]) ? (int ) $ _GET ['message ' ] : 0 ;
156
+
157
+ $ restApi ->viewMessage ($ messageId );
158
+ break ;
154
159
155
160
case Rest::GET_USER_COURSES :
156
161
$ userId = isset ($ _REQUEST ['user_id ' ]) ? (int ) $ _REQUEST ['user_id ' ] : 0 ;
You can’t perform that action at this time.
0 commit comments