Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Delisle <marc@infomarc.info>
  • Loading branch information
lem9 committed Mar 25, 2014
2 parents 35b3e41 + 186a809 commit cb39297
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -44,6 +44,7 @@ phpMyAdmin - ChangeLog
4.1.12.0 (not yet released)
- bug #4334 Add event : datepicker won't open
- bug #4338 Fix missing value error while executing SQL query
- TCPDF library is now optional dependency

4.1.11.0 (2014-03-23)
- bug #4335 reCaptcha problem (4.1.10 regression)
Expand Down
10 changes: 9 additions & 1 deletion libraries/plugins/export/ExportPdf.class.php
Expand Up @@ -10,6 +10,14 @@
exit;
}

/**
* Skip the plugin if TCPDF is not available.
*/
if (! file_exists(TCPDF_INC)) {
$GLOBALS['skip_import'] = true;
return;
}

/* Get the export interface */
require_once 'libraries/plugins/ExportPlugin.class.php';
/* Get the PMA_ExportPdf class */
Expand Down Expand Up @@ -265,4 +273,4 @@ private function _setPdfReportTitle($pdfReportTitle)
$this->_pdfReportTitle = $pdfReportTitle;
}
}
?>
?>
15 changes: 15 additions & 0 deletions libraries/schema/Pdf_Relation_Schema.class.php
Expand Up @@ -9,6 +9,21 @@
exit;
}

/**
* Skip the plugin if TCPDF is not available.
*/
if (! file_exists(TCPDF_INC)) {
$GLOBALS['skip_import'] = true;
return;
}

/**
* block attempts to directly run this script
*/
if (getcwd() == dirname(__FILE__)) {
die('Attack stopped');
}

require_once 'Export_Relation_Schema.class.php';
require_once './libraries/PDF.class.php';

Expand Down
8 changes: 8 additions & 0 deletions libraries/schema/User_Schema.class.php
Expand Up @@ -663,7 +663,15 @@ private function _processExportSchema()
__('File doesn\'t exist')
);
}
$GLOBALS['skip_import'] = false;
include $filename;
if ( $GLOBALS['skip_import']) {
PMA_Export_Relation_Schema::dieSchema(
$_POST['chpage'],
$export_type,
__('Plugin is disabled')
);
}
$class_name = 'PMA_' . $path . '_Relation_Schema';
$obj_schema = new $class_name();
$obj_schema->showOutput();
Expand Down

0 comments on commit cb39297

Please sign in to comment.