Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
The branch, master has been updated
via 87459a5cf6b7c640c8a19cbd70575424420850f7 (commit)
via a30554b1e4e5a0b6a048b4dfe12dfbeb45321c37 (commit)
from a1c9a65994630a28f76a08d86d498ef0493539eb (commit)
- Log -----------------------------------------------------------------
commit 87459a5cf6b7c640c8a19cbd70575424420850f7
Author: Dieter Adriaenssens <ruleant(a)users.sourceforge.net>
Date: Tue Sep 6 22:04:51 2011 +0200
use include() instead of require() when including file conditionally
commit a30554b1e4e5a0b6a048b4dfe12dfbeb45321c37
Author: Dieter Adriaenssens <ruleant(a)users.sourceforge.net>
Date: Tue Sep 6 21:48:05 2011 +0200
use require() instead of include() when including file unconditionally
-----------------------------------------------------------------------
Summary of changes:
export.php | 42 ++++++++++++------------
gis_data_editor.php | 4 +-
import.php | 16 ++++----
index.php | 2 +-
libraries/Advisor.class.php | 2 +-
libraries/auth/config.auth.lib.php | 6 ++--
libraries/auth/cookie.auth.lib.php | 14 ++++----
libraries/auth/http.auth.lib.php | 6 ++--
libraries/auth/signon.auth.lib.php | 2 +-
libraries/auth/swekey/swekey.auth.lib.php | 4 +-
libraries/charset_conversion.lib.php | 2 +-
libraries/common.inc.php | 34 +++++++++---------
libraries/config/ConfigFile.class.php | 8 ++--
libraries/core.lib.php | 4 +-
libraries/engines/berkeleydb.lib.php | 2 +-
libraries/engines/innobase.lib.php | 2 +-
libraries/engines/mrg_myisam.lib.php | 2 +-
libraries/schema/Dia_Relation_Schema.class.php | 2 +-
libraries/schema/Eps_Relation_Schema.class.php | 2 +-
pmd_display_field.php | 2 +-
pmd_pdf.php | 2 +-
pmd_relation_new.php | 4 +-
pmd_relation_upd.php | 4 +-
pmd_save_pos.php | 2 +-
schema_export.php | 4 +-
25 files changed, 87 insertions(+), 87 deletions(-)
diff --git a/export.php b/export.php
index e26427d..b82ef99 100644
--- a/export.php
+++ b/export.php
@@ -75,16 +75,16 @@ if ($_REQUEST['output_format'] == 'astext') {
// Does export require to be into file?
if (isset($export_list[$type]['force_file']) && ! $asfile) {
$message = PMA_Message::error(__('Selected export type has to be saved in file!'));
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
if ($export_type == 'server') {
$active_page = 'server_export.php';
- require './server_export.php';
+ include './server_export.php';
} elseif ($export_type == 'database') {
$active_page = 'db_export.php';
- require './db_export.php';
+ include './db_export.php';
} else {
$active_page = 'tbl_export.php';
- require './tbl_export.php';
+ include './tbl_export.php';
}
exit();
}
@@ -318,16 +318,16 @@ if ($save_on_server) {
}
}
if (isset($message)) {
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
if ($export_type == 'server') {
$active_page = 'server_export.php';
- require './server_export.php';
+ include './server_export.php';
} elseif ($export_type == 'database') {
$active_page = 'db_export.php';
- require './db_export.php';
+ include './db_export.php';
} else {
$active_page = 'tbl_export.php';
- require './tbl_export.php';
+ include './tbl_export.php';
}
exit();
}
@@ -352,14 +352,14 @@ if (!$save_on_server) {
$num_tables = count($tables);
if ($num_tables == 0) {
$message = PMA_Message::error(__('No tables found in database.'));
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
$active_page = 'db_export.php';
- require './db_export.php';
+ include './db_export.php';
exit();
}
}
$backup_cfgServer = $cfg['Server'];
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
$cfg['Server'] = $backup_cfgServer;
unset($backup_cfgServer);
echo "\n" . '<div align="' . $cell_align_left . '">' . "\n";
@@ -416,7 +416,7 @@ do {
$cfgRelation = PMA_getRelationsParam();
}
if ($do_mime) {
- require_once './libraries/transformations.lib.php';
+ include_once './libraries/transformations.lib.php';
}
// Include dates in export?
@@ -600,16 +600,16 @@ do {
// End of fake loop
if ($save_on_server && isset($message)) {
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
if ($export_type == 'server') {
$active_page = 'server_export.php';
- require './server_export.php';
+ include './server_export.php';
} elseif ($export_type == 'database') {
$active_page = 'db_export.php';
- require './db_export.php';
+ include './db_export.php';
} else {
$active_page = 'tbl_export.php';
- require './tbl_export.php';
+ include './tbl_export.php';
}
exit();
}
@@ -654,16 +654,16 @@ if (!empty($asfile)) {
$message = new PMA_Message(__('Dump has been saved to file %s.'), PMA_Message::SUCCESS, $save_filename);
}
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
if ($export_type == 'server') {
$active_page = 'server_export.php';
- require_once './server_export.php';
+ include_once './server_export.php';
} elseif ($export_type == 'database') {
$active_page = 'db_export.php';
- require_once './db_export.php';
+ include_once './db_export.php';
} else {
$active_page = 'tbl_export.php';
- require_once './tbl_export.php';
+ include_once './tbl_export.php';
}
exit();
} else {
@@ -704,6 +704,6 @@ if (!empty($asfile)) {
//]]>
</script>
<?php
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
} // end if
?>
diff --git a/gis_data_editor.php b/gis_data_editor.php
index fde183d..d9db06f 100644
--- a/gis_data_editor.php
+++ b/gis_data_editor.php
@@ -1,8 +1,8 @@
<?php
require_once './libraries/common.inc.php';
if (! isset($_REQUEST['get_gis_editor']) && ! isset($_REQUEST['generate'])) {
- require_once './libraries/header_http.inc.php';
- require_once './libraries/header_meta_style.inc.php';
+ include_once './libraries/header_http.inc.php';
+ include_once './libraries/header_meta_style.inc.php';
}
require_once './libraries/gis/pma_gis_factory.php';
require_once './libraries/gis_visualization.lib.php';
diff --git a/import.php b/import.php
index f305293..92859ff 100644
--- a/import.php
+++ b/import.php
@@ -53,7 +53,7 @@ if (!empty($sql_query)) {
// upload limit has been reached, let's assume the second possibility.
;
if ($_POST == array() && $_GET == array()) {
- require_once './libraries/header.inc.php';
+ include_once './libraries/header.inc.php';
$message = PMA_Message::error(__('You probably tried to upload too large file. Please refer to %sdocumentation%s for ways to workaround this limit.'));
$message->addParam('[a@./Documentation.html#faq1_16@_blank]');
$message->addParam('[/a]');
@@ -63,7 +63,7 @@ if ($_POST == array() && $_GET == array()) {
$_SESSION['Import_message']['go_back_url'] = $goto;
$message->display();
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
}
// Check needed parameters
@@ -148,7 +148,7 @@ $bookmark_created = false;
// Bookmark Support: get a query back from bookmark if required
if (!empty($id_bookmark)) {
$id_bookmark = (int)$id_bookmark;
- require_once './libraries/bookmark.lib.php';
+ include_once './libraries/bookmark.lib.php';
switch ($action_bookmark) {
case 0: // bookmarked query that have to be run
$import_text = PMA_Bookmark_get($db, $id_bookmark, 'id', isset($action_bookmark_all));
@@ -183,7 +183,7 @@ if (isset($GLOBALS['show_as_php'])) {
// Store the query as a bookmark before executing it if bookmarklabel was given
if (!empty($bkm_label) && !empty($import_text)) {
- require_once './libraries/bookmark.lib.php';
+ include_once './libraries/bookmark.lib.php';
$bfields = array(
'dbase' => $db,
'user' => $cfg['Bookmark']['user'],
@@ -377,7 +377,7 @@ if (!$error) {
} else {
// Do the real import
$plugin_param = $import_type;
- require './libraries/import/' . $format . '.php';
+ include './libraries/import/' . $format . '.php';
}
}
@@ -441,7 +441,7 @@ if (isset($message)) {
// (but if the query is too large, in case of an imported file, the parser
// can choke on it so avoid parsing)
if (strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
- require_once './libraries/parse_analyze.lib.php';
+ include_once './libraries/parse_analyze.lib.php';
}
// There was an error?
@@ -461,10 +461,10 @@ if (! empty($last_query_with_results)) {
}
if ($go_sql) {
- require './sql.php';
+ include './sql.php';
} else {
$active_page = $goto;
- require './' . $goto;
+ include './' . $goto;
}
exit();
?>
diff --git a/index.php b/index.php
index 9add876..c8c7756 100644
--- a/index.php
+++ b/index.php
@@ -69,7 +69,7 @@ $lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1];
// start output
-include './libraries/header_http.inc.php';
+require './libraries/header_http.inc.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
diff --git a/libraries/Advisor.class.php b/libraries/Advisor.class.php
index bf4e404..533fe88 100644
--- a/libraries/Advisor.class.php
+++ b/libraries/Advisor.class.php
@@ -28,7 +28,7 @@ class Advisor
FROM data_dictionary.GLOBAL_STATEMENTS", 0, 1));
}
// Add total memory to variables as well
- require_once 'libraries/sysinfo.lib.php';
+ include_once 'libraries/sysinfo.lib.php';
$sysinfo = getSysInfo();
$memory = $sysinfo->memory();
$this->variables['system_memory'] = $memory['MemTotal'];
diff --git a/libraries/auth/config.auth.lib.php b/libraries/auth/config.auth.lib.php
index e90e0bf..573bede 100644
--- a/libraries/auth/config.auth.lib.php
+++ b/libraries/auth/config.auth.lib.php
@@ -75,7 +75,7 @@ function PMA_auth_fails()
header('Content-Type: text/html; charset=utf-8');
/* HTML header */
$page_title = __('Access denied');
- require './libraries/header_meta_style.inc.php';
+ include './libraries/header_meta_style.inc.php';
?>
</head>
@@ -117,7 +117,7 @@ function PMA_auth_fails()
<?php
if (count($GLOBALS['cfg']['Servers']) > 1) {
// offer a chance to login to other servers if the current one failed
- require_once './libraries/select_server.lib.php';
+ include_once './libraries/select_server.lib.php';
echo '<tr>' . "\n";
echo ' <td>' . "\n";
PMA_select_server(true, true);
@@ -125,7 +125,7 @@ function PMA_auth_fails()
echo '</tr>' . "\n";
}
echo '</table>' . "\n";
- require './libraries/footer.inc.php';
+ include './libraries/footer.inc.php';
return true;
} // end of the 'PMA_auth_fails()' function
diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php
index 2a3f7c1..b196461 100644
--- a/libraries/auth/cookie.auth.lib.php
+++ b/libraries/auth/cookie.auth.lib.php
@@ -73,7 +73,7 @@ if (function_exists('mcrypt_encrypt')) {
}
} else {
- require_once './libraries/blowfish.php';
+ include_once './libraries/blowfish.php';
}
/**
@@ -137,9 +137,9 @@ function PMA_auth()
/* HTML header; do not show here the PMA version to improve security */
$page_title = 'phpMyAdmin ';
- require './libraries/header_meta_style.inc.php';
+ include './libraries/header_meta_style.inc.php';
// if $page_title is set, this script uses it as the title:
- require './libraries/header_scripts.inc.php';
+ include './libraries/header_scripts.inc.php';
?>
<script type="text/javascript">
//<![CDATA[
@@ -155,7 +155,7 @@ if (top != self) {
<?php
if (file_exists(CUSTOM_HEADER_FILE)) {
- require CUSTOM_HEADER_FILE;
+ include CUSTOM_HEADER_FILE;
}
?>
@@ -184,7 +184,7 @@ if (top != self) {
// Displays the languages form
if (empty($GLOBALS['cfg']['Lang'])) {
- require_once './libraries/display_select_lang.lib.php';
+ include_once './libraries/display_select_lang.lib.php';
// use fieldset, don't show doc link
PMA_select_language(true, false);
}
@@ -234,7 +234,7 @@ if (top != self) {
}
echo '>';
- require_once './libraries/select_server.lib.php';
+ include_once './libraries/select_server.lib.php';
PMA_select_server(false, false);
echo '</select></div>';
@@ -283,7 +283,7 @@ if (top != self) {
</div>
<?php
if (file_exists(CUSTOM_FOOTER_FILE)) {
- require CUSTOM_FOOTER_FILE;
+ include CUSTOM_FOOTER_FILE;
}
?>
</body>
diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php
index b31d327..b54cf34 100644
--- a/libraries/auth/http.auth.lib.php
+++ b/libraries/auth/http.auth.lib.php
@@ -49,13 +49,13 @@ function PMA_auth()
header('Content-Type: text/html; charset=utf-8');
/* HTML header */
$page_title = __('Access denied');
- require './libraries/header_meta_style.inc.php';
+ include './libraries/header_meta_style.inc.php';
?>
</head>
<body>
<?php
if (file_exists(CUSTOM_HEADER_FILE)) {
- require CUSTOM_HEADER_FILE;
+ include CUSTOM_HEADER_FILE;
}
?>
@@ -69,7 +69,7 @@ function PMA_auth()
PMA_Message::error(__('Wrong username/password. Access denied.'))->display();
if (file_exists(CUSTOM_FOOTER_FILE)) {
- require CUSTOM_FOOTER_FILE;
+ include CUSTOM_FOOTER_FILE;
}
?>
diff --git a/libraries/auth/signon.auth.lib.php b/libraries/auth/signon.auth.lib.php
index 976845c..fb105c2 100644
--- a/libraries/auth/signon.auth.lib.php
+++ b/libraries/auth/signon.auth.lib.php
@@ -87,7 +87,7 @@ function PMA_auth_check()
if (! file_exists($script_name)) {
PMA_fatalError(__('Can not find signon authentication script:') . ' ' . $script_name);
}
- require $script_name;
+ include $script_name;
list ($PHP_AUTH_USER, $PHP_AUTH_PW) = get_login_credentials($cfg['Server']['user']);
diff --git a/libraries/auth/swekey/swekey.auth.lib.php b/libraries/auth/swekey/swekey.auth.lib.php
index c748a53..f7299d1 100644
--- a/libraries/auth/swekey/swekey.auth.lib.php
+++ b/libraries/auth/swekey/swekey.auth.lib.php
@@ -69,7 +69,7 @@ function Swekey_auth_error()
if (! $_SESSION['SWEKEY']['ENABLED'])
return null;
- require_once './libraries/auth/swekey/authentication.inc.php';
+ include_once './libraries/auth/swekey/authentication.inc.php';
?>
<script>
@@ -115,7 +115,7 @@ function Swekey_auth_error()
if (count($_SESSION['SWEKEY']['VALID_SWEKEYS']) == 0)
return sprintf(__('File %s does not contain any key id'), $GLOBALS['cfg']['Server']['auth_swekey_config']);
- require_once "./libraries/auth/swekey/swekey.php";
+ include_once "./libraries/auth/swekey/swekey.php";
Swekey_SetCheckServer($_SESSION['SWEKEY']['CONF_SERVER_CHECK']);
Swekey_SetRndTokenServer($_SESSION['SWEKEY']['CONF_SERVER_RNDTOKEN']);
diff --git a/libraries/charset_conversion.lib.php b/libraries/charset_conversion.lib.php
index 8d19ad4..ecd71bc 100644
--- a/libraries/charset_conversion.lib.php
+++ b/libraries/charset_conversion.lib.php
@@ -51,7 +51,7 @@ if ($cfg['RecodingEngine'] == 'iconv') {
/* Load AIX iconv wrapper if needed */
if ($PMA_recoding_engine == PMA_CHARSET_ICONV_AIX) {
- require_once './libraries/iconv_wrapper.lib.php';
+ include_once './libraries/iconv_wrapper.lib.php';
}
/**
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 390325d..8c34bdb 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -124,17 +124,17 @@ if (!defined('PMA_MINIMUM_COMMON')) {
/**
* common functions
*/
- require_once './libraries/common.lib.php';
+ include_once './libraries/common.lib.php';
/**
* Java script escaping.
*/
- require_once './libraries/js_escape.lib.php';
+ include_once './libraries/js_escape.lib.php';
/**
* Include URL/hidden inputs generating.
*/
- require_once './libraries/url_generating.lib.php';
+ include_once './libraries/url_generating.lib.php';
}
/******************************************************************************/
@@ -265,7 +265,7 @@ if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
* include deprecated grab_globals only if required
*/
if (empty($__redirect) && !defined('PMA_NO_VARIABLES_IMPORT')) {
- require './libraries/grab_globals.lib.php';
+ include './libraries/grab_globals.lib.php';
}
/**
@@ -484,7 +484,7 @@ if (! PMA_isValid($_REQUEST['token']) || $_SESSION[' PMA_token '] != $_REQUEST['
/**
* Require cleanup functions
*/
- require './libraries/cleanup.lib.php';
+ include './libraries/cleanup.lib.php';
/**
* Do actual cleanup
*/
@@ -740,12 +740,12 @@ if (! defined('PMA_MINIMUM_COMMON')) {
/**
* Character set conversion.
*/
- require_once './libraries/charset_conversion.lib.php';
+ include_once './libraries/charset_conversion.lib.php';
/**
* String handling
*/
- require_once './libraries/string.lib.php';
+ include_once './libraries/string.lib.php';
/**
* Lookup server by name
@@ -793,7 +793,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
*/
if (function_exists('mb_convert_encoding')
&& $lang == 'ja') {
- require_once './libraries/kanji-encoding.lib.php';
+ include_once './libraries/kanji-encoding.lib.php';
} // end if
/**
@@ -810,9 +810,9 @@ if (! defined('PMA_MINIMUM_COMMON')) {
/**
* Loads the proper database interface for this server
*/
- require_once './libraries/database_interface.lib.php';
+ include_once './libraries/database_interface.lib.php';
- require_once './libraries/logging.lib.php';
+ include_once './libraries/logging.lib.php';
// get LoginCookieValidity from preferences cache
// no generic solution for loading preferences from cache as some settings need to be kept
@@ -837,7 +837,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
/**
* the required auth type plugin
*/
- require_once './libraries/auth/' . $cfg['Server']['auth_type'] . '.auth.lib.php';
+ include_once './libraries/auth/' . $cfg['Server']['auth_type'] . '.auth.lib.php';
if (!PMA_auth_check()) {
/* Force generating of new session on login */
PMA_secureSession();
@@ -857,7 +857,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
/**
* ip based access library
*/
- require_once './libraries/ip_allow_deny.lib.php';
+ include_once './libraries/ip_allow_deny.lib.php';
$allowDeny_forbidden = false; // default
if ($cfg['Server']['AllowDeny']['order'] == 'allow,deny') {
@@ -954,17 +954,17 @@ if (! defined('PMA_MINIMUM_COMMON')) {
/**
* SQL Parser code
*/
- require_once './libraries/sqlparser.lib.php';
+ include_once './libraries/sqlparser.lib.php';
/**
* SQL Validator interface code
*/
- require_once './libraries/sqlvalidator.lib.php';
+ include_once './libraries/sqlvalidator.lib.php';
/**
* the PMA_List_Database class
*/
- require_once './libraries/PMA.php';
+ include_once './libraries/PMA.php';
$pma = new PMA;
$pma->userlink = $userlink;
$pma->controllink = $controllink;
@@ -991,7 +991,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
// library file for blobstreaming
- require_once './libraries/blobstreaming.lib.php';
+ include_once './libraries/blobstreaming.li .php'; { w,deny') { '.auth.lib.php'; be kept key_config']); for ways to workaround this limit.')); ����* ή�* �ʯ�* `�'� � ��* P�'� �'� k���* 6 � �! �! ��'� `�'� x�ɯ�* P�'� ���* ����* ��'� `��* /�'� ��-��* u����* �-��* ش-��* ��-��* ����* x�ɯ�* P�'� �'� k���* �! �! ��'� `�'� H����* 0�'� ���* ����* ��'� `��* /�'� �'� �'� 8ή�* �p� `�'� u����* ����* 0�'� �'� k���* G H I J K M N O P ��'� `�'� HE���* ��'� ���* ����* ��'� 0�-��* u����* �ɯ�* �y]��* �-��* ش-��* ��-��* ����* HE���* ��'� �'� k���* 8E���* ��'� @�'� k���* (E���* ��'� p�'� k���* E���* ��'� ��'� k���* ��-��* u����* ��-��* �'� ��]��* e����* ش-��* @�'� y�]��* e����* �-��* p�'� Z�]��* e����* �t]��* �ɯ�* �y]��* �-��* ��ɯ�* ش-��* ��-��* ����* 8ή�* =)��* `�'� p]��* �'� ��'� k���* 5 6 7 8 : <