SimpleDesk API
Procedural File: SimpleDesk-TicketTopicMove.php
Source Location: /source/SimpleDesk-TicketTopicMove.phpThis file handles displaying the user options for, and subsequently enacting, tickets being moved to/from the helpdesk, from/to forum threads.
Tags:
- since
- 1.0
Contains the following functions:
shd_tickettotopic [line 41]
void shd_tickettotopic (
)
Load the form up for asking users what board they want to go to.
Validates the user permission and session, then displays a list of boards the user can create new topics in.
Accessed through action=helpdesk;sa=tickettotopic;ticket=x;sessvar=sessid
Tags:
- see
- shd_tickettotopic2()
- since
- 1.0
Return value
This function has no return value.shd_tickettotopic2 [line 163]
void shd_tickettotopic2 (
)
Receives the form for moving tickets to topics, and actually handles the move.
After checking permissions, and so on, begin to actually move posts.
This is done by invoking SMF's createPost function to make the new thread and repost all the ticket's posts as new thread posts using defaults for some settings.
Operations:
- check the user can see the board they are linking to
- move the ticket's text as the opening post
- update the ticket row if the post was modified before
- get the rest of the replies
- step through and post, updating for modified details
- send the notification PM if we're doing that
- update the attachments table
- update the action log
- remove the ticket from the DB
Tags:
- see
- shd_tickettotopic()
- since
- 1.0
Return value
This function has no return value.shd_topictoticket [line 519]
void shd_topictoticket (
)
Load the form up for asking users whether to send a personal message (and what message) to the topic/ticket starter or not. Most of the rest of this function is about loading the data to make the page well-rounded (like the subject for breadcrumbs)
Validates the user permission and session, of course.
Accessed through action=helpdesk;sa=topictoticket;topic=x;sessvar=sessid
Tags:
- see
- shd_topictoticket2()
- since
- 1.0
Return value
This function has no return value.shd_topictoticket2 [line 593]
void shd_topictoticket2 (
)
Handles moving a topic into the helpdesk.
After checking permissions, and so on, begin to actually move posts.
Broadly this is done using shd_create_ticket_post(), which has hooks specifically to deal with post modification times (written in specifically to ease this function's workload)
Operations:
- get the topic information (and checking topic access permission in the process)
- identify the status of the topic (new/with staff/with user)
- create the new ticket from these details
- assuming there are replies, query for them
- step through and repost
- send the notification PM if we're doing that
- update the attachments table
- update the action log
- remove the topic from the forum
Tags:
- see
- shd_topictoticket()
- since
- 1.0



