if (!empty($done[$clsname.':'.$lang])) {
- return; // already sent headers and everything.
+ return true; // already sent headers and everything.
}
putenv("LANGUAGE=$lang");
$d->filetype = 'php';
if (! $d->find(true) ){
$done[$clsname.':'.$lang] = true;
- return;
+ return false;
}
$user = 'www-data'; // ?? do we need other ones
$compileDir = ini_get('session.save_path') .'/' .
$ts->template_id = $d->id;
if (!$ts->find(true)) {
// then in theory there are no translations
- return;
+ return false;
}
if (file_exists($fname) && strtotime($ts->updated) < filemtime($fname)) {
- return; // file exists and is newer than our updated line.
+ return $fname; // file exists and is newer than our updated line.
}
//DB_DataObject::debugLevel(1);
$ts->selectAdd('join_src_id_id.txt as src_id_txt, core_templatestr.txt as txt');
$ts->lang = $lang;
$ts->template_id = $d->id;
+ $ts->whereAdd("LENGTH(join_src_id_id.txt) > 0 AND LENGTH(core_templatestr.txt) > 0");
$words = $ts->fetchAll('src_id_txt', 'txt' );
if (!file_exists($fdir)) {
- return;
+ return $fname;
require_once 'File/Gettext.php';
$gt = File_Gettext::factory('MO', $fname);