コード例 #1
0
	$db = MMDB::instance();
	
	$results = $db->arrayQuery( 'select path from mm_publisher_folder' );
	$question = 'Select publisher folders to align articles for';
	$choices = array();
	
	foreach ( $results as $result )
		$choices[] = $result['path'];
	
	$replies = $questionHandler->askQuestionMultipleChoices( $question, $choices, 'validateReplyMultiple', false );
	
	foreach ( $replies as $choice )
	{
		try
		{
			$publisherObject = fetchPublisher( $choices[$choice] );
			alignArticle( $publisherObject, $checkModified, $checkLocations, $checkLanguages, $checkHidden, $timingDelay, $forceLast, $sleepTime );
		}
		catch ( Exception $e )
		{
			echo "Publisher folder doesn't exist : {$choices[$choice]}";
			echo $e->getMessage(). "\n";
		}
	}
}

$eZSolr->commit();
$script->shutdown();


/**
コード例 #2
0
    }
    else
    {
        foreach ( $publisherFolders['objects'] as $publisherObject )
        {
            alignArticleLocation( $publisherObject );
        }
    }

}
else if ( $source == SOURCE_PUBLISHER )
{
    $publisherObject = null;
    try
    {
        $publisherObject = fetchPublisher( $publisher );
    }
    catch ( Exception $e )
    {
        $script->shutdown( 1, $e->getMessage() );
    }
    alignArticleLocation( $publisherObject, $offset );
}

$script->shutdown();

/**
 * Returns publisher folders related to given cluster
 * @param string $clusterIdentifier
 * @throws Exception
 * @return array: