Skip to content

Commit

Permalink
Update SocialShareNetwork.php
Browse files Browse the repository at this point in the history
  • Loading branch information
phpsa committed Mar 6, 2018
1 parent 6c6a58a commit c025060
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions code/model/SocialShareNetwork.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function requireDefaultRecords()
{
parent::requireDefaultRecords();

if(SocialShareNetwork::get()->Count() == 0) {
if(SocialShareNetwork::get()->Count() == 0) {
$object = new SocialShareNetwork();
$object->Network = 'Facebook';
$object->NetworkUrl = 'http://www.facebook.com/sharer.php?u={$AbsoluteLink}';
Expand All @@ -97,21 +97,15 @@ public function requireDefaultRecords()
$object->Active = 1;
$object->write();

$object = new SocialShareNetwork();
$object->Network = 'Google+';
$object->NetworkUrl = 'https://plus.google.com/share?url={$AbsoluteLink}';
$object->Active = 1;
$object->write();

$object = new SocialShareNetwork();
$object->Network = 'Linkedin';
$object->NetworkUrl = 'http://www.linkedin.com/shareArticle?url={$AbsoluteLink}&title={$Title}';
$object->Active = 1;
$object->write();

$object = new SocialShareNetwork();
$object->Network = 'Reddit';
$object->NetworkUrl = 'http://www.reddit.com/submit?url={$AbsoluteLink}&title={$Title}';
$object->Network = 'Mail';
$object->NetworkUrl = 'mailto:?subject={$Title}&body=I thought you might find {$AbsoluteLink} Interesting';
$object->Active = 1;
$object->write();
}
Expand All @@ -128,4 +122,4 @@ public function getThumbnail()
{
return $this->Image()->CroppedImage(20, 20);
}
}
}

0 comments on commit c025060

Please sign in to comment.