Ignore.php 703 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * [WeEngine System] Copyright (c) 2014 WE7.CC
  4. * WeEngine is NOT a free software, it under the license terms, visited http://www.we7.cc/ for more details.
  5. */
  6. namespace We7\Table\Modules;
  7. class Ignore extends \We7Table {
  8. protected $tableName = 'modules_ignore';
  9. protected $primaryKey = 'id';
  10. protected $field = array(
  11. 'mid',
  12. 'name',
  13. 'version',
  14. );
  15. protected $default = array(
  16. 'mid' => '',
  17. 'name' => '',
  18. 'version' => '',
  19. );
  20. public function add($modulename, $version) {
  21. pdo_delete($this->tableName, array('name' => $modulename));
  22. $ignore_module = array(
  23. 'name' => $modulename,
  24. 'version' => $version
  25. );
  26. return pdo_insert($this->tableName, $ignore_module);
  27. }
  28. }