function __construct(SphinxSearch_Config $config)
 {
     global $wpdb, $table_prefix;
     $this->_sphinx = $config->init_sphinx();
     $this->_wpdb = $wpdb;
     $this->_table_prefix = $table_prefix;
     $this->view = $config->get_view();
     $this->_config = $config;
     $this->view->assign('header', 'Sphinx Search :: Statistics');
 }
 function _ban_keywords($keywords)
 {
     $sphinx = $this->_config->init_sphinx();
     foreach ($keywords as $keyword) {
         $keyword = urldecode($keyword);
         $sql = "update " . $this->_table_prefix . "sph_stats set status = 2\n            where keywords_full = '" . $this->_wpdb->escape($keyword) . "'";
         $this->_wpdb->query($sql);
         $sphinx->SetLimits(0, 10000);
         $sphinx->SetFilter('status', array(2), true);
         $sphinx->SetFilter('keywords_crc', array(crc32($keyword)));
         $res = $sphinx->Query("", $this->_config->get_option('sphinx_index') . 'stats');
         if (empty($res['matches'])) {
             continue;
         }
         $idx = array();
         foreach ($res['matches'] as $index => $m) {
             $idx[$index] = array(2);
         }
         $sphinx->UpdateAttributes($this->_config->get_option('sphinx_index') . 'stats', array('status'), $idx);
         $sphinx->ResetFilters();
     }
 }