]> git.nbdom.net Git - nb.git/commitdiff
lib/php/db/table.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 5 Jan 2018 03:33:14 +0000 (03:33 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 5 Jan 2018 03:33:14 +0000 (03:33 +0000)
lib/php/db/table.php

index a8694ea6d788fc959831bef4947b90c5fe7385e6..52816fa7f1d8b21066a0d01a0e30c0fc76bce5b2 100644 (file)
@@ -1501,7 +1501,11 @@ Class Table extends nb {
     $this->__rows_table_attr = [];
     foreach ($fields as $name => $f) {
       $this->__rows_table_attr[$name] = ''
-        . ' class="' . $name . ($f->key?' key':'') . (isset($this->extras[$name])?' extra':'') . ' ' . preg_replace('/\W.*$/','',$f->type).'"'
+        . ' class="' . $name
+               . ($f->key ? ' key' : '')
+               . (isset($this->extras[$name]) ? ' extra' : '')
+               . ' ' . preg_replace('/\W.*$/','',$f->type)
+        .'"'
       ;
     }