fix not saving javascript in code
Dieser Commit ist enthalten in:
Ursprung
8c65d7a755
Commit
764991d239
|
@ -49,21 +49,15 @@ cInclude ("includes", "functions.con.php");
|
||||||
*/
|
*/
|
||||||
function layEditLayout($idlay, $name, $description, $code) {
|
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");
|
$date = date("Y-m-d H:i:s");
|
||||||
$author = "".$auth->auth["uname"]."";
|
$author = $auth->auth["uname"];
|
||||||
$description = (string) stripslashes($description);
|
$description = stripslashes($description);
|
||||||
|
|
||||||
/**
|
$code = addslashes($code);
|
||||||
set_magic_quotes_gpc($name);
|
|
||||||
set_magic_quotes_gpc($description);
|
|
||||||
set_magic_quotes_gpc($code);
|
|
||||||
**/
|
|
||||||
//$code = addslashes($code);
|
|
||||||
if (strlen(trim($name)) == 0) {
|
if (strlen(trim($name)) == 0) {
|
||||||
$name = i18n('-- Unnamed Layout --');
|
$name = i18n('-- Unnamed Layout --');
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,9 +84,10 @@ if (!$layout->virgin) {
|
||||||
$ret = tplBrowseLayoutForContainers($idlay);
|
$ret = tplBrowseLayoutForContainers($idlay);
|
||||||
|
|
||||||
if (strlen($ret) != 0) {
|
if (strlen($ret) != 0) {
|
||||||
|
$container = [];
|
||||||
|
$types =[];
|
||||||
$containers = explode("&", $ret);
|
$containers = explode("&", $ret);
|
||||||
|
|
||||||
$types = array();
|
|
||||||
|
|
||||||
foreach ($containers as $value) {
|
foreach ($containers as $value) {
|
||||||
if ($value != "") {
|
if ($value != "") {
|
||||||
|
@ -107,11 +108,7 @@ if (!$layout->virgin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$types = array_unique($types);
|
$types = array_unique($types);
|
||||||
if (version_compare(PHP_VERSION, '7.4.0', '>=')) {
|
$layout->setProperty("layout", "used-types", implode(";", $types));
|
||||||
$layout->setProperty("layout", "used-types", implode(";", $types));
|
|
||||||
} else {
|
|
||||||
$layout->setProperty("layout", "used-types", implode($types, ";"));
|
|
||||||
}
|
|
||||||
|
|
||||||
$msg = "";
|
$msg = "";
|
||||||
|
|
||||||
|
@ -138,7 +135,6 @@ if (!$layout->virgin) {
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($v->missingNodes as $value) {
|
foreach ($v->missingNodes as $value) {
|
||||||
$idqualifier = "";
|
|
||||||
|
|
||||||
$attr = array();
|
$attr = array();
|
||||||
|
|
||||||
|
@ -236,5 +232,4 @@ if (stripslashes($_REQUEST['idlay'])) {
|
||||||
$sReloadScript = "";
|
$sReloadScript = "";
|
||||||
}
|
}
|
||||||
$page->addScript('reload', $sReloadScript);
|
$page->addScript('reload', $sReloadScript);
|
||||||
$page->render();
|
$page->render();
|
||||||
?>
|
|
Laden…
In neuem Issue referenzieren