! Check that the helpdesk menu item actually exists before adding the staff list to its drop down [Feature 457] ! Fixed stupid typo in staff list package-info.xml [Feature 457] ! Added missing !empty() check in the staff list template [Feature 457]
cookiemonster

cookiemonster commited on 2011-03-25 06:57:56
Showing 4 changed files, with 5 additions and 2 deletions.

... ...
@@ -58,7 +58,7 @@ function template_shd_staff_list()
58 58
 					<tr class="', ($use_bg2 ? 'windowbg2' : 'windowbg'), '">
59 59
 						<td width="1%">
60 60
 							', (!empty($modSettings['shd_display_avatar']) && empty($options['show_no_avatars']) && !empty($member['avatar']['image'])) ? $member['avatar']['image'] : '', '
61
-							', $member['extra'],'
61
+							', !empty($member['extra']) ? $member['extra'] : '','
62 62
 						</td>
63 63
 						<td><strong>', $member['link'], '</strong></td>
64 64
 						<td><span style="color: ', $member['group_color'], '">', $member['group'], '</span></td>
... ...
@@ -8,7 +8,7 @@
8 8
 	<install for="2.0 RC5">
9 9
 		<require-file name="SDPluginStaffList.english.php" destination="$languagedir" />
10 10
 		<require-dir name="staff_list" destination="$sourcedir/sd_plugins_source" />
11
-		<require-filr name="SDPluginStaffList.template.php" destination="$themedir/sd_plugins_template" />
11
+		<require-file name="SDPluginStaffList.template.php" destination="$themedir/sd_plugins_template" />
12 12
 		
13 13
 		<redirect url="?action=admin;area=helpdesk_plugins#js_feature_staff_list" />
14 14
 	</install>
... ...
@@ -58,6 +58,7 @@ function shd_staff_list_main_menu(&$menu_buttons)
58 58
 {
59 59
 	global $context, $scripturl, $txt;
60 60
 
61
+	if(empty($modSettings['shd_hidemenu']) && isset($menu_buttons['helpdesk']))
61 62
 		$menu_buttons['helpdesk']['sub_buttons']['staff_list'] = array(
62 63
 			'title' => $txt['shdp_staff_list_title'],
63 64
 			'href' => $scripturl . '?action=helpdesk;sa=stafflist',
... ...
@@ -60,10 +60,12 @@ function shdplugin_staff_list()
60 60
 		),
61 61
 		'includes' => array(
62 62
 			'source' => array(
63
+				'init' => 'SDPluginStaffList.php',
63 64
 				'hdadmin' => 'SDPluginStaffList.php',
64 65
 				'helpdesk' => 'SDPluginStaffList.php',
65 66
 			),
66 67
 			'language' => array(
68
+				'init' => 'SDPluginStaffList',
67 69
 				'hdadmin' => 'SDPluginStaffList',
68 70
 				'helpdesk' => 'SDPluginStaffList',
69 71
 			),
70 72