BxDolStudioStoreQuery.php 942 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup DolphinStudio Dolphin Studio
  7. * @{
  8. */
  9. bx_import('BxDolStudioModulesQuery');
  10. class BxDolStudioStoreQuery extends BxDolStudioModulesQuery
  11. {
  12. function __construct()
  13. {
  14. parent::__construct();
  15. }
  16. public function isQueued($sAction, $sName)
  17. {
  18. bx_import('BxDolStudioInstallerUtils');
  19. $sJobName = '';
  20. switch($sAction) {
  21. case 'download':
  22. $sJobName = BxDolStudioInstallerUtils::getNameDownloadFile($sName);
  23. break;
  24. case 'action':
  25. $sJobName = BxDolStudioInstallerUtils::getNamePerformAction($sName);
  26. break;
  27. }
  28. $sSql = $this->prepare("SELECT `id` FROM `sys_cron_jobs` WHERE name=? LIMIT 1", $sJobName);
  29. return (int)$this->getOne($sSql) > 0;
  30. }
  31. }
  32. /** @} */