X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fplflagset.php;h=28c7addff674b9868bec8ff51b6c1c9589c2a2ee;hb=4d1c62e006bc896e9ddb59d15dc7a7e30f9eb48e;hp=474f9d87a2e24ad057f24f99bef256cec85bee9c;hpb=a7f778a593a0a7e168a7112ec28cb84d032adaf3;p=platal.git diff --git a/classes/plflagset.php b/classes/plflagset.php index 474f9d8..28c7add 100644 --- a/classes/plflagset.php +++ b/classes/plflagset.php @@ -1,6 +1,6 @@ sep = $sep; $splitted = explode($sep, $flags); foreach ($splitted as $part) { - $this->values[$part] = true; + if (!empty($part)) { + $this->values[$part] = true; + } } } @@ -118,6 +120,14 @@ class PlFlagSet } return $flags; } + + + /** format for XDB + */ + public function format() + { + return XDB::escape($this->flags()); + } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: