Merge pull request #1 from dignajar/master

Sync repos
This commit is contained in:
Alexandre Teles 2016-08-23 01:27:08 -03:00 committed by GitHub
commit f6d33a8a8d
3 changed files with 15 additions and 7 deletions

View File

@ -356,7 +356,7 @@ $(document).ready(function() {
{
type: "json",
action: HTML_PATH_ADMIN_ROOT+"ajax/uploader",
allow : "*.(jpg|jpeg|gif|png)",
allow : "*.(jpg|jpeg|gif|png|svg)",
params: {"type":"profilePicture", "username":"'.$username.'"},
loadstart: function() {
@ -391,4 +391,4 @@ $(document).ready(function() {
echo $html.$script;
}
}
}

View File

@ -47,11 +47,20 @@ if($type=='profilePicture')
else {
// Generate the thumbnail
$Image = new Image();
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, THUMBNAILS_WIDTH, THUMBNAILS_HEIGHT, 'crop');
$Image->saveImage(PATH_UPLOADS_THUMBNAILS.$tmpName, THUMBNAILS_QUALITY, true);
//Handling all other formats than svg
if (strcasecmp($fileExtension, 'svg') != 0) {
$Image->setImage(PATH_TMP.'original'.'.'.$fileExtension, THUMBNAILS_WIDTH, THUMBNAILS_HEIGHT, 'crop');
$Image->saveImage(PATH_UPLOADS_THUMBNAILS.$tmpName, THUMBNAILS_QUALITY, true);
}
// Move the original to the upload folder.
rename(PATH_TMP.'original'.'.'.$fileExtension, PATH_UPLOADS.$tmpName);
//If it is a svg file, just save a copy in thumbnail-folder
if (strcasecmp($fileExtension, 'svg') == 0) {
symlink(PATH_UPLOADS.$tmpName, PATH_UPLOADS_THUMBNAILS.$tmpName);
}
}
// Remove the Bludit temporary file.

View File

@ -18,7 +18,6 @@ class pluginAbout extends Plugin {
$html .= '<label>'.$Language->get('Plugin label').'</label>';
$html .= '<input name="label" id="jslabel" type="text" value="'.$this->getDbField('label').'">';
$html .= '</div>';
$html .= '<div>';
$html .= '<label>'.$Language->get('About').'</label>';
$html .= '<textarea name="text" id="jstext">'.$this->getDbField('text').'</textarea>';
@ -32,10 +31,10 @@ class pluginAbout extends Plugin {
$html = '<div class="plugin plugin-about">';
$html .= '<h2>'.$this->getDbField('label').'</h2>';
$html .= '<div class="plugin-content">';
$html .= nl2br($this->getDbField('text'));
$html .= html_entity_decode(nl2br($this->getDbField('text')));
$html .= '</div>';
$html .= '</div>';
return $html;
}
}
}