Hi All,
Aegir's snippets contain many constructions like the following one:
$list = mgd_list_snippetdirs($some_dirobj->id);
while ($list->fetch()) {
$some_dirname = $list->name;
// do something...
};
It does not work in my environment (FreeBSD 5.1 + PHP 4.3.3). Always
$some_dirname is equal to 0... And seems it should not work because
according Midgard mannual:
"...
The objects returned by the mgd_list_*() functions are "truncated"
(due to obvious performance issues)
and have only the following five common members:
class MidgardFetchable {
$__table__; // PRIVATE!
$__res__; // PRIVATE!
$N; // Number of items in the list
$id; // id of the current instance
$sitegroup; // sitegroup of the current instance
fetch(); // The only method: fetches the next
// instance in the result list
}
..."
So correct construction should be like the following one:
$list = mgd_list_snippetdirs($some_dirobj->id);
while ($list->fetch()) {
$dir=mgd_get_snippetdir($list->id);
$some_dirname = $dir->name;
// do something...
};
And it really works...
May be I have not understood something? I wonder why it works on
FreeBSD 4.5 + PHP 4.2.x?
Please help!
Thanks!
Alexander
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]