Index: includes/common.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.611.2.12
diff -u -p -r1.611.2.12 common.inc
--- includes/common.inc	17 Oct 2007 21:28:59 -0000	1.611.2.12
+++ includes/common.inc	10 Jan 2008 23:17:04 -0000
@@ -1631,7 +1631,9 @@ function _drupal_add_js($data, $type, $s
   if (!is_null($data)) {
     switch ($type) {
       case 'setting':
-        $javascript[$scope][$type][] = $data;
+        if (array_search($data, $javascript[$scope][$type]) === FALSE) {
+	         $javascript[$scope][$type][] = $data;
+        }
         break;
       case 'inline':
         $javascript[$scope][$type][] = array('code' => $data, 'defer' => $defer);
