Skip to content

Commit

Permalink
Merge pull request #7908 from piwik/tcpdf_composer
Browse files Browse the repository at this point in the history
Require TCPDF using composer
  • Loading branch information
Stefan Giehl committed May 19, 2015
2 parents 95bec8a + a4ea6b8 commit 06ebc8b
Show file tree
Hide file tree
Showing 54 changed files with 87 additions and 77,948 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"symfony/event-dispatcher": "~2.6",
"pear/pear_exception": "~1.0.0",
"pear/pear-core-minimal": "~1.9.5",
"piwik/referrer-spam-blacklist": "~1.0"
"piwik/referrer-spam-blacklist": "~1.0",
"tecnick.com/tcpdf": "~6.0"
},
"require-dev": {
"aws/aws-sdk-php": "2.7.1",
Expand Down
77 changes: 70 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 14 additions & 3 deletions core/ReportRenderer/Pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
* @see libs/tcpdf
*/
require_once PIWIK_INCLUDE_PATH . '/plugins/ScheduledReports/config/tcpdf_config.php';
require_once PIWIK_INCLUDE_PATH . '/libs/tcpdf/config/lang/eng.php';
require_once PIWIK_INCLUDE_PATH . '/core/TCPDF.php';

/**
*
Expand Down Expand Up @@ -93,6 +91,11 @@ public function __construct()
public function setLocale($locale)
{
switch ($locale) {
case 'bn':
case 'hi':
$reportFont = 'freesans';
break;

case 'zh-tw':
$reportFont = 'msungstdlight';
break;
Expand All @@ -110,9 +113,17 @@ public function setLocale($locale)
break;

case 'ar':
$reportFont = 'almohanad';
$reportFont = 'aealarabiya';
break;

case 'am':
case 'ta':
case 'th':
$reportFont = 'freeserif';
break;

case 'te':
// not working with bundled fonts
case 'en':
default:
$reportFont = ReportRenderer::DEFAULT_REPORT_FONT_FAMILY;
Expand Down
5 changes: 0 additions & 5 deletions core/TCPDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@

use Exception;

/**
* @see libs/tcpdf/tcpdf.php
*/
require_once PIWIK_INCLUDE_PATH . '/libs/tcpdf/tcpdf.php';

/**
* TCPDF class wrapper.
*
Expand Down
172 changes: 0 additions & 172 deletions libs/tcpdf/2dbarcodes.php

This file was deleted.

Loading

0 comments on commit 06ebc8b

Please sign in to comment.