function processUploadId($uploadId) { $args = $this->args; $this->activeRules = array_key_exists('r', $args) ? intval($args['r']) : self::RULES_ALL; $this->licenseMap = new LicenseMap($this->dbManager, $this->groupId, $this->licenseMapUsage); $parentBounds = $this->uploadDao->getParentItemBounds($uploadId); foreach ($this->uploadDao->getContainedItems($parentBounds) as $item) { $process = $this->processItem($item); $this->heartbeat($process); } if (($this->activeRules & self::RULES_BULK_REUSE) == self::RULES_BULK_REUSE) { $bulkReuser = new BulkReuser(); $bulkReuser->rerunBulkAndDeciderOnUpload($uploadId, $this->groupId, $this->userId, $this->jobId); } return true; }
private function loopContainedItems($itemTreeBounds) { if (!$itemTreeBounds->containsFiles()) { return array($itemTreeBounds); } $result = array(); $condition = "(ut.lft BETWEEN \$1 AND \$2) AND ((ut.ufile_mode & (3<<28)) = 0)"; $params = array($itemTreeBounds->getLeft(), $itemTreeBounds->getRight()); foreach ($this->uploadDao->getContainedItems($itemTreeBounds, $condition, $params) as $item) { $result[] = $item->getItemTreeBounds(); } return $result; }