BUG 9463 Cuando se cambia el skin por medio de Admin-Settings-Skin... SOLVED

- there was a validation incorrecta.
- By change of url additional validation is needed.
This commit is contained in:
Marco Antonio Nina
2012-07-20 16:03:39 -04:00
parent 881873f616
commit 7f055e30db
2 changed files with 21 additions and 2 deletions

View File

@@ -45,7 +45,14 @@ function skinList()
{ {
G::loadClass('system'); G::loadClass('system');
$skinListArray = System::getSkingList(); $skinList = System::getSkingList();
foreach ($skinList['skins'] as $key => $value) {
if ($value['SKIN_FOLDER_ID'] != 'simplified' && $value['SKIN_FOLDER_ID'] != 'uxs') {
$skinListArray['skins'][] = $value;
}
}
$skinListArray['currentSkin'] = $skinList['currentSkin'];
echo G::json_encode($skinListArray); echo G::json_encode($skinListArray);
} }

View File

@@ -750,7 +750,19 @@ function changeSkin(newSkin,currentSkin){
var response = Ext.util.JSON.decode(r.responseText); var response = Ext.util.JSON.decode(r.responseText);
if (response.success) { if (response.success) {
currentLocation = top.location.href; currentLocation = top.location.href;
newLocation = currentLocation.replace("/" + currentSkin + "/", "/" + newSkin + "/"); if (currentSkin.substring(0,2) != 'ux') {
if (newSkin.substring(0,2) == 'ux') {
newLocation = currentLocation.replace("/" + currentSkin + "/setup/", "/" + newSkin + "/");
} else {
newLocation = currentLocation.replace("/" + currentSkin + "/", "/" + newSkin + "/");
}
} else {
if (newSkin.substring(0,2) == 'ux') {
newLocation = currentLocation.replace("/" + currentSkin + "/", "/" + newSkin + "/");
} else {
newLocation = currentLocation.replace("/" + currentSkin + "/", "/" + newSkin + "/setup/");
}
}
top.location.href = newLocation; top.location.href = newLocation;
} }
else { else {