diff --git a/plugin/Gallery/view/topLogic.php b/plugin/Gallery/view/topLogic.php index 34798102a..f792fd2ac 100644 --- a/plugin/Gallery/view/topLogic.php +++ b/plugin/Gallery/view/topLogic.php @@ -1,79 +1,83 @@ sortReverseable) { if (strpos($_SERVER['REQUEST_URI'], "?") != false) { $orderString = $_SERVER['REQUEST_URI'] . "&"; } else { $orderString = $_SERVER['REQUEST_URI'] . "/?"; } $orderString = str_replace("&&", "&", $orderString); $orderString = str_replace("//", "/", $orderString); } $video = Video::getVideo("", "viewable", !$obj->hidePrivateVideos, false, true); if (empty($video)) { $video = Video::getVideo("", "viewable", !$obj->hidePrivateVideos, true); } if (empty($_GET['page'])) { $_GET['page'] = 1; } else { $_GET['page'] = intval($_GET['page']); } $total = 0; $totalPages = 0; $url = ''; $args = ''; $metaDescription = ""; if(!empty($video)){ if (strpos($_SERVER['REQUEST_URI'], "?") != false) { $args = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], "?"), strlen($_SERVER['REQUEST_URI'])); } if (strpos($_SERVER['REQUEST_URI'], "/cat/") === false) { $url = $global['webSiteRootURL'] . "page/"; } else { $url = $global['webSiteRootURL'] . "cat/" . $video['clean_category'] . "/page/"; } $contentSearchFound = false; array_push($siteTitle, __("Home")); - array_push($siteTitle, getSEOComplement(false)); + + $seoComplement = getSEOComplement(false); // false = don't add a prefix, it's already handled here below by the implode() func + if (!empty($seoComplement)) { + array_push($siteTitle, $seoComplement); + } $metaDescription = $video['id']; } else { array_push($siteTitle, __("Video Not Available")); array_push($siteTitle, __("Home")); $metaDescription = __("Video Not Available"); } array_push($siteTitle, $config->getWebSiteTitle()); $metaDescription .= $config->getPageTitleSeparator() . __("Home"); $siteTitle = implode($config->getPageTitleSeparator(), $siteTitle);