--- sites/default/modules/dropcap/dropcap.module	2010-03-02 13:06:44.000000000 +0200
+++ sites/default/modules/dropcap/dropcapPATCHED.module	2010-03-02 13:06:52.000000000 +0200
@@ -1,78 +1,74 @@
-<?php 
-// $Id: dropcap.module,v 1.4 2008/07/11 21:28:13 lefnire Exp $ 
+<?php
+// $Id: dropcap.module,v 1.4 2008/07/11 21:28:13 lefnire Exp $
 
 /**
-*  Implementation of hook_menu
+*  Implementation of hook_menu()
+* 
 */
-function dropcap_menu($may_cache) {
-  $items = array();
-
-  if (!$may_cache) {
-    $items[] = array(
-      'path' => 'admin/settings/dropcap',
-      'title' => t('Drop Cap'),
-      'description' => t('Configure Drop Cap settings (selectors, images, etc).'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => 'dropcap_admin_settings',
-      'access' => user_access('administer site configuration'),
-      'type' => MENU_NORMAL_ITEM
+function dropcap_menu() {
+		$items['admin/settings/dropcap'] = array(
+ 			'title' => 'Drop Cap',
+    	'description' => 'Configure Drop Cap settings (selectors, images, etc).',
+    	'page callback' => 'drupal_get_form',
+    	'page arguments' => array('dropcap_admin_settings'),
+    	'access arguments' => array('administer site configuration'),
+    	'type' => MENU_NORMAL_ITEM
     );
-  }
-  return $items;
+	return $items;
 }
 
 /**
 *  Admin settings page, creates a textarea where users enter the jQuery selectors for dropcaps.
+*
 */
-function dropcap_admin_settings(){
+function dropcap_admin_settings() {
 	
-	  /* jquery selector */
-	  $form['dropcap_selectors'] = array(
-	    '#type' => 'textarea',
-	    '#title' => t('Drop Cap paragraph selectors'),
-	    '#default_value' => variable_get('dropcap_selectors', ''),
-	    '#description' => t('Specify which selectors (ex, "p.main_content") are to have a drop cap as their first letter.  Enter one per line.'),
-	  );
-	  
-	  /* alphabet image set */
-	  $alphabet_dirs=glob(drupal_get_path('module','dropcap').'/alphabet/*',GLOB_ONLYDIR);
-	  $options=array();
-	  foreach($alphabet_dirs as $dir){
-	  	preg_match( '|(?<=/)[^/]+$|', (string)$dir, $matches );
-		if($matches[0]!='CVS') $options[$matches[0]]=$matches[0];
-	  }
-	  	 
-	  $form['dropcap_alphabet']=array(
-	  	'#type' => 'select',
+	// jquery selector
+	$form['dropcap_selectors'] = array(
+    '#type' => 'textarea',
+		'#title' => t('Drop Cap paragraph selectors'),
+		'#default_value' => variable_get('dropcap_selectors', ''),
+		'#description' => t('Specify which selectors (ex, "p.main_content") are to have a drop cap as their first letter.  Enter one per line.'),
+	);
+
+	/* alphabet image set */
+	$alphabet_dirs = glob(drupal_get_path('module', 'dropcap') . '/alphabet/*', GLOB_ONLYDIR);
+	$options = array();
+	foreach( $alphabet_dirs as $dir ) {
+		preg_match( '|(?<=/)[^/]+$|', (string)$dir, $matches);
+		if( $matches[0] != 'CVS' ) $options[$matches[0]] = $matches[0];
+	 }
+
+	$form['dropcap_alphabet'] = array(
+		'#type' => 'select',
 		'#title' => t('Select alphabet image set'),
 		'#options' => $options,
 		'#default_value' => variable_get('dropcap_alphabet', 'default'),
-	  );
-	  	  
-	  return system_settings_form($form);
+	);
+
+	return system_settings_form($form);
 }
 
+
 /**
 *  Implementation of hook_nodeapi
+*
 */
-function dropcap_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL){
-	if($op=='view'){
-		;
-		static $core_sent;
-  		if (!$core_sent) {
-			$path=drupal_get_path('module','dropcap');
-			drupal_add_css( $path.'/dropcap.css');
-			
-			drupal_add_js( $path.'/dropcap.js');
-			drupal_add_js(array('dropcap' => 
-				array( 
-					'path' => '/'.$path.'/alphabet/'.variable_get('dropcap_alphabet', 'default').'/',
-					'selectors' => explode( '\n', variable_get('dropcap_selectors', '') ),
-				)), 
-				'setting');
-			
-			
-			$core_sent=TRUE;
+function dropcap_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
+	if($selectors = variable_get('dropcap_selectors', '')){
+		switch($op){
+			case 'view':
+				$path = drupal_get_path('module', 'dropcap');
+				drupal_add_css( $path.'/dropcap.css');
+				drupal_add_js( $path.'/dropcap.js');
+				drupal_add_js(
+					array('dropcap' => 
+						array(
+							'path' => '/'.$path.'/alphabet/'.variable_get('dropcap_alphabet', 'default').'/',
+							'selectors' => explode( '\n', $selectors),
+						)
+					),'setting');
+			break;
 		}
 	}
 }
\ No newline at end of file
