Move function def out of switch statement,
authorjollytoad <jollytoad>
Mon, 14 Mar 2005 11:08:46 +0000 (11:08 +0000)
committerjollytoad <jollytoad>
Mon, 14 Mar 2005 11:08:46 +0000 (11:08 +0000)
to work around PHP 5 bug: http://bugs.php.net/bug.php?id=28487

types.php

index eb1bb6676a1ed486e94bd22ba57d1cfd8e590e04..682545bd0826fd8639fd06d08a8601a151860f37 100644 (file)
--- a/types.php
+++ b/types.php
@@ -3,7 +3,7 @@
        /**
         * Manage types in a database
         *
-        * $Id: types.php,v 1.25 2004/09/07 13:58:21 jollytoad Exp $
+        * $Id: types.php,v 1.25.2.1 2005/03/14 11:08:46 jollytoad Exp $
         */
 
        // Include application functions
                $misc->printTitle($lang['strproperties'], 'pg.type');
                $misc->printMsg($msg);
                
+               function attPre(&$rowdata) {
+                       global $data;
+                       $rowdata->f['+type'] = $data->formatType($rowdata->f['type'], $rowdata->f['atttypmod']);
+               }
+
                if ($typedata->recordCount() > 0) {
                        switch ($typedata->f['typtype']) {
                        case 'c':
-                               function attPre(&$rowdata) {
-                                       global $data;
-                                       $rowdata->f['+type'] = $data->formatType($rowdata->f['type'], $rowdata->f['atttypmod']);
-                               }
-                               
                                $attrs = &$data->getTableAttributes($_REQUEST['type']);
                                
                                $columns = array(