The branch, master has been updated via e03dcf766976fe6dfffb75d4aa3c8cf2f76acffa (commit) from 137a70e671954ed6fdb11290d6bc62b46426ba63 (commit)
- Log ----------------------------------------------------------------- commit e03dcf766976fe6dfffb75d4aa3c8cf2f76acffa Author: Rouslan Placella rouslan@placella.com Date: Thu Oct 13 22:06:52 2011 +0100
Removed some unused variables
-----------------------------------------------------------------------
Summary of changes: libraries/rte/rte_events.lib.php | 12 ++++++------ libraries/rte/rte_export.lib.php | 2 +- libraries/rte/rte_footer.lib.php | 2 +- libraries/rte/rte_routines.lib.php | 14 ++++++-------- libraries/rte/rte_triggers.lib.php | 10 +++++----- 5 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/libraries/rte/rte_events.lib.php b/libraries/rte/rte_events.lib.php index c4b6a1f..0e9d1e2 100644 --- a/libraries/rte/rte_events.lib.php +++ b/libraries/rte/rte_events.lib.php @@ -78,7 +78,7 @@ function PMA_EVN_main() */ function PMA_EVN_handleEditor() { - global $_REQUEST, $_POST, $errors, $db, $table; + global $_REQUEST, $_POST, $errors, $db;
if (! empty($_REQUEST['editor_process_add']) || ! empty($_REQUEST['editor_process_edit']) @@ -140,7 +140,7 @@ function PMA_EVN_handleEditor() if (count($errors)) { $message = PMA_Message::error(__('<b>One or more errors have occured while processing your request:</b>')); $message->addString('<ul>'); - foreach ($errors as $num => $string) { + foreach ($errors as $string) { $message->addString('<li>' . $string . '</li>'); } $message->addString('</ul>'); @@ -245,7 +245,7 @@ function PMA_EVN_getDataFromRequest() 'item_preserve', 'item_comment', 'item_definer'); - foreach ($indices as $key => $index) { + foreach ($indices as $index) { $retval[$index] = isset($_REQUEST[$index]) ? $_REQUEST[$index] : ''; } $retval['item_type'] = 'ONE TIME'; @@ -320,7 +320,7 @@ function PMA_EVN_getDataFromName($name) */ function PMA_EVN_getEditorForm($mode, $operation, $item) { - global $db, $table, $titles, $event_status, $event_type, $event_interval; + global $db, $table, $event_status, $event_type, $event_interval;
// Escape special characters $need_escape = array( @@ -335,7 +335,7 @@ function PMA_EVN_getEditorForm($mode, $operation, $item) 'item_definer', 'item_comment' ); - foreach ($need_escape as $key => $index) { + foreach ($need_escape as $index) { $item[$index] = htmlentities($item[$index], ENT_QUOTES); } $original_data = ''; @@ -506,7 +506,7 @@ function PMA_EVN_getEditorForm($mode, $operation, $item) */ function PMA_EVN_getQueryFromRequest() { - global $_REQUEST, $db, $errors, $event_status, $event_type, $event_interval; + global $_REQUEST, $errors, $event_status, $event_type, $event_interval;
$query = 'CREATE '; if (! empty($_REQUEST['item_definer'])) { diff --git a/libraries/rte/rte_export.lib.php b/libraries/rte/rte_export.lib.php index 8cac214..a0fe0c8 100644 --- a/libraries/rte/rte_export.lib.php +++ b/libraries/rte/rte_export.lib.php @@ -18,7 +18,7 @@ if (! defined('PHPMYADMIN')) { */ function PMA_RTE_handleExport($item_name, $export_data) { - global $db, $table; + global $db;
$item_name = htmlspecialchars(PMA_backquote($_GET['item_name'])); if ($export_data !== false) { diff --git a/libraries/rte/rte_footer.lib.php b/libraries/rte/rte_footer.lib.php index 22e414b..36ca06e 100644 --- a/libraries/rte/rte_footer.lib.php +++ b/libraries/rte/rte_footer.lib.php @@ -73,7 +73,7 @@ function PMA_TRI_getFooterLinks() */ function PMA_EVN_getFooterLinks() { - global $db, $url_query, $ajax_class; + global $db, $url_query;
/** * For events, we show the usual 'Add event' form and also diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php index a6557d7..60b163f 100644 --- a/libraries/rte/rte_routines.lib.php +++ b/libraries/rte/rte_routines.lib.php @@ -142,8 +142,6 @@ function PMA_RTN_parseOneParameter($value) */ function PMA_RTN_parseAllParameters($parsed_query, $routine_type) { - global $param_directions; - $retval = array(); $retval['num'] = 0;
@@ -230,7 +228,7 @@ function PMA_RTN_parseRoutineDefiner($parsed_query) */ function PMA_RTN_handleEditor() { - global $_GET, $_POST, $_REQUEST, $GLOBALS, $db, $cfg, $errors; + global $_GET, $_POST, $_REQUEST, $GLOBALS, $db, $errors;
if (! empty($_REQUEST['editor_process_add']) || ! empty($_REQUEST['editor_process_edit']) @@ -293,7 +291,7 @@ function PMA_RTN_handleEditor() if (count($errors)) { $message = PMA_Message::error(__('<b>One or more errors have occured while processing your request:</b>')); $message->addString('<ul>'); - foreach ($errors as $num => $string) { + foreach ($errors as $string) { $message->addString('<li>' . $string . '</li>'); } $message->addString('</ul>'); @@ -511,7 +509,7 @@ function PMA_RTN_getDataFromRequest() */ function PMA_RTN_getDataFromName($name, $type, $all = true) { - global $param_directions, $param_sqldataaccess, $db; + global $db;
$retval = array();
@@ -734,7 +732,7 @@ function PMA_RTN_getParameterRow($routine = array(), $index = null, $class = '') */ function PMA_RTN_getEditorForm($mode, $operation, $routine) { - global $db, $titles, $errors, $param_directions, $param_sqldataaccess, $param_opts_num; + global $db, $errors, $param_sqldataaccess, $param_opts_num;
// Escape special characters $need_escape = array( @@ -976,7 +974,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine) */ function PMA_RTN_getQueryFromRequest() { - global $_REQUEST, $cfg, $errors, $param_sqldataaccess, $param_opts_num, $param_directions; + global $_REQUEST, $cfg, $errors, $param_sqldataaccess, $param_directions;
$_REQUEST['item_type'] = isset($_REQUEST['item_type']) ? $_REQUEST['item_type'] : '';
@@ -1174,7 +1172,7 @@ function PMA_RTN_handleExecute() $affected = 0; $result = null; $outcome = true; - foreach ($queries as $num => $query) { + foreach ($queries as $query) { $resource = PMA_DBI_try_query($query); if ($resource === false) { $outcome = false; diff --git a/libraries/rte/rte_triggers.lib.php b/libraries/rte/rte_triggers.lib.php index 29cc60f..7dc0fb8 100644 --- a/libraries/rte/rte_triggers.lib.php +++ b/libraries/rte/rte_triggers.lib.php @@ -113,7 +113,7 @@ function PMA_TRI_handleEditor() if (count($errors)) { $message = PMA_Message::error(__('<b>One or more errors have occured while processing your request:</b>')); $message->addString('<ul>'); - foreach ($errors as $num => $string) { + foreach ($errors as $string) { $message->addString('<li>' . $string . '</li>'); } $message->addString('</ul>'); @@ -125,7 +125,7 @@ function PMA_TRI_handleEditor() if ($message->isSuccess()) { $items = PMA_DBI_get_triggers($db, $table, ''); $trigger = false; - foreach ($items as $key => $value) { + foreach ($items as $value) { if ($value['name'] == $_REQUEST['item_name']) { $trigger = $value; } @@ -215,7 +215,7 @@ function PMA_TRI_getDataFromRequest() 'item_event_manipulation', 'item_definition', 'item_definer'); - foreach ($indices as $key => $index) { + foreach ($indices as $index) { $retval[$index] = isset($_REQUEST[$index]) ? $_REQUEST[$index] : ''; } return $retval; @@ -235,7 +235,7 @@ function PMA_TRI_getDataFromName($name)
$temp = array(); $items = PMA_DBI_get_triggers($db, $table, ''); - foreach ($items as $key => $value) { + foreach ($items as $value) { if ($value['name'] == $name) { $temp = $value; } @@ -269,7 +269,7 @@ function PMA_TRI_getDataFromName($name) */ function PMA_TRI_getEditorForm($mode, $item) { - global $db, $table, $titles, $event_manipulations, $action_timings; + global $db, $table, $event_manipulations, $action_timings;
// Escape special characters $need_escape = array(
hooks/post-receive