coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: divestoclimb on June 11, 2009, 05:01:02 PM

Title: BUG: source selection does not work with cfrss::addLastAddedMedia()
Post by: divestoclimb on June 11, 2009, 05:01:02 PM
I know this one's a bug.

In cfrssget.php, the method used to generate the feed items for the last added media is:

function addLastAddedMedia($count,$source="") {
$results = $this->cpm->cpm_viewLastAddedMedia($count,1,$source);
$this->generateFeedFromResults($results);
}

You're calling the wrong function and passing $source as the $options argument. This code should be:

function addLastAddedMedia($count,$source="") {
$results = $this->cpm->cpm_viewLastAddedMediaFrom($source,$count,1);
$this->generateFeedFromResults($results);
}