mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
two fixes
git-svn-id: file:///svn/phpbb/trunk@8011 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
dca78b88a0
commit
4d3add1686
3 changed files with 17 additions and 5 deletions
|
@ -204,8 +204,7 @@ p a {
|
||||||
<li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li>
|
<li>[Fix] Added label bindings to the custom profile fields in the ACP (Bug #13936) - patch provided by damnian</li>
|
||||||
<li>[Change] Made group avatar/rank changes more intuitive</li>
|
<li>[Change] Made group avatar/rank changes more intuitive</li>
|
||||||
<li>[Fix] Give more feedback in icon/smilie management (Bug #13295)</li>
|
<li>[Fix] Give more feedback in icon/smilie management (Bug #13295)</li>
|
||||||
|
<li>[Fix] Correctly set user::lang_id (Bug #14010)</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -652,11 +652,23 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||||
if ($type['version'] == 1)
|
if ($type['version'] == 1)
|
||||||
{
|
{
|
||||||
$new_image = imagecreate($new_width, $new_height);
|
$new_image = imagecreate($new_width, $new_height);
|
||||||
|
|
||||||
|
if ($new_image === false)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
imagecopyresized($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
imagecopyresized($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$new_image = imagecreatetruecolor($new_width, $new_height);
|
$new_image = imagecreatetruecolor($new_width, $new_height);
|
||||||
|
|
||||||
|
if ($new_image === false)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
imagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1190,6 +1190,7 @@ class user extends session
|
||||||
var $dst;
|
var $dst;
|
||||||
|
|
||||||
var $lang_name;
|
var $lang_name;
|
||||||
|
var $lang_id = false;
|
||||||
var $lang_path;
|
var $lang_path;
|
||||||
var $img_lang;
|
var $img_lang;
|
||||||
var $img_array = array();
|
var $img_array = array();
|
||||||
|
@ -1720,7 +1721,7 @@ class user extends session
|
||||||
{
|
{
|
||||||
global $config, $db;
|
global $config, $db;
|
||||||
|
|
||||||
if (isset($this->lang_id))
|
if (!empty($this->lang_id))
|
||||||
{
|
{
|
||||||
return $this->lang_id;
|
return $this->lang_id;
|
||||||
}
|
}
|
||||||
|
@ -1734,10 +1735,10 @@ class user extends session
|
||||||
FROM ' . LANG_TABLE . "
|
FROM ' . LANG_TABLE . "
|
||||||
WHERE lang_iso = '" . $db->sql_escape($this->lang_name) . "'";
|
WHERE lang_iso = '" . $db->sql_escape($this->lang_name) . "'";
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
$lang_id = (int) $db->sql_fetchfield('lang_id');
|
$this->lang_id = (int) $db->sql_fetchfield('lang_id');
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
return $lang_id;
|
return $this->lang_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue