1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-05 12:48:00 +02:00

Merge pull request #157 from promo360/master

Promo360 - Fixes
This commit is contained in:
Sergey Romanenko
2013-11-21 04:46:24 -08:00
4 changed files with 11 additions and 0 deletions

View File

@@ -179,6 +179,7 @@ class Monstra
ORM::configure(MONSTRA_DB_DSN);
ORM::configure('username', MONSTRA_DB_USER);
ORM::configure('password', MONSTRA_DB_PASSWORD);
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
}
/**

View File

@@ -218,6 +218,8 @@ class Image
// Create a new true color image width new width and height
$resized = imagecreatetruecolor($new_width, $new_height);
$transPng = imagecolorallocatealpha($resized, 0, 0, 0, 127);
imagefill($resized, 0, 0, $transPng);
// Copy and resize part of an image with resampling
imagecopyresampled($resized, $this->image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height);
@@ -227,6 +229,8 @@ class Image
// Create a new true color image width new width and height
$this->image = imagecreatetruecolor($new_width, $new_height);
$transPng = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
imagefill($this->image, 0, 0, $transPng);
// Copy and resize part of an image with resampling
imagecopyresampled($this->image, $resized, 0, 0, 0, 0, $new_width, $new_height, $new_width, $new_height);
@@ -269,6 +273,8 @@ class Image
// Create a new true color image
$crop = imagecreatetruecolor($width, $height);
$transPng = imagecolorallocatealpha($crop, 0, 0, 0, 127);
imagefill($crop, 0, 0, $transPng);
// Copy and resize part of an image with resampling
imagecopyresampled($crop, $this->image, 0, 0, $x, $y, $this->width, $this->height, $this->width, $this->height);
@@ -278,6 +284,8 @@ class Image
// Create a new true color image
$this->image = imagecreatetruecolor($width, $height);
$transPng = imagecolorallocatealpha($this->image, 0, 0, 0, 127);
imagefill($this->image, 0, 0, $transPng);
// Copy and resize part of an image with resampling
imagecopyresampled($this->image, $crop, 0, 0, 0, 0, $width, $height, $width, $height);

View File

@@ -76,5 +76,6 @@
'Main .htaccess file not writable' => 'Main .htaccess file not writable',
'Official Support Forum' => 'Official Support Forum',
'Documentation' => 'Documentation',
'Your changes have been saved.' => 'Your changes have been saved.',
)
);

View File

@@ -75,5 +75,6 @@
'Main .htaccess file not writable' => 'Главный .htaccess файл не доступен для записи',
'Official Support Forum' => 'Официальный Форум Поддержки',
'Documentation' => 'Документация',
'Your changes have been saved.' => 'Ваши изменения сохранены.',
)
);