Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct small Bugs with php 8.030 for not generate erros log #708

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions action/meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<style type="text/css">#edbtn__preview { display:none; }</style>';
} elseif (!empty($FCKG_show_preview)) {
echo '<style type="text/css">#edbtn__preview { display: inline; } </style>';
} else {
echo '<style type="text/css">#edbtn__preview, .btn_show { position:absolute }</style>';
}

global $ckgedit_lang;

if ($_REQUEST['fck_preview_mode'] == 'preview') {
return;
}
}



/*
if($_REQUEST['fck_preview_mode'] != 'nil' && !isset($_COOKIE['FCKG_USE']) && !$FCKG_show_preview) {
echo '<style type="text/css">#edbtn__preview { display:none; }</style>';
}
Expand All @@ -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
Expand Down Expand Up @@ -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'])) {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion action/save.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down
10 changes: 8 additions & 2 deletions admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ function html() {
echo $this->getLang('stylesheet_oinfo');
ptln('</button>');

$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('<form action="'.wl($ID).'" method="post">');
// output hidden values to ensure dokuwiki will return back to this plugin
ptln(' <input type="hidden" name="do" value="admin" />');
Expand All @@ -75,8 +81,8 @@ function html() {
ptln('</select>');
ptln('<input type="submit" name="cmd[alt_stylesheet]" value="'.$this->getLang('style_sheet').'" />');
ptln('</form></p>');

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);
Expand Down
1 change: 1 addition & 0 deletions scripts/css6.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <link>$data</link> como um array vazio
if(file_exists($ini)){
$data = parse_ini_file($ini, true);

Expand Down