[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libreoffice-website] Added documentation link to libreoffice.org/download "related pages"


Christian Lohmaier wrote:
> It probably ignores the subsite filter, either in retrieving the pages
> or when putting them into the cache. Either way, I reserved some
> pomodoros for this today.
>
Sticking in

@@ -266,7 +302,14 @@ class DownloadSimplePage_Controller extends Page_Controller implements i18nEntit
$tags[] = "dltype".($temptype .= "-".$typepart);
foreach ($tags as $tag)
$sql[] = "concat(MetaKeywords,',') like '%".convert::raw2sql($tag).",%'";
- $result = DataObject::get("SiteTree", "(".implode(" OR ", $sql).")", "MenuTitle");
+ $lang = i18n::default_locale();
+ if ($this->SubsiteID) {
+ $subsite = DataObject::get_by_ID("Subsite", $this->SubsiteID);
+ if ($subsite) {
+ $lang = $subsite->getLanguage();
+ }
+ }
+ $result = Translatable::get_by_locale("SiteTree", $lang, "(".implode(" OR ", $sql).")", "MenuTitle");
$cache->save(serialize($result));
}
return $result;

did not help immediately (though I never seem to recall whether the
caching is flushed via ?flush=all or through another mechanism) FWIW.

Cheers,

-- Thorsten

--
Unsubscribe instructions: E-mail to website+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/website/
All messages sent to this list will be publicly archived and cannot be deleted

Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.