|
@@ -49,7 +49,12 @@ class BxBaseModProfileUploaderPictureCrop extends BxTemplUploaderCrop
|
|
|
if (!$s || !$iContentId) // if we're creating new profile return all ghosts
|
|
if (!$s || !$iContentId) // if we're creating new profile return all ghosts
|
|
|
return $s;
|
|
return $s;
|
|
|
|
|
|
|
|
- $a = json_decode($s, true);
|
|
|
|
|
|
|
+ $a = array();
|
|
|
|
|
+ if ($sFormat == 'array')
|
|
|
|
|
+ $a = $s;
|
|
|
|
|
+ else if ($sFormat == 'json')
|
|
|
|
|
+ $a = json_decode($s, true);
|
|
|
|
|
+
|
|
|
if (!$a)
|
|
if (!$a)
|
|
|
return $s;
|
|
return $s;
|
|
|
|
|
|
|
@@ -64,7 +69,14 @@ class BxBaseModProfileUploaderPictureCrop extends BxTemplUploaderCrop
|
|
|
$aResult[] = $aFile;
|
|
$aResult[] = $aFile;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- return json_encode($aResult);
|
|
|
|
|
|
|
+ if ('array' == $sFormat) {
|
|
|
|
|
+ return $a;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if ('json' == $sFormat) {
|
|
|
|
|
+ return json_encode($a);
|
|
|
|
|
+ } else { // html format is not suported for this data type
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
protected function isAdmin ($iContentId = 0)
|
|
protected function isAdmin ($iContentId = 0)
|