Skip to content

Commit 5584565

Browse files
author
neustadt
committed
insert cronjob into s_crontab with pluginID for backward compatibility
1 parent c4126b1 commit 5584565

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Resources/sql/install.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ INSERT IGNORE INTO `wbm_query_manager` (`id`, `name`, `sql_string`, `has_cronjob
1818
(4, 'Vorkasse-Bestellungen stornieren', '/* \nFrist in Tagen \n*/\n\nSET @deadline=20;\n\n/* \nVorkasse-Bestellungen mit Zahlungsstatus "Offen"\nwerden nach Ablauf der Frist auf den Bestellstatus\n"Storniert / Abgelehnt" gesetzt.\n*/\n\nUPDATE `s_order` \nSET `status` = 4\nWHERE `cleared` = 17 \nAND `ordertime` < (NOW() - INTERVAL @deadline DAY) \nAND `paymentID` = 5;', 0, NULL, NULL, 0, '', 0);
1919

2020
INSERT IGNORE INTO `s_crontab` (`name`, `action`, `elementID`, `data`, `next`, `start`, `interval`, `active`, `disable_on_error`, `end`, `inform_template`, `inform_mail`, `pluginID`) VALUES
21-
('Query Manager', 'Shopware_CronJob_WbmQueryManagerCron', NULL, '', NOW(), NULL, 1, 1, 1, NOW(), '', '', null);
21+
('Query Manager', 'Shopware_CronJob_WbmQueryManagerCron', NULL, '', NOW(), NULL, 1, 1, 1, NOW(), '', '', ?);

WbmQueryManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function install(InstallContext $context)
4444
{
4545
$sql = file_get_contents($this->getPath() . '/Resources/sql/install.sql');
4646

47-
$this->container->get('shopware.db')->query($sql);
47+
$this->container->get('shopware.db')->query($sql, array($context->getPlugin()->getId()));
4848
}
4949

5050
/**

0 commit comments

Comments
 (0)