fix not saving javascript in code

Dieser Commit ist enthalten in:
Ortwin Pinke 2023-07-27 19:04:46 +02:00
Ursprung 8c65d7a755
Commit 764991d239
2 geänderte Dateien mit 10 neuen und 21 gelöschten Zeilen

Datei anzeigen

@ -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 --');
}

Datei anzeigen

@ -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();