fix not saving javascript in code
This commit is contained in:
parent
8c65d7a755
commit
764991d239
2 changed files with 10 additions and 21 deletions
|
@ -49,21 +49,15 @@ cInclude ("includes", "functions.con.php");
|
|||
*/
|
||||
function layEditLayout($idlay, $name, $description, $code) {
|
||||
|
||||
global $client, $auth, $cfg, $sess, $area_tree, $perm, $cfgClient;
|
||||
global $client, $auth, $cfg, $cfgClient;
|
||||
|
||||
$db2= new DB_ConLite;
|
||||
$db = new DB_ConLite;
|
||||
$db = new DB_ConLite();
|
||||
|
||||
$date = date("Y-m-d H:i:s");
|
||||
$author = "".$auth->auth["uname"]."";
|
||||
$description = (string) stripslashes($description);
|
||||
|
||||
/**
|
||||
set_magic_quotes_gpc($name);
|
||||
set_magic_quotes_gpc($description);
|
||||
set_magic_quotes_gpc($code);
|
||||
**/
|
||||
//$code = addslashes($code);
|
||||
$author = $auth->auth["uname"];
|
||||
$description = stripslashes($description);
|
||||
|
||||
$code = addslashes($code);
|
||||
if (strlen(trim($name)) == 0) {
|
||||
$name = i18n('-- Unnamed Layout --');
|
||||
}
|
||||
|
|
|
@ -84,9 +84,10 @@ if (!$layout->virgin) {
|
|||
$ret = tplBrowseLayoutForContainers($idlay);
|
||||
|
||||
if (strlen($ret) != 0) {
|
||||
$container = [];
|
||||
$types =[];
|
||||
$containers = explode("&", $ret);
|
||||
|
||||
$types = array();
|
||||
|
||||
foreach ($containers as $value) {
|
||||
if ($value != "") {
|
||||
|
@ -107,11 +108,7 @@ if (!$layout->virgin) {
|
|||
}
|
||||
|
||||
$types = array_unique($types);
|
||||
if (version_compare(PHP_VERSION, '7.4.0', '>=')) {
|
||||
$layout->setProperty("layout", "used-types", implode(";", $types));
|
||||
} else {
|
||||
$layout->setProperty("layout", "used-types", implode($types, ";"));
|
||||
}
|
||||
$layout->setProperty("layout", "used-types", implode(";", $types));
|
||||
|
||||
$msg = "";
|
||||
|
||||
|
@ -138,7 +135,6 @@ if (!$layout->virgin) {
|
|||
}
|
||||
|
||||
foreach ($v->missingNodes as $value) {
|
||||
$idqualifier = "";
|
||||
|
||||
$attr = array();
|
||||
|
||||
|
@ -236,5 +232,4 @@ if (stripslashes($_REQUEST['idlay'])) {
|
|||
$sReloadScript = "";
|
||||
}
|
||||
$page->addScript('reload', $sReloadScript);
|
||||
$page->render();
|
||||
?>
|
||||
$page->render();
|
Loading…
Reference in a new issue