Commit d17768d4 authored by friendica's avatar friendica

change app dropdown to point to apps module (changes nav template). Important:...

change app dropdown to point to apps module (changes nav template). Important: Plugins using the app-menu hook will no longer be accessible from there and may require re-writing to plug into the system apps page. Also filter apps in items from the language detector to avoid false triggers from the base64 content.
parent a6602a98
......@@ -214,8 +214,10 @@ function detect_language($s) {
if($min_confidence === false)
// embedded apps have long base64 strings which will trip up the detector.
$naked_body = preg_replace('/\[app\](.*?)\[\/app\]/','',$s);
// strip off bbcode
$naked_body = preg_replace('/\[(.+?)\]/', '', $s);
$naked_body = preg_replace('/\[(.+?)\]/', '', $naked_body);
if(mb_strlen($naked_body) < intval($min_length)) {
logger('detect language: string length less than ' . intval($min_length), LOGGER_DATA);
return '';
......@@ -138,8 +138,8 @@ EOT;
if(! get_config('system','hide_help'))
$nav['help'] = array($help_url, t('Help'), "", t('Help and documentation'));
if(count($a->get_apps()) > 0)
$nav['apps'] = array('apps', t('Apps'), "", t('Addon applications, utilities, games'));
$nav['apps'] = array('apps', t('Apps'), "", t('Applications, utilities, links, games'));
$nav['search'] = array('search', t('Search'), "", t('Search site content'));
......@@ -221,7 +221,6 @@ EOT;
'$userinfo' => $x['usermenu'],
'$localuser' => local_user(),
'$sel' => $a->nav_sel,
'$apps' => $a->get_apps(),
'$pleasewait' => t('Please wait...')
......@@ -157,13 +157,8 @@
{{if $nav.apps}}
<li class="{{$sel.apps}} hidden-xs">
<a class="{{$nav.apps.2}} dropdown-toggle" data-toggle="dropdown" href="#" rel="#nav-apps-menu" title="{{$nav.apps.3}}" ><i class="icon-cogs"></i></a>
<ul class="dropdown-menu">
{{foreach $apps as $ap}}
<li role="presentation">{{$ap}}</li>
<li class="{{$sel.apps}}">
<a class="{{$nav.apps.2}}" href="{{$nav.apps.0}}" title="{{$nav.apps.3}}" ><i class="icon-cogs"></i></a>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment