From: jollytoad Date: Mon, 14 Mar 2005 11:03:14 +0000 (+0000) Subject: Move function def out of switch statement, X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/%20?a=commitdiff_plain;h=599358ee1582ce9ce1872b9dc9f3b4a80910e8e8;p=phppgadmin.git Move function def out of switch statement, to work around PHP 5 bug: http://bugs.php.net/bug.php?id=28487 --- diff --git a/types.php b/types.php index 61d3bb80..adb8ae37 100644 --- a/types.php +++ b/types.php @@ -3,7 +3,7 @@ /** * Manage types in a database * - * $Id: types.php,v 1.25.4.2 2005/03/14 09:58:01 jollytoad Exp $ + * $Id: types.php,v 1.25.4.3 2005/03/14 11:03:14 jollytoad Exp $ */ // Include application functions @@ -27,14 +27,14 @@ $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( @@ -76,8 +76,8 @@ echo "\n"; } - echo "

href}\">{$lang['strshowalltypes']}

\n"; } - else + echo "

href}\">{$lang['strshowalltypes']}

\n"; + } else doDefault($lang['strinvalidparam']); }