hm2k/PHP_Mailman — Issue #1: Small lists
Author: alanonzander
Created: 2012-01-01 17:05:41+00:00
State: open

A Small list doesn't work right. There are no "letters" to grab.

this fixes it:

if(count($letters)==0) {
$url=$this->adminurl.sprintf('/%s/members?adminpw=%s',$this->list,$this->adminpw);
$html=$this->fetch($url);
//parse html
//$p='##i';
$p='#	(.+?)
#i';
preg_match_all($p,$html,$m);
array_shift($m);
$members[0]=array_merge($members[0],$m[0]);
$members[1]=array_merge($members[1],$m[1]);
} else {
foreach($letters as $letter) {
$url=$this->adminurl.sprintf('/%s/members?letter=%s&adminpw=%s',$this->list,$letter,$this->adminpw);
$html=$this->fetch($url);
//parse html
//$p='##i';
$p='#	(.+?)
#i';
preg_match_all($p,$html,$m);
array_shift($m);
$members[0]=array_merge($members[0],$m[0]);
$members[1]=array_merge($members[1],$m[1]);
}
}