<commit_before><?php
/**
 * @package plugins.sphinxSearch
 * @subpackage model.filters
 */
class SphinxEntryCriteria extends SphinxCriteria
{
	public function getIndexObjectName() {
		return "entryIndex";
	} 
	
	/* (non-PHPdoc)
	 * @see SphinxCriteria::applyFilterFields()
	 */
	protected function applyFilterFields(baseObjectFilter $filter)
	{
		/* @var $filter entryFilter */

		if ( $filter->is_set('_eq_redirect_from_entry_id' ) )
		{
			$origEntryId = $filter->get( '_eq_redirect_from_entry_id' );
			
			$partners = array (0,kCurrentContext::getCurrentPartnerId());
			
			$c = new Criteria();
			$c->add(entryPeer::ID , $origEntryId );
			$c->add(entryPeer::PARTNER_ID , $partners , Criteria::IN);
			$c->add(entryPeer::STATUS ,entryStatus::DELETED , Criteria::NOT_EQUAL);
			entryPeer::setUseCriteriaFilter(false);
			$origEntry = entryPeer::doSelectOne($c);
			entryPeer::setUseCriteriaFilter(true);
				
			
			if ( ! empty( $origEntry ) )
			{
				// Get the id of the entry id that is being redirected from the original entry
				$redirectEntryId = $origEntry->getRedirectEntryId(); 
				
				if ( is_null( $redirectEntryId ) ) // No redirection required? 
				{
					$filter->set( '_eq_id', $origEntryId ); // Continue with original entry id
				}
				else<commit_msg>putting PartnerPeer::GLOBAL_PARTNER as 0 in partners array<commit_after><?php
/**
 * @package plugins.sphinxSearch
 * @subpackage model.filters
 */
class SphinxEntryCriteria extends SphinxCriteria
{
	public function getIndexObjectName() {
		return "entryIndex";
	} 
	
	/* (non-PHPdoc)
	 * @see SphinxCriteria::applyFilterFields()
	 */
	protected function applyFilterFields(baseObjectFilter $filter)
	{
		/* @var $filter entryFilter */

		if ( $filter->is_set('_eq_redirect_from_entry_id' ) )
		{
			$origEntryId = $filter->get( '_eq_redirect_from_entry_id' );
			
			$partners = array (PartnerPeer::GLOBAL_PARTNER,kCurrentContext::getCurrentPartnerId());
			
			$c = new Criteria();
			$c->add(entryPeer::ID , $origEntryId );
			$c->add(entryPeer::PARTNER_ID , $partners , Criteria::IN);
			$c->add(entryPeer::STATUS ,entryStatus::DELETED , Criteria::NOT_EQUAL);
			entryPeer::setUseCriteriaFilter(false);
			$origEntry = entryPeer::doSelectOne($c);
			entryPeer::setUseCriteriaFilter(true);
				
			
			if ( ! empty( $origEntry ) )
			{
				// Get the id of the entry id that is being redirected from the original entry
				$redirectEntryId = $origEntry->getRedirectEntryId(); 
				
				if ( is_null( $redirectEntryId ) ) // No redirection required? 
				{
					$filter->set( '_eq_id', $origEntryId ); // Continue with original entry id
				}
				else
{'fraction_non_alphanumeric': 0.13520698822635777, 'fraction_numerical': 0.0007595898214963919, 'mean_word_length': 4.094777562862669, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '928513', 'n_tokens_mistral': 984, 'n_tokens_neox': 842, 'n_words': 169}