{
                        $dataMap['media_content']->fromString(implode('-', array_unique($relatedObjectIds)));
                        $dataMap['media_content']->store();
                    }
                }
            }
            else
            {
                $cli->warning((string) $article . ' : object not fetchable');
            }
        }

        eZContentObject::clearCache();

        $db->commit();
    }
    catch(Exception $e)
    {
        $db->rollback();
        $cli->error((is_object($article) ? (string) $article : '') . ' ' . $e->getMessage());
    }
}

MMSynchMonitor::stop();
$cli->output();

// Statistics
$cli->output(MMSynchMonitor::stats());

$script->shutdown();
Ejemplo n.º 2
0
    public function cleanup()
    {
        MMSynchMonitor::stop();

        $item = self::getCurrentSQLiImportItem();
        if ($item)
        {
            MMSynchMonitor::saveReport($item->attribute('id'));
        }

        $this->dataSource = null;
    }