I would say its just standard routine when title does not exists in selected locale
If so, then why do we have multiple cases for this scenario? Is another function used to return the listing title to construct the URL?
function osc_item_title($locale = "") {
if ($locale == "") $locale = osc_current_user_locale();
$title = osc_item_field("s_title", $locale);
if($title=='') {
$title = osc_item_field("s_title", osc_language());
if($title=='') {
$aLocales = osc_get_locales();
foreach($aLocales as $locale) {
$title = osc_item_field("s_title", @$locale['pk_c_code']);
if($title!='') {
break;
}
}
}
}
return (string) $title;
}
Of which none are returning the desired default value ie. the English value, or any other value stored in different locales.
What's strange is that the same function returns English titles correctly for listings under Arabic when no Arabic title is stored ... so something to do with the construction of the url.
Update: for those interested, I found the culprit function - osc_item_url_from_item ... now to code a fix for the bug.
Thanks anyway