diff --git a/action/meta.php b/action/meta.php index eb5ddae8..6a73cb8a 100644 --- a/action/meta.php +++ b/action/meta.php @@ -385,8 +385,34 @@ function insertFormElement(Doku_Event $event, $param) { return; } + + + // restore preview button if standard DW editor is in place // $FCKG_show_preview is set in edit.php in the register() function + + + + +if (isset($_REQUEST['fck_preview_mode'])) { + if ($_REQUEST['fck_preview_mode'] != 'nil' && !isset($_COOKIE['FCKG_USE']) && !empty($FCKG_show_preview)) { + echo ''; + } elseif (!empty($FCKG_show_preview)) { + echo ''; + } else { + echo ''; + } + + global $ckgedit_lang; + + if ($_REQUEST['fck_preview_mode'] == 'preview') { + return; + } +} + + + +/* if($_REQUEST['fck_preview_mode'] != 'nil' && !isset($_COOKIE['FCKG_USE']) && !$FCKG_show_preview) { echo ''; } @@ -402,6 +428,7 @@ function insertFormElement(Doku_Event $event, $param) { if($_REQUEST['fck_preview_mode']== 'preview'){ return; } +*/ $param = array(); $this->preprocess($event, $param); // create the setDWEditCookie() js function @@ -823,12 +850,21 @@ function file_type(Doku_Event $event, $param) { setcookieSameSite('FCK_NmSp',$ID, $expire, '/'); +// Verifica se a chave 'TopLevel' está definida no array $_COOKIE +if (isset($_COOKIE['TopLevel'])) { + // Verifica se $_REQUEST['TopLevel'] está definido + $topLevelValue = isset($_REQUEST['TopLevel']) ? $_REQUEST['TopLevel'] : ''; + + // Remove o cookie 'TopLevel' + setcookieSameSite("TopLevel", $topLevelValue, time() - 3600, '/'); +} /* Remove TopLevel cookie */ +/* if(isset($_COOKIE['TopLevel'])) { setcookieSameSite("TopLevel", $_REQUEST['TopLevel'], time()-3600, '/'); } - +*/ if(!isset($_REQUEST['id']) || isset($ACT['preview'])) return; if(isset($_REQUEST['do']) && isset($_REQUEST['do']['edit'])) { @@ -916,7 +952,7 @@ function reset_user_rewrite_check() { $conf['userewrite'] = 0; } - if($conf['htmlok'] || $this->getConf('htmlblock_ok')) { + if((isset($conf['htmlok'])&& $conf['htmlok']) || $this->getConf('htmlblock_ok')) { $JSINFO['htmlok'] = 1; } else $JSINFO['htmlok'] = 0; diff --git a/action/save.php b/action/save.php index d90007e3..c2c21aa3 100644 --- a/action/save.php +++ b/action/save.php @@ -221,7 +221,7 @@ function($matches){ } $link = explode('?',$matches[1]); - if($link[1]) { + if (isset($link[1])) { $link_id = $link[0]; list($qs,$linktext) = explode('|', $link[1]); } diff --git a/admin.php b/admin.php index b72466e9..e0949e0b 100755 --- a/admin.php +++ b/admin.php @@ -55,6 +55,12 @@ function html() { echo $this->getLang('stylesheet_oinfo'); ptln(''); + $ID = ""; // Initialize $ID with an empty string + //----- Correction Start + if (isset($_REQUEST['ID'])) { + $ID = $_REQUEST['ID']; // Assign the value from $_REQUEST['ID'] to $ID + } + //---- Correction End ptln('
'); // output hidden values to ensure dokuwiki will return back to this plugin ptln(' '); @@ -75,8 +81,8 @@ function html() { ptln(''); ptln(''); ptln('

'); - - if($this->output && $this->output == 'style_sheet_msg') { + + if($this->output && $this->output == 'style_sheet_msg') { $path = $this->tpl_inc; ptln(htmlspecialchars($this->getLang($this->output)). " " .$this->template); $retv = css_ckg_out($path); diff --git a/scripts/css6.php b/scripts/css6.php index 0da730b7..25682a1f 100644 --- a/scripts/css6.php +++ b/scripts/css6.php @@ -234,6 +234,7 @@ function css_ckg_styleini($tpl) { $incbase = tpl_incdir($tpl); $webbase = tpl_basedir($tpl); $ini = $incbase.'style.ini'; +$data = []; // Define a variável $data como um array vazio if(file_exists($ini)){ $data = parse_ini_file($ini, true);