]> gitweb.fluxo.info Git - drupal/calendario.git/commitdiff
Singularizing tag url
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Aug 2012 23:55:15 +0000 (20:55 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 8 Aug 2012 23:55:15 +0000 (20:55 -0300)
calendario.module

index bfa61e7c89b2f03fd0d31af182ae80f3750bca03..c8e5665d22e40834c9389894f4043b30cbd23be2 100644 (file)
@@ -73,7 +73,9 @@ function calendario_views_post_render(&$view, &$output, &$cache) {
  * Entity uri callback.
  */
 function calendario_taxonomy_term_uri($term) {
+  $type = ($term->vocabulary_machine_name == 'tags') ? 'tag' : $term->vocabulary_machine_name;
+
   return array(
-    'path' => 'calendario/'. $term->vocabulary_machine_name .'/'. $term->name .'/mes',
+    'path' => 'calendario/'. $type .'/'. $term->name .'/mes',
   );
 }