X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Fincludes%2Fclass.pdf.inc;h=2252c28c86e6dd8c07c68b77e51b5bdc279c0444;hb=477c1f221df891f39e9363f7b34e6ff1eb4ad4c7;hp=0b15e80f8efae9fac05e5725c8ad12c9e1493958;hpb=eac3de7e85d95ddda61e4cd01e7641e46306748f;p=fa-stable.git diff --git a/reporting/includes/class.pdf.inc b/reporting/includes/class.pdf.inc index 0b15e80f..2252c28c 100644 --- a/reporting/includes/class.pdf.inc +++ b/reporting/includes/class.pdf.inc @@ -79,21 +79,21 @@ class Cpdf extends FPDI { */ function SetLang($code=null) { - global $installed_languages, $dflt_lang, $path_to_root, $local_path_to_root; + global $installed_languages, $dflt_lang, $path_to_root, $local_path_to_root, $GetText; if (!$code) $code = $dflt_lang; $lang = array_search_value($code, $installed_languages, 'code'); - $_SESSION['get_text']->set_language($lang['code'], strtoupper($lang['encoding'])); + $GetText->set_language($lang['code'], strtoupper($lang['encoding'])); // $local_path_to_root is set inside find_custom_file. // Select extension domain if po file is provided // otherwise use global translation. if (file_exists($local_path_to_root.'/lang/'.$lang['code'].'/LC_MESSAGES/'.$lang['code'].'.po')) - $_SESSION['get_text']->add_domain($lang['code'], $local_path_to_root . "/lang"); + $GetText->add_domain($lang['code'], $local_path_to_root . "/lang"); else - $_SESSION['get_text']->add_domain($lang['code'], $path_to_root . "/lang", @$lang['version']); + $GetText->add_domain($lang['code'], $path_to_root . "/lang", @$lang['version']); // re-read translated sys names. include($path_to_root.'/includes/sysnames.inc'); @@ -181,7 +181,7 @@ class Cpdf extends FPDI { { default : $fontname = "freesans13"; break; } - } + } // else use built-in adobe fonts helvetica. } $this->SetFont($fontname, $style); @@ -334,4 +334,3 @@ class Cpdf extends FPDI { } // end of class -?> \ No newline at end of file