public function testGetDbUntranslated_filterBySearch()
 {
     global $prefs;
     $prefs['record_untranslated'] = 'y';
     $expectedResult = array('translations' => array('Untranslated string 3' => array('source' => 'Untranslated string 3', 'tran' => null)), 'total' => 1);
     $this->assertEquals($expectedResult, $this->obj->getDbUntranslated(-1, 0, 'string 3'));
 }
	//Handle searches
	$find = '';

	if (isset($_REQUEST['find']) && strlen($_REQUEST['find']) > 0) {
		$find = $_REQUEST['find'];
		$smarty->assign('find', $find);
	}

	$sort_mode = "source_asc";

	$data = array();

	if ($action == "edit_rec_sw") {
		if (isset($_REQUEST['only_db_untranslated']) && $_REQUEST['only_db_untranslated'] != 'n') {
			// display only database stored untranslated strings
			$data = $translations->getDbUntranslated($maxRecords, $offset, $find);
		} else {
			// display all untranslated strings (language.php + db)
			$data = $translations->getAllUntranslated($maxRecords, $offset, $find);
		}
	} elseif ($action == "edit_tran_sw") {
		if (isset($_REQUEST['only_db_translations']) && $_REQUEST['only_db_translations'] != 'n') {
			// display only database stored translations
			$data = $translations->getDbTranslations($sort_mode, $maxRecords, $offset, $find);
		} else {
			// display all available translations (db + custom.php + language.php)
			$data = $translations->getAllTranslations($maxRecords, $offset, $find);
		}
	}

	$smarty->assign_by_ref('translations', $data['translations']);