The branch, master has been updated
via a1c9a65994630a28f76a08d86d498ef0493539eb (commit)
via 0ade69e84dffab147144735a25555c278f9820a9 (commit)
from 767fc7ec6c64783eff40e4206d452c427a652137 (commit)
- Log -----------------------------------------------------------------
commit a1c9a65994630a28f76a08d86d498ef0493539eb
Merge: 0ade69e 767fc7e
Author: Dieter Adriaenssens <ruleant(a)users.sourceforge.net>
Date: Tue Sep 6 17:58:28 2011 +0200
Merge branch 'master' of
ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
commit 0ade69e84dffab147144735a25555c278f9820a9
Author: Dieter Adriaenssens <ruleant(a)users.sourceforge.net>
Date: Tue Sep 6 17:57:48 2011 +0200
use include() instead of require() when including file conditionally
-----------------------------------------------------------------------
Summary of changes:
db_create.php | 10 +++++-----
db_datadict.php | 4 ++--
db_export.php | 2 +-
db_operations.php | 10 +++++-----
db_qbe.php | 4 ++--
db_routines.php | 4 ++--
db_search.php | 2 +-
db_sql.php | 2 +-
db_structure.php | 14 +++++++-------
db_tracking.php | 6 +++---
10 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/db_create.php b/db_create.php
index 84ef1a5..27bf279 100644
--- a/db_create.php
+++ b/db_create.php
@@ -14,7 +14,7 @@ $GLOBALS['js_include'][] =
'jquery/jquery-ui-1.8.custom.js';
require_once './libraries/mysql_charsets.lib.php';
if (!PMA_DRIZZLE) {
- require './libraries/replication.inc.php';
+ include './libraries/replication.inc.php';
}
require './libraries/build_html_for_db.lib.php';
@@ -54,8 +54,8 @@ if (! $result) {
PMA_ajaxResponse($message, false);
}
- require_once './libraries/header.inc.php';
- require_once './main.php';
+ include_once './libraries/header.inc.php';
+ include_once './main.php';
} else {
$message = PMA_Message::success(__('Database %1$s has been created.'));
$message->addParam($new_db);
@@ -125,7 +125,7 @@ if (! $result) {
PMA_ajaxResponse($message, true, $extra_data);
}
- require_once './libraries/header.inc.php';
- require_once './' . $cfg['DefaultTabDatabase'];
+ include_once './libraries/header.inc.php';
+ include_once './' . $cfg['DefaultTabDatabase'];
}
?>
diff --git a/db_datadict.php b/db_datadict.php
index fc5de90..c9b5560 100644
--- a/db_datadict.php
+++ b/db_datadict.php
@@ -11,8 +11,8 @@
require_once './libraries/common.inc.php';
if (! isset($selected_tbl)) {
- require './libraries/db_common.inc.php';
- require './libraries/db_info.inc.php';
+ include './libraries/db_common.inc.php';
+ include './libraries/db_info.inc.php';
}
diff --git a/db_export.php b/db_export.php
index f8a4762..5c880dd 100644
--- a/db_export.php
+++ b/db_export.php
@@ -28,7 +28,7 @@ $export_page_title = __('View dump (schema) of database');
// exit if no tables in db found
if ($num_tables < 1) {
PMA_Message::error(__('No tables found in database.'))->display();
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
exit;
} // end if
diff --git a/db_operations.php b/db_operations.php
index c9430d1..77c2af7 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -109,7 +109,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy)))
{
$views = array();
// remove all foreign key constraints, otherwise we can get errors
- require_once './libraries/export/sql.php';
+ include_once './libraries/export/sql.php';
foreach ($tables_full as $each_table => $tmp) {
$sql_constraints = '';
$sql_drop_foreign_keys = '';
@@ -263,7 +263,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy)))
{
/**
* cleanup pmadb stuff for this db
*/
- require_once './libraries/relation_cleanup.lib.php';
+ include_once './libraries/relation_cleanup.lib.php';
PMA_relationsCleanupDatabase($db);
// if someday the RENAME DATABASE reappears, do not DROP
@@ -329,12 +329,12 @@ if (isset($_REQUEST['comment'])) {
* because there is no table in the database ($is_info is true)
*/
if (empty($is_info)) {
- require './libraries/db_common.inc.php';
+ include './libraries/db_common.inc.php';
$url_query .= '&goto=db_operations.php';
// Gets the database structure
$sub_part = '_structure';
- require './libraries/db_info.inc.php';
+ include './libraries/db_info.inc.php';
echo "\n";
if (isset($message)) {
@@ -372,7 +372,7 @@ if (!$is_information_schema) {
}
?>
<div class="operations_half_width">
- <?php require './libraries/display_create_table.lib.php'; ?>
+ <?php include './libraries/display_create_table.lib.php'; ?>
</div>
<?php
/**
diff --git a/db_qbe.php b/db_qbe.php
index 66d670b..de09953 100644
--- a/db_qbe.php
+++ b/db_qbe.php
@@ -26,7 +26,7 @@ if (isset($_REQUEST['submit_sql']) && !
empty($sql_query)) {
$message_to_display = true;
} else {
$goto = 'db_sql.php';
- require './sql.php';
+ include './sql.php';
exit;
}
}
@@ -99,7 +99,7 @@ $tbl_result = PMA_DBI_query('SHOW TABLES FROM ' .
PMA_backquote($db) . ';',
$tbl_result_cnt = PMA_DBI_num_rows($tbl_result);
if (0 == $tbl_result_cnt) {
PMA_Message::error(__('No tables found in database.'))->display();
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
exit;
}
diff --git a/db_routines.php b/db_routines.php
index 6d22335..da92c22 100644
--- a/db_routines.php
+++ b/db_routines.php
@@ -13,9 +13,9 @@ require_once './libraries/common.inc.php';
require_once './libraries/common.lib.php';
require_once './libraries/mysql_charsets.lib.php';
if (PMA_DRIZZLE) {
- require_once './libraries/data_drizzle.inc.php';
+ include_once './libraries/data_drizzle.inc.php';
} else {
- require_once './libraries/data_mysql.inc.php';
+ include_once './libraries/data_mysql.inc.php';
}
/**
diff --git a/db_search.php b/db_search.php
index a9817ba..88ae5d3 100644
--- a/db_search.php
+++ b/db_search.php
@@ -93,7 +93,7 @@ if (empty($_REQUEST['field_str']) || !
is_string($_REQUEST['field_str'])) {
$sub_part = '';
if ( $GLOBALS['is_ajax_request'] != true) {
- require './libraries/db_info.inc.php';
+ include './libraries/db_info.inc.php';
echo '<div id="searchresults">';
}
diff --git a/db_sql.php b/db_sql.php
index 38074e9..2f495ac 100644
--- a/db_sql.php
+++ b/db_sql.php
@@ -35,7 +35,7 @@ require './libraries/db_info.inc.php';
if ($num_tables == 0 && empty($db_query_force)) {
$sub_part = '';
$is_info = true;
- require './db_structure.php';
+ include './db_structure.php';
exit();
}
diff --git a/db_structure.php b/db_structure.php
index a7e7a2b..8673471 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -31,21 +31,21 @@ if (empty($is_info)) {
// -> db_structure.php and if we got an error on the multi submit,
// we must display it here and not call again mult_submits.inc.php
if (! isset($error) || false === $error) {
- require './libraries/mult_submits.inc.php';
+ include './libraries/mult_submits.inc.php';
}
if (empty($message)) {
$message = PMA_Message::success();
}
}
- require './libraries/db_common.inc.php';
+ include './libraries/db_common.inc.php';
$url_query .= '&goto=db_structure.php';
// Gets the database structure
$sub_part = '_structure';
- require './libraries/db_info.inc.php';
+ include './libraries/db_info.inc.php';
if (!PMA_DRIZZLE) {
- require './libraries/replication.inc.php';
+ include './libraries/replication.inc.php';
} else {
$server_slave_status = false;
}
@@ -66,13 +66,13 @@ if ($num_tables == 0) {
echo '<p>' . __('No tables found in database') .
'</p>' . "\n";
if (empty($db_is_information_schema)) {
- require './libraries/display_create_table.lib.php';
+ include './libraries/display_create_table.lib.php';
} // end if (Create Table dialog)
/**
* Displays the footer
*/
- require_once './libraries/footer.inc.php';
+ include_once './libraries/footer.inc.php';
exit;
}
@@ -572,7 +572,7 @@ echo __('Data Dictionary') . '</a>';
echo '</p>';
if (empty($db_is_information_schema)) {
- require './libraries/display_create_table.lib.php';
+ include './libraries/display_create_table.lib.php';
} // end if (Create Table dialog)
/**
diff --git a/db_tracking.php b/db_tracking.php
index 29d8cc8..fd4f7ed 100644
--- a/db_tracking.php
+++ b/db_tracking.php
@@ -17,7 +17,7 @@ $GLOBALS['js_include'][] = 'db_structure.js';
* If we are not in an Ajax request, then do the common work and show the links etc.
*/
if ($GLOBALS['is_ajax_request'] != true) {
- require './libraries/db_common.inc.php';
+ include './libraries/db_common.inc.php';
}
$url_query .= '&goto=tbl_tracking.php&back=db_tracking.php';
@@ -48,11 +48,11 @@ if ($num_tables == 0 && count($data['ddlog']) == 0) {
echo '<p>' . __('No tables found in database.') .
'</p>' . "\n";
if (empty($db_is_information_schema)) {
- require './libraries/display_create_table.lib.php';
+ include './libraries/display_create_table.lib.php';
}
// Display the footer
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
exit;
}
hooks/post-receive
--
phpMyAdmin