PM--2619 No se visualiza si se subió correctamente el logo requerido
This commit is contained in:
@@ -1009,7 +1009,6 @@ class adminProxy extends HttpProxyController
|
|||||||
public function uploadImage()
|
public function uploadImage()
|
||||||
{
|
{
|
||||||
//!dataSystem
|
//!dataSystem
|
||||||
|
|
||||||
G::LoadSystem('inputfilter');
|
G::LoadSystem('inputfilter');
|
||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
$_SERVER["REQUEST_URI"] = $filter->xssFilterHard($_SERVER["REQUEST_URI"]);
|
$_SERVER["REQUEST_URI"] = $filter->xssFilterHard($_SERVER["REQUEST_URI"]);
|
||||||
@@ -1090,7 +1089,13 @@ class adminProxy extends HttpProxyController
|
|||||||
$uploaded = $filter->validateInput($uploaded,'int');
|
$uploaded = $filter->validateInput($uploaded,'int');
|
||||||
$files_img_type = $filter->xssFilterHard($files_img_type);
|
$files_img_type = $filter->xssFilterHard($files_img_type);
|
||||||
$failed = $filter->validateInput($failed,'int');
|
$failed = $filter->validateInput($failed,'int');
|
||||||
echo '{success: true, failed: ' . $failed . ', uploaded: ' . $uploaded . ', type: "' . $files_img_type . '"}';
|
$resp = array(
|
||||||
|
'success' => true,
|
||||||
|
'failed' => $failed,
|
||||||
|
'uploaded' => $uploaded,
|
||||||
|
'type' => $files_img_type
|
||||||
|
);
|
||||||
|
echo json_encode($resp);
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ Ext.onReady(function() {
|
|||||||
waitTitle : " ",
|
waitTitle : " ",
|
||||||
success : function(form, o) {
|
success : function(form, o) {
|
||||||
obj = Ext.util.JSON.decode(o.response.responseText);
|
obj = Ext.util.JSON.decode(o.response.responseText);
|
||||||
if (obj.failed == '0' && obj.uploaded != '0') {
|
if ((obj.failed == '' || obj.failed == '0') && obj.uploaded != '0') {
|
||||||
PMExt.notify(_('ID_SUCCESS'), _('ID_YOUR_IMAGE_HAS_BEEN_SUCCESSFULLY'));
|
PMExt.notify(_('ID_SUCCESS'), _('ID_YOUR_IMAGE_HAS_BEEN_SUCCESSFULLY'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user