Project

General

Profile

« Previous | Next » 

Revision 7c0c59d8

Added by Andreas Kohlbecker almost 8 years ago

#5851 handling special case of originalSource.citation == null

View differences:

modules/cdm_dataportal/includes/common.inc
152 152
 */
153 153
function compare_original_sources($a, $b){
154 154

  
155
  $a_string = $a->citation->titleCache;
155
  $a_string = '';
156
  if(isset($a->citation->titleCache)) {
157
    $a_string = $a->citation->titleCache;
158
  }
156 159
  if((isset($a->nameUsedInSource))){
157 160
    $a_string .= $a->nameUsedInSource->titleCache;
158 161
  } elseif (isset($a->originalNameString)){
159 162
    $a_string .= $a->originalNameString;
160 163
  }
161 164

  
162
  $b_string = $b->citation->titleCache;
165
  $b_string = '';
166
  if(isset($b->citation->titleCache)) {
167
    $b_string = $b->citation->titleCache;
168
  };
163 169
  if((isset($b->nameUsedInSource))){
164 170
    $b_string .= $b->nameUsedInSource->titleCache;
165 171
  } elseif (isset($b->originalNameString)){

Also available in: Unified diff