Skip to content
Commits on Source (6)
......@@ -51,7 +51,7 @@ class issues implements Interfaces\Api
$issue = new Issue;
$issue->setTitle($title)
->setDescription($description)
->setLabels('S - Triage (New), T - Bug (Triage)');
->setLabels('Status::Validation, Type::Bug (Triage)');
// call gitlab api
$res = $manager->postIssue($issue, $pages[0]);
......
......@@ -26,9 +26,10 @@ class Thumbnails
*/
public function get($entity, $size)
{
if (is_string($entity)) {
$entity = $this->entitiesBuilder->build($entity);
if (is_numeric($entity)) {
$entity = $this->entitiesBuilder->single($entity);
}
if (!$entity || !Core\Security\ACL::_()->read($entity)) {
return false;
}
......
......@@ -29,7 +29,9 @@ class Spam
$foundSpam = Text::strposa($entity->getBody(), ProhibitedDomains::DOMAINS);
break;
}
$foundSpam = Text::strposa($entity->getDescription(), ProhibitedDomains::DOMAINS);
if (method_exists($entity, 'getDescription')) {
$foundSpam = Text::strposa($entity->getDescription(), ProhibitedDomains::DOMAINS);
}
break;
case 'user':
$foundSpam = Text::strposa($entity->briefdescription, ProhibitedDomains::DOMAINS);
......
......@@ -386,4 +386,26 @@ class Image extends File
$this->time_sent = $time_sent;
return $this;
}
/**
* Return description
* @return string
*/
public function getDescription(): string
{
return $this->description ?: '';
}
/**
* Set description
*
* @param string $description - description to be set.
* @return Image
*/
public function setDescription($description): Image
{
$this->description = $description;
return $this;
}
}
......@@ -296,4 +296,25 @@ class Video extends MindsObject
$this->time_sent = $time_sent;
return $this;
}
/**
* Return description
* @return string
*/
public function getDescription(): string
{
return $this->description ?: '';
}
/**
* Set description
*
* @param string $description - description to be set.
* @return Video
*/
public function setDescription($description): Video
{
$this->description = $description;
return $this;
}
}
......@@ -879,8 +879,9 @@ function elgg_get_entities(array $options = array()) {
}
$entity = entity_row_to_elggstar($newrow);
if(Minds\Core\Security\ACL::_()->read($entity))
if ($entity && Minds\Core\Security\ACL::_()->read($entity)) {
$entities[] = $entity;
}
}
}
} catch(Exception $e){
......