~ubuntu-branches/ubuntu/lucid/phpmyadmin/lucid

« back to all changes in this revision

Viewing changes to libraries/relation.lib.php

  • Committer: Bazaar Package Importer
  • Author(s): Michal Čihař
  • Date: 2009-06-30 14:05:13 UTC
  • mfrom: (1.2.1 upstream) (36.1.2 karmic)
  • Revision ID: james.westby@ubuntu.com-20090630140513-hz71do3sij2jhm4s
* New upstream version fixing XSS (PMASA-2009-5).
* Document no empty password in README.Debian and the shipped sample
  configuration file (LP: #388703).
* Install service file for avahi (if web service enabled and if avahi is
  installed) (LP: #369244).
* Mention protecting of setup if not using provided configuration snippets
  for webservers.
* Call ucf with --debconf-ok in postrm (Closes: #534894).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Set of functions used with the relation and pdf feature
5
5
 *
6
6
 * @version $Id: relation.lib.php 12231 2009-02-10 19:21:01Z lem9 $
 
7
 * @package phpMyAdmin
7
8
 */
8
9
if (! defined('PHPMYADMIN')) {
9
10
    exit;
44
45
/**
45
46
 * @uses    $_SESSION['relation' . $GLOBALS['server']] for caching
46
47
 * @uses    $GLOBALS['cfgRelation'] to set it
47
 
 * @uses    $GLOBALS['server'] to ensure we are using server-specific pmadb 
 
48
 * @uses    $GLOBALS['server'] to ensure we are using server-specific pmadb
48
49
 * @uses    PMA__getRelationsParam()
49
50
 * @uses    PMA_printRelationsParamDiagnostic()
50
51
 * @param   bool    $verbose    whether to print diagnostic info
391
392
            if (count($one_key['index_list']) == 1) {
392
393
                foreach ($one_key['index_list'] as $i => $field) {
393
394
                    // If a foreign key is defined in the 'internal' source (pmadb)
394
 
                    // and as a native foreign key, we won't get it twice 
 
395
                    // and as a native foreign key, we won't get it twice
395
396
                    // if $source='both' because we use $field as key
396
397
 
397
398
                    // The parser looks for a CONSTRAINT clause just before
1096
1097
 
1097
1098
/**
1098
1099
 * Rename a field in relation tables
1099
 
 * 
 
1100
 *
1100
1101
 * usually called after a field in a table was renamed in tbl_alter.php
1101
1102
 *
1102
1103
 * @uses    PMA_getRelationsParam()
1111
1112
function PMA_REL_renameField($db, $table, $field, $new_name)
1112
1113
{
1113
1114
    $cfgRelation = PMA_getRelationsParam();
1114
 
    
 
1115
 
1115
1116
    if ($cfgRelation['displaywork']) {
1116
1117
        $table_query = 'UPDATE ' . PMA_backquote($cfgRelation['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
1117
1118
                      . '   SET display_field = \'' . PMA_sqlAddslashes($new_name) . '\''
1140
1141
 
1141
1142
/**
1142
1143
 * Create a PDF page
1143
 
 * 
 
1144
 *
1144
1145
 * @uses    $GLOBALS['strNoDescription']
1145
1146
 * @uses    PMA_backquote()
1146
1147
 * @uses    $GLOBALS['cfgRelation']['db']
1152
1153
 * @param array     $cfgRelation
1153
1154
 * @param string    $db
1154
1155
 * @param string    $query_default_option
1155
 
 * @return string   $pdf_page_number 
 
1156
 * @return string   $pdf_page_number
1156
1157
 */
1157
1158
function PMA_REL_create_page($newpage, $cfgRelation, $db, $query_default_option) {
1158
1159
    if (! isset($newpage) || $newpage == '') {