PM--2619 No se visualiza si se subió correctamente el logo requerido

This commit is contained in:
Brayan Pereyra
2015-05-06 15:31:54 -04:00
parent bb3e1d3885
commit 6709f28546
2 changed files with 8 additions and 3 deletions

View File

@@ -1009,7 +1009,6 @@ class adminProxy extends HttpProxyController
public function uploadImage()
{
//!dataSystem
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$_SERVER["REQUEST_URI"] = $filter->xssFilterHard($_SERVER["REQUEST_URI"]);
@@ -1090,7 +1089,13 @@ class adminProxy extends HttpProxyController
$uploaded = $filter->validateInput($uploaded,'int');
$files_img_type = $filter->xssFilterHard($files_img_type);
$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();
}

View File

@@ -257,7 +257,7 @@ Ext.onReady(function() {
waitTitle : " ",
success : function(form, o) {
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'));
}
else {