mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-24 02:12:17 +00:00
Kleine Korrekturen für Imagecropper
Berechtigungsüberprüfung in crop.php Bild in skin/images verschoben
This commit is contained in:
@@ -9,6 +9,7 @@ require_once('../../include/phrasen.class.php');
|
||||
require_once('../../include/fotostatus.class.php');
|
||||
|
||||
$src = $_POST['src'];
|
||||
$user = get_uid();
|
||||
|
||||
//kopiert von bildupload.php
|
||||
function resize($filename, $width, $height)
|
||||
@@ -42,6 +43,21 @@ function resize($filename, $width, $height)
|
||||
@imagedestroy($image);
|
||||
}
|
||||
|
||||
if(isset($_POST['person_idValue']))
|
||||
{
|
||||
$benutzer = new benutzer();
|
||||
$benutzer->load($user);
|
||||
|
||||
if($benutzer->person_id!=$_POST['person_idValue'])
|
||||
die($p->t('global/keineBerechtigungFuerDieseSeite'));
|
||||
|
||||
$fs = new fotostatus();
|
||||
if($fs->akzeptiert($benutzer->person_id))
|
||||
die($p->t('profil/profilfotoUploadGesperrt'));
|
||||
}
|
||||
else
|
||||
die($p->t('global/fehlerBeiDerParameteruebergabe'));
|
||||
|
||||
//file als png und jpg abspeichern
|
||||
file_put_contents('image.png', base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $src)));
|
||||
$imageTmp=imagecreatefrompng('image.png');
|
||||
|
||||
Reference in New Issue
Block a user