mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
PHP Notice fixes. mbstring function fallback.
This commit is contained in:
@@ -489,7 +489,7 @@ function render_meta($type)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// legay meta-tag checks.
|
// legay meta-tag checks.
|
||||||
if(empty(e107::getUrl()->response()->getMetaKeywords()))
|
if(empty(e107::getUrl()->response()->getMetaKeywords()))
|
||||||
{
|
{
|
||||||
echo (defined("META_KEYWORDS")) ? "\n<meta name=\"keywords\" content=\"".$key_merge.META_KEYWORDS."\" />\n" : render_meta('keywords');
|
echo (defined("META_KEYWORDS")) ? "\n<meta name=\"keywords\" content=\"".$key_merge.META_KEYWORDS."\" />\n" : render_meta('keywords');
|
||||||
|
@@ -1350,23 +1350,25 @@ class e_parse extends e_parser
|
|||||||
|
|
||||||
$text = html_entity_decode($text,ENT_QUOTES,'utf-8');
|
$text = html_entity_decode($text,ENT_QUOTES,'utf-8');
|
||||||
|
|
||||||
return mb_strimwidth($text, 0, $len, $more);
|
if(function_exists('mb_strimwidth'))
|
||||||
|
{
|
||||||
|
return mb_strimwidth($text, 0, $len, $more);
|
||||||
|
}
|
||||||
|
|
||||||
// $ret = $this->usubstr($text, 0, $len);
|
$ret = $this->usubstr($text, 0, $len);
|
||||||
|
|
||||||
// search for possible broken html entities
|
// search for possible broken html entities
|
||||||
// - if an & is in the last 8 chars, removing it and whatever follows shouldn't hurt
|
// - if an & is in the last 8 chars, removing it and whatever follows shouldn't hurt
|
||||||
// it should work for any characters encoding
|
// it should work for any characters encoding
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
$leftAmp = $this->ustrrpos($this->usubstr($ret, -8), '&');
|
$leftAmp = $this->ustrrpos($this->usubstr($ret, -8), '&');
|
||||||
if($leftAmp)
|
if($leftAmp)
|
||||||
{
|
{
|
||||||
$ret = $this->usubstr($ret, 0, $this->ustrlen($ret) - 8 + $leftAmp);
|
$ret = $this->usubstr($ret, 0, $this->ustrlen($ret) - 8 + $leftAmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $ret.$more;*/
|
return $ret.$more;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -810,10 +810,22 @@ class e_form
|
|||||||
function number($name, $value=0, $maxlength = 200, $options = array())
|
function number($name, $value=0, $maxlength = 200, $options = array())
|
||||||
{
|
{
|
||||||
if(is_string($options)) parse_str($options, $options);
|
if(is_string($options)) parse_str($options, $options);
|
||||||
if (empty($options['maxlength'])) $maxlength = $options['maxlength'];
|
|
||||||
|
if(!empty($options['maxlength']))
|
||||||
|
{
|
||||||
|
$maxlength = $options['maxlength'];
|
||||||
|
}
|
||||||
|
|
||||||
unset($options['maxlength']);
|
unset($options['maxlength']);
|
||||||
if(empty($options['size'])) $options['size'] = 15;
|
|
||||||
if(empty($options['class'])) $options['class'] = 'tbox number e-spinner input-small ';
|
if(empty($options['size']))
|
||||||
|
{
|
||||||
|
$options['size'] = 15;
|
||||||
|
}
|
||||||
|
if(empty($options['class']))
|
||||||
|
{
|
||||||
|
$options['class'] = 'tbox number e-spinner input-small ';
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($options['size']))
|
if(!empty($options['size']))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user