mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Upgraded to FontAwesome 4.7.0. Glyph caching improved.
This commit is contained in:
@@ -1406,6 +1406,8 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$items = array();
|
||||||
|
|
||||||
//TODO FIXME Upgrade to bs3 when Bootstrap3 Admin is ready.
|
//TODO FIXME Upgrade to bs3 when Bootstrap3 Admin is ready.
|
||||||
|
|
||||||
$bs2 = e107::getMedia()->getGlyphs('bs3','glyphicon-');
|
$bs2 = e107::getMedia()->getGlyphs('bs3','glyphicon-');
|
||||||
@@ -1426,6 +1428,7 @@ class media_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
$fa4 = e107::getMedia()->getGlyphs('fa4');
|
$fa4 = e107::getMedia()->getGlyphs('fa4');
|
||||||
|
|
||||||
|
|
||||||
foreach($fa4 as $val)
|
foreach($fa4 as $val)
|
||||||
{
|
{
|
||||||
$items[] = array(
|
$items[] = array(
|
||||||
@@ -1442,16 +1445,18 @@ class media_admin_ui extends e_admin_ui
|
|||||||
if(vartrue($parm['search']))
|
if(vartrue($parm['search']))
|
||||||
{
|
{
|
||||||
$filtered = array();
|
$filtered = array();
|
||||||
foreach($items as $v)
|
if(!empty($items))
|
||||||
{
|
{
|
||||||
if(strpos($v['title'], $parm['search'])!==false)
|
foreach($items as $v)
|
||||||
{
|
{
|
||||||
$v['slideCaption'] = '';
|
if(strpos($v['title'], $parm['search'])!==false)
|
||||||
$filtered[] = $v;
|
{
|
||||||
|
$v['slideCaption'] = '';
|
||||||
|
$filtered[] = $v;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$items = $filtered;
|
$items = $filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -929,12 +929,10 @@ class e_media
|
|||||||
}
|
}
|
||||||
|
|
||||||
$cache = e107::getCache();
|
$cache = e107::getCache();
|
||||||
$cachTag = !empty($prefix) ? "glyphs_".$prefix : "glyphs";
|
$cachTag = !empty($prefix) ? "Glyphs_".$prefix."_".$type : "Glyphs_".$type;
|
||||||
$cache->setMD5($cachTag, false);
|
|
||||||
|
|
||||||
if($data = $cache->retrieve($type,360,true))
|
if($data = $cache->retrieve($cachTag ,360,true,true))
|
||||||
{
|
{
|
||||||
$cache->setMD5(null);
|
|
||||||
return e107::unserialize($data);
|
return e107::unserialize($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -942,7 +940,7 @@ class e_media
|
|||||||
if($type == 'fa4')
|
if($type == 'fa4')
|
||||||
{
|
{
|
||||||
$pattern = '/\.(fa-(?:\w+(?:-)?)+):before/';
|
$pattern = '/\.(fa-(?:\w+(?:-)?)+):before/';
|
||||||
$subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.css');
|
$subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css');
|
||||||
// print_a($subject);
|
// print_a($subject);
|
||||||
}
|
}
|
||||||
elseif($type == 'fa3')
|
elseif($type == 'fa3')
|
||||||
@@ -967,8 +965,8 @@ class e_media
|
|||||||
|
|
||||||
$data = e107::serialize($icons);
|
$data = e107::serialize($icons);
|
||||||
|
|
||||||
$cache->set($type,$data,true);
|
$cache->set_sys($cachTag ,$data,true);
|
||||||
$cache->setMD5(null);
|
|
||||||
return $icons;
|
return $icons;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -13,7 +13,7 @@ define('FONTAWESOME', 4);
|
|||||||
|
|
||||||
e107::js("url", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery', 2);
|
e107::js("url", "https://cdn.jsdelivr.net/bootstrap/3.3.6/js/bootstrap.min.js", 'jquery', 2);
|
||||||
// e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.5/css/bootstrap.min.css');
|
// e107::css('url', 'https://cdn.jsdelivr.net/bootstrap/3.3.5/css/bootstrap.min.css');
|
||||||
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.5.0/css/font-awesome.min.css');
|
e107::css('url', 'https://cdn.jsdelivr.net/fontawesome/4.7.0/css/font-awesome.min.css');
|
||||||
|
|
||||||
|
|
||||||
// Too slow.
|
// Too slow.
|
||||||
|
Reference in New Issue
Block a user