~ubuntu-branches/ubuntu/trusty/phpmyadmin/trusty

« back to all changes in this revision

Viewing changes to libraries/database_interface.lib.php

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2013-10-07 20:18:01 UTC
  • mfrom: (1.2.46)
  • Revision ID: package-import@ubuntu.com-20131007201801-l5l0ril5992p8sxz
Tags: 4:4.0.8-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
 
59
59
        // if it fails try alternative extension ...
60
60
        // and display an error ...
 
61
        $docurl = PMA_Util::getDocuLink('faq', 'faqmysql');
 
62
        $doclink = sprintf(
 
63
            __('See %sour documentation%s for more information.'),
 
64
            '[a@' . $docurl  . '@documentation]',
 
65
            '[/a]'
 
66
        );
61
67
 
62
68
        /**
63
69
         * @todo add different messages for alternative extension
66
72
        PMA_warnMissingExtension(
67
73
            $GLOBALS['cfg']['Server']['extension'],
68
74
            false,
69
 
            PMA_Util::showDocu('faq', 'faqmysql')
 
75
            $doclink
70
76
        );
71
77
 
72
78
        if ($GLOBALS['cfg']['Server']['extension'] === 'mysql') {
80
86
            PMA_warnMissingExtension(
81
87
                $GLOBALS['cfg']['Server']['extension'],
82
88
                true,
83
 
                PMA_Util::showDocu('faq', 'faqmysql')
 
89
                $doclink
84
90
            );
85
91
        }
86
92
 
1466
1472
 */
1467
1473
function PMA_DBI_postConnect($link, $is_controluser = false)
1468
1474
{
 
1475
    if ($is_controluser) {
 
1476
        return;
 
1477
    }
1469
1478
    if (! defined('PMA_MYSQL_INT_VERSION')) {
1470
1479
        if (PMA_Util::cacheExists('PMA_MYSQL_INT_VERSION', true)) {
1471
1480
            define(
1534
1543
            );
1535
1544
            // Detect Drizzle - it does not support character sets
1536
1545
            $charset_result = PMA_DBI_get_variable(
1537
 
                'character_set_results', 
1538
 
                PMA_DBI_GETVAR_GLOBAL, 
 
1546
                'character_set_results',
 
1547
                PMA_DBI_GETVAR_GLOBAL,
1539
1548
                $link
1540
1549
            );
1541
1550
            if ($charset_result) {
2128
2137
 */
2129
2138
function PMA_getFirstOccurringRegularExpression($regex_array, $query)
2130
2139
{
2131
 
    
 
2140
 
2132
2141
    $minimum_first_occurence_index = null;
2133
2142
    $regex = null;
2134
 
    
 
2143
 
2135
2144
    for ($i = 0; $i < count($regex_array); $i++) {
2136
2145
        if (preg_match($regex_array[$i], $query, $matches, PREG_OFFSET_CAPTURE)) {
2137
 
            
 
2146
 
2138
2147
            if (is_null($minimum_first_occurence_index)
2139
2148
                || ($matches[0][1] < $minimum_first_occurence_index)
2140
2149
            ) {
2141
2150
                $regex = $regex_array[$i];
2142
2151
                $minimum_first_occurence_index = $matches[0][1];
2143
2152
            }
2144
 
            
 
2153
 
2145
2154
        }
2146
2155
    }
2147
 
    
 
2156
 
2148
2157
    return $regex;
2149
 
    
 
2158
 
2150
2159
}
2151
2160
 
2152
2161
?>