24 private $searchHelperDao;
26 function __construct()
28 $this->uploadDao = $GLOBALS[
'container']->get(
'dao.upload');
29 $this->searchHelperDao = $GLOBALS[
'container']->get(
'dao.searchhelperdao');
39 $uploadTreeId = $this->uploadDao->getUploadParent($uploadId);
42 $Item = $uploadTreeId;
43 $Filename =
"LICENSES";
49 $searchtype =
"containers";
53 list($result, $count) = $this->searchHelperDao->GetResults($Item, $Filename, $uploadId, $tag, $Page, $Limit, $SizeMin, $SizeMax, $searchtype, $License, $Copyright, $this->uploadDao,
Auth::getGroupId());
58 $itemTreeBounds = $this->uploadDao->getItemTreeBounds($result[0][
'uploadtree_pk']);
59 $condition =
"(ut.lft BETWEEN $1 AND $2)";
60 $params = array($itemTreeBounds->getLeft(), $itemTreeBounds->getRight());
62 $containedItems = $this->uploadDao->getContainedItems($itemTreeBounds, $condition, $params);
63 foreach ($containedItems as $item) {
77 return preg_replace(
"/(.*)\\.txt$/i",
"$1", $licenseFileName);
Contains the constants and helpers for authentication of user.
static getGroupId()
Get the current user's group id.
Detects licenses declard inside LICENSES directory.
getDeclearedLicenses($uploadId)
Get licenses decleared in LICENSES folder.
cleanLicenseId($licenseFileName)
Truncate .txt from licenseFileName.
Contains business rules for FOSSology.