Skip to content

Commit

Permalink
Improve CSV export compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Hipska committed Jul 2, 2021
1 parent dbbfe3c commit 9c440e6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.5.0 - 2021-07-02
### Changed
- Improved CSV export compatibility.

## 1.4.0 - 2020-10-06
### Added
- Portuguese translation, thanks to [@rokam](https://www.transifex.com/user/profile/rokam/).
Expand Down
19 changes: 18 additions & 1 deletion main.sv-geolocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,24 @@ public function MakeRealValue($proposedValue, $oHostObj)
return;
}
}


/**
* Geolocation raw value always contains comma character
*
* @param string $sValue
* @param string $sSeparator
* @param string $sTextQualifier
* @param \DBObject $oHostObject
* @param bool $bLocalize
* @param bool $bConvertToPlainText
*
* @return string
*/
public function GetAsCSV($sValue, $sSeparator = ',', $sTextQualifier = '"', $oHostObject = null, $bLocalize = true, $bConvertToPlainText = false) {
if (!empty($sValue) && strpos($sSeparator, ',') !== false) return $sTextQualifier.$sValue.$sTextQualifier;
return parent::GetAsCSV($sValue, $sSeparator, $sTextQualifier,$oHostObject, $bLocalize, $bConvertToPlainText);
}

/**
* @param ormGeolocation $value
* @param DBObject $oHostObject
Expand Down
2 changes: 1 addition & 1 deletion module.sv-geolocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'sv-geolocation/1.4.0',
'sv-geolocation/1.5.0',
array(
// Identification
//
Expand Down

0 comments on commit 9c440e6

Please sign in to comment.