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.
This commit is contained in:
@@ -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 '';
|
||||
|
||||
Reference in New Issue
Block a user