fixed E_STRICT
This commit is contained in:
@@ -527,16 +527,6 @@ class PMA_Config
|
||||
return $this->source;
|
||||
}
|
||||
|
||||
/**
|
||||
* old PHP 4 style constructor
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function PMA_Config($source = null)
|
||||
{
|
||||
$this->__construct($source);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns time of last config change.
|
||||
* @return int Unix timestamp
|
||||
@@ -788,7 +778,7 @@ class PMA_Config
|
||||
/**
|
||||
* @static
|
||||
*/
|
||||
function isHttps()
|
||||
static public function isHttps()
|
||||
{
|
||||
$is_https = false;
|
||||
|
||||
@@ -837,7 +827,7 @@ class PMA_Config
|
||||
/**
|
||||
* @static
|
||||
*/
|
||||
function getCookiePath()
|
||||
static public function getCookiePath()
|
||||
{
|
||||
static $cookie_path = null;
|
||||
|
||||
@@ -922,7 +912,7 @@ class PMA_Config
|
||||
* @param string $current_size current selected font size with unit
|
||||
* @return array selectable font sizes
|
||||
*/
|
||||
function getFontsizeOptions($current_size = '82%')
|
||||
static protected function _getFontsizeOptions($current_size = '82%')
|
||||
{
|
||||
$unit = preg_replace('/[0-9.]*/', '', $current_size);
|
||||
$value = preg_replace('/[^0-9.]*/', '', $current_size);
|
||||
@@ -980,16 +970,16 @@ class PMA_Config
|
||||
*
|
||||
* @uses $_SESSION['PMA_Config']
|
||||
* @uses PMA_Config::get()
|
||||
* @uses PMA_Config::getFontsizeOptions()
|
||||
* @uses PMA_Config::_getFontsizeOptions()
|
||||
* @uses $GLOBALS['strFontSize']
|
||||
* @static
|
||||
* @param string $current_size currently slected font size with unit
|
||||
* @return string html selectbox
|
||||
*/
|
||||
function getFontsizeSelection()
|
||||
static protected function _getFontsizeSelection()
|
||||
{
|
||||
$current_size = $_SESSION['PMA_Config']->get('fontsize');
|
||||
$options = PMA_Config::getFontsizeOptions($current_size);
|
||||
$options = PMA_Config::_getFontsizeOptions($current_size);
|
||||
|
||||
$return = '<label for="select_fontsize">' . $GLOBALS['strFontSize'] . ':</label>' . "\n";
|
||||
$return .= '<select name="fontsize" id="select_fontsize" onchange="this.form.submit();">' . "\n";
|
||||
@@ -1009,18 +999,18 @@ class PMA_Config
|
||||
* return complete font size selection form
|
||||
*
|
||||
* @uses PMA_generate_common_hidden_inputs()
|
||||
* @uses PMA_Config::getFontsizeSelection()
|
||||
* @uses PMA_Config::_getFontsizeSelection()
|
||||
* @uses $GLOBALS['strGo']
|
||||
* @static
|
||||
* @param string $current_size currently slected font size with unit
|
||||
* @return string html selectbox
|
||||
*/
|
||||
function getFontsizeForm()
|
||||
static public function getFontsizeForm()
|
||||
{
|
||||
return '<form name="form_fontsize_selection" id="form_fontsize_selection"'
|
||||
. ' method="post" action="index.php" target="_parent">' . "\n"
|
||||
. PMA_generate_common_hidden_inputs() . "\n"
|
||||
. PMA_Config::getFontsizeSelection() . "\n"
|
||||
. PMA_Config::_getFontsizeSelection() . "\n"
|
||||
. '<noscript>' . "\n"
|
||||
. '<input type="submit" value="' . $GLOBALS['strGo'] . '" />' . "\n"
|
||||
. '</noscript>' . "\n"
|
||||
|
@@ -69,18 +69,6 @@ class PMA_File
|
||||
*/
|
||||
var $_charset = null;
|
||||
|
||||
/**
|
||||
* old PHP 4 style constructor
|
||||
*
|
||||
* @see PMA_File::__construct()
|
||||
* @uses PMA_File::__construct()
|
||||
* @access public
|
||||
*/
|
||||
function PMA_File($name = false)
|
||||
{
|
||||
$this->__construct($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
|
@@ -68,15 +68,6 @@ require_once './libraries/List.class.php';
|
||||
$this->build();
|
||||
}
|
||||
|
||||
/**
|
||||
* old PHP 4 style constructor
|
||||
*
|
||||
* @see PMA_List_Database::__construct()
|
||||
*/
|
||||
function PMA_List_Database($db_link_user = null, $db_link_control = null) {
|
||||
$this->__construct($db_link_user, $db_link_control);
|
||||
}
|
||||
|
||||
/**
|
||||
* removes all databases not accessible by current user from list
|
||||
*
|
||||
|
@@ -78,17 +78,6 @@ class PMA_Sql
|
||||
*/
|
||||
var $_tokens = array();
|
||||
|
||||
/**
|
||||
* old PHP 4 style constructor
|
||||
* @deprecated
|
||||
* @access public
|
||||
* @see PMA_sql::__construct()
|
||||
*/
|
||||
function PMA_sql($sql)
|
||||
{
|
||||
$this->__construct($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
@@ -51,11 +51,11 @@ class PMA_StorageEngine
|
||||
* @staticvar array $storage_engines storage engines
|
||||
* @access public
|
||||
* @uses PMA_MYSQL_INT_VERSION
|
||||
* @uses PMA_StorageEngine::getStorageEnginesBefore40102()
|
||||
* @uses PMA_StorageEngine::_getStorageEnginesBefore40102()
|
||||
* @uses PMA_DBI_fetch_result()
|
||||
* @return array of storage engines
|
||||
*/
|
||||
function getStorageEngines()
|
||||
static public function getStorageEngines()
|
||||
{
|
||||
static $storage_engines = null;
|
||||
|
||||
@@ -67,7 +67,7 @@ class PMA_StorageEngine
|
||||
|
||||
// SHOW STORAGE ENGINES comes with MySQL 4.1.2
|
||||
if (PMA_MYSQL_INT_VERSION < 40102) {
|
||||
$storage_engines = PMA_StorageEngine::getStorageEnginesBefore40102();
|
||||
$storage_engines = PMA_StorageEngine::_getStorageEnginesBefore40102();
|
||||
} else {
|
||||
$storage_engines = PMA_DBI_fetch_result('SHOW STORAGE ENGINES', 'Engine');
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class PMA_StorageEngine
|
||||
* Should unavailable storage engines be offered?
|
||||
* @return string html selectbox
|
||||
*/
|
||||
function getHtmlSelect($name = 'engine', $id = null,
|
||||
static public function getHtmlSelect($name = 'engine', $id = null,
|
||||
$selected = null, $offerUnavailableEngines = false)
|
||||
{
|
||||
$selected = strtolower($selected);
|
||||
@@ -126,7 +126,7 @@ class PMA_StorageEngine
|
||||
* @uses substr()
|
||||
* @return array of storage engines
|
||||
*/
|
||||
function getStorageEnginesBefore40102()
|
||||
static protected function _getStorageEnginesBefore40102()
|
||||
{
|
||||
$storage_engines = array(
|
||||
'myisam' => array(
|
||||
@@ -181,7 +181,7 @@ class PMA_StorageEngine
|
||||
* @param string $engine The engine ID
|
||||
* @return object The engine plugin
|
||||
*/
|
||||
function getEngine($engine)
|
||||
static public function getEngine($engine)
|
||||
{
|
||||
$engine = str_replace('/', '', str_replace('.', '', $engine));
|
||||
$engine_lowercase_filename = strtolower($engine);
|
||||
@@ -203,7 +203,7 @@ class PMA_StorageEngine
|
||||
* @param string $engine name of engine
|
||||
* @reutrn boolean whether $engine is valid or not
|
||||
*/
|
||||
function isValid($engine)
|
||||
static public function isValid($engine)
|
||||
{
|
||||
$storage_engines = PMA_StorageEngine::getStorageEngines();
|
||||
return isset($storage_engines[$engine]);
|
||||
@@ -360,18 +360,6 @@ class PMA_StorageEngine
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* old PHP 4 style constructor
|
||||
* @deprecated
|
||||
* @see PMA_StorageEngine::__construct()
|
||||
* @uses PMA_StorageEngine::__construct()
|
||||
* @param string $engine engine name
|
||||
*/
|
||||
function PMA_StorageEngine($engine)
|
||||
{
|
||||
$this->__construct($engine);
|
||||
}
|
||||
|
||||
/**
|
||||
* public String getTitle()
|
||||
*
|
||||
|
@@ -137,7 +137,7 @@ class PMA_Table {
|
||||
return $this->getDbName($quoted) . '.' . $this->getName($quoted);
|
||||
}
|
||||
|
||||
function isView($db = null, $table = null)
|
||||
static public function isView($db = null, $table = null)
|
||||
{
|
||||
if (strlen($db) && strlen($table)) {
|
||||
return PMA_Table::_isView($db, $table);
|
||||
@@ -208,16 +208,6 @@ class PMA_Table {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* old PHP 4style constructor
|
||||
*
|
||||
* @see PMA_Table::__construct()
|
||||
*/
|
||||
function PMA_Table($table_name, $db_name)
|
||||
{
|
||||
$this->__construct($table_name, $db_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if this "table" is a view
|
||||
*
|
||||
@@ -230,7 +220,8 @@ class PMA_Table {
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function _isView($db, $table) {
|
||||
static protected function _isView($db, $table)
|
||||
{
|
||||
// maybe we already know if the table is a view
|
||||
if (isset($GLOBALS['tbl_is_view']) && $GLOBALS['tbl_is_view']) {
|
||||
return true;
|
||||
@@ -374,7 +365,7 @@ class PMA_Table {
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function countRecords($db, $table, $ret = false, $force_exact = false)
|
||||
static public function countRecords($db, $table, $ret = false, $force_exact = false)
|
||||
{
|
||||
$row_count = false;
|
||||
|
||||
|
@@ -110,7 +110,7 @@ class PMA_Theme {
|
||||
* @param string $folder path to theme
|
||||
* @return object PMA_Theme
|
||||
*/
|
||||
function load($folder)
|
||||
static public function load($folder)
|
||||
{
|
||||
$theme = new PMA_Theme();
|
||||
|
||||
|
@@ -212,14 +212,6 @@ class PMA_Theme_Manager
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* old PHP 4 constructor
|
||||
*/
|
||||
function PMA_Theme_Manager()
|
||||
{
|
||||
$this->__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param string $folder
|
||||
|
@@ -34,20 +34,6 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* For now, avoid warnings of E_STRICT mode
|
||||
* (this must be done before function definitions)
|
||||
*/
|
||||
if (defined('E_STRICT')) {
|
||||
$old_error_reporting = error_reporting(0);
|
||||
if ($old_error_reporting & E_STRICT) {
|
||||
error_reporting($old_error_reporting ^ E_STRICT);
|
||||
} else {
|
||||
error_reporting($old_error_reporting);
|
||||
}
|
||||
unset($old_error_reporting);
|
||||
}
|
||||
|
||||
// at this point PMA_PHP_INT_VERSION is not yet defined
|
||||
if (version_compare(phpversion(), '6', 'lt')) {
|
||||
/**
|
||||
@@ -238,6 +224,15 @@ if (empty($__redirect) && !defined('PMA_NO_VARIABLES_IMPORT')) {
|
||||
require './libraries/grab_globals.lib.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* check timezone setting
|
||||
* this could produce an E_STRICT - but only once,
|
||||
* if not done here it will produce E_STRICT on every date/time function
|
||||
*
|
||||
* @todo need to decide how we should handle this (without @)
|
||||
*/
|
||||
date_default_timezone_set(@date_default_timezone_get());
|
||||
|
||||
/**
|
||||
* include session handling after the globals, to prevent overwriting
|
||||
*/
|
||||
|
@@ -325,16 +325,13 @@ function PMA_DBI_fetch_row($result)
|
||||
*
|
||||
* @uses mysqli_result
|
||||
* @uses func_get_args()
|
||||
* @uses is_object()
|
||||
* @uses is_a()
|
||||
* @uses mysqli_free_result()
|
||||
* @param result $result,... one or more mysql result resources
|
||||
*/
|
||||
function PMA_DBI_free_result()
|
||||
{
|
||||
foreach (func_get_args() as $result) {
|
||||
if (is_object($result)
|
||||
&& is_a($result, 'mysqli_result')) {
|
||||
if ($result instanceof mysqli_result) {
|
||||
mysqli_free_result($result);
|
||||
}
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ if (isset($plugin_list)) {
|
||||
$plugin_list['sql']['options'][] =
|
||||
array('type' => 'bgroup', 'name' => 'structure', 'text' => 'strStructure', 'force' => 'data');
|
||||
if ($plugin_param['export_type'] == 'table') {
|
||||
if (PMA_Table::_isView($GLOBALS['db'], $GLOBALS['table'])) {
|
||||
if (PMA_Table::isView($GLOBALS['db'], $GLOBALS['table'])) {
|
||||
$drop_clause = 'DROP VIEW';
|
||||
} else {
|
||||
$drop_clause = 'DROP TABLE';
|
||||
@@ -444,7 +444,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false)
|
||||
$schema_create .= $new_crlf;
|
||||
|
||||
if (!empty($sql_drop_table)) {
|
||||
if (PMA_Table::_isView($db,$table)) {
|
||||
if (PMA_Table::isView($db,$table)) {
|
||||
$drop_clause = 'DROP VIEW';
|
||||
} else {
|
||||
$drop_clause = 'DROP TABLE';
|
||||
@@ -765,7 +765,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
|
||||
// Do not export data for a VIEW
|
||||
// (For a VIEW, this is called only when exporting a single VIEW)
|
||||
if (PMA_Table::_isView($db, $table)) {
|
||||
if (PMA_Table::isView($db, $table)) {
|
||||
$head = $crlf
|
||||
. PMA_exportComment()
|
||||
. PMA_exportComment('VIEW ' . ' ' . $formatted_table_name)
|
||||
|
@@ -165,7 +165,7 @@ if (!function_exists('class_exists') || !class_exists('SOAP_Client')) {
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function PMA_SQLValidator()
|
||||
function __construct()
|
||||
{
|
||||
$this->url = 'http://sqlvalidator.mimer.com/v1/services';
|
||||
$this->service_name = 'SQL99Validator';
|
||||
|
@@ -76,7 +76,7 @@ class PMA_PDF extends TCPDF {
|
||||
* @access public
|
||||
* @see FPDF::FPDF()
|
||||
*/
|
||||
function PMA_PDF($orientation = 'L', $unit = 'mm', $format = 'A4')
|
||||
function __construct($orientation = 'L', $unit = 'mm', $format = 'A4')
|
||||
{
|
||||
$this->Alias = array() ;
|
||||
$this->TCPDF($orientation, $unit, $format);
|
||||
@@ -617,7 +617,7 @@ class PMA_RT_Table {
|
||||
* @see PMA_PDF, PMA_RT_Table::PMA_RT_Table_setWidth,
|
||||
PMA_RT_Table::PMA_RT_Table_setHeight
|
||||
*/
|
||||
function PMA_RT_Table($table_name, $ff, &$same_wide_width)
|
||||
function __construct($table_name, $ff, &$same_wide_width)
|
||||
{
|
||||
global $pdf, $pdf_page_number, $cfgRelation, $db;
|
||||
|
||||
@@ -750,7 +750,7 @@ class PMA_RT_Relation {
|
||||
* @access private
|
||||
* @see PMA_RT_Relation::PMA_RT_Relation_getXy
|
||||
*/
|
||||
function PMA_RT_Relation($master_table, $master_field, $foreign_table, $foreign_field)
|
||||
function __construct($master_table, $master_field, $foreign_table, $foreign_field)
|
||||
{
|
||||
$src_pos = $this->PMA_RT_Relation_getXy($master_table, $master_field);
|
||||
$dest_pos = $this->PMA_RT_Relation_getXy($foreign_table, $foreign_field);
|
||||
@@ -959,7 +959,7 @@ class PMA_RT {
|
||||
* @access private
|
||||
* @see PMA_PDF
|
||||
*/
|
||||
function PMA_RT($which_rel, $show_info = 0, $change_color = 0, $show_grid = 0, $all_tab_same_wide = 0, $orientation = 'L', $paper = 'A4')
|
||||
function __construct($which_rel, $show_info = 0, $change_color = 0, $show_grid = 0, $all_tab_same_wide = 0, $orientation = 'L', $paper = 'A4')
|
||||
{
|
||||
global $pdf, $db, $cfgRelation, $with_doc;
|
||||
|
||||
|
@@ -208,9 +208,19 @@ if ($databases_count > 0) {
|
||||
echo ' </td>' . "\n";
|
||||
}
|
||||
echo ' <td class="name">' . "\n"
|
||||
. ' <a onclick="if (window.parent.openDb(\'' . urlencode($current['SCHEMA_NAME']) . '\')) return false;" href="index.php?' . $url_query . '&db=' . urlencode($current['SCHEMA_NAME']) . '" title="' . sprintf($strJumpToDB, htmlspecialchars($current['SCHEMA_NAME'])) . '" target="_parent">' . "\n"
|
||||
. ' <a onclick="'
|
||||
. 'if (window.parent.openDb(\'' . PMA_jsFormat($current['SCHEMA_NAME'], false) . '\')) return false;'
|
||||
. '" href="index.php?' . $url_query . '&db='
|
||||
. urlencode($current['SCHEMA_NAME']) . '" title="'
|
||||
. sprintf($strJumpToDB, htmlspecialchars($current['SCHEMA_NAME']))
|
||||
. '" target="_parent">' . "\n"
|
||||
. ' ' . htmlspecialchars($current['SCHEMA_NAME']) . "\n"
|
||||
. ' </a>' . "\n"
|
||||
. ' <a onclick="
|
||||
//<![CDATA[
|
||||
if (window.parent.openDb(\'' . PMA_jsFormat($current['SCHEMA_NAME'], false) . '\', true)) return false;
|
||||
//]]>
|
||||
">T</a>' . "\n"
|
||||
. ' </td>' . "\n";
|
||||
|
||||
foreach ($column_order as $stat_name => $stat) {
|
||||
@@ -242,8 +252,17 @@ if ($databases_count > 0) {
|
||||
|
||||
if ($is_superuser) {
|
||||
echo ' <td class="tool">' . "\n"
|
||||
. ' <a onclick="window.parent.setDb(\'' . urlencode($current['SCHEMA_NAME']) . '\');" href="./server_privileges.php?' . $url_query . '&checkprivs=' . urlencode($current['SCHEMA_NAME']) . '" title="' . sprintf($strCheckPrivsLong, htmlspecialchars($current['SCHEMA_NAME'])) . '">'. "\n"
|
||||
. ' ' .($cfg['PropertiesIconic'] ? '<img class="icon" src="' . $pmaThemeImage . 's_rights.png" width="16" height="16" alt=" ' .$strCheckPrivs . '" /> ' : $strCheckPrivs). "\n"
|
||||
. ' <a onclick="
|
||||
// <![CDATA[
|
||||
window.parent.setDb(\'' . PMA_jsFormat($current['SCHEMA_NAME']) . '\');
|
||||
// ]]>" href="./server_privileges.php?' . $url_query
|
||||
. '&checkprivs=' . urlencode($current['SCHEMA_NAME'])
|
||||
. '" title="' . sprintf($strCheckPrivsLong, htmlspecialchars($current['SCHEMA_NAME']))
|
||||
. '">'. "\n"
|
||||
. ' '
|
||||
. ($cfg['PropertiesIconic']
|
||||
? '<img class="icon" src="' . $pmaThemeImage . 's_rights.png" width="16" height="16" alt=" ' . $strCheckPrivs . '" /> '
|
||||
: $strCheckPrivs) . "\n"
|
||||
. ' </a></td>' . "\n";
|
||||
}
|
||||
echo '</tr>' . "\n";
|
||||
|
Reference in New Issue
Block a user