Validate Graph and PDF Renderer library directories

git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@91353 2327b42d-5241-43d6-9e2a-de5ac946f064
This commit is contained in:
Mark Baker 2012-06-05 14:18:55 +00:00
parent 3edd3c30e3
commit 2cd4c7e044
1 changed files with 6 additions and 0 deletions

View File

@ -220,6 +220,9 @@ class PHPExcel_Settings
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setChartRendererPath($libraryBaseDir) { public static function setChartRendererPath($libraryBaseDir) {
if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) {
return FALSE;
}
self::$_chartRendererPath = $libraryBaseDir; self::$_chartRendererPath = $libraryBaseDir;
return TRUE; return TRUE;
@ -293,6 +296,9 @@ class PHPExcel_Settings
* @return boolean Success or failure * @return boolean Success or failure
*/ */
public static function setPdfRendererPath($libraryBaseDir) { public static function setPdfRendererPath($libraryBaseDir) {
if ((file_exists($libraryBaseDir) === false) || (is_readable($libraryBaseDir) === false)) {
return FALSE;
}
self::$_pdfRendererPath = $libraryBaseDir; self::$_pdfRendererPath = $libraryBaseDir;
return TRUE; return TRUE;