mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 05:02:02 +02:00
PHP Notice fixes. mbstring function fallback.
This commit is contained in:
parent
80fbb2a334
commit
fcbe12c5f6
@ -489,7 +489,7 @@ function render_meta($type)
|
||||
}
|
||||
}
|
||||
|
||||
// legay meta-tag checks.
|
||||
// legay meta-tag checks.
|
||||
if(empty(e107::getUrl()->response()->getMetaKeywords()))
|
||||
{
|
||||
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');
|
||||
|
||||
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
|
||||
// - if an & is in the last 8 chars, removing it and whatever follows shouldn't hurt
|
||||
// it should work for any characters encoding
|
||||
|
||||
/*
|
||||
|
||||
$leftAmp = $this->ustrrpos($this->usubstr($ret, -8), '&');
|
||||
if($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())
|
||||
{
|
||||
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']);
|
||||
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']))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user