peyacoc
New Member
I got this error message:
The "Call to undefined function get_magic_quotes_gpc()" error indicates that you are trying to call a function that is no longer supported in PHP. The get_magic_quotes_gpc function was deprecated in PHP 5.3.0 and removed in PHP 7.0.0.
in \plugins\fabrik_element\jdate\jdate.php
I fixed it like this:
//this works for me!!!
protected function autoCompleteFilter($default, $v, $labelValue = null, $normal = true, $container = null)
{
$default = filter_input(INPUT_POST, $v, FILTER_SANITIZE_STRING);
$htmlId = $this->getHTMLId();
$layout = $this->getLayout('list-filter-autocomplete');
$displayData = new stdClass;
$displayData->class = $this->filterClass();
$displayData->name = $v;
$displayData->default = $default;
$displayData->htmlId = $htmlId;
$autoId = '#' . $htmlId . '-auto-complete';
if (!$normal)
{
$autoId = '.advanced-search-list .autocomplete-trigger';
}
FabrikHelperHTML::autoComplete($autoId, $this->getElement()->id, $this->getFormModel()->getId(), 'date');
return $layout->render($displayData);
}
// fine codice
/* this does not work DEPRECATED
protected function autoCompleteFilter($default, $v, $labelValue = null, $normal = true, $container = null)
{
if (get_magic_quotes_gpc())
{
$default = stripslashes($default);
}
$default = htmlspecialchars($default);
$htmlId = $this->getHTMLId();
$layout = $this->getLayout('list-filter-autocomplete');
$displayData = new stdClass;
$displayData->class = $this->filterClass();
$displayData->name = $v;
$displayData->default = $default;
$displayData->htmlId = $htmlId;
$autoId = '#' . $htmlId . '-auto-complete';
if (!$normal)
{
$autoId = '.advanced-search-list .autocomplete-trigger';
}
FabrikHelperHTML::autoComplete($autoId, $this->getElement()->id, $this->getFormModel()->getId(), 'date');
return $layout->render($displayData);
}
fine codice deprecato */
//this works for me!!!
protected function hiddenFilter($default, $v)
{
if (is_array($default))
{
$default = array_shift($default);
}
$default = addslashes(htmlspecialchars($default));
$class = $this->filterClass();
// Don't add id as caused issues with inline edit plugin and clashing ids.
return '<input type="hidden" name="' . $v . '" class="' . $class . '" value="' . $default . '" />';
}
//fine codice mio
/* this does not work
protected function hiddenFilter($default, $v)
{
if (is_array($default))
{
$default = array_shift($default);
}
if (get_magic_quotes_gpc())
{
$default = stripslashes($default);
}
$default = htmlspecialchars($default);
$class = $this->filterClass();
// Don't add id as caused issues with inline edit plugin and clashing ids.
return '<input type="hidden" name="' . $v . '" class="' . $class . '" value="' . $default . '" />';
}
fine codice deprecato */
The "Call to undefined function get_magic_quotes_gpc()" error indicates that you are trying to call a function that is no longer supported in PHP. The get_magic_quotes_gpc function was deprecated in PHP 5.3.0 and removed in PHP 7.0.0.
in \plugins\fabrik_element\jdate\jdate.php
I fixed it like this:
//this works for me!!!
protected function autoCompleteFilter($default, $v, $labelValue = null, $normal = true, $container = null)
{
$default = filter_input(INPUT_POST, $v, FILTER_SANITIZE_STRING);
$htmlId = $this->getHTMLId();
$layout = $this->getLayout('list-filter-autocomplete');
$displayData = new stdClass;
$displayData->class = $this->filterClass();
$displayData->name = $v;
$displayData->default = $default;
$displayData->htmlId = $htmlId;
$autoId = '#' . $htmlId . '-auto-complete';
if (!$normal)
{
$autoId = '.advanced-search-list .autocomplete-trigger';
}
FabrikHelperHTML::autoComplete($autoId, $this->getElement()->id, $this->getFormModel()->getId(), 'date');
return $layout->render($displayData);
}
// fine codice
/* this does not work DEPRECATED
protected function autoCompleteFilter($default, $v, $labelValue = null, $normal = true, $container = null)
{
if (get_magic_quotes_gpc())
{
$default = stripslashes($default);
}
$default = htmlspecialchars($default);
$htmlId = $this->getHTMLId();
$layout = $this->getLayout('list-filter-autocomplete');
$displayData = new stdClass;
$displayData->class = $this->filterClass();
$displayData->name = $v;
$displayData->default = $default;
$displayData->htmlId = $htmlId;
$autoId = '#' . $htmlId . '-auto-complete';
if (!$normal)
{
$autoId = '.advanced-search-list .autocomplete-trigger';
}
FabrikHelperHTML::autoComplete($autoId, $this->getElement()->id, $this->getFormModel()->getId(), 'date');
return $layout->render($displayData);
}
fine codice deprecato */
//this works for me!!!
protected function hiddenFilter($default, $v)
{
if (is_array($default))
{
$default = array_shift($default);
}
$default = addslashes(htmlspecialchars($default));
$class = $this->filterClass();
// Don't add id as caused issues with inline edit plugin and clashing ids.
return '<input type="hidden" name="' . $v . '" class="' . $class . '" value="' . $default . '" />';
}
//fine codice mio
/* this does not work
protected function hiddenFilter($default, $v)
{
if (is_array($default))
{
$default = array_shift($default);
}
if (get_magic_quotes_gpc())
{
$default = stripslashes($default);
}
$default = htmlspecialchars($default);
$class = $this->filterClass();
// Don't add id as caused issues with inline edit plugin and clashing ids.
return '<input type="hidden" name="' . $v . '" class="' . $class . '" value="' . $default . '" />';
}
fine codice deprecato */