소스 검색

Fixed uninitilized variable error

Chun-Huai Cheng 9 년 전
부모
커밋
74e4f6f717
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      tripal_core/api/tripal_core.chado_query.api.inc
  2. 1 1
      tripal_featuremap/theme/templates/tripal_featuremap_publication.tpl.php

+ 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);
   $page = 0;
   if (count($pages) >= $element) {
-    $page = $pages[$element];
+    $page = key_exists($element, $pages) ? $pages[$element] : 0;
   }
   $offset = $limit * $page;
   $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);
-      $citation = preg_replace('/' . $fixed_title . '/', $link, $citation);
+      $citation = preg_replace('/' . str_replace('/', ' ', $fixed_title) . '/', $link, $citation);
     }
     
     $rows[] = array(