summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjollytoad2005-03-14 11:03:14 +0000
committerjollytoad2005-03-14 11:03:14 +0000
commit599358ee1582ce9ce1872b9dc9f3b4a80910e8e8 (patch)
tree4da4d78929fae9199b6ef4bfe315c04b5e60751f
parent1e53297e623edd9406e2560a817c7ad33b468bbf (diff)
Move function def out of switch statement,
to work around PHP 5 bug: http://bugs.php.net/bug.php?id=28487
-rw-r--r--types.php16
1 files changed, 8 insertions, 8 deletions
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 "</table>\n";
}
- echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['strshowalltypes']}</a></p>\n"; }
- else
+ echo "<p><a class=\"navlink\" href=\"$PHP_SELF?{$misc->href}\">{$lang['strshowalltypes']}</a></p>\n";
+ } else
doDefault($lang['strinvalidparam']);
}