diff --git a/libraries/bookmark.lib.php3 b/libraries/bookmark.lib.php3 index 7aa965b91..6643a111b 100644 --- a/libraries/bookmark.lib.php3 +++ b/libraries/bookmark.lib.php3 @@ -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 diff --git a/libraries/common.lib.php3 b/libraries/common.lib.php3 index 18aa5d1e4..5b84eaad1 100644 --- a/libraries/common.lib.php3 +++ b/libraries/common.lib.php3 @@ -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 = ''; } diff --git a/libraries/config_import.lib.php3 b/libraries/config_import.lib.php3 index d77a5291f..63782a498 100644 --- a/libraries/config_import.lib.php3 +++ b/libraries/config_import.lib.php3 @@ -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'])) { diff --git a/libraries/get_foreign.lib.php3 b/libraries/get_foreign.lib.php3 index 8e0b6928f..c894ea103 100755 --- a/libraries/get_foreign.lib.php3 +++ b/libraries/get_foreign.lib.php3 @@ -1,6 +1,15 @@ - // get foreign keys in preparation for a drop-down selector +/* $Id$ */ + + +/** + * Gets foreign keys in preparation for a drop-down selector + * Thanks to + */ + + +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__ ?> diff --git a/tbl_alter.php3 b/tbl_alter.php3 index 944b54035..c2ad8e762 100755 --- a/tbl_alter.php3 +++ b/tbl_alter.php3 @@ -48,11 +48,11 @@ if (isset($submit)) { $field_name[$i] = $field_orig[$i]; } $field_default_orig[$i] = urldecode($field_default_orig[$i]); - if (strcmp(str_replace('"', '"', $field_default_orig[$i]), $field_default[$i]) == 0) { + if (strcmp(str_replace('"', '"', $field_default_orig[$i]), $field_default[$i]) == 0) { $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)) {