1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

PHP Notice removal

This commit is contained in:
Cameron 2014-02-07 07:03:23 -08:00
parent f96f755318
commit c7cb6d2975
3 changed files with 10 additions and 13 deletions

View File

@ -295,7 +295,7 @@ class pluginManager{
foreach($this->fields as $key=>$val)
{
if($val['forced'] == true && substr($key,0,6)=='plugin')
if(vartrue($val['forced']) && substr($key,0,6)=='plugin')
{
$this->fieldpref[] = $key;
}

View File

@ -2694,7 +2694,7 @@ class e_parser
*/
public function toGlyph($text, $space=" ")
{
if(!deftrue('BOOTSTRAP'))
if(!deftrue('BOOTSTRAP') || empty($text))
{
return false;
}
@ -2718,10 +2718,14 @@ class e_parser
// Get Glyph names.
$bs3 = e107::getMedia()->getGlyphs('bs3','');
$fa4 = e107::getMedia()->getGlyphs('fa4','');
list($cls,$tmp) = explode('.glyph',$text);
list($cls) = explode('.glyph',$text,2);
// list($type, $tmp2) = explode("-",$text,2);
// return $cls;
$removePrefix = array('glyphicon-','icon-','fa-');
$id = str_replace($removePrefix, "", $cls);
@ -2748,6 +2752,8 @@ class e_parser
$tag = 'i';
}
$size = '';
}
$text = "<".$tag." class='".$prefix.$id.$size."'></".$tag.">" ;

View File

@ -2646,7 +2646,7 @@ class e_form
// $value = "<a class='e-tip e-editable editable-click' data-name='".$field."' data-value='{$_value}' data-source=\"".$source."\" title=\"".LAN_EDIT." ".$attributes['title']."\" data-type='".$xtype."' data-pk='".$id."' data-url='".e_SELF."?mode=&amp;action=inline&amp;id={$id}&amp;ajax_used=1' href='#'>".$value."</a>";
$value = $this->renderInline($field, $id, $title, $_value, $value, $xtype, $wparms);
$value = $this->renderInline($field, $id, $attributes['title'], $_value, $value, $xtype, $wparms);
}
// return ;
@ -2770,15 +2770,6 @@ class e_form
break;
case 'icon':
if($glyph = $tp->toGlyph($value))
{
// $value = $glyph;
}
else
{
// $value = '<img src="'.$tp->replaceConstants(vartrue($parms['pre']).$value, 'abs').'" alt="'.basename($value).'" class="icon'.(vartrue($parms['class']) ? ' '.$parms['class'] : '').'" />';
}
$value = $tp->toIcon($value,array('size'=>'2x'));