#use Slash;
#use Slash::Display;
#use Slash::Utility;
+use Newslash::Model::SlashUtility;
#use Slash::Slashboxes;
#use Slash::Tags;
#use Sphinx::Search 0.14;
$data->{mediatype} ||= "none";
$data->{email} ||= '';
+ # added by hylom, 2016
+ $data->{name} ||= '';
+ $data->{sprite_info} ||= '';
+
my $text_data = {};
$text_data->{title} = delete $data->{title};
$text_data->{introtext} = delete $data->{introtext};
my $story = $slash_db->getStory($id, "", 1);
if ($story) {
- my $globjid = $globjs->getGlobjidCreate("stories", $story->{stoid});
+ my $globjid = $globjs->getGlobjidCreate("stories", $story->{stoid});
my $id = $self->getFireHoseIdFromGlobjid($globjid);
if ($id) {
# If a story is getting its primary skid to an ignored value set its firehose entry to non-public
foreach (@$the_tids) {
$self->sqlInsert("firehose_topics_rendered", { id => $id, tid => $_});
}
- my $tree = $self->getTopicTree();
+ my $tree = $db->getTopicTree();
@nexus_topics = grep { $tree->{$_}->{nexus} } @$the_tids;
my $nexus_list = join ' ', @nexus_topics;
$nexus_list = " $nexus_list ";
my $constants = $self->getCurrentStatic();
# If a story is created with an ignored primary skid it'll never be created as a firehose entry currently
my %ignore_skids = map {$_ => 1 } @{$constants->{firehose_story_ignore_skids}};
- my $story = $self->getStory($id, '', 1);
+ my $slash_db = $self->new_instance_of("Newslash::Model::SlashDB");
+ my $globjs = $self->new_instance_of("Newslash::Model::Globjs");
+ my $story = $slash_db->getStory($id, '', 1);
my $popularity = $self->getEntryPopularityForColorLevel(2);
if ($story->{story_topics_rendered}{$constants->{mainpage_nexus_tid}}) {
}
if ($story && !$ignore_skids{$story->{primaryskid}}) {
- my $globjid = $self->getGlobjidCreate("stories", $story->{stoid});
+ my $globjid = $globjs->getGlobjidCreate("stories", $story->{stoid});
my $public = $story->{neverdisplay} ? "no" : "yes";
my $data = {
title => $story->{title},