$_ins[] = array($word, $_POST['bad_word_list']);
                 }
             }
             $result =& $B->db->executeMultiple($sth, $_ins);
             if (DB::isError($result)) {
                 trigger_error($result->getMessage() . "\n\nINFO: " . $result->userinfo . "\n\nFILE: " . __FILE__ . "\nLINE: " . __LINE__, E_USER_ERROR);
             }
         } else {
             trigger_error("No " . $bad_word_file . " file for this module!\nFILE: " . __FILE__ . "\nLINE: " . __LINE__, E_USER_ERROR);
         }
     }
     // delete selected bad word languages
     if (isset($_POST['selected_lang']) && count($_POST['selected_lang']) > 0) {
         include_once SF_BASE_DIR . '/admin/include/class.sfWordIndexer.php';
         foreach ($_POST['selected_lang'] as $lang) {
             word_indexer::delete_bad_words_lang($lang);
         }
     }
 }
 // Load the available public templates sets from the main folder
 $B->templ = array();
 $directory =& dir(SF_BASE_DIR);
 while (false != ($dirname = $directory->read())) {
     if (FALSE == is_dir(SF_BASE_DIR . '/' . $dirname)) {
         if (preg_match("/(^[^_]+).*\\.tpl\\.php\$/", $dirname, $tmp)) {
             if (!in_array($tmp[1], $B->templ)) {
                 $B->templ[] = $tmp[1];
             }
         }
     }
 }
 /**
  * Add language bad words in db table
  *
  * @access privat
  */
 function _update_bad_words_list()
 {
     // insert bad word languages list
     if (isset($_POST['update_main_options_badwordadd']) && !empty($_POST['bad_word_list'])) {
         // Insert bad word list in db table
         $bad_word_file = SF_BASE_DIR . 'modules/option/bad_word/stop.' . $_POST['bad_word_list'] . '.sql';
         if (TRUE == @is_file($bad_word_file)) {
             $bad_word = @file($bad_word_file);
             $alldata = array();
             foreach ($bad_word as $word) {
                 if (!strstr($word, "#")) {
                     $alldata[] = array($word, $_POST['bad_word_list']);
                 }
             }
             $prepared_query = $this->B->db->prepare('INSERT INTO ' . $this->B->sys['db']['table_prefix'] . 'bad_words VALUES(?,?)', array('text', 'text'));
             $result = $this->B->db->executeMultiple($prepared_query, null, $alldata);
             if (MDB2::isError($result)) {
                 trigger_error($result->getMessage() . "\n\nINFO: " . $result->userinfo . "\n\nFILE: " . __FILE__ . "\nLINE: " . __LINE__, E_USER_ERROR);
             }
         } else {
             trigger_error("No " . $bad_word_file . " file for this module!\nFILE: " . __FILE__ . "\nLINE: " . __LINE__, E_USER_ERROR);
         }
     } elseif (isset($_POST['update_main_options_badworddel']) && isset($_POST['selected_lang']) && count($_POST['selected_lang']) > 0) {
         foreach ($_POST['selected_lang'] as $lang) {
             word_indexer::delete_bad_words_lang($lang);
         }
     }
 }