This file handles probably the two most critical functions in SimpleDesk: the one that adds new posts to the database and one that saves updated posts; also contains miscellaneous code that applies generally in posting.
This function handles all of the creation of posts and tickets within SimpleDesk, even with respect to managing tickets spawned from forum topics being moved, as well as newly deleted tickets (formed as a split when replies are deleted). New tickets' contents as well as replies to tickets generally hold the same format. All three parameters are by reference meaning they WILL be updated if things change. Note that this function is not validating that they are sensible values; it is up to the calling function to ascertain that.
Parameter: $msgOptions
Expected type: array
A hash array by reference, containing details of the post you wish to add.
Parameter: $ticketOptions
Expected type: array
A hash array by reference, containing details of the ticket as a whole.
Parameter: $posterOptions
Expected type: array
A hash array by reference, containing details of the person the reply is written by.
This function allows modification of all post/ticket details - and can be used independently; it is possible (and even done in SimpleDesk) to update just a ticket or just a post from this function. All three parameters are by reference meaning they WILL be updated if things change. Note that this function is not validating that they are sensible values; it is up to the calling function to ascertain that.
Parameter: $msgOptions
Expected type: array
- a hash array by reference, stating zero or more details to change on a message (if the change is strictly ticket-only, the entire $msgOptions array can be an empty array):
Parameter: $ticketOptions
Expected type: array
- a hash array by reference, stating one or more details necessary to change on a ticket:
Parameter: $posterOptions
Expected type: array
- a hash array by reference of details to change on the poster of a message:
Ticket urgency permissions are checked, and an array is built suitable for $context['ticket_form'], which is the principle format used in the ticket posting/reply posting functions in SimpleDesk-Post.php. There is no return function; $context['ticket_form']['urgency'] is updated, both the ['options'] and ['can_change'] keys may be modified.
Parameter: $self_ticket
Expected type: bool
Default: false
(default false) Permissions will be different for many users depending on whether it is one of their own tickets or not. This allows the code to state whether it is a ticket owned by the current user or not.
Page created in 0.018 seconds with 13 queries.