/program/modules/confab/confab_common.php - code shared between admin and view
This file defines various constants and subroutines used from both and confab_view.php.
check conversations for timeout and hard limit and maybe create a new participant_id
this is a dual-purpose routine. The first task is to check the validity of the current conversation. If the conversation started longer than CONFAB_MAX_CONVERSATION_LIMIT (24h) ago, we bluntly end the conversation by incrementing the last_conversation_id in the confab configuration. The same effect happens when the latest contribution to the conversation was more than $timeout_conversation (1h) ago.
If the conversation is no longer current, the last_conversation_id is incremented and also the last_participant_id is reset to 0. This information will be recorded in the database and also updated in the $config array (which was provided by reference, and not by value).
However... in order to save a trip to the database, we can also provide a new participant_id in the same go. This happens when $bump_participant is TRUE. The caller can be sure that in that case the value $config['last_participant_id'] can be used by the caller (provided the routine returns TRUE, indicating success).
If somehow something goes wrong, e.g. a database error, the $config record is untouched and the routine returns FALSE.
This routine should be called periodically, for instance - when a new participants wants to join a conversation - when a participant contributes to the conversation This keeps the conversation_id in line and makes sure that an ongoing conversation is stopped eventually.
retrieve all participants that joined the current conversation
shorthand for remote IP-address
Documentation generated on Tue, 28 Jun 2016 19:08:41 +0200 by phpDocumentor 1.4.0