diff --git a/ChangeLog b/ChangeLog index bcf81d625..2852263dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -36,6 +36,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA editing, thanks to knittl - knittl + rfe #2123386 Added option to disable mcrypt warning. - bug #2648502 Request-URI Too Large error from Location header ++ rfe #1731967 Check for relations support on main page. 3.1.4.0 (not yet released) + patch #1808339 [doc] Apache SSLOptions and StdEnvVars FAQ, diff --git a/chk_rel.php b/chk_rel.php index 6c2ad81bf..f95d45bda 100644 --- a/chk_rel.php +++ b/chk_rel.php @@ -10,7 +10,8 @@ * Gets some core libraries */ require_once './libraries/common.inc.php'; -require_once './libraries/db_common.inc.php'; +$GLOBALS['js_include'][] = 'functions.js'; +require_once './libraries/header.inc.php'; require_once './libraries/relation.lib.php'; diff --git a/main.php b/main.php index 82c383a80..8e262def2 100644 --- a/main.php +++ b/main.php @@ -302,6 +302,24 @@ if (!empty($_SESSION['auto_blowfish_secret']) && trigger_error($strSecretRequired, E_USER_WARNING); } +/** + * Check whether relations are supported. + */ +if ($server > 0) { + require_once './libraries/relation.lib.php'; + $cfgRelation = PMA_getRelationsParam(); + if(!$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) { + $message = PMA_Message::notice('strRelationNotWorking'); + $message->addParam('', false); + $message->addParam('', false); + /* Show error if user has configured something, notice elsewhere */ + if (!empty($cfg['Servers'][$server]['pmadb'])) { + $message->isError(true); + } + $message->display(); + } // end if +} + /** * Warning about different MySQL library and server version * (a difference on the third digit does not count).