BxVideosDb.php 908 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Videos Videos
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /*
  12. * Module database queries
  13. */
  14. class BxVideosDb extends BxBaseModTextDb
  15. {
  16. function __construct(&$oConfig)
  17. {
  18. parent::__construct($oConfig);
  19. }
  20. public function updateEntries($aParamsSet, $aParamsWhere)
  21. {
  22. $CNF = &$this->_oConfig->CNF;
  23. if(empty($aParamsSet) || empty($aParamsWhere))
  24. return false;
  25. $sSql = "UPDATE `" . $CNF['TABLE_ENTRIES'] . "` SET " . $this->arrayToSQL($aParamsSet) . " WHERE " . $this->arrayToSQL($aParamsWhere, " AND ");
  26. return $this->query($sSql);
  27. }
  28. public function getEmbedProviders() {
  29. return $this->getAll("SELECT * FROM `bx_videos_embeds_providers`");
  30. }
  31. }
  32. /** @} */