BUG 9297 Al crear un nuevo skin y seleccionar el uxmodern despliega... SOLVED

- It was found that an alert was displayed with a not very specific error
- Skin_ajax was modified to allow the skin uxmodern to be copied, moreover to clarify the type of error.
This commit is contained in:
Marco Antonio Nina
2012-07-06 11:06:20 -04:00
parent 8e04c6c083
commit dab8440ac8
2 changed files with 19 additions and 12 deletions

View File

@@ -24,6 +24,7 @@ if (in_array($_REQUEST ['action'],$restrictedFunctions)) {
$functionName = $_REQUEST ['action'];
//echo $_REQUEST ['action'];
$functionParams = isset($_REQUEST ['params']) ? $_REQUEST ['params'] : array();
$functionName();
@@ -48,7 +49,8 @@ function skinList() {
}
function newSkin($baseSkin='classic') {
//G::pr($_REQUEST);
//G::pr($_REQUEST);
$skinBase = $baseSkin != "" ? strtolower($baseSkin) : 'classic';
if ((isset($_REQUEST['skinBase'])) && ($_REQUEST['skinBase'] != "")) {
$skinBase = strtolower($_REQUEST['skinBase']);
@@ -81,15 +83,20 @@ function newSkin($baseSkin='classic') {
//All validations OK then create skin
switch ($skinBase) {
case 'classic': //Special Copy of this dir + xmlreplace
//$configurationFile = G::ExpandPath("skinEngine") . 'base' . PATH_SEP . 'config.xml';
copy_skin_folder(G::ExpandPath("skinEngine") . 'base' . PATH_SEP, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml","baseCss"));
$pathBase=G::ExpandPath("skinEngine") . 'base' . PATH_SEP;
break;
default: //Commmon copy/paste of a folder + xmlrepalce
copy_skin_folder(PATH_CUSTOM_SKINS . $skinBase, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml"));
$pathBase=PATH_CUSTOM_SKINS.$skinBase;
break;
case 'uxmodern':
copy_skin_folder(G::ExpandPath("skinEngine") . 'uxmodern' . PATH_SEP, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml"));
$pathBase=G::ExpandPath("skinEngine") . 'base' . PATH_SEP;
break;
case 'classic':
//Special Copy of this dir + xmlreplace
copy_skin_folder(G::ExpandPath("skinEngine") . 'base' . PATH_SEP, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml","baseCss"));
$pathBase=G::ExpandPath("skinEngine") . 'base' . PATH_SEP;
break;
default:
//Commmon copy/paste of a folder + xmlrepalce
copy_skin_folder(PATH_CUSTOM_SKINS . $skinBase, PATH_CUSTOM_SKINS . $skinFolder,array("config.xml"));
$pathBase=PATH_CUSTOM_SKINS.$skinBase;
break;
}
//ReBuild config file
//TODO: Improve this pre_replace lines
@@ -330,4 +337,4 @@ function copy_skin_folder($path, $dest, $exclude=array()) {
} else {
return false;
}
}
}