2012-04-24 Miguel de Dios <miguel.dedios@artica.es>
* include/Image/image_functions.php: fixed into the function "createthumb" when you have a path with "." character try to extract the extension of file before of name of file. * include/config_process.php: disabled warning message of PHP5 about the timezone. MERGED FROM 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6131 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c2e58c9d49
commit
5e83f35a13
|
@ -1,3 +1,14 @@
|
|||
2012-04-24 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/Image/image_functions.php: fixed into the function
|
||||
"createthumb" when you have a path with "." character try to extract
|
||||
the extension of file before of name of file.
|
||||
|
||||
* include/config_process.php: disabled warning message of PHP5 about
|
||||
the timezone.
|
||||
|
||||
MERGED FROM 4.0.2
|
||||
|
||||
2012-04-24 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_graph.php
|
||||
|
|
|
@ -84,17 +84,23 @@ function getFile ($destFileName,$fileLocation) {
|
|||
function createthumb ($origFileName, $destFileName, $newWidth, $newHeight) {
|
||||
//TODO $newWidth and $newHeight values as percent.
|
||||
|
||||
$system = explode(".",$origFileName);
|
||||
if (preg_match ("/jpg|jpeg/",$system[1]))
|
||||
preg_match("/\.(jpg|jpeg|png)$/", $origFileName, $match);
|
||||
$extension = '';
|
||||
if (!empty($match))
|
||||
$extension = $match[1];
|
||||
|
||||
if (preg_match ("/jpg|jpeg/", $extension))
|
||||
$src_img = imagecreatefromjpeg($origFileName);
|
||||
if (preg_match ("/png/",$system[1]))
|
||||
|
||||
if (preg_match ("/png/", $extension))
|
||||
$src_img = imagecreatefrompng($origFileName);
|
||||
|
||||
$oldWidth = imageSX($src_img);
|
||||
$oldHeight = imageSY($src_img);
|
||||
|
||||
|
||||
$dst_img = ImageCreateTrueColor($newWidth, $newHeight);
|
||||
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $newWidth, $newHeight, $oldWidth, $oldHeight);
|
||||
if (preg_match("/png/",$system[1]))
|
||||
if (preg_match("/png/", $extension))
|
||||
imagepng($dst_img,$destFileName);
|
||||
else
|
||||
imagejpeg($dst_img,$destFileName);
|
||||
|
|
|
@ -25,7 +25,11 @@
|
|||
$build_version = 'PC120214';
|
||||
$pandora_version = 'v5.0-dev';
|
||||
|
||||
date_default_timezone_set("Europe/Berlin");
|
||||
// Do not overwrite default timezone set if defined.
|
||||
$script_tz = @date_default_timezone_get();
|
||||
if (empty($script_tz)){
|
||||
date_default_timezone_set("Europe/Berlin");
|
||||
}
|
||||
|
||||
global $develop_bypass;
|
||||
/* Help to debug problems. Override global PHP configuration */
|
||||
|
|
Loading…
Reference in New Issue