coding standards
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
|
||||
|
||||
if (!defined('PMA_BOOKMARK_LIB_INCLUDED')){
|
||||
if (!defined('PMA_BOOKMARK_LIB_INCLUDED')) {
|
||||
define('PMA_BOOKMARK_LIB_INCLUDED', 1);
|
||||
|
||||
/**
|
||||
@@ -110,7 +110,7 @@ if (!defined('PMA_BOOKMARK_LIB_INCLUDED')){
|
||||
* @param array the properties of the bookmark to add
|
||||
* @param array the bookmark parameters for the current user
|
||||
*
|
||||
* @return boolean if the INSERT succeeds
|
||||
* @return boolean whether the INSERT succeeds or not
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
@@ -119,20 +119,22 @@ if (!defined('PMA_BOOKMARK_LIB_INCLUDED')){
|
||||
$query = 'INSERT INTO ' . PMA_backquote($cfgBookmark['db']) . '.' . PMA_backquote($cfgBookmark['table'])
|
||||
. ' (id, dbase, user, query, label) VALUES (\'\', \'' . PMA_sqlAddslashes($fields['dbase']) . '\', \'' . PMA_sqlAddslashes($fields['user']) . '\', \'' . PMA_sqlAddslashes(urldecode($fields['query'])) . '\', \'' . PMA_sqlAddslashes($fields['label']) . '\')';
|
||||
if (isset($GLOBALS['dbh'])) {
|
||||
$result = PMA_mysql_query($query, $GLOBALS['dbh']);
|
||||
$result = PMA_mysql_query($query, $GLOBALS['dbh']);
|
||||
if (PMA_mysql_error($GLOBALS['dbh'])) {
|
||||
$error = PMA_mysql_error($GLOBALS['dbh']);
|
||||
include('./header.inc.php3');
|
||||
PMA_mysqlDie($error);
|
||||
}
|
||||
} else {
|
||||
$result = PMA_mysql_query($query);
|
||||
$result = PMA_mysql_query($query);
|
||||
if (PMA_mysql_error()) {
|
||||
$error = PMA_mysql_error();
|
||||
include('./header.inc.php3');
|
||||
PMA_mysqlDie($error);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
} // end of the 'PMA_addBookmarks()' function
|
||||
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
|
||||
|
||||
if (!defined('PMA_COMMON_LIB_INCLUDED')){
|
||||
if (!defined('PMA_COMMON_LIB_INCLUDED')) {
|
||||
define('PMA_COMMON_LIB_INCLUDED', 1);
|
||||
|
||||
/**
|
||||
@@ -85,8 +85,8 @@ if (!defined('PMA_COMMON_LIB_INCLUDED')){
|
||||
// Include failed
|
||||
if (!isset($cfgServers) && !isset($cfg['Servers'])) {
|
||||
// Creates fake settings
|
||||
$cfg = array('DefaultLang' => 'en-iso-8859-1',
|
||||
'AllowAnywhereRecoding' => FALSE);
|
||||
$cfg = array('DefaultLang' => 'en-iso-8859-1',
|
||||
'AllowAnywhereRecoding' => FALSE);
|
||||
// Loads the language file
|
||||
include('./libraries/select_lang.lib.php3');
|
||||
// Sends the Content-Type header
|
||||
@@ -136,7 +136,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
/**
|
||||
* Includes the language file if it hasn't been included yet
|
||||
*/
|
||||
if (!defined('PMA_SELECT_LANG_LIB_INCLUDED')){
|
||||
if (!defined('PMA_SELECT_LANG_LIB_INCLUDED')) {
|
||||
include('./libraries/select_lang.lib.php3');
|
||||
}
|
||||
|
||||
@@ -1207,7 +1207,7 @@ if (typeof(document.getElementById) != 'undefined'
|
||||
if (eregi('^SELECT[[:space:]]+', $GLOBALS['sql_query'])) {
|
||||
$explain_link .= urlencode('EXPLAIN ' . $GLOBALS['sql_query']) . '">' . $GLOBALS['strExplain'];
|
||||
} else if (eregi('^EXPLAIN[[:space:]]+SELECT[[:space:]]+', $GLOBALS['sql_query'])) {
|
||||
$explain_link .= substr($GLOBALS['sql_query'],8) . '">' . $GLOBALS['strNoExplain'];
|
||||
$explain_link .= substr($GLOBALS['sql_query'], 8) . '">' . $GLOBALS['strNoExplain'];
|
||||
} else {
|
||||
$explain_link = '';
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')){
|
||||
if (!defined('PMA_CONFIG_IMPORT_LIB_INCLUDED')) {
|
||||
define('PMA_CONFIG_IMPORT_LIB_INCLUDED', 1);
|
||||
|
||||
if (!isset($cfg['PmaAbsoluteUri'])) {
|
||||
|
@@ -1,6 +1,15 @@
|
||||
<?php
|
||||
// <markus@noga.de>
|
||||
// get foreign keys in preparation for a drop-down selector
|
||||
/* $Id$ */
|
||||
|
||||
|
||||
/**
|
||||
* Gets foreign keys in preparation for a drop-down selector
|
||||
* Thanks to <markus@noga.de>
|
||||
*/
|
||||
|
||||
|
||||
if (!defined('PMA_GET_FOREIGN_LIB_INCLUDED')) {
|
||||
define('PMA_GET_FOREIGN_LIB_INCLUDED', 1);
|
||||
|
||||
// lem9: we always show the foreign field in the drop-down; if a display
|
||||
// field is defined, we show it besides the foreign field
|
||||
@@ -32,4 +41,6 @@
|
||||
$disp = PMA_mysql_query($dispsql);
|
||||
}
|
||||
} // end if $foreigners
|
||||
|
||||
} // $__PMA_GET_FOREIGN_LIB_INCLUDED__
|
||||
?>
|
||||
|
@@ -52,7 +52,7 @@ if (isset($submit)) {
|
||||
$field_default[$i] = $field_default_orig[$i];
|
||||
}
|
||||
$field_length_orig[$i] = urldecode($field_length_orig[$i]);
|
||||
if (strcmp(str_replace('"', '"', $field_length_orig[$i]), $field_length[$i]) ==0) {
|
||||
if (strcmp(str_replace('"', '"', $field_length_orig[$i]), $field_length[$i]) == 0) {
|
||||
$field_length[$i] = $field_length_orig[$i];
|
||||
}
|
||||
if (!isset($query)) {
|
||||
|
Reference in New Issue
Block a user