1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00
fix for #799 - output shoud be without word return
This commit is contained in:
Jimako
2014-10-26 21:16:32 +01:00
parent 14a403d0de
commit 40bf774df8

View File

@@ -311,13 +311,13 @@ class login_menu_shortcodes extends e_shortcode
if(!isset($data['new_news'])) return ''; if(!isset($data['new_news'])) return '';
$tmp = array(); $tmp = array();
if($data['new_news']){ if($data['new_news']){
$tmp['LM_STAT_NEW'] = "return '".$data['new_news']."';"; $tmp['LM_STAT_NEW'] = $data['new_news'];
$tmp['LM_STAT_LABEL'] = $data['new_news'] == 1 ? "return '".LOGIN_MENU_L14."';" : "return '".LOGIN_MENU_L15."';"; $tmp['LM_STAT_LABEL'] = $data['new_news'] == 1 ? LOGIN_MENU_L14 : LOGIN_MENU_L15;
$tmp['LM_STAT_EMPTY'] = ''; $tmp['LM_STAT_EMPTY'] = '';
} else { } else {
$tmp['LM_STAT_NEW'] = ''; $tmp['LM_STAT_NEW'] = '';
$tmp['LM_STAT_LABEL'] = ''; $tmp['LM_STAT_LABEL'] = '';
$tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L15."';"; $tmp['LM_STAT_EMPTY'] = LOGIN_MENU_L26." ".LOGIN_MENU_L15;
} }
return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp); return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
} }
@@ -329,13 +329,13 @@ class login_menu_shortcodes extends e_shortcode
if(!isset($data['new_comments'])) return ''; if(!isset($data['new_comments'])) return '';
$tmp = array(); $tmp = array();
if($data['new_comments']){ if($data['new_comments']){
$tmp['LM_STAT_NEW'] = "return '".$data['new_comments']."';"; $tmp['LM_STAT_NEW'] = $data['new_comments'];
$tmp['LM_STAT_LABEL'] = $data['new_comments'] == 1 ? "return '".LOGIN_MENU_L18."';" : "return '".LOGIN_MENU_L19."';"; $tmp['LM_STAT_LABEL'] = $data['new_comments'] == 1 ? LOGIN_MENU_L18 : LOGIN_MENU_L19;
$tmp['LM_STAT_EMPTY'] = ''; $tmp['LM_STAT_EMPTY'] = '';
} else { } else {
$tmp['LM_STAT_NEW'] = ''; $tmp['LM_STAT_NEW'] = '';
$tmp['LM_STAT_LABEL'] = ''; $tmp['LM_STAT_LABEL'] = '';
$tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L19."';"; $tmp['LM_STAT_EMPTY'] = LOGIN_MENU_L26." ".LOGIN_MENU_L19;
} }
return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp); return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
} }
@@ -347,13 +347,13 @@ class login_menu_shortcodes extends e_shortcode
if(!isset($data['new_users'])) return ''; if(!isset($data['new_users'])) return '';
$tmp = array(); $tmp = array();
if($data['new_users']){ if($data['new_users']){
$tmp['LM_STAT_NEW'] = "return '".$data['new_users']."';"; $tmp['LM_STAT_NEW'] = $data['new_users'];
$tmp['LM_STAT_LABEL'] = $data['new_users'] == 1 ? "return '".LOGIN_MENU_L22."';" : "return '".LOGIN_MENU_L23."';"; $tmp['LM_STAT_LABEL'] = $data['new_users'] == 1 ? LOGIN_MENU_L22 : LOGIN_MENU_L23;
$tmp['LM_STAT_EMPTY'] = ''; $tmp['LM_STAT_EMPTY'] = '';
} else { } else {
$tmp['LM_STAT_NEW'] = ''; $tmp['LM_STAT_NEW'] = '';
$tmp['LM_STAT_LABEL'] = ''; $tmp['LM_STAT_LABEL'] = '';
$tmp['LM_STAT_EMPTY'] = "return '".LOGIN_MENU_L26." ".LOGIN_MENU_L23."';"; $tmp['LM_STAT_EMPTY'] = LOGIN_MENU_L26." ".LOGIN_MENU_L23;
} }
return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp); return $tp -> parseTemplate($LOGIN_MENU_STATITEM, false, $tmp);
} }