Hi
when I want to adjust the template of Pisearch (pi_search) 1.71 it breaks the html:
Before changing it looks like this:
Suchen:
......
after I submit my changes it looks like this:
Suchen:
......
please, beg, knee down .... some one help
Thanks,
Olaf
Pisearch 1.71: Edit template breaks HTML
Re: Pisearch 1.71: Edit template breaks HTML
This is the solution:
change the function update of the module:
This behavior must be a cmsms system bug with php 4.3.3, because in include.php this was every time in use:
but it seems that this does not work with php 4.3.3 and on module level (other modules have the same problem).
The next pisearch version comes today.
change the function update of the module:
Code: Select all
function update($id, &$params, $return_id)
{
if (isset($_GET['form']) && isset($_GET['result']))
{
if (get_magic_quotes_gpc()==1)
{
$f = stripslashes($_GET['form']);
$r= stripslashes($_GET['result']);
}
else
{
$f = $_GET['form'];
$r= $_GET['result'];
}
...... etc etc
Code: Select all
#Stupid magic quotes...
if(get_magic_quotes_gpc())
{
strip_slashes($_GET);
strip_slashes($_POST);
strip_slashes($_REQUEST);
strip_slashes($_COOKIE);
strip_slashes($_SESSIONS);
}
The next pisearch version comes today.
Re: Pisearch 1.71: Edit template breaks HTML
This says php manual:
it has no function , where is the return value ?
but this is in include.phpDescription
string stripslashes ( string str)
Returns a string with backslashes stripped off. (\' becomes ' and so on.) Double backslashes (\\) are made into a single backslash (\).
Code: Select all
#Stupid magic quotes...
if(get_magic_quotes_gpc())
{
strip_slashes($_GET);
strip_slashes($_POST);
strip_slashes($_REQUEST);
strip_slashes($_COOKIE);
strip_slashes($_SESSIONS);
}
Re: Pisearch 1.71: Edit template breaks HTML
the working code in include.php must be something like this (found in php.net):
you see, that original code of cmsms include.php can make heavy problems.
Code: Select all
if ( get_magic_quotes_gpc() ) {
function stripslashes_deep($value) {
if( is_array($value) )
{
$value = array_map('stripslashes_deep', $value)
}
elseif ( !empty($value) && is_string($value) )
{
$value = stripslashes($value);
}
return $value;
}
$_POST = stripslashes_deep($_POST);
$_GET = stripslashes_deep($_GET);
$_COOKIE = stripslashes_deep($_COOKIE);
}
Re: Pisearch 1.71: Edit template breaks HTML
Module pisearch 1.72 is available in the dev.
Re: Pisearch 1.71: Edit template breaks HTML
Hi
did you see this:
http://de3.php.net/manual/de/function.g ... es-gpc.php
I guess so, judging after your additions to the pi_search code.
Thanks again
Olaf
did you see this:
http://de3.php.net/manual/de/function.g ... es-gpc.php
I guess so, judging after your additions to the pi_search code.
Thanks again
Olaf