[adminer-svn] SF.net SVN: adminer:[1114] trunk/adminer/include/editing.inc.php
Database management in a single PHP file
Brought to you by:
jakubvrana
From: <jak...@us...> - 2009-09-19 19:31:23
|
Revision: 1114 http://adminer.svn.sourceforge.net/adminer/?rev=1114&view=rev Author: jakubvrana Date: 2009-09-19 19:31:16 +0000 (Sat, 19 Sep 2009) Log Message: ----------- Save bytes Modified Paths: -------------- trunk/adminer/include/editing.inc.php Modified: trunk/adminer/include/editing.inc.php =================================================================== --- trunk/adminer/include/editing.inc.php 2009-09-19 11:40:26 UTC (rev 1113) +++ trunk/adminer/include/editing.inc.php 2009-09-19 19:31:16 UTC (rev 1114) @@ -130,14 +130,15 @@ } function type_class($type) { - if (ereg('char|text', $type)) { - return " class='char'"; - } elseif (ereg('date|time|year', $type)) { - return " class='date'"; - } elseif (ereg('binary|blob', $type)) { - return " class='binary'"; - } elseif (ereg('enum|set', $type)) { - return " class='enum'"; + foreach (array( + 'char' => 'text', + 'date' => 'time|year', + 'binary' => 'blob', + 'enum' => 'set', + ) as $key => $val) { + if (ereg("$key|$val", $type) { + return " class='$key'"; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |