Skip to content

Commit

Permalink
Adding @Package, third part.
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Nov 24, 2008
1 parent 2f457ee commit 84ae042
Show file tree
Hide file tree
Showing 27 changed files with 85 additions and 56 deletions.
2 changes: 2 additions & 0 deletions libraries/Theme.class.php
Expand Up @@ -4,6 +4,7 @@
* hold PMA_Theme class
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand All @@ -14,6 +15,7 @@
* @todo make css optionally replacing 'parent' css or extending it (by appending at the end)
* @todo add an optional global css file - which will be used for both frames
*
* @package phpMyAdmin
*/
class PMA_Theme {
/**
Expand Down
2 changes: 2 additions & 0 deletions libraries/Theme_Manager.class.php
Expand Up @@ -3,6 +3,7 @@
/**
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand All @@ -12,6 +13,7 @@

/**
*
* @package phpMyAdmin
*/
class PMA_Theme_Manager
{
Expand Down
1 change: 1 addition & 0 deletions libraries/tbl_info.inc.php
Expand Up @@ -7,6 +7,7 @@
* @todo this should be recoded as functions, to avoid messing with global variables
*
* @version $Id$
* @package phpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
Expand Down
1 change: 1 addition & 0 deletions libraries/tbl_links.inc.php
Expand Up @@ -3,6 +3,7 @@
/**
*
* @version $Id$
* @package phpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
Expand Down
1 change: 1 addition & 0 deletions libraries/tbl_triggers.lib.php
Expand Up @@ -3,6 +3,7 @@
/**
*
* @version $Id$
* @package phpMyAdmin
*/
if (! defined('PHPMYADMIN')) {
exit;
Expand Down
1 change: 1 addition & 0 deletions libraries/transformations.lib.php
Expand Up @@ -4,6 +4,7 @@
* Set of functions used with the relation and pdf feature
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down
7 changes: 4 additions & 3 deletions libraries/url_generating.lib.php
Expand Up @@ -4,6 +4,7 @@
* URL/hidden inputs generating.
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down Expand Up @@ -124,7 +125,7 @@ function PMA_getHiddenFields($values, $pre = '')
if (is_array($value)) {
$fields .= PMA_getHiddenFields($value, $name);
} else {
// do not generate an ending "\n" because
// do not generate an ending "\n" because
// PMA_generate_common_hidden_inputs() is sometimes called
// from a JS document.write()
$fields .= '<input type="hidden" name="' . htmlspecialchars($name)
Expand Down Expand Up @@ -188,11 +189,11 @@ function PMA_getHiddenFields($values, $pre = '')
* on the resulting URL (for a normal URL displayed in HTML)
* or something else to avoid using htmlspecialchars() (for
* a URL sent via a header); if not set,'html' is assumed
* - if first param is not array: optional table name
* - if first param is not array: optional table name
*
* @param string - if first param is array: optional character to
* use instead of '?'
* - if first param is not array: optional character to use
* - if first param is not array: optional character to use
* instead of '&amp;' for dividing URL parameters
* @return string string with URL parameters
* @access public
Expand Down
33 changes: 17 additions & 16 deletions tbl_addfield.php
Expand Up @@ -3,6 +3,7 @@
/**
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down Expand Up @@ -67,7 +68,7 @@
}
} // end if
} // end for

// Builds the field creation statement and alters the table
for ($i = 0; $i < $field_cnt; ++$i) {
// '0' is also empty for php :-(
Expand All @@ -76,23 +77,23 @@
}

$definition = ' ADD ' . PMA_Table::generateFieldSpec(
$_REQUEST['field_name'][$i],
$_REQUEST['field_name'][$i],
$_REQUEST['field_type'][$i],
$_REQUEST['field_length'][$i],
$_REQUEST['field_length'][$i],
$_REQUEST['field_attribute'][$i],
isset($_REQUEST['field_collation'][$i])
? $_REQUEST['field_collation'][$i]
isset($_REQUEST['field_collation'][$i])
? $_REQUEST['field_collation'][$i]
: '',
isset($_REQUEST['field_null'][$i])
? $_REQUEST['field_null'][$i]
isset($_REQUEST['field_null'][$i])
? $_REQUEST['field_null'][$i]
: 'NOT NULL',
$_REQUEST['field_default_type'][$i],
$_REQUEST['field_default_type'][$i],
$_REQUEST['field_default_value'][$i],
isset($_REQUEST['field_extra'][$i])
? $_REQUEST['field_extra'][$i]
: false,
isset($_REQUEST['field_comments'][$i])
? $_REQUEST['field_comments'][$i]
isset($_REQUEST['field_comments'][$i])
? $_REQUEST['field_comments'][$i]
: '',
$field_primary,
$i
Expand Down Expand Up @@ -121,7 +122,7 @@
}
$definitions[] = ' ADD PRIMARY KEY (' . implode(', ', $fields) . ') ';
}

// Builds the indexes statements and updates the table
if (count($field_index)) {
$fields = array();
Expand All @@ -130,7 +131,7 @@
}
$definitions[] = ' ADD INDEX (' . implode(', ', $fields) . ') ';
}

// Builds the uniques statements and updates the table
if (count($field_unique)) {
$fields = array();
Expand Down Expand Up @@ -167,10 +168,10 @@
foreach ($_REQUEST['field_mimetype'] as $fieldindex => $mimetype) {
if (isset($_REQUEST['field_name'][$fieldindex])
&& strlen($_REQUEST['field_name'][$fieldindex])) {
PMA_setMIME($db, $table,
$_REQUEST['field_name'][$fieldindex],
$mimetype,
$_REQUEST['field_transformation'][$fieldindex],
PMA_setMIME($db, $table,
$_REQUEST['field_name'][$fieldindex],
$mimetype,
$_REQUEST['field_transformation'][$fieldindex],
$_REQUEST['field_transformation_options'][$fieldindex]);
}
}
Expand Down
1 change: 1 addition & 0 deletions tbl_alter.php
Expand Up @@ -7,6 +7,7 @@
* form and handles this form data
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down
9 changes: 5 additions & 4 deletions tbl_change.php
Expand Up @@ -6,6 +6,7 @@
* register_globals_save (mark this file save for disabling register globals)
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down Expand Up @@ -426,10 +427,10 @@
} else {
// loic1: special binary "characters"
if ($field['is_binary'] || $field['is_blob']) {
$vrow[$field['Field']] = PMA_replace_binary_contents($vrow[$field['Field']]);
$vrow[$field['Field']] = PMA_replace_binary_contents($vrow[$field['Field']]);
} // end if
$special_chars = htmlspecialchars($vrow[$field['Field']]);

//We need to duplicate the first \n or otherwise we will lose the first newline entered in a VARCHAR or TEXT column
$special_chars_encoded = PMA_duplicateFirstNewline($special_chars);

Expand All @@ -452,7 +453,7 @@
$data = $field['Default'];
}
if ($field['True_Type'] == 'bit') {
$special_chars = PMA_printable_bit_value($field['Default'], $extracted_fieldspec['spec_in_brackets']);
$special_chars = PMA_printable_bit_value($field['Default'], $extracted_fieldspec['spec_in_brackets']);
} else {
$special_chars = htmlspecialchars($field['Default']);
}
Expand Down Expand Up @@ -925,7 +926,7 @@ class="textfield" <?php echo $unnullify_trigger; ?>
if (!empty($bs_tables) && strlen($db) > 0)
{
$bs_tables = $bs_tables[$db];

// check if reference to BLOBStreaming tables exists
if (isset($bs_tables))
{
Expand Down
23 changes: 12 additions & 11 deletions tbl_create.php
Expand Up @@ -32,6 +32,7 @@
* @uses sprintf()
* @uses htmlspecialchars()
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down Expand Up @@ -99,7 +100,7 @@
}
} // end if
} // end for

// Builds the fields creation statements
for ($i = 0; $i < $field_cnt; $i++) {
// '0' is also empty for php :-(
Expand All @@ -108,25 +109,25 @@
}

$query = PMA_Table::generateFieldSpec(
$_REQUEST['field_name'][$i],
$_REQUEST['field_name'][$i],
$_REQUEST['field_type'][$i],
$_REQUEST['field_length'][$i],
$_REQUEST['field_length'][$i],
$_REQUEST['field_attribute'][$i],
isset($_REQUEST['field_collation'][$i])
? $_REQUEST['field_collation'][$i]
isset($_REQUEST['field_collation'][$i])
? $_REQUEST['field_collation'][$i]
: '',
isset($_REQUEST['field_null'][$i])
? $_REQUEST['field_null'][$i]
isset($_REQUEST['field_null'][$i])
? $_REQUEST['field_null'][$i]
: 'NOT NULL',
$_REQUEST['field_default_type'][$i],
$_REQUEST['field_default_type'][$i],
$_REQUEST['field_default_value'][$i],
isset($_REQUEST['field_extra'][$i])
? $_REQUEST['field_extra'][$i]
: false,
isset($_REQUEST['field_comments'][$i])
? $_REQUEST['field_comments'][$i]
isset($_REQUEST['field_comments'][$i])
? $_REQUEST['field_comments'][$i]
: '',
$field_primary,
$field_primary,
$i);

$query .= ', ';
Expand Down
1 change: 1 addition & 0 deletions tbl_export.php
Expand Up @@ -3,6 +3,7 @@
/**
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down
1 change: 1 addition & 0 deletions tbl_import.php
Expand Up @@ -3,6 +3,7 @@
/**
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down
21 changes: 11 additions & 10 deletions tbl_indexes.php
Expand Up @@ -4,6 +4,7 @@
* Displays index edit/creation form and handles it
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand Down Expand Up @@ -44,7 +45,7 @@
*/
if (isset($_REQUEST['do_save_data'])) {
$error = false;

// $sql_query is the one displayed in the query box
$sql_query = 'ALTER TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table);

Expand Down Expand Up @@ -77,26 +78,26 @@
. ($index->getName() ? PMA_backquote($index->getName()) : '');
break;
} // end switch

$index_fields = array();
foreach ($index->getColumns() as $key => $column) {
$index_fields[$key] = PMA_backquote($column->getName());
if ($column->getSubPart()) {
$index_fields[$key] .= '(' . $column->getSubPart() . ')';
}
} // end while

if (empty($index_fields)){
$error = PMA_Message::error('strNoIndexPartsDefined');
} else {
$sql_query .= ' (' . implode(', ', $index_fields) . ')';
}

if (! $error) {
PMA_DBI_query($sql_query);
$message = PMA_Message::success('strTableAlteredSuccessfully');
$message->addParam($table);

$active_page = 'tbl_structure.php';
require './tbl_structure.php';
exit;
Expand All @@ -119,7 +120,7 @@

if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
// coming already from form
$add_fields =
$add_fields =
count($_REQUEST['index']['columns']['names']) - $index->getColumnCount();
if (isset($_REQUEST['add_fields'])) {
$add_fields += $_REQUEST['added_fields'];
Expand Down Expand Up @@ -155,8 +156,8 @@
<fieldset>
<legend>
<?php
echo (isset($_REQUEST['create_index'])
? $strCreateIndexTopic
echo (isset($_REQUEST['create_index'])
? $strCreateIndexTopic
: $strModifyIndexTopic);
?>
</legend>
Expand Down Expand Up @@ -201,7 +202,7 @@
|| preg_match('/(char|text)/i', $field_type)) {
echo '<option value="' . htmlspecialchars($field_name) . '"'
. (($field_name == $column->getName()) ? ' selected="selected"' : '') . '>'
. htmlspecialchars($field_name) . ' [' . $field_type . ']'
. htmlspecialchars($field_name) . ' [' . $field_type . ']'
. '</option>' . "\n";
}
} // end foreach $fields
Expand All @@ -223,7 +224,7 @@
<?php
foreach ($fields as $field_name => $field_type) {
echo '<option value="' . htmlspecialchars($field_name) . '">'
. htmlspecialchars($field_name) . ' [' . $field_type . ']'
. htmlspecialchars($field_name) . ' [' . $field_type . ']'
. '</option>' . "\n";
} // end foreach $fields
?>
Expand Down
5 changes: 3 additions & 2 deletions tbl_move_copy.php
Expand Up @@ -3,6 +3,7 @@
/**
*
* @version $Id$
* @package phpMyAdmin
*/

/**
Expand All @@ -28,8 +29,8 @@

$goto = $cfg['DefaultTabTable'];

/**
* $_REQUEST['target_db'] could be empty in case we came from an input field
/**
* $_REQUEST['target_db'] could be empty in case we came from an input field
* (when there are many databases, no drop-down)
*/
if (empty($_REQUEST['target_db'])) {
Expand Down

0 comments on commit 84ae042

Please sign in to comment.