Topic: Code repetition
There are many instances of code repetition found in PunBB. Are you guys not aware of it or what? Like in changeset 1540 (http://dev.punbb.org/changeset/1540), you can do:
$basename = $pun_config['o_avatars_dir'].'/'.$id;
foreach(array('gif', 'jpg', 'png') as $ext) {
$file = "basename.$ext";
if(file_exists($file)) {
@unlink($file);
}
}
Oh wait, I forgot you guys don't use foreach()