? creativecommons.diff
? creativecommons.patch
Index: includes/creativecommons_views_handler_filter_license_uri.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/creativecommons/includes/Attic/creativecommons_views_handler_filter_license_uri.inc,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 creativecommons_views_handler_filter_license_uri.inc
--- includes/creativecommons_views_handler_filter_license_uri.inc	30 Dec 2009 07:19:04 -0000	1.1.2.2
+++ includes/creativecommons_views_handler_filter_license_uri.inc	6 Jan 2010 05:21:31 -0000
@@ -7,19 +7,53 @@ class creativecommons_views_handler_filt
   function get_value_options() {
     if (!isset($this->value_options)) {
       $this->value_title = t('License Types');
-      $jurisdiction = variable_get('creativecommons_default_jurisdiction', '');
-      $types = creativecommons_get_available_license_list( array('jurisdiction' => $jurisdiction) );
+      $available_license_types = creativecommons_get_available_license_types();
+      $license_array_keys = creativecommons_get_licenses(array('jurisdiction' => variable_get('creativecommons_default_jurisdiction', '')), TRUE);
         
-      foreach ($types as $type => $info) {
+      foreach ($license_array_keys as $key => $info) {
         if(is_array($info)){
-          foreach($info as $type => $value){
-            $options[$type] = $value;
+          foreach($info as $key => $value){
+            if(in_array($key,$available_license_types)){
+              $options[$key] = $value;
+            }
           }
         } else {
-            $options[$type] = $info;
+          if(in_array($key,$available_license_types)){
+            $options[$key] = $info;
+          }
         }
       }
       $this->value_options = $options;
     }
   }
+  function query() {
+
+    if (empty($this->value)) {
+      return;
+    }
+    $this->ensure_my_table();
+
+    if($this->operator == 'not in'){
+      $not = ' NOT ';
+    } 
+    foreach($this->value as $value){
+      if(strlen($where)){
+        if($this->operator == 'not in'){
+          $or = ' AND ';
+        } else {
+          $or = ' OR ';
+        }
+      }
+      if(strlen($value)){
+        $like = '\'%/'.$value.'%\' ';
+      }
+      else {
+        $like = '\'\'';
+      }
+      $where = " $this->table_alias.$this->real_field $not" . " LIKE " .  $like . $or  . $where;
+      
+    }
+    $this->query->add_where($this->options['group'], $where);
+  }
+
 }
