[Customisation Database Commits] r603 - in /trunk/titania/includes: objects/contribution.php tools/sync.php
Nathan Guse
exreaction at phpbb.com
Mon Feb 15 01:39:43 GMT 2010
Author: exreaction
Date: Mon Feb 15 01:39:43 2010
New Revision: 603
Log:
Do not index cleaned contrib items
Modified:
trunk/titania/includes/objects/contribution.php
trunk/titania/includes/tools/sync.php
Modified: trunk/titania/includes/objects/contribution.php
==============================================================================
*** trunk/titania/includes/objects/contribution.php (original)
--- trunk/titania/includes/objects/contribution.php Mon Feb 15 01:39:43 2010
***************
*** 135,153 ****
parent::submit();
// Index!
! $data = array(
! 'title' => $this->contrib_name,
! 'text' => $this->contrib_desc,
! 'text_uid' => $this->contrib_desc_uid,
! 'text_bitfield' => $this->contrib_desc_bitfield,
! 'text_options' => $this->contrib_desc_options,
! 'author' => $this->contrib_user_id,
! 'date' => $this->contrib_last_update,
! 'url' => titania_url::unbuild_url($this->get_url()),
! 'approved' => (!titania::$config->require_validation || $this->contrib_status == TITANIA_CONTRIB_APPROVED) ? true : false,
! );
! titania_search::index($this->contrib_type, $this->contrib_id, $data);
}
/**
--- 135,156 ----
parent::submit();
// Index!
! if ($this->contrib_status != TITANIA_CONTRIB_CLEANED)
! {
! $data = array(
! 'title' => $this->contrib_name,
! 'text' => $this->contrib_desc,
! 'text_uid' => $this->contrib_desc_uid,
! 'text_bitfield' => $this->contrib_desc_bitfield,
! 'text_options' => $this->contrib_desc_options,
! 'author' => $this->contrib_user_id,
! 'date' => $this->contrib_last_update,
! 'url' => titania_url::unbuild_url($this->get_url()),
! 'approved' => (!titania::$config->require_validation || $this->contrib_status == TITANIA_CONTRIB_APPROVED) ? true : false,
! );
! titania_search::index($this->contrib_type, $this->contrib_id, $data);
! }
}
/**
***************
*** 196,214 ****
phpbb::$db->sql_query($sql);
// Index!
! $data = array(
! 'title' => $this->contrib_name,
! 'text' => $this->contrib_desc,
! 'text_uid' => $this->contrib_desc_uid,
! 'text_bitfield' => $this->contrib_desc_bitfield,
! 'text_options' => $this->contrib_desc_options,
! 'author' => $this->contrib_user_id,
! 'date' => $this->contrib_last_update,
! 'url' => titania_url::unbuild_url($this->get_url()),
! 'approved' => (!titania::$config->require_validation || $this->contrib_status == TITANIA_CONTRIB_APPROVED) ? true : false,
! );
! titania_search::index($this->contrib_type, $this->contrib_id, $data);
}
public function validate($contrib_categories = array())
--- 199,224 ----
phpbb::$db->sql_query($sql);
// Index!
! if ($this->contrib_status != TITANIA_CONTRIB_CLEANED)
! {
! $data = array(
! 'title' => $this->contrib_name,
! 'text' => $this->contrib_desc,
! 'text_uid' => $this->contrib_desc_uid,
! 'text_bitfield' => $this->contrib_desc_bitfield,
! 'text_options' => $this->contrib_desc_options,
! 'author' => $this->contrib_user_id,
! 'date' => $this->contrib_last_update,
! 'url' => titania_url::unbuild_url($this->get_url()),
! 'approved' => (!titania::$config->require_validation || $this->contrib_status == TITANIA_CONTRIB_APPROVED) ? true : false,
! );
! titania_search::index($this->contrib_type, $this->contrib_id, $data);
! }
! else
! {
! titania_search::delete($this->contrib_type, $this->contrib_id);
! }
}
public function validate($contrib_categories = array())
Modified: trunk/titania/includes/tools/sync.php
==============================================================================
*** trunk/titania/includes/tools/sync.php (original)
--- trunk/titania/includes/tools/sync.php Mon Feb 15 01:39:43 2010
***************
*** 146,152 ****
$data = array();
$contrib = new titania_contribution;
! $sql = 'SELECT * FROM ' . TITANIA_CONTRIBS_TABLE;
$result = phpbb::$db->sql_query($sql);
while ($row = phpbb::$db->sql_fetchrow($result))
{
--- 146,153 ----
$data = array();
$contrib = new titania_contribution;
! $sql = 'SELECT * FROM ' . TITANIA_CONTRIBS_TABLE . '
! WHERE contrib_status <> ' . TITANIA_CONTRIB_CLEANED;
$result = phpbb::$db->sql_query($sql);
while ($row = phpbb::$db->sql_fetchrow($result))
{
More information about the customisationdb-commits
mailing list