0000978 : PDF report don't run in newer verions of PHP (case sensitive member functions).
[fa-stable.git] / reporting / includes / pdf_report.inc
index 9e405431746e1fe1c2860bd1fd2a7ff7d75c39b1..91e6437c1078dabd42698b7ddf55ed39d636dcad 100644 (file)
@@ -255,10 +255,10 @@ class FrontReport extends Cpdf
        {
                global $app_title, $version, $power_by, $power_url;
 
-               $this->addinfo('Title', $this->title);
-               $this->addinfo('Subject', $this->title);
-               $this->addinfo('Author', $app_title . ' ' . $version);
-               $this->addinfo('Creator',$power_by . ' - ' . $power_url);
+               $this->addInfo('Title', $this->title);
+               $this->addInfo('Subject', $this->title);
+               $this->addInfo('Author', $app_title . ' ' . $version);
+               $this->addInfo('Creator',$power_by . ' - ' . $power_url);
                $year = get_current_fiscalyear();
                if ($year['closed'] == 0)
                        $how = _("Active");
@@ -945,7 +945,7 @@ class FrontReport extends Cpdf
                        $this->{$this->headerTmpl}();
        }
 
-       function End($email=0)
+       function End($email=0, $subject='')
        {
                global $pdf_debug, $path_to_root;
 
@@ -980,7 +980,8 @@ class FrontReport extends Cpdf
                                        display_error(_("You have no email contact defined for this type of document"));
                                } else {
                                        $sent = $try = 0;
-                                       $subject = $this->formData['document_name'] . ' '. $this->formData['document_number'];
+                                       if(!$subject)
+                                               $subject = $this->formData['document_name'] . ' '. $this->formData['document_number'];
                                        foreach($this->contactData as $contact) {
                                                if (!isset($contact['email'])) 
                                                        continue;