Преглед на файлове

! No need to pass $context to a hook :P

Also remove hooks already implemented by emanuele (in a less half-assed
way, too :P)
marcusforsberg преди 12 години
родител
ревизия
18831c20ca
променени са 8 файла, в които са добавени 9 реда и са изтрити 21 реда
  1. 1 1
      Sources/BoardIndex.php
  2. 1 1
      Sources/Calendar.php
  3. 2 14
      Sources/Display.php
  4. 1 1
      Sources/Memberlist.php
  5. 1 1
      Sources/MessageIndex.php
  6. 1 1
      Sources/PersonalMessage.php
  7. 1 1
      Sources/Recent.php
  8. 1 1
      Sources/Reports.php

+ 1 - 1
Sources/BoardIndex.php

@@ -115,7 +115,7 @@ function BoardIndex()
 	);
 	
 	// Allow mods to add additional buttons here
-	call_integration_hook('integrate_mark_read_button', array(&$context['mark_read_button'])); 
+	call_integration_hook('integrate_mark_read_button'); 
 }
 
 /**

+ 1 - 1
Sources/Calendar.php

@@ -151,7 +151,7 @@ function CalendarMain()
 	);
 	
 	// Allow mods to add additional buttons here
-	call_integration_hook('integrate_calendar_buttons', array(&$context['calendar_buttons']));
+	call_integration_hook('integrate_calendar_buttons');
 }
 
 /**

+ 2 - 14
Sources/Display.php

@@ -767,11 +767,8 @@ function Display()
 		);
 		
 		// Allow mods to add additional buttons here
-		call_integration_hook('integrate_poll_buttons', array(&$context['poll_buttons']));
+		call_integration_hook('integrate_poll_buttons');
 	}
-	
-	// Editing poll output, eh?
-	call_integration_hook('integrate_view_poll', array(&$context['poll']));
 
 	// Calculate the fastest way to get the messages!
 	$ascending = empty($options['view_newest_first']);
@@ -962,9 +959,6 @@ function Display()
 			foreach ($temp as $row)
 				$attachments[$row['id_msg']][] = $row;
 		}
-		
-		// Any custom stuff that might need to be loaded if there are messages to show
-		call_integration_hook('integrate_pre_message_load', array(&$messages));
 
 		// What?  It's not like it *couldn't* be only guests in this topic...
 		if (!empty($posters))
@@ -1126,9 +1120,6 @@ function Display()
 		'send' => array('test' => 'can_send_topic', 'text' => 'send_topic', 'image' => 'sendtopic.png', 'lang' => true, 'url' => $scripturl . '?action=emailuser;sa=sendtopic;topic=' . $context['current_topic'] . '.0'),
 		'print' => array('test' => 'can_print', 'text' => 'print', 'image' => 'print.png', 'lang' => true, 'custom' => 'rel="new_win nofollow"', 'url' => $scripturl . '?action=printpage;topic=' . $context['current_topic'] . '.0'),
 	);
-
-	// Allow adding new buttons easily.
-	call_integration_hook('integrate_display_buttons', array(&$context['normal_buttons']));	
 	
 	// Build the mod button array
 	$context['mod_buttons'] = array(
@@ -1145,7 +1136,7 @@ function Display()
 		$context['mod_buttons'][] = array('text' => 'restore_topic', 'image' => '', 'lang' => true, 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
 
 	// Allow adding new mod buttons easily.
-	call_integration_hook('integrate_mod_buttons', array(&$context['mod_buttons']));
+	call_integration_hook('integrate_display_buttons');
 }
 
 /**
@@ -1274,9 +1265,6 @@ function prepareDisplayContext($reset = false)
 		$counter++;
 	else
 		$counter--;
-		
-	// Add new data to messages?
-	call_integration_hook('integrate_display_context', array(&$output));
 
 	return $output;
 }

+ 1 - 1
Sources/Memberlist.php

@@ -183,7 +183,7 @@ function Memberlist()
 	);
 	
 	// Allow mods to add additional buttons here
-	call_integration_hook('integrate_memberlist_buttons', array(&$context['memberlist_buttons']));	
+	call_integration_hook('integrate_memberlist_buttons');	
 
 	// Jump to the sub action.
 	if (isset($subActions[$context['listing_by']]))

+ 1 - 1
Sources/MessageIndex.php

@@ -642,7 +642,7 @@ function MessageIndex()
 	);
 	
 	// Allow adding new buttons easily.
-	call_integration_hook('integrate_messageindex_buttons', array(&$context['normal_buttons']));
+	call_integration_hook('integrate_messageindex_buttons');
 }
 
 /**

+ 1 - 1
Sources/PersonalMessage.php

@@ -852,7 +852,7 @@ function MessageFolder()
 		);
 		
 		// Allow mods to add additional buttons here
-		call_integration_hook('integrate_conversation_buttons', array(&$context['conversation_buttons']));
+		call_integration_hook('integrate_conversation_buttons');
 	}
 }
 

+ 1 - 1
Sources/Recent.php

@@ -1355,7 +1355,7 @@ function UnreadTopics()
 		}
 
 		// Allow mods to add additional buttons here
-		call_integration_hook('integrate_recent_buttons', array(&$context['recent_buttons']));
+		call_integration_hook('integrate_recent_buttons');
 	}
 	
 	// Allow helpdesks and bug trackers and what not to add their own unread data (just add a template_layer to show custom stuff in the template!)

+ 1 - 1
Sources/Reports.php

@@ -111,7 +111,7 @@ function ReportsMain()
 	);
 	
 	// Allow mods to add additional buttons here
-	call_integration_hook('integrate_report_buttons', array(&$context['report_buttons']));	
+	call_integration_hook('integrate_report_buttons');	
 	
 	// Now generate the data.
 	$context['report_types'][$context['report_type']]['function']();