aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/language.php4
-rw-r--r--include/nav.php5
2 files changed, 5 insertions, 4 deletions
diff --git a/include/language.php b/include/language.php
index 780dfadba..cfaa855dd 100644
--- a/include/language.php
+++ b/include/language.php
@@ -214,8 +214,10 @@ function detect_language($s) {
if($min_confidence === false)
$min_confidence = LANGUAGE_DETECT_MIN_CONFIDENCE;
+ // 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 '';
diff --git a/include/nav.php b/include/nav.php
index a97b434bc..2d0d43d5a 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -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...')
));