Beispiel #1
0
/**
 * Returns current relation parameters
 *
 * @return array   $cfgRelation
 */
function PMA_getRelationsParam()
{
    if (empty($_SESSION['relation'][$GLOBALS['server']])) {
        $_SESSION['relation'][$GLOBALS['server']] = PMA__getRelationsParam();
    }
    // just for BC but needs to be before PMA_getRelationsParamDiagnostic()
    // which uses it
    $GLOBALS['cfgRelation'] = $_SESSION['relation'][$GLOBALS['server']];
    return $_SESSION['relation'][$GLOBALS['server']];
}
Beispiel #2
0
/**
 * @uses    $_SESSION['relation' . $GLOBALS['server']] for caching
 * @uses    $GLOBALS['cfgRelation'] to set it
 * @uses    $GLOBALS['server'] to ensure we are using server-specific pmadb
 * @uses    PMA__getRelationsParam()
 * @uses    PMA_printRelationsParamDiagnostic()
 * @param   bool    $verbose    whether to print diagnostic info
 * @return  array   $cfgRelation
 */
function PMA_getRelationsParam($verbose = false)
{
    if (empty($_SESSION['relation' . $GLOBALS['server']])) {
        $_SESSION['relation' . $GLOBALS['server']] = PMA__getRelationsParam();
    }
    if ($verbose) {
        PMA_printRelationsParamDiagnostic($_SESSION['relation' . $GLOBALS['server']]);
    }
    // just for BC
    $GLOBALS['cfgRelation'] = $_SESSION['relation' . $GLOBALS['server']];
    return $_SESSION['relation' . $GLOBALS['server']];
}
Beispiel #3
0
/**
 * @uses    $GLOBALS['cfgRelation'] to set it
 * @uses    PMA__getRelationsParam()
 * @uses    PMA_printRelationsParamDiagnostic()
 * @param   bool    $verbose    whether to print diagnostic info
 * @return  array   $cfgRelation
 */
function PMA_getRelationsParam($verbose = false)
{
    static $cfgRelation = null;
    if (null === $cfgRelation) {
        $cfgRelation = PMA__getRelationsParam();
    }
    if ($verbose) {
        PMA_printRelationsParamDiagnostic($cfgRelation);
    }
    // just for BC
    $GLOBALS['cfgRelation'] = $cfgRelation;
    return $cfgRelation;
}
Beispiel #4
0
/**
 * @uses    $_SESSION['relation' . $GLOBALS['server']] for caching
 * @uses    $GLOBALS['cfgRelation'] to set it
 * @uses    $GLOBALS['server'] to ensure we are using server-specific pmadb
 * @uses    PMA__getRelationsParam()
 * @uses    PMA_printRelationsParamDiagnostic()
 * @param   bool    $verbose    whether to print diagnostic info
 * @return  array   $cfgRelation
 */
function PMA_getRelationsParam($verbose = false)
{
    if (empty($_SESSION['relation' . $GLOBALS['server']])) {
        $_SESSION['relation' . $GLOBALS['server']] = PMA__getRelationsParam();
    }
    // just for BC but needs to be before PMA_printRelationsParamDiagnostic()
    // which uses it
    $GLOBALS['cfgRelation'] = $_SESSION['relation' . $GLOBALS['server']];
    if ($verbose) {
        PMA_printRelationsParamDiagnostic($_SESSION['relation' . $GLOBALS['server']]);
    }
    return $_SESSION['relation' . $GLOBALS['server']];
}