@@ -20,9 +20,9 @@ |
||
20 | 20 | |
21 | 21 | // but if server_id isn't set, then you will be redirected to intro |
22 | 22 | if ($this->container->requestobj->getQueryParam('server') === null) { |
23 | - $destinationurl = SUBFOLDER.'/src/views/intro'; |
|
23 | + $destinationurl = SUBFOLDER . '/src/views/intro'; |
|
24 | 24 | } else { |
25 | - $destinationurl = SUBFOLDER.'/src/views/login'.($query_string ? '?'.$query_string : ''); |
|
25 | + $destinationurl = SUBFOLDER . '/src/views/login' . ($query_string ? '?' . $query_string : ''); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | return $destinationurl; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $plugins = $this->conf['plugins']; |
49 | 49 | |
50 | 50 | foreach ($plugins as $activated_plugin) { |
51 | - $plugin_file = BASE_PATH.'/src/plugins/'.$activated_plugin.'/plugin.php'; |
|
51 | + $plugin_file = BASE_PATH . '/src/plugins/' . $activated_plugin . '/plugin.php'; |
|
52 | 52 | |
53 | 53 | // Verify is the activated plugin exists |
54 | 54 | if (file_exists($plugin_file)) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | continue; |
62 | 62 | } |
63 | 63 | } else { |
64 | - printf($this->lang['strpluginnotfound']."\t\n", $activated_plugin); |
|
64 | + printf($this->lang['strpluginnotfound'] . "\t\n", $activated_plugin); |
|
65 | 65 | exit; |
66 | 66 | } |
67 | 67 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $hooks = $plugin->get_hooks(); |
86 | 86 | foreach ($hooks as $hook => $functions) { |
87 | 87 | if (!in_array($hook, $this->available_hooks)) { |
88 | - printf($this->lang['strhooknotfound']."\t\n", $hook); |
|
88 | + printf($this->lang['strhooknotfound'] . "\t\n", $hook); |
|
89 | 89 | exit; |
90 | 90 | } |
91 | 91 | $this->hooks[$hook][$plugin_name] = $functions; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | if (!isset($this->plugins_list[$plugin_name])) { |
135 | 135 | // Show an error and stop the application |
136 | - printf($this->lang['strpluginnotfound']."\t\n", $plugin_name); |
|
136 | + printf($this->lang['strpluginnotfound'] . "\t\n", $plugin_name); |
|
137 | 137 | exit; |
138 | 138 | } |
139 | 139 | $plugin = $this->plugins_list[$plugin_name]; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | call_user_func([$plugin, $action]); |
144 | 144 | } else { |
145 | 145 | // Show an error and stop the application |
146 | - printf($this->lang['stractionnotfound']."\t\n", $action, $plugin_name); |
|
146 | + printf($this->lang['stractionnotfound'] . "\t\n", $action, $plugin_name); |
|
147 | 147 | exit; |
148 | 148 | } |
149 | 149 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | if (count($this->conf['servers']) === 1) { |
69 | 69 | $info = $this->conf['servers'][0]; |
70 | - $this->server_id = $info['host'].':'.$info['port'].':'.$info['sslmode']; |
|
70 | + $this->server_id = $info['host'] . ':' . $info['port'] . ':' . $info['sslmode']; |
|
71 | 71 | } elseif (isset($_REQUEST['server'])) { |
72 | 72 | $this->server_id = $_REQUEST['server']; |
73 | 73 | } elseif (isset($_SESSION['webdbLogin']) && count($_SESSION['webdbLogin']) > 0) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | //\PC::debug(['str' => $str, 'help' => $help], 'printHelp'); |
134 | 134 | if ($help !== null) { |
135 | 135 | $helplink = $this->getHelpLink($help); |
136 | - $str .= '<a class="help" href="'.$helplink.'" title="'.$this->lang['strhelp'].'" target="phppgadminhelp">'.$this->lang['strhelpicon'].'</a>'; |
|
136 | + $str .= '<a class="help" href="' . $helplink . '" title="' . $this->lang['strhelp'] . '" target="phppgadminhelp">' . $this->lang['strhelpicon'] . '</a>'; |
|
137 | 137 | } |
138 | 138 | if ($do_print) { |
139 | 139 | echo $str; |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | |
145 | 145 | public function getHelpLink($help) |
146 | 146 | { |
147 | - return htmlspecialchars(SUBFOLDER.'/help?help='.urlencode($help).'&server='.urlencode($this->getServerId())); |
|
147 | + return htmlspecialchars(SUBFOLDER . '/help?help=' . urlencode($help) . '&server=' . urlencode($this->getServerId())); |
|
148 | 148 | } |
149 | 149 | |
150 | 150 | /** |
@@ -206,9 +206,9 @@ discard block |
||
206 | 206 | $sql = $p1; |
207 | 207 | $inputparams = $p2; |
208 | 208 | |
209 | - $error_msg = '<p><b>strsqlerror</b><br />'.nl2br($errmsg).'</p> <p><b>SQL:</b><br />'.nl2br($sql).'</p> '; |
|
209 | + $error_msg = '<p><b>strsqlerror</b><br />' . nl2br($errmsg) . '</p> <p><b>SQL:</b><br />' . nl2br($sql) . '</p> '; |
|
210 | 210 | |
211 | - echo '<table class="error" cellpadding="5"><tr><td>'.nl2br($error_msg).'</td></tr></table><br />'."\n"; |
|
211 | + echo '<table class="error" cellpadding="5"><tr><td>' . nl2br($error_msg) . '</td></tr></table><br />' . "\n"; |
|
212 | 212 | |
213 | 213 | break; |
214 | 214 | |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | |
324 | 324 | return; |
325 | 325 | } |
326 | - $_type = '\PHPPgAdmin\Database\\'.$_type; |
|
326 | + $_type = '\PHPPgAdmin\Database\\' . $_type; |
|
327 | 327 | |
328 | 328 | $this->setServerInfo('platform', $platform, $this->server_id); |
329 | 329 | $this->setServerInfo('pgVersion', $_connection->conn->pgVersion, $this->server_id); |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | |
446 | 446 | // Otherwise, look for it in the conf file |
447 | 447 | foreach ($this->conf['servers'] as $idx => $info) { |
448 | - if ($this->server_id == $info['host'].':'.$info['port'].':'.$info['sslmode']) { |
|
448 | + if ($this->server_id == $info['host'] . ':' . $info['port'] . ':' . $info['sslmode']) { |
|
449 | 449 | // Automatically use shared credentials if available |
450 | 450 | if (!isset($info['username']) && isset($_SESSION['sharedUsername'])) { |
451 | 451 | $info['username'] = $_SESSION['sharedUsername']; |
@@ -620,9 +620,9 @@ discard block |
||
620 | 620 | } |
621 | 621 | |
622 | 622 | foreach ($this->conf['servers'] as $idx => $info) { |
623 | - $server_id = $info['host'].':'.$info['port'].':'.$info['sslmode']; |
|
623 | + $server_id = $info['host'] . ':' . $info['port'] . ':' . $info['sslmode']; |
|
624 | 624 | if ($group === false || isset($group[$idx]) || ($group === 'all')) { |
625 | - $server_id = $info['host'].':'.$info['port'].':'.$info['sslmode']; |
|
625 | + $server_id = $info['host'] . ':' . $info['port'] . ':' . $info['sslmode']; |
|
626 | 626 | |
627 | 627 | if (isset($logins[$server_id])) { |
628 | 628 | $srvs[$server_id] = $logins[$server_id]; |
@@ -723,13 +723,13 @@ discard block |
||
723 | 723 | { |
724 | 724 | $href = []; |
725 | 725 | if (isset($_REQUEST['server']) && $exclude_from != 'server') { |
726 | - $href[] = 'server='.urlencode($_REQUEST['server']); |
|
726 | + $href[] = 'server=' . urlencode($_REQUEST['server']); |
|
727 | 727 | } |
728 | 728 | if (isset($_REQUEST['database']) && $exclude_from != 'database') { |
729 | - $href[] = 'database='.urlencode($_REQUEST['database']); |
|
729 | + $href[] = 'database=' . urlencode($_REQUEST['database']); |
|
730 | 730 | } |
731 | 731 | if (isset($_REQUEST['schema']) && $exclude_from != 'schema') { |
732 | - $href[] = 'schema='.urlencode($_REQUEST['schema']); |
|
732 | + $href[] = 'schema=' . urlencode($_REQUEST['schema']); |
|
733 | 733 | } |
734 | 734 | |
735 | 735 | return htmlentities(implode('&', $href)); |
@@ -891,10 +891,10 @@ discard block |
||
891 | 891 | } |
892 | 892 | |
893 | 893 | if (!isset($vars['url'])) { |
894 | - $vars['url'] = SUBFOLDER.'/redirect'; |
|
894 | + $vars['url'] = SUBFOLDER . '/redirect'; |
|
895 | 895 | } |
896 | - if ($vars['url'] == SUBFOLDER.'/redirect' && isset($vars['params']['subject'])) { |
|
897 | - $vars['url'] = SUBFOLDER.'/redirect/'.$vars['params']['subject']; |
|
896 | + if ($vars['url'] == SUBFOLDER . '/redirect' && isset($vars['params']['subject'])) { |
|
897 | + $vars['url'] = SUBFOLDER . '/redirect/' . $vars['params']['subject']; |
|
898 | 898 | unset($vars['params']['subject']); |
899 | 899 | } |
900 | 900 | |
@@ -908,14 +908,14 @@ discard block |
||
908 | 908 | { |
909 | 909 | $form = []; |
910 | 910 | if (isset($_REQUEST['server'])) { |
911 | - $form[] = '<input type="hidden" name="server" value="'.htmlspecialchars($_REQUEST['server']).'" />'; |
|
911 | + $form[] = '<input type="hidden" name="server" value="' . htmlspecialchars($_REQUEST['server']) . '" />'; |
|
912 | 912 | } |
913 | 913 | if (isset($_REQUEST['database'])) { |
914 | - $form[] = '<input type="hidden" name="database" value="'.htmlspecialchars($_REQUEST['database']).'" />'; |
|
914 | + $form[] = '<input type="hidden" name="database" value="' . htmlspecialchars($_REQUEST['database']) . '" />'; |
|
915 | 915 | } |
916 | 916 | |
917 | 917 | if (isset($_REQUEST['schema'])) { |
918 | - $form[] = '<input type="hidden" name="schema" value="'.htmlspecialchars($_REQUEST['schema']).'" />'; |
|
918 | + $form[] = '<input type="hidden" name="schema" value="' . htmlspecialchars($_REQUEST['schema']) . '" />'; |
|
919 | 919 | } |
920 | 920 | $this->form = implode("\n", $form); |
921 | 921 | |
@@ -973,7 +973,7 @@ discard block |
||
973 | 973 | $maxlen = isset($params['cliplen']) && is_int($params['cliplen']) ? $params['cliplen'] : $this->conf['max_chars']; |
974 | 974 | $ellipsis = isset($params['ellipsis']) ? $params['ellipsis'] : $lang['strellipsis']; |
975 | 975 | if (strlen($str) > $maxlen) { |
976 | - $str = substr($str, 0, $maxlen - 1).$ellipsis; |
|
976 | + $str = substr($str, 0, $maxlen - 1) . $ellipsis; |
|
977 | 977 | } |
978 | 978 | } |
979 | 979 | |
@@ -1058,23 +1058,23 @@ discard block |
||
1058 | 1058 | $limit = 10 * 1024; |
1059 | 1059 | $mult = 1; |
1060 | 1060 | if ($str < $limit * $mult) { |
1061 | - $out = $str.' '.$lang['strbytes']; |
|
1061 | + $out = $str . ' ' . $lang['strbytes']; |
|
1062 | 1062 | } else { |
1063 | 1063 | $mult *= 1024; |
1064 | 1064 | if ($str < $limit * $mult) { |
1065 | - $out = floor(($str + $mult / 2) / $mult).' '.$lang['strkb']; |
|
1065 | + $out = floor(($str + $mult / 2) / $mult) . ' ' . $lang['strkb']; |
|
1066 | 1066 | } else { |
1067 | 1067 | $mult *= 1024; |
1068 | 1068 | if ($str < $limit * $mult) { |
1069 | - $out = floor(($str + $mult / 2) / $mult).' '.$lang['strmb']; |
|
1069 | + $out = floor(($str + $mult / 2) / $mult) . ' ' . $lang['strmb']; |
|
1070 | 1070 | } else { |
1071 | 1071 | $mult *= 1024; |
1072 | 1072 | if ($str < $limit * $mult) { |
1073 | - $out = floor(($str + $mult / 2) / $mult).' '.$lang['strgb']; |
|
1073 | + $out = floor(($str + $mult / 2) / $mult) . ' ' . $lang['strgb']; |
|
1074 | 1074 | } else { |
1075 | 1075 | $mult *= 1024; |
1076 | 1076 | if ($str < $limit * $mult) { |
1077 | - $out = floor(($str + $mult / 2) / $mult).' '.$lang['strtb']; |
|
1077 | + $out = floor(($str + $mult / 2) / $mult) . ' ' . $lang['strtb']; |
|
1078 | 1078 | } |
1079 | 1079 | } |
1080 | 1080 | } |
@@ -1120,7 +1120,7 @@ discard block |
||
1120 | 1120 | if ($num > 0) { |
1121 | 1121 | $temp = "<table>\n<tr><td class=\"{$class}\" style=\"vertical-align: top; padding-right: 10px;\"><pre class=\"{$class}\">"; |
1122 | 1122 | for ($i = 1; $i <= $num; $i++) { |
1123 | - $temp .= $i."\n"; |
|
1123 | + $temp .= $i . "\n"; |
|
1124 | 1124 | } |
1125 | 1125 | $temp .= "</pre></td><td class=\"{$class}\" style=\"vertical-align: top;\">{$out}</td></tr></table>\n"; |
1126 | 1126 | $out = $temp; |
@@ -1370,7 +1370,7 @@ discard block |
||
1370 | 1370 | 'icon' => 'Views', |
1371 | 1371 | ], |
1372 | 1372 | 'matviews' => [ |
1373 | - 'title' => 'M '.$lang['strviews'], |
|
1373 | + 'title' => 'M ' . $lang['strviews'], |
|
1374 | 1374 | 'url' => 'materializedviews.php', |
1375 | 1375 | 'urlvars' => ['subject' => 'schema'], |
1376 | 1376 | 'help' => 'pg.matview', |
@@ -2003,43 +2003,43 @@ discard block |
||
2003 | 2003 | { |
2004 | 2004 | if (is_string($icon)) { |
2005 | 2005 | $path = "/images/themes/{$this->conf['theme']}/{$icon}"; |
2006 | - if (file_exists(BASE_PATH.$path.'.png')) { |
|
2007 | - return SUBFOLDER.$path.'.png'; |
|
2006 | + if (file_exists(BASE_PATH . $path . '.png')) { |
|
2007 | + return SUBFOLDER . $path . '.png'; |
|
2008 | 2008 | } |
2009 | 2009 | |
2010 | - if (file_exists(BASE_PATH.$path.'.gif')) { |
|
2011 | - return SUBFOLDER.$path.'.gif'; |
|
2010 | + if (file_exists(BASE_PATH . $path . '.gif')) { |
|
2011 | + return SUBFOLDER . $path . '.gif'; |
|
2012 | 2012 | } |
2013 | 2013 | |
2014 | - if (file_exists(BASE_PATH.$path.'.ico')) { |
|
2015 | - return SUBFOLDER.$path.'.ico'; |
|
2014 | + if (file_exists(BASE_PATH . $path . '.ico')) { |
|
2015 | + return SUBFOLDER . $path . '.ico'; |
|
2016 | 2016 | } |
2017 | 2017 | |
2018 | 2018 | $path = "/images/themes/default/{$icon}"; |
2019 | - if (file_exists(BASE_PATH.$path.'.png')) { |
|
2020 | - return SUBFOLDER.$path.'.png'; |
|
2019 | + if (file_exists(BASE_PATH . $path . '.png')) { |
|
2020 | + return SUBFOLDER . $path . '.png'; |
|
2021 | 2021 | } |
2022 | 2022 | |
2023 | - if (file_exists(BASE_PATH.$path.'.gif')) { |
|
2024 | - return SUBFOLDER.$path.'.gif'; |
|
2023 | + if (file_exists(BASE_PATH . $path . '.gif')) { |
|
2024 | + return SUBFOLDER . $path . '.gif'; |
|
2025 | 2025 | } |
2026 | 2026 | |
2027 | - if (file_exists(BASE_PATH.$path.'.ico')) { |
|
2028 | - return SUBFOLDER.$path.'.ico'; |
|
2027 | + if (file_exists(BASE_PATH . $path . '.ico')) { |
|
2028 | + return SUBFOLDER . $path . '.ico'; |
|
2029 | 2029 | } |
2030 | 2030 | } else { |
2031 | 2031 | // Icon from plugins |
2032 | 2032 | $path = "/plugins/{$icon[0]}/images/{$icon[1]}"; |
2033 | - if (file_exists(BASE_PATH.$path.'.png')) { |
|
2034 | - return SUBFOLDER.$path.'.png'; |
|
2033 | + if (file_exists(BASE_PATH . $path . '.png')) { |
|
2034 | + return SUBFOLDER . $path . '.png'; |
|
2035 | 2035 | } |
2036 | 2036 | |
2037 | - if (file_exists(BASE_PATH.$path.'.gif')) { |
|
2038 | - return SUBFOLDER.$path.'.gif'; |
|
2037 | + if (file_exists(BASE_PATH . $path . '.gif')) { |
|
2038 | + return SUBFOLDER . $path . '.gif'; |
|
2039 | 2039 | } |
2040 | 2040 | |
2041 | - if (file_exists(BASE_PATH.$path.'.ico')) { |
|
2042 | - return SUBFOLDER.$path.'.ico'; |
|
2041 | + if (file_exists(BASE_PATH . $path . '.ico')) { |
|
2042 | + return SUBFOLDER . $path . '.ico'; |
|
2043 | 2043 | } |
2044 | 2044 | } |
2045 | 2045 | |
@@ -2087,7 +2087,7 @@ discard block |
||
2087 | 2087 | if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { |
2088 | 2088 | $data->fieldClean($str); |
2089 | 2089 | |
2090 | - return '"'.$str.'"'; |
|
2090 | + return '"' . $str . '"'; |
|
2091 | 2091 | } |
2092 | 2092 | |
2093 | 2093 | return escapeshellcmd($str); |
@@ -2125,7 +2125,7 @@ discard block |
||
2125 | 2125 | $forcedserver = null; |
2126 | 2126 | if (count($servers) === 1) { |
2127 | 2127 | $forcedserver = $this->server_id; |
2128 | - $connection_html .= '<input type="hidden" readonly="readonly" value="'.$this->server_id.'" name="server">'; |
|
2128 | + $connection_html .= '<input type="hidden" readonly="readonly" value="' . $this->server_id . '" name="server">'; |
|
2129 | 2129 | } else { |
2130 | 2130 | $connection_html .= '<label>'; |
2131 | 2131 | $connection_html .= $this->printHelp($lang['strserver'], 'pg.server', false); |
@@ -2137,7 +2137,7 @@ discard block |
||
2137 | 2137 | } |
2138 | 2138 | $selected = isset($_REQUEST['server']) && $info['id'] == $_REQUEST['server'] ? ' selected="selected"' : ''; |
2139 | 2139 | // not logged on this server |
2140 | - $connection_html .= '<option value="'.htmlspecialchars($info['id']).'" '.$selected.'>'; |
|
2140 | + $connection_html .= '<option value="' . htmlspecialchars($info['id']) . '" ' . $selected . '>'; |
|
2141 | 2141 | $connection_html .= htmlspecialchars("{$info['desc']} ({$info['id']})"); |
2142 | 2142 | $connection_html .= "</option>\n"; |
2143 | 2143 | } |
@@ -2147,7 +2147,7 @@ discard block |
||
2147 | 2147 | $connection_html .= "</td><td class=\"popup_select2\" style=\"text-align: right\">\n"; |
2148 | 2148 | |
2149 | 2149 | if (count($servers) === 1 && isset($servers[$this->server_id]['useonlydefaultdb']) && $servers[$this->server_id]['useonlydefaultdb'] === true) { |
2150 | - $connection_html .= '<input type="hidden" name="database" value="'.htmlspecialchars($servers[$this->server_id]['defaultdb'])."\" />\n"; |
|
2150 | + $connection_html .= '<input type="hidden" name="database" value="' . htmlspecialchars($servers[$this->server_id]['defaultdb']) . "\" />\n"; |
|
2151 | 2151 | } else { |
2152 | 2152 | |
2153 | 2153 | // Get the list of all databases |
@@ -2166,14 +2166,14 @@ discard block |
||
2166 | 2166 | while (!$databases->EOF) { |
2167 | 2167 | $dbname = $databases->fields['datname']; |
2168 | 2168 | $dbselected = isset($_REQUEST['database']) && $dbname == $_REQUEST['database'] ? ' selected="selected"' : ''; |
2169 | - $connection_html .= '<option value="'.htmlspecialchars($dbname).'" '.$dbselected.'>'.htmlspecialchars($dbname)."</option>\n"; |
|
2169 | + $connection_html .= '<option value="' . htmlspecialchars($dbname) . '" ' . $dbselected . '>' . htmlspecialchars($dbname) . "</option>\n"; |
|
2170 | 2170 | |
2171 | 2171 | $databases->moveNext(); |
2172 | 2172 | } |
2173 | 2173 | $connection_html .= "</select></label>\n"; |
2174 | 2174 | } else { |
2175 | 2175 | $server_info = $misc->getServerInfo(); |
2176 | - $connection_html .= '<input type="hidden" name="database" value="'.htmlspecialchars($server_info['defaultdb'])."\" />\n"; |
|
2176 | + $connection_html .= '<input type="hidden" name="database" value="' . htmlspecialchars($server_info['defaultdb']) . "\" />\n"; |
|
2177 | 2177 | } |
2178 | 2178 | } |
2179 | 2179 | |
@@ -2253,38 +2253,38 @@ discard block |
||
2253 | 2253 | $fksprops['code'] .= "var constrs = {};\n"; |
2254 | 2254 | foreach ($fksprops['byconstr'] as $conid => $props) { |
2255 | 2255 | $fksprops['code'] .= "constrs.constr_{$conid} = {\n"; |
2256 | - $fksprops['code'] .= 'pattnums: ['.implode(',', $props['pattnums'])."],\n"; |
|
2257 | - $fksprops['code'] .= "f_table:'".addslashes(htmlentities($props['f_table'], ENT_QUOTES, 'UTF-8'))."',\n"; |
|
2258 | - $fksprops['code'] .= "f_schema:'".addslashes(htmlentities($props['f_schema'], ENT_QUOTES, 'UTF-8'))."',\n"; |
|
2256 | + $fksprops['code'] .= 'pattnums: [' . implode(',', $props['pattnums']) . "],\n"; |
|
2257 | + $fksprops['code'] .= "f_table:'" . addslashes(htmlentities($props['f_table'], ENT_QUOTES, 'UTF-8')) . "',\n"; |
|
2258 | + $fksprops['code'] .= "f_schema:'" . addslashes(htmlentities($props['f_schema'], ENT_QUOTES, 'UTF-8')) . "',\n"; |
|
2259 | 2259 | $_ = ''; |
2260 | 2260 | foreach ($props['pattnames'] as $n) { |
2261 | - $_ .= ",'".htmlentities($n, ENT_QUOTES, 'UTF-8')."'"; |
|
2261 | + $_ .= ",'" . htmlentities($n, ENT_QUOTES, 'UTF-8') . "'"; |
|
2262 | 2262 | } |
2263 | - $fksprops['code'] .= 'pattnames: ['.substr($_, 1)."],\n"; |
|
2263 | + $fksprops['code'] .= 'pattnames: [' . substr($_, 1) . "],\n"; |
|
2264 | 2264 | |
2265 | 2265 | $_ = ''; |
2266 | 2266 | foreach ($props['fattnames'] as $n) { |
2267 | - $_ .= ",'".htmlentities($n, ENT_QUOTES, 'UTF-8')."'"; |
|
2267 | + $_ .= ",'" . htmlentities($n, ENT_QUOTES, 'UTF-8') . "'"; |
|
2268 | 2268 | } |
2269 | 2269 | |
2270 | - $fksprops['code'] .= 'fattnames: ['.substr($_, 1)."]\n"; |
|
2270 | + $fksprops['code'] .= 'fattnames: [' . substr($_, 1) . "]\n"; |
|
2271 | 2271 | $fksprops['code'] .= "};\n"; |
2272 | 2272 | } |
2273 | 2273 | |
2274 | 2274 | $fksprops['code'] .= "var attrs = {};\n"; |
2275 | 2275 | foreach ($fksprops['byfield'] as $attnum => $cstrs) { |
2276 | - $fksprops['code'] .= "attrs.attr_{$attnum} = [".implode(',', $fksprops['byfield'][$attnum])."];\n"; |
|
2276 | + $fksprops['code'] .= "attrs.attr_{$attnum} = [" . implode(',', $fksprops['byfield'][$attnum]) . "];\n"; |
|
2277 | 2277 | } |
2278 | 2278 | |
2279 | - $fksprops['code'] .= "var table='".addslashes(htmlentities($table, ENT_QUOTES, 'UTF-8'))."';"; |
|
2280 | - $fksprops['code'] .= "var server='".htmlentities($_REQUEST['server'], ENT_QUOTES, 'UTF-8')."';"; |
|
2281 | - $fksprops['code'] .= "var database='".addslashes(htmlentities($_REQUEST['database'], ENT_QUOTES, 'UTF-8'))."';"; |
|
2282 | - $fksprops['code'] .= "var subfolder='".SUBFOLDER."';"; |
|
2279 | + $fksprops['code'] .= "var table='" . addslashes(htmlentities($table, ENT_QUOTES, 'UTF-8')) . "';"; |
|
2280 | + $fksprops['code'] .= "var server='" . htmlentities($_REQUEST['server'], ENT_QUOTES, 'UTF-8') . "';"; |
|
2281 | + $fksprops['code'] .= "var database='" . addslashes(htmlentities($_REQUEST['database'], ENT_QUOTES, 'UTF-8')) . "';"; |
|
2282 | + $fksprops['code'] .= "var subfolder='" . SUBFOLDER . "';"; |
|
2283 | 2283 | $fksprops['code'] .= "</script>\n"; |
2284 | 2284 | |
2285 | 2285 | $fksprops['code'] .= '<div id="fkbg"></div>'; |
2286 | 2286 | $fksprops['code'] .= '<div id="fklist"></div>'; |
2287 | - $fksprops['code'] .= '<script src="'.SUBFOLDER.'/js/ac_insert_row.js" type="text/javascript"></script>'; |
|
2287 | + $fksprops['code'] .= '<script src="' . SUBFOLDER . '/js/ac_insert_row.js" type="text/javascript"></script>'; |
|
2288 | 2288 | } else /* we have no foreign keys on this table */ |
2289 | 2289 | { |
2290 | 2290 | return false; |