Fix possible fatal article number error in 1839remote_groupfile.
This commit is contained in:
parent
f54bfb656a
commit
1b8f31fe34
|
@ -141,6 +141,7 @@ function get_articles($ns, $group) {
|
||||||
$grouppath = $path.preg_replace('/\./', '/', $group);
|
$grouppath = $path.preg_replace('/\./', '/', $group);
|
||||||
$banned_names = file($user_ban_file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
$banned_names = file($user_ban_file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||||
|
|
||||||
|
|
||||||
$nocem_check="@@NCM";
|
$nocem_check="@@NCM";
|
||||||
|
|
||||||
# Check if group exists. Open it if it does
|
# Check if group exists. Open it if it does
|
||||||
|
@ -156,8 +157,11 @@ function get_articles($ns, $group) {
|
||||||
foreach($grouplist as $findgroup) {
|
foreach($grouplist as $findgroup) {
|
||||||
$name = explode(':', $findgroup);
|
$name = explode(':', $findgroup);
|
||||||
if (strcmp($name[0], $group) == 0) {
|
if (strcmp($name[0], $group) == 0) {
|
||||||
if (isset($name[1]))
|
if (is_numeric(trim($name[1]))) {
|
||||||
$article = $name[1] + 1;
|
$article = $name[1] + 1;
|
||||||
|
} else {
|
||||||
|
$article = 1;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue