~ubuntu-branches/ubuntu/hardy/phpmyadmin/hardy

« back to all changes in this revision

Viewing changes to libraries/database_interface.lib.php

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst, Thijs Kinkhorst, Translations
  • Date: 2007-06-17 17:52:03 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20070617175203-6oa2mpmgazkhp8tl
Tags: 4:2.10.2-1

[ Thijs Kinkhorst ]
* New upstream release.
* Welcome Michal Čihař as new co-maintainer.

[ Translations ]
* Vietnamese by Clytie Siddall (Closes: #427177).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
/* $Id: database_interface.lib.php 10189 2007-03-23 16:45:44Z lem9 $ */
 
2
/* $Id: database_interface.lib.php 10356 2007-05-08 20:39:33Z cybot_tm $ */
3
3
// vim: expandtab sw=4 ts=4 sts=4:
4
4
 
5
5
/**
1166
1166
    return $compats;
1167
1167
}
1168
1168
 
 
1169
/**
 
1170
 * returns warnings for last query
 
1171
 * 
 
1172
 * @uses    $GLOBALS['userlink']
 
1173
 * @uses    PMA_DBI_fetch_result()
 
1174
 * @param   resource mysql link  $link   mysql link resource
 
1175
 * @return  array   warnings
 
1176
 */
 
1177
function PMA_DBI_get_warnings($link = null)
 
1178
{
 
1179
    if (PMA_MYSQL_INT_VERSION < 40100) {
 
1180
        return array();
 
1181
    }
 
1182
    
 
1183
    if (empty($link)) {
 
1184
        if (isset($GLOBALS['userlink'])) {
 
1185
            $link = $GLOBALS['userlink'];
 
1186
        } else {
 
1187
            return array();
 
1188
        }
 
1189
    }
 
1190
    
 
1191
    return PMA_DBI_fetch_result('SHOW WARNINGS', null, null, $link);
 
1192
}
1169
1193
 
1170
1194
/**
1171
1195
 * returns true (int > 0) if current user is superuser