Created
September 9, 2011 10:50
-
-
Save croxton/1205936 to your computer and use it in GitHub Desktop.
Tagger - Low search tweak
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ********************************************************************************* // | |
/** | |
* Preps the data for saving | |
* | |
* @param $data Contains the submitted field data. | |
* @return string Data to be saved | |
*/ | |
public function save($data) | |
{ | |
// Single Field UI? | |
if (isset($data['single_field']) == TRUE) | |
{ | |
$data['tags'] = explode('||', $data['single_field']); | |
} | |
$this->EE->session->cache['Tagger']['FieldData'] = $data; | |
if (isset($data['tags']) == FALSE OR empty($data['tags']) == TRUE) | |
{ | |
return ''; | |
} | |
else | |
{ | |
// need a space after the comma so Low search will index as separate words | |
return implode(', ', $data['tags']); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change to tagger/ft.tagger.php Save() function