kernel/private/classes/ezpcontentpublishingqueue.php
private static function getNextItem()
    {
        $pendingStatusValue = ezpContentPublishingProcess::STATUS_PENDING;
        $workingStatusValue = ezpContentPublishingProcess::STATUS_WORKING;

        $sql = <<< SQL
SELECT *
FROM
  ezpublishingqueueprocesses p,
  ezcontentobject_version v
WHERE p.status = $pendingStatusValue
  AND p.ezcontentobject_version_id = v.id
  AND v.contentobject_id NOT IN (
    SELECT v.contentobject_id
    FROM ezpublishingqueueprocesses p,
      ezcontentobject_version v
    WHERE
      p.ezcontentobject_version_id = v.id
      AND p.status = $workingStatusValue
  )
ORDER BY p.created, p.ezcontentobject_version_id ASC
SQL;
        $db = eZDB::instance();
        $rows = $db->arrayQuery( $sql, array( 'offset' => 0, 'limit' => 1 ) );
        if ( count( $rows ) == 0 )
            return false;

        /** @var ezpContentPublishingProcess[] $persistentObjects */
        $persistentObjects = eZPersistentObject::handleRows( $rows, 'ezpContentPublishingProcess', true );
        return $persistentObjects[0];
    }
private static function getNextItem()
    {
        $pendingStatusValue = ezpContentPublishingProcess::STATUS_PENDING;
        $workingStatusValue = ezpContentPublishingProcess::STATUS_WORKING;

        $sql = <<< SQL
SELECT *
FROM
  ezpublishingqueueprocesses p,
  ezcontentobject_version v
WHERE p.status = $pendingStatusValue
  AND p.ezcontentobject_version_id = v.id
  AND v.contentobject_id NOT IN (
    SELECT v.contentobject_id
    FROM ezpublishingqueueprocesses p,
      ezcontentobject_version v
    WHERE
      p.ezcontentobject_version_id = v.id
      AND p.status = $workingStatusValue
  )
ORDER BY p.created, p.ezcontentobject_version_id ASC
SQL;
        $db = eZDB::instance();
        $rows = $db->arrayQuery( $sql, array( 'offset' => 0, 'limit' => 1 ) );
        if ( count( $rows ) == 0 )
            return false;

        /** @var ezpContentPublishingProcess[] $persistentObjects */
        $persistentObjects = eZPersistentObject::handleRows( $rows, 'ezpContentPublishingProcess', true );
        return $persistentObjects[0];
    }
private static function getNextItem ( ) { $ pendingStatusValue = ezpContentPublishingProcess :: STATUS_PENDING ; $ workingStatusValue = ezpContentPublishingProcess :: STATUS_WORKING ; $ sql =  <<< SQL
SELECT *
FROM
  ezpublishingqueueprocesses p,
  ezcontentobject_version v
WHERE p.status = $pendingStatusValue
  AND p.ezcontentobject_version_id = v.id
  AND v.contentobject_id NOT IN (
    SELECT v.contentobject_id
    FROM ezpublishingqueueprocesses p,
      ezcontentobject_version v
    WHERE
      p.ezcontentobject_version_id = v.id
      AND p.status = $workingStatusValue
  )
ORDER BY p.created, p.ezcontentobject_version_id ASC
SQL ; $ db = eZDB :: instance ( ) ; $ rows = $ db -> arrayQuery ( $ sql , array ( 'offset' => 0 , 'limit' => 1 ) ) ; if ( count ( $ rows ) == 0 ) return false ; /** @var ezpContentPublishingProcess[] $persistentObjects */ $ persistentObjects = eZPersistentObject :: handleRows ( $ rows , 'ezpContentPublishingProcess' , true ) ; return $ persistentObjects [ 0 ] ; }
Returns the next queued item, excluding those for which another version of the same content is being published.
@return ezpContentPublishingProcess|false
Returns the next queued item excluding those for which another version of the same content is being published .