Class vB_DataManager_GroupMessage

Description

Class to do data save/delete operations for profile messages

  • version: $Revision: 26098 $
  • date: $Date: 2008-03-14 06:52:33 -0500 (Fri, 14 Mar 2008) $

Located in /includes/class_dm_groupmessage.php (line 25)

vB_DataManager
   |
   --vB_DataManager_GroupMessage
Variable Summary
Method Summary
 vB_DataManager_GroupMessage vB_DataManager_GroupMessage (vB_Registry &$registry, [integer $errtype = ERRTYPE_STANDARD])
 boolean delete ()
 void insert_dupehash ([integer $groupid = -1])
 boolean is_duplicate ()
 boolean is_flooding ()
 void post_delete ([boolean $doquery = true])
 void post_save_once ([boolean $doquery = true])
 boolean pre_save ([boolean $doquery = true])
 void update_owner_pending_gm_count (integer $ownerid)
 void verify_ipaddress (string &$ipaddress, bool 1)
 void verify_pagetext (string &$pagetext, bool 1)
 void verify_title (string &$title, bool 1)
 boolean verify_userid (integer &$userid)
Variables
array $condition_construct = array('gmid = %1$s', 'gmid') (line 51)

Condition for update query


Redefinition of:
vB_DataManager::$condition_construct
Condition template for update query This is for use with sprintf(). First key is the where clause, further keys are the field names of the data to be used.
string $table = 'groupmessage' (line 58)

The main table this class deals with


Redefinition of:
vB_DataManager::$table
Default table to be used in queries
array $validfields = array(
'gmid' => array(TYPE_UINT, REQ_INCR, VF_METHOD, 'verify_nonzero'),'groupid'=>array(TYPE_UINT,REQ_YES),'postuserid'=>array(TYPE_UINT,REQ_NO,VF_METHOD,'verify_userid'),'postusername'=>array(TYPE_NOHTMLCOND,REQ_NO,VF_METHOD,'verify_username'),'dateline'=>array(TYPE_UNIXTIME,REQ_AUTO),'state'=>array(TYPE_STR,REQ_NO),'title'=>array(TYPE_NOHTMLCOND,REQ_NO,VF_METHOD),'pagetext'=>array(TYPE_STR,REQ_YES,VF_METHOD),'ipaddress'=>array(TYPE_STR,REQ_AUTO,VF_METHOD),'allowsmilie'=>array(TYPE_UINT,REQ_NO),'reportthreadid'=>array(TYPE_UINT,REQ_NO),)
(line 32)

Array of recognised and required fields for groupmessage, and their types


Redefinition of:
vB_DataManager::$validfields
Array of field names that are valid for this data object

Inherited Variables

Inherited from vB_DataManager

vB_DataManager::$bitfields
vB_DataManager::$condition
vB_DataManager::$dbobject
vB_DataManager::$errors
vB_DataManager::$error_handler
vB_DataManager::$existing
vB_DataManager::$failure_callback
vB_DataManager::$info
vB_DataManager::$lamda
vB_DataManager::$presave_called
vB_DataManager::$rawfields
vB_DataManager::$registry
vB_DataManager::$setfields
Methods
Constructor vB_DataManager_GroupMessage (line 108)

Constructor - checks that the registry object has been passed correctly.

vB_DataManager_GroupMessage vB_DataManager_GroupMessage (vB_Registry &$registry, [integer $errtype = ERRTYPE_STANDARD])
  • vB_Registry &$registry: Instance of the vBulletin data registry object - expected to have the database object as one of its $this->db member.
  • integer $errtype: One of the ERRTYPE_x constants
delete (line 186)

Deleted a SG Message

  • return: Was this message deleted successfully?
boolean delete ()

Redefinition of:
vB_DataManager::delete()
Deletes the specified data item from the database
insert_dupehash (line 477)

Inserts a hash into the database for use with duplicate checking

void insert_dupehash ([integer $groupid = -1])
  • integer $groupid: Group ID (-1 for current group from DM)
is_duplicate (line 445)

Is this a duplicate post of a message posted with the last 5 minutes?

  • return: whether this is a duplicate post or not
boolean is_duplicate ()
is_flooding (line 412)

Determines whether the message being posted would constitute flooding

  • return: Is this classed as flooding?
boolean is_flooding ()
post_delete (line 243)
void post_delete ([boolean $doquery = true])
  • boolean $doquery: Do the query?

Redefinition of:
vB_DataManager::post_delete()
Additional data to update after a delete call (such as denormalized values in other tables).
post_save_once (line 253)
void post_save_once ([boolean $doquery = true])
  • boolean $doquery: Do the query?

Redefinition of:
vB_DataManager::post_save_once()
Additional data to update after a save call (such as denormalized values in other tables).
pre_save (line 122)

Pre-Save code for a SG Message

  • return: Did this function run successfully?
boolean pre_save ([boolean $doquery = true])
  • boolean $doquery: Do we actually run the query?

Redefinition of:
vB_DataManager::pre_save()
Any checks to run immediately before saving. If returning false, the save will not take place.
update_owner_pending_gm_count (line 311)

Updates the counter for the owner of the group that shows how many pending members they have awaiting them to deal with

void update_owner_pending_gm_count (integer $ownerid)
  • integer $ownerid: The userid of the owner of the group
verify_ipaddress (line 365)

Converts ip address into an integer

void verify_ipaddress (string &$ipaddress, bool 1)
  • bool 1: Whether the ip is valid
  • string &$ipaddress: IP Address

Redefinition of:
vB_DataManager::verify_ipaddress()
Verifies an IP address - currently only works with IPv4
verify_pagetext (line 379)

Verifies the page text is valid and sets it up for saving.

void verify_pagetext (string &$pagetext, bool 1)
  • bool 1: Whether the text is valid
  • string &$pagetext: Page text

Redefinition of:
vB_DataManager::verify_pagetext()
Basic options to perform on all pagetext type fields
verify_title (line 67)

Verifies the title is valid and sets up the title for saving (wordwrap, censor, etc).

void verify_title (string &$title, bool 1)
  • bool 1: Whether the title is valid
  • string &$title: Title text
verify_userid (line 332)

Verifies that the specified user exists

  • return: Returns true if user exists
boolean verify_userid (integer &$userid)
  • integer &$userid: User ID

Redefinition of:
vB_DataManager::verify_userid()
Verifies that the specified user exists

Inherited Methods

Inherited From vB_DataManager

 vB_DataManager::vB_DataManager()
 vB_DataManager::check_required()
 vB_DataManager::db_delete()
 vB_DataManager::db_insert()
 vB_DataManager::db_insert_ignore()
 vB_DataManager::db_update()
 vB_DataManager::delete()
 vB_DataManager::do_set()
 vB_DataManager::do_unset()
 vB_DataManager::error()
 vB_DataManager::fetch_field()
 vB_DataManager::fetch_insert_sql()
 vB_DataManager::fetch_update_sql()
 vB_DataManager::has_errors()
 vB_DataManager::post_delete()
 vB_DataManager::post_save_each()
 vB_DataManager::post_save_once()
 vB_DataManager::pre_delete()
 vB_DataManager::pre_save()
 vB_DataManager::save()
 vB_DataManager::set()
 vB_DataManager::setr()
 vB_DataManager::setr_info()
 vB_DataManager::set_bitfield()
 vB_DataManager::set_condition()
 vB_DataManager::set_error_handler()
 vB_DataManager::set_existing()
 vB_DataManager::set_failure_callback()
 vB_DataManager::set_info()
 vB_DataManager::strip_empty_bbcode()
 vB_DataManager::strip_empty_bbcode_callback()
 vB_DataManager::verify()
 vB_DataManager::verify_commalist()
 vB_DataManager::verify_date_array()
 vB_DataManager::verify_email()
 vB_DataManager::verify_image_count()
 vB_DataManager::verify_ipaddress()
 vB_DataManager::verify_link()
 vB_DataManager::verify_list()
 vB_DataManager::verify_md5()
 vB_DataManager::verify_nonempty()
 vB_DataManager::verify_nonzero()
 vB_DataManager::verify_pagetext()
 vB_DataManager::verify_serialized()
 vB_DataManager::verify_spacelist()
 vB_DataManager::verify_userid()
 vB_DataManager::verify_username()

Documentation generated on Fri, 09 May 2008 09:01:01 -0500 by phpDocumentor 1.4.1