Commit 5731f4e0 authored by Sebastian Castro's avatar Sebastian Castro

Minor fixes

parent 9f31a3c3
......@@ -62,6 +62,8 @@ class Import extends AbstractFile
public function __construct() {}
public function __toString() { return "Import " . $this->sourceName; }
public function isDynamicImport() { return false; }
/**
......
......@@ -53,7 +53,8 @@ class PostalAddress
{
if ($this->customFormatedAddress) return $this->customFormatedAddress;
$result = "";
if ($this->streetAddress) $result .= $this->streetAddress . ', ';
if ($this->streetAddress) $result .= $this->streetAddress;
if ($this->postalCode || $this->addressLocality) $result .= ', ';
if ($this->postalCode) $result .= $this->postalCode . ' ';
if ($this->addressLocality) $result .= $this->addressLocality;
return $result;
......
......@@ -12,14 +12,15 @@ use Application\Sonata\UserBundle\Document\Group;
use Biopen\GeoDirectoryBundle\Document\Option;
use Doctrine\ODM\MongoDB\DocumentManager;
/* check databas eintegrity : when removing an option, need to remove all references to this options */
/* check database integrity : for example when removing an option, need to remove all references to this options */
class DatabaseIntegrityWatcher
{
public function preRemove(\Doctrine\ODM\MongoDB\Event\LifecycleEventArgs $args)
{
$document = $args->getDocument();
$dm = $args->getDocumentManager();
if ($document instanceof Option)
{
$option = $document;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment