Skip to content

Commit 80964f7

Browse files
authored
Merge pull request #601 from topcoder-platform/issues-549
Issues-549: Fixed image links for discussion metadata
2 parents 97e4988 + e1db733 commit 80964f7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

vanilla/applications/dashboard/modules/class.headmodule.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ public function toString() {
470470
$hasRelevantImage = false;
471471

472472
// Default to the site logo if there were no images provided by the controller.
473-
if (count($this->_Sender->image()) == 0) {
473+
// Show the same image for all pages
474+
//if (count($this->_Sender->image()) == 0) {
474475
$logo = c('Garden.ShareImage', c('Garden.Logo', ''));
475476
if ($logo != '') {
476477
// Fix the logo path.
@@ -481,12 +482,12 @@ public function toString() {
481482
// $logo = Gdn_Upload::url($logo);
482483
$this->addTag('meta', ['property' => 'og:image', 'content' => Gdn::request()->domain().$logo]);
483484
}
484-
} else {
485-
foreach ($this->_Sender->image() as $img) {
486-
$this->addTag('meta', ['name' => 'twitter:image', 'property' => 'og:image', 'content' => $img]);
487-
$hasRelevantImage = true;
488-
}
489-
}
485+
// } else {
486+
// foreach ($this->_Sender->image() as $img) {
487+
// $this->addTag('meta', ['name' => 'twitter:image', 'property' => 'og:image', 'content' => $img]);
488+
// $hasRelevantImage = true;
489+
// }
490+
// }
490491

491492
// For the moment at least, only discussions are supported.
492493
if ($title && val('DiscussionID', $this->_Sender)) {

0 commit comments

Comments
 (0)