Kaynağa Gözat

Fixed uninitilized variable error

Chun-Huai Cheng 9 yıl önce
ebeveyn
işleme
74e4f6f717

+ 1 - 1
tripal_core/api/tripal_core.chado_query.api.inc

@@ -1549,7 +1549,7 @@ function chado_pager_query($query, $args, $limit, $element, $count_query = '') {
   $pages = explode(',', $page_arg);
   $pages = explode(',', $page_arg);
   $page = 0;
   $page = 0;
   if (count($pages) >= $element) {
   if (count($pages) >= $element) {
-    $page = $pages[$element];
+    $page = key_exists($element, $pages) ? $pages[$element] : 0;
   }
   }
   $offset = $limit * $page;
   $offset = $limit * $page;
   $q = $_GET['q'];
   $q = $_GET['q'];

+ 1 - 1
tripal_featuremap/theme/templates/tripal_featuremap_publication.tpl.php

@@ -51,7 +51,7 @@ if (count($featuremap_pubs) > 0) { ?>
         '/(\+)/', '/(\.)/', '/(\?)/', 
         '/(\+)/', '/(\.)/', '/(\?)/', 
       );
       );
       $fixed_title = preg_replace($patterns, "\\\\$1", $pub->title);
       $fixed_title = preg_replace($patterns, "\\\\$1", $pub->title);
-      $citation = preg_replace('/' . $fixed_title . '/', $link, $citation);
+      $citation = preg_replace('/' . str_replace('/', ' ', $fixed_title) . '/', $link, $citation);
     }
     }
     
     
     $rows[] = array(
     $rows[] = array(