Thanks for your reply, and the patch.
Two other problem still not solved..
First:
pmsg.inc and pmsg_view.inc data query problem:
in read_pmsg_body():
if ($GLOBALS['FUD_OPT_3'] & 32768 && $offset != -1) {
return q_singleval('SELECT data FROM fud_msg_store WHERE id='.$length);
}
but offset is always -1 if $GLOBALS['FUD_OPT_3'] & 32768 because:
in fud_pmsg->add
if ($GLOBALS['FUD_OPT_3'] & 32768) {
$this->foff = $this->length = -1;
} else {
the first ($GLOBALS['FUD_OPT_3'] & 32768 && $offset != -1) condition never true.
cosmetic patch: change != to == in pmsg.inc and pmsg_view.inc read_pmsg_body, and pmsg body correctly retrieved from db.
Another:
The pmsg connectivity pmsg table length field multiple usage
first: contains length of message if stored on disk
(write_pmsg_body())
second: contains relations to msg_store table if pmsg data stored ind db
inc class fud_pmsg
method add
if ($GLOBALS['FUD_OPT_3'] & 32768 && $this->body) {
$fid = db_qid('INSERT INTO fud_msg_store(data) VALUES('._esc($this->body).')');
q('UPDATE fud_pmsg SET length='.$fid.' WHERE id='.$id);
}
and the storage query problem:
in pmsg.inc
$disk_usage = q_singleval('SELECT SUM(length) FROM fud_pmsg WHERE duser_id='._uid);
$percent_full = ceil($disk_usage / $MAX_PMSG_FLDR_SIZE * 100);
if msg is stored in db length field contains msg_store table id-s and
summary is false.
patching this maybe rewrite pmsg data handling similar to msg handling, but
i have not enought experience with your software.
Thanks for help