Address two minor php warnings. Check var exsists before using.
This commit is contained in:
parent
d686415a0d
commit
a9a9e2d6a2
|
@ -190,11 +190,13 @@ function thread_overview_interpret($line, $overviewformat, $groupname)
|
||||||
$article->references = explode(" ", $over[$i + 1]);
|
$article->references = explode(" ", $over[$i + 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isset($article->references)) {
|
||||||
foreach ($article->references as &$refs) {
|
foreach ($article->references as &$refs) {
|
||||||
if (! strcmp($article->id, $refs)) {
|
if (! strcmp($article->id, $refs)) {
|
||||||
$refs = "";
|
$refs = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
$article->number = $over[0];
|
$article->number = $over[0];
|
||||||
$article->isAnswer = false;
|
$article->isAnswer = false;
|
||||||
return ($article);
|
return ($article);
|
||||||
|
@ -392,7 +394,12 @@ function thread_load_newsserver(&$ns, $groupname, $poll)
|
||||||
// parse the output of the server...
|
// parse the output of the server...
|
||||||
$article = thread_overview_interpret($line, $overviewformat, $groupname);
|
$article = thread_overview_interpret($line, $overviewformat, $groupname);
|
||||||
// ... and save it in our data structure
|
// ... and save it in our data structure
|
||||||
|
|
||||||
|
if (isset($article->threadsize)) {
|
||||||
$article->threadsize++;
|
$article->threadsize++;
|
||||||
|
} else {
|
||||||
|
$article->threadsize = 1;
|
||||||
|
}
|
||||||
$article->date_thread = $article->date;
|
$article->date_thread = $article->date;
|
||||||
$headers[$article->id] = $article;
|
$headers[$article->id] = $article;
|
||||||
// if we are in poll-mode: print status information and
|
// if we are in poll-mode: print status information and
|
||||||
|
@ -807,8 +814,7 @@ function thread_format_lastmessage($c, $group = '')
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
if ($found = $stmt->fetch()) {
|
if ($found = $stmt->fetch()) {
|
||||||
$ovfound = 1;
|
$ovfound = 1;
|
||||||
}
|
};
|
||||||
;
|
|
||||||
$dbh = null;
|
$dbh = null;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -822,8 +828,7 @@ function thread_format_lastmessage($c, $group = '')
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
if ($found = $stmt->fetch()) {
|
if ($found = $stmt->fetch()) {
|
||||||
$ovfound = 1;
|
$ovfound = 1;
|
||||||
}
|
};
|
||||||
;
|
|
||||||
$dbh = null;
|
$dbh = null;
|
||||||
}
|
}
|
||||||
$fromline = address_decode(headerDecode($found['name']), "nowhere");
|
$fromline = address_decode(headerDecode($found['name']), "nowhere");
|
||||||
|
@ -1157,5 +1162,3 @@ function thread_getsubthreadids($id, $thread)
|
||||||
$subthread = thread_getsubthreadids_recursive($id);
|
$subthread = thread_getsubthreadids_recursive($id);
|
||||||
return $subthread;
|
return $subthread;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
|
@ -767,8 +767,11 @@ function groups_show($gruppen)
|
||||||
}
|
}
|
||||||
/* Display article count */
|
/* Display article count */
|
||||||
$groupdisplay .= '</td><td class="' . $lineclass . '">';
|
$groupdisplay .= '</td><td class="' . $lineclass . '">';
|
||||||
if ($gl_age && isset($g->age))
|
if ($gl_age && isset($g->age)) {
|
||||||
$datecolor = thread_format_date_color($g->age);
|
$datecolor = thread_format_date_color($g->age);
|
||||||
|
} else {
|
||||||
|
$datecolor = "";
|
||||||
|
}
|
||||||
$groupdisplay .= '<small>';
|
$groupdisplay .= '<small>';
|
||||||
if ($datecolor != "")
|
if ($datecolor != "")
|
||||||
$groupdisplay .= '<font color="' . $datecolor . '">' . $g->count . '</font>';
|
$groupdisplay .= '<font color="' . $datecolor . '">' . $g->count . '</font>';
|
||||||
|
|
Loading…
Reference in New Issue