added missing curly braces
Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
92901d8626
commit
5471dd79e8
1 changed files with 6 additions and 4 deletions
|
@ -215,7 +215,7 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
||||||
|
|
||||||
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, $defperm);
|
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 0, 0, $defperm);
|
||||||
|
|
||||||
if(! $r) {
|
if (! $r) {
|
||||||
$msg = t('Image upload failed.');
|
$msg = t('Image upload failed.');
|
||||||
if ($r_json) {
|
if ($r_json) {
|
||||||
echo json_encode(array('error'=>$msg));
|
echo json_encode(array('error'=>$msg));
|
||||||
|
@ -225,18 +225,20 @@ function wall_upload_post(App $a, $desktopmode = true) {
|
||||||
killme();
|
killme();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($width > 640 || $height > 640) {
|
if ($width > 640 || $height > 640) {
|
||||||
$ph->scaleImage(640);
|
$ph->scaleImage(640);
|
||||||
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1, 0, $defperm);
|
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 1, 0, $defperm);
|
||||||
if ($r)
|
if ($r) {
|
||||||
$smallest = 1;
|
$smallest = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($width > 320 || $height > 320) {
|
if ($width > 320 || $height > 320) {
|
||||||
$ph->scaleImage(320);
|
$ph->scaleImage(320);
|
||||||
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 2, 0, $defperm);
|
$r = $ph->store($page_owner_uid, $visitor, $hash, $filename, t('Wall Photos'), 2, 0, $defperm);
|
||||||
if ($r AND ($smallest == 0))
|
if ($r AND ($smallest == 0)) {
|
||||||
$smallest = 2;
|
$smallest = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$basename = basename($filename);
|
$basename = basename($filename);
|
||||||
|
|
Loading…
Reference in a new issue