generate synopsis if it is blank
This commit is contained in:
parent
1dfaef6a79
commit
5d85562a90
1 changed files with 3 additions and 2 deletions
|
|
@ -110,12 +110,13 @@ sub create {
|
|||
my $url = $asset->get("url");
|
||||
$url =~ s/\/|\-|\_/ /g;
|
||||
my $description = WebGUI::HTML::filter($asset->get('description'), "all");
|
||||
my $keywords = join(" ",$asset->get("title"), $asset->get("menuTitle"), $asset->get("synopsis"), $url, $description);
|
||||
my $keywords = WebGUI::HTML::filter(join(" ",$asset->get("title"), $asset->get("menuTitle"), $asset->get("synopsis"), $url, $description), "all");
|
||||
my $synopsis = $asset->get("synopsis") || substr($description,0,255) || substr($keywords,0,255);
|
||||
my $add = $self->session->db->prepare("insert into assetIndex (assetId, title, url, creationDate, revisionDate,
|
||||
ownerUserId, groupIdView, groupIdEdit, lineage, className, synopsis, keywords) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )");
|
||||
$add->execute([$asset->getId, $asset->get("title"), $asset->get("url"), $asset->get("creationDate"),
|
||||
$asset->get("revisionDate"), $asset->get("ownerUserId"), $asset->get("groupIdView"), $asset->get("groupIdEdit"),
|
||||
$asset->get("lineage"), $asset->get("className"), $asset->get("synopsis"), $keywords]);
|
||||
$asset->get("lineage"), $asset->get("className"), $synopsis, $keywords]);
|
||||
return $self;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue