Skip to content
Snippets Groups Projects
Commit 8b83d35e authored by Tristan O\'Neil's avatar Tristan O\'Neil
Browse files

Fixed PHP 5.3 FeedsImporter::copy function must be compatible bug.

parent 985975b4
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
Feeds 7.x 2.0 XXXXXXXXXXXXXXXXXXX
---------------------------------
- #940866 tristanoneil: PHP 5.3 FeedsImporter::copy function must be compatible.
- #944986 tristanoneil: Link Mapper Upgrade.
- #959066 tristanoneil: Remove old mappers and tests.
- #883342 Steven Jones: Don't force usage of cURL.
......
......@@ -197,16 +197,18 @@ class FeedsImporter extends FeedsConfigurable {
* @param FeedsImporter $importer
* The feeds importer object to copy from.
*/
public function copy(FeedsImporter $importer) {
$this->setConfig($importer->config);
public function copy(FeedsConfigurable $configurable) {
parent::copy($configurable);
// Instantiate new fetcher, parser and processor and initialize their
// configurations.
foreach ($this->plugin_types as $plugin_type) {
$this->setPlugin($importer->config[$plugin_type]['plugin_key']);
$this->$plugin_type->setConfig($importer->config[$plugin_type]['config']);
}
}
if ($configurable instanceof FeedsImporter) {
// Instantiate new fetcher, parser and processor and initialize their
// configurations.
foreach ($this->plugin_types as $plugin_type) {
$this->setPlugin($importer->config[$plugin_type]['plugin_key']);
$this->$plugin_type->setConfig($importer->config[$plugin_type]['config']);
}
}
}
/**
* Get configuration of this feed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment