Class vB_DataManager_Thread_FirstPost

Description

Class to do data save/delete operations for a THREAD and its FIRST POST.

This is an important distinction!

  • version: $Revision: 34950 $
  • date: $Date: 2010-01-13 15:31:59 -0600 (Wed, 13 Jan 2010) $

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

vB_DataManager
   |
   --vB_DataManager_ThreadPost
      |
      --vB_DataManager_Thread
         |
         --vB_DataManager_Thread_FirstPost
Variable Summary
 array $bitfields
 array $post
 string $table
 array $thread
 array $validfields
Method Summary
 vB_DataManager_Thread_FirstPost vB_DataManager_Thread_FirstPost (vB_Registry &$registry, [integer $errtype = ERRTYPE_STANDARD])
 mixed delete ([boolean $countposts = true], [boolean $physicaldel = true], [array $delinfo = NULL], [boolean $dolog = true])
 void do_set (string $fieldname, mixed &$value)
 void post_save_each ([ $doquery = true])
 void post_save_once ([ $doquery = true])
 void pre_save ([ $doquery = true])
 mixed save ([ $doquery = true])
Variables
array $bitfields = array() (line 1556)

Array of field names that are bitfields, together with the name of the variable in the registry with the definitions.


Redefinition of:
vB_DataManager_Thread::$bitfields
Array of field names that are bitfields, together with the name of the variable in the registry with the definitions.
array $condition_construct = array('threadid = %1$d', 'threadid') (line 1571)

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.


Redefinition of:
vB_DataManager_Thread::$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.
array $post = array() (line 1585)

Array to store stuff to save to post table

string $table = 'thread' (line 1563)

The main table this class deals with


Redefinition of:
vB_DataManager_Thread::$table
The main table this class deals with
array $thread = array() (line 1578)

Array to store stuff to save to thread table


Redefinition of:
vB_DataManager_Thread::$thread
Array to store stuff to save to thread/post tables
array $validfields = array(
'firstpostid' => array(TYPE_UINT, REQ_AUTO),'lastpost'=>array(TYPE_UINT,REQ_AUTO),'forumid'=>array(TYPE_UINT,REQ_YES),'pollid'=>array(TYPE_UINT,REQ_NO),'open'=>array(TYPE_UINT,REQ_AUTO,VF_METHOD),'replycount'=>array(TYPE_UINT,REQ_AUTO),'hiddencount'=>array(TYPE_UINT,REQ_AUTO),'deletedcount'=>array(TYPE_UINT,REQ_AUTO),'lastposter'=>array(TYPE_STR,REQ_AUTO),'lastposterid'=>array(TYPE_UINT,REQ_AUTO),'lastpostid'=>array(TYPE_UINT,REQ_AUTO),'views'=>array(TYPE_UINT,REQ_NO),'notes'=>array(TYPE_STR,REQ_NO),'sticky'=>array(TYPE_UINT,REQ_NO,VF_METHOD),'votenum'=>array(TYPE_UINT,REQ_NO),'votetotal'=>array(TYPE_UINT,REQ_NO),'similar'=>array(TYPE_STR,REQ_AUTO),'prefixid'=>array(TYPE_STR,REQ_NO,VF_METHOD),'taglist'=>array(TYPE_STR,REQ_NO),'keywords'=>array(TYPE_STR,REQ_NO),// shared fields
'threadid'=>array(TYPE_UINT,REQ_INCR),'title'=>array(TYPE_STR,REQ_YES,VF_METHOD),'username'=>array(TYPE_STR,REQ_NO,VF_METHOD),// maps to thread.postusername
'userid'=>array(TYPE_UINT,REQ_NO,VF_METHOD),// maps to thread.postuserid
'dateline'=>array(TYPE_UINT,REQ_AUTO),'iconid'=>array(TYPE_UINT,REQ_NO,VF_METHOD),'visible'=>array(TYPE_BOOL,REQ_NO),// note: post.visible will always be 1 with this object!
'attach'=>array(TYPE_UINT,REQ_NO),// post only fields
'pagetext'=>array(TYPE_STR,REQ_YES,VF_METHOD),'allowsmilie'=>array(TYPE_UINT,REQ_YES),// this is required as we must know whether smilies count as images
'showsignature'=>array(TYPE_BOOL,REQ_NO),'ipaddress'=>array(TYPE_STR,REQ_AUTO),)
(line 1512)

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


Redefinition of:
vB_DataManager_Thread::$validfields
Array of recognised and required fields for threads, and their types

Inherited Variables

Inherited from vB_DataManager_Thread

vB_DataManager_Thread::$modlog

Inherited from vB_DataManager_ThreadPost

vB_DataManager_ThreadPost::$floodcheck
vB_DataManager_ThreadPost::$spamlog_insert

Inherited from vB_DataManager

vB_DataManager::$condition
vB_DataManager::$dbobject
vB_DataManager::$errors
vB_DataManager::$error_handler
vB_DataManager::$existing
vB_DataManager::$failure_callback
vB_DataManager::$hook_delete
vB_DataManager::$hook_postsave
vB_DataManager::$hook_presave
vB_DataManager::$hook_start
vB_DataManager::$info
vB_DataManager::$lamda
vB_DataManager::$presave_called
vB_DataManager::$rawfields
vB_DataManager::$registry
vB_DataManager::$setfields
Methods
Constructor vB_DataManager_Thread_FirstPost (line 1593)

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

vB_DataManager_Thread_FirstPost vB_DataManager_Thread_FirstPost (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 1880)

Deletes a thread with the first post

  • return: The number of affected rows
mixed delete ([boolean $countposts = true], [boolean $physicaldel = true], [array $delinfo = NULL], [boolean $dolog = true])
  • boolean $countposts: Whether to consider updating post counts, regardless of forum's settings
  • boolean $physicaldel: Whether to physically remove the thread from the database
  • array $delinfo: Array of information for a soft delete
  • boolean $dolog: Whether to add an entry to the moderator log

Redefinition of:
vB_DataManager_Thread::delete()
Deletes a thread
do_set (line 1606)

Takes valid data and sets it as part of the data to be saved

void do_set (string $fieldname, mixed &$value)
  • string $fieldname: The name of the field to which the supplied data should be applied
  • mixed &$value: The data itself

Redefinition of:
vB_DataManager_Thread::do_set()
Takes valid data and sets it as part of the data to be saved
post_save_each (line 1795)
void post_save_each ([ $doquery = true])
  • $doquery

Redefinition of:
vB_DataManager_Thread::post_save_each()
post_save_once (line 1778)
void post_save_once ([ $doquery = true])
  • $doquery

Redefinition of:
vB_DataManager_Thread::post_save_once()
pre_save (line 1717)
void pre_save ([ $doquery = true])
  • $doquery

Redefinition of:
vB_DataManager_Thread::pre_save()
save (line 1670)

Saves thread data to the database

mixed save ([ $doquery = true])
  • $doquery

Redefinition of:
vB_DataManager::save()
Saves the data from the object into the specified database tables

Inherited Methods

Inherited From vB_DataManager_Thread

 vB_DataManager_Thread::vB_DataManager_Thread()
 vB_DataManager_Thread::delete()
 vB_DataManager_Thread::do_set()
 vB_DataManager_Thread::insert_moderator_log()
 vB_DataManager_Thread::post_save_each()
 vB_DataManager_Thread::post_save_once()
 vB_DataManager_Thread::pre_save()
 vB_DataManager_Thread::verify_open()
 vB_DataManager_Thread::verify_prefixid()
 vB_DataManager_Thread::verify_sticky()
 vB_DataManager_Thread::verify_title()

Inherited From vB_DataManager_ThreadPost

 vB_DataManager_ThreadPost::vB_DataManager_ThreadPost()
 vB_DataManager_ThreadPost::akismet_mark_as_ham()
 vB_DataManager_ThreadPost::email_moderators()
 vB_DataManager_ThreadPost::fetch_attachment_count()
 vB_DataManager_ThreadPost::insert_dupehash()
 vB_DataManager_ThreadPost::insert_postlog_data()
 vB_DataManager_ThreadPost::post_save_each_post()
 vB_DataManager_ThreadPost::pre_save_post()
 vB_DataManager_ThreadPost::rebuild_keywords()
 vB_DataManager_ThreadPost::verify_iconid()
 vB_DataManager_ThreadPost::verify_pagetext()
 vB_DataManager_ThreadPost::verify_title()
 vB_DataManager_ThreadPost::verify_userid()

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_nonzero_or_negone()
 vB_DataManager::verify_pagetext()
 vB_DataManager::verify_serialized()
 vB_DataManager::verify_spacelist()
 vB_DataManager::verify_userid()
 vB_DataManager::verify_username()

Documentation generated on Tue, 26 Jan 2010 15:15:32 -0600 by phpDocumentor 1.4.3