Class vB_DataManager_ThreadPost

Description

Base data manager for threads and posts. Uninstantiable.

  • version: $Revision: 26120 $
  • date: $Date: 2008-03-17 07:54:36 -0500 (Mon, 17 Mar 2008) $

Located in /includes/class_dm_threadpost.php (line 27)

vB_DataManager
   |
   --vB_DataManager_ThreadPost
Direct descendents
Class Description
 class vB_DataManager_Post Class to do data save/delete operations for POSTS
 class vB_DataManager_Thread Class to do data save/delete operations for THREADS. Primarily useful when updating a thread's settings and you don't want to bring the first post into the picture.
Variable Summary
 null|vB_Floodcheck $floodcheck
 boolean $spamlog_insert
Method Summary
 vB_DataManager_ThreadPost vB_DataManager_ThreadPost (vB_Registry &$registry, [integer $errtype = ERRTYPE_STANDARD])
 void akismet_mark_as_ham ( $postid)
 void email_moderators ( $fields)
 integer fetch_attachment_count (string $posthash, [integer $userid = -1])
 void insert_dupehash ([ $threadid = -1])
 void post_save_each_post ([ $doquery = true])
 bool pre_save_post ([ $doquery = true])
 bool verify_iconid (integer &$iconid)
 void verify_pagetext (string &$pagetext, bool 1)
 void verify_title (string &$title, bool 1)
 boolean verify_userid (integer &$userid)
Variables
null|vB_Floodcheck $floodcheck = null (line 35)

If doing a flood check, this will hold the flood check object.

Needed for rollbacks.

boolean $spamlog_insert = false (line 42)

If the post was marked as spam in pre-save, insert a row in postsave

Inherited Variables

Inherited from vB_DataManager

vB_DataManager::$bitfields
vB_DataManager::$condition
vB_DataManager::$condition_construct
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
vB_DataManager::$table
vB_DataManager::$validfields
Methods
Constructor vB_DataManager_ThreadPost (line 50)

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

vB_DataManager_ThreadPost vB_DataManager_ThreadPost (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
akismet_mark_as_ham (line 304)
void akismet_mark_as_ham ( $postid)
  • $postid
email_moderators (line 325)
void email_moderators ( $fields)
  • $fields
fetch_attachment_count (line 233)

Fetches the amount of attachments associated with a posthash and user

  • return: Number of attachments
integer fetch_attachment_count (string $posthash, [integer $userid = -1])
  • string $posthash: Post hash
  • integer $userid: User ID associated with post hash (-1 means current user)
insert_dupehash (line 251)
void insert_dupehash ([ $threadid = -1])
  • $threadid
insert_postlog_data (line 288)

Inserts Post Log data for Akismet

void insert_postlog_data ()
post_save_each_post (line 504)

Post save function run on each record. Applies only if there was a post submitted.

void post_save_each_post ([ $doquery = true])
  • $doquery
pre_save_post (line 400)

This is a pre_save method that only applies to the subclasses that have post fields as their members (ie, not _Thread). Likely only called in those class's pre_save methods.

  • return: True on success, false on failure
bool pre_save_post ([ $doquery = true])
  • $doquery
verify_iconid (line 184)

Verifies that the icon selected is valid.

  • return: Whether the icon is valid
bool verify_iconid (integer &$iconid)
  • integer &$iconid: The ID of the icon
verify_pagetext (line 151)

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 107)

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

Redefined in descendants as:
verify_userid (line 67)

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:06 -0500 by phpDocumentor 1.4.1