From e2f0f0d71d46dff6e4f971cfd8c08f3944966290 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 May 2020 12:11:39 +0200 Subject: [PATCH] Add exclude id --- scripts/website/migrate-news-joomla2dolibarr.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/website/migrate-news-joomla2dolibarr.php b/scripts/website/migrate-news-joomla2dolibarr.php index 1575976a318..30c166aa594 100755 --- a/scripts/website/migrate-news-joomla2dolibarr.php +++ b/scripts/website/migrate-news-joomla2dolibarr.php @@ -43,6 +43,7 @@ $joomlaserverinfo = empty($argv[3]) ? '' : $argv[3]; $image = 'image/__WEBSITE_KEY__/images/stories/dolibarr.png'; $max = (!isset($argv[4]) || (empty($argv[4]) && $argv[4] !== '0')) ? '10' : $argv[4]; +$excludeid = (empty($argv[5]) ? '' : $argv[5]); if (empty($argv[3]) || !in_array($argv[1], array('test', 'confirm')) || empty($websiteref)) { print '***** '.$script_file.' *****'."\n"; @@ -87,6 +88,7 @@ if ($dbjoomla->error) $sql = 'SELECT c.id, c.title, c.alias, c.created, c.introtext, `fulltext`, c.metadesc, c.metakey, c.language, c.created, c.publish_up, u.username FROM '.$joomlaprefix.'_content as c'; $sql .= ' LEFT JOIN '.$joomlaprefix.'_users as u ON u.id = c.created_by'; $sql .= ' WHERE featured = 1'; +$sql .= ' AND c.id NOT IN ('.$excludeid.')'; $sql .= ' ORDER BY publish_up ASC'; $resql = $dbjoomla->query($sql);