From da198685a39b449f2a00d70b087404dd1415de87 Mon Sep 17 00:00:00 2001 From: soranzo Date: Tue, 17 Apr 2007 10:01:12 +0000 Subject: [PATCH] Add default to the new radio button. Drop unused HTML ids. Coding style fixes. --- views.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/views.php b/views.php index b4b5106e..4e1144c8 100644 --- a/views.php +++ b/views.php @@ -3,7 +3,7 @@ /** * Manage views in a database * - * $Id: views.php,v 1.63 2007/04/16 21:41:14 ioguix Exp $ + * $Id: views.php,v 1.64 2007/04/17 10:01:12 soranzo Exp $ */ // Include application functions @@ -225,7 +225,7 @@ echo "{$lang['strviewname']}"; echo "\n\n"; // View name - echo "_maxNameLen}\" />\n"; + echo "_maxNameLen}\" />\n"; echo "\n\n"; echo "{$lang['strcomment']}"; echo "\n\n"; @@ -243,7 +243,7 @@ echo "\n"; echo ""; echo "
"; - echo "

"; + echo "

"; // Output the Linking keys combo boxes echo "\n"; @@ -269,7 +269,7 @@ echo GUI::printCombo($arrFields, "formLink[$i][rightlink]", true, $curRightLink, false ); echo "\n\n"; $rowClass = $rowClass == 'data1' ? 'data2' : 'data1'; - } + } echo "
\n
\n"; // Build list of available operators (infix only) @@ -292,12 +292,12 @@ $rowClass = $rowClass == 'data1' ? 'data2' : 'data1'; } echo "\n"; - echo "

\n"; + echo "

\n"; echo "\n"; echo "

\n"; foreach ($arrSelTables AS $curTable) { - echo "\n"; + echo "\n"; } echo $misc->form; @@ -342,7 +342,7 @@ echo "\n"; echo "

\n"; echo "

\n"; - echo "\n"; + echo "\n"; echo $misc->form; echo "\n"; } @@ -414,30 +414,30 @@ else { $selFields = ''; - if (! empty ($_POST['dblFldMeth']) ) - $tmpHsh = array (); + if (! empty($_POST['dblFldMeth']) ) + $tmpHsh = array(); foreach ($_POST['formFields'] AS $curField) { $arrTmp = unserialize($curField); - if ( ! empty ($_POST['dblFldMeth'] ) ) { // doublon control - if (empty ($tmpHsh[$arrTmp['fieldname']])) { // field does not exist - $selFields .= $data->hasSchemas() ? "\"{$arrTmp['schemaname']}\".":""; + if (! empty($_POST['dblFldMeth']) ) { // doublon control + if (empty($tmpHsh[$arrTmp['fieldname']])) { // field does not exist + $selFields .= $data->hasSchemas() ? "\"{$arrTmp['schemaname']}\"." : ''; $selFields .= "\"{$arrTmp['tablename']}\".\"{$arrTmp['fieldname']}\", "; - $tmpHsh[$arrTmp['fieldname']]=1; - } else if ($_POST['dblFldMeth']=="rename") { // field exist and must be renamed + $tmpHsh[$arrTmp['fieldname']] = 1; + } else if ($_POST['dblFldMeth'] == 'rename') { // field exist and must be renamed $tmpHsh[$arrTmp['fieldname']]++; - $selFields .= $data->hasSchemas() ? "\"{$arrTmp['schemaname']}\".":""; + $selFields .= $data->hasSchemas() ? "\"{$arrTmp['schemaname']}\"." : ''; $selFields .= "\"{$arrTmp['tablename']}\".\"{$arrTmp['fieldname']}\" AS \"{$arrTmp['schemaname']}_{$arrTmp['tablename']}_{$arrTmp['fieldname']}{$tmpHsh[$arrTmp['fieldname']]}\", "; } /* field already exist, just ignore this one */ } else { // no doublon control - $selFields .= $data->hasSchemas() ? "\"{$arrTmp['schemaname']}\".":""; + $selFields .= $data->hasSchemas() ? "\"{$arrTmp['schemaname']}\"." : ''; $selFields .= "\"{$arrTmp['tablename']}\".\"{$arrTmp['fieldname']}\", "; } } - $selFields = substr ($selFields, 0, -2); - unset ($arrTmp,$tmpHsh); + $selFields = substr($selFields, 0, -2); + unset($arrTmp, $tmpHsh); $linkFields = ''; // If we have links, out put the JOIN ... ON statements -- 2.39.5