! Minor code formatting cleanup
gruffen

gruffen commited on 2011-03-31 05:46:30
Showing 3 changed files, with 3 additions and 9 deletions.

... ...
@@ -162,7 +162,7 @@ function shd_admin_custom_edit()
162 162
 		$context['custom_field']['options'] = !empty($row['field_options']) ? unserialize($row['field_options']) : array(1 => '', '', '');
163 163
 
164 164
 		// If this is a textarea, we need to get its dimensions too.
165
-		if($context['custom_field']['field_type'] == 2)
165
+		if ($context['custom_field']['field_type'] == CFIELD_TYPE_LARGETEXT)
166 166
 			$context['custom_field']['dimensions'] = explode(',',$context['custom_field']['default_value']);
167 167
 
168 168
 		$context['custom_field']['can_see'] = explode(',',$context['custom_field']['can_see']);
... ...
@@ -285,10 +284,7 @@ function shd_profile_show_tickets($memID)
285 284
 	);
286 285
 
287 286
 	// The active button.
288
-	if($context['can_haz_replies'])
289
-		$context['show_tickets_navigation']['replies']['active'] = true; 
290
-	else
291
-		$context['show_tickets_navigation']['tickets']['active'] = true;		
287
+	$context['show_tickets_navigation'][$context['can_haz_replies'] ? 'replies' : 'tickets']['active'] = true;
292 288
 
293 289
 	// "That still only counts as one!"
294 290
 	if ($context['can_haz_replies'])
... ...
@@ -294,10 +294,7 @@ function shd_create_ticket_post(&$msgOptions, &$ticketOptions, &$posterOptions)
294 294
 		if (empty($flag)) // such as, say, a new ticket?
295 295
 		{
296 296
 			// Hold on a second... If this is a proxy ticket... We'll want to mark it read for the staff member, not the member for whom it was posted.
297
-			if(!empty($ticketOptions['mark_as_read_proxy']))
298
-				$mark_read_user = $ticketOptions['mark_as_read_proxy'];
299
-			else
300
-				$mark_read_user = $posterOptions['id'];
297
+			$mark_read_user = !empty($ticketOptions['mark_as_read_proxy']) ? $ticketOptions['mark_as_read_proxy'] : $posterOptions['id'];
301 298
 
302 299
 			$smcFunc['db_insert']('replace',
303 300
 				'{db_prefix}helpdesk_log_read',
304 301