Merge branch 'master' of github.com:phpmyadmin/phpmyadmin

This commit is contained in:
Atul Pratap Singh 2012-10-28 22:23:08 +05:30
commit 0026d89bf2
53 changed files with 297 additions and 206 deletions

View File

@ -45,10 +45,8 @@ if ($cfgRelation['commwork']) {
* Displays DB comment
*/
if ($comment) {
?>
<p> <?php echo __('Database comment: '); ?>
<i><?php echo htmlspecialchars($comment); ?></i></p>
<?php
echo '<p>' . __('Database comment: ')
. '<i>' . htmlspecialchars($comment) . '</i></p>';
} // end if
}

View File

@ -448,14 +448,14 @@ function ADVISOR_bytime($num, $precision)
$per = '';
if ($num >= 1) { // per second
$per = __('per second');
} elseif ($num*60 >= 1) { // per minute
$num = $num*60;
} elseif ($num * 60 >= 1) { // per minute
$num = $num * 60;
$per = __('per minute');
} elseif ($num*60*60 >=1 ) { // per hour
$num = $num*60*60;
} elseif ($num * 60 * 60 >= 1 ) { // per hour
$num = $num * 60 * 60;
$per = __('per hour');
} else {
$num = $num*60*60*24;
$num = $num * 60 * 60 * 24;
$per = __('per day');
}

View File

@ -692,9 +692,9 @@ class PMA_Config
) {
// load required libraries
include_once './libraries/user_preferences.lib.php';
$prefs = PMA_load_userprefs();
$prefs = PMA_loadUserprefs();
$_SESSION['cache'][$cache_key]['userprefs']
= PMA_apply_userprefs($prefs['config_data']);
= PMA_applyUserprefs($prefs['config_data']);
$_SESSION['cache'][$cache_key]['userprefs_mtime'] = $prefs['mtime'];
$_SESSION['cache'][$cache_key]['userprefs_type'] = $prefs['type'];
$_SESSION['cache'][$cache_key]['config_mtime'] = $config_mtime;
@ -834,7 +834,7 @@ class PMA_Config
if ($default_value === null) {
$default_value = PMA_arrayRead($cfg_path, $this->default);
}
PMA_persist_option($cfg_path, $new_cfg_value, $default_value);
PMA_persistOption($cfg_path, $new_cfg_value, $default_value);
}
if ($prefs_type != 'db' && $cookie_name) {
// fall back to cookies

View File

@ -81,7 +81,7 @@ class PMA_File
*
* @access public
*/
function __construct($name = false)
public function __construct($name = false)
{
if ($name) {
$this->setName($name);
@ -94,7 +94,7 @@ class PMA_File
* @see PMA_File::cleanUp()
* @access public
*/
function __destruct()
public function __destruct()
{
$this->cleanUp();
}
@ -105,7 +105,7 @@ class PMA_File
* @access public
* @return boolean success
*/
function cleanUp()
public function cleanUp()
{
if ($this->isTemp()) {
return $this->delete();
@ -120,7 +120,7 @@ class PMA_File
* @access public
* @return boolean success
*/
function delete()
public function delete()
{
return unlink($this->getName());
}
@ -134,7 +134,7 @@ class PMA_File
* @return boolean PMA_File::$_is_temp
* @access public
*/
function isTemp($is_temp = null)
public function isTemp($is_temp = null)
{
if (null !== $is_temp) {
$this->_is_temp = (bool) $is_temp;
@ -151,7 +151,7 @@ class PMA_File
* @return void
* @access public
*/
function setName($name)
public function setName($name)
{
$this->_name = trim($name);
}
@ -168,7 +168,7 @@ class PMA_File
*
* @access public
*/
function getContent($as_binary = true, $offset = 0, $length = null)
public function getContent($as_binary = true, $offset = 0, $length = null)
{
if (null === $this->_content) {
if ($this->isUploaded() && ! $this->checkUploadedFile()) {
@ -206,7 +206,7 @@ class PMA_File
*
* @return bool
*/
function isUploaded()
public function isUploaded()
{
return is_uploaded_file($this->getName());
}
@ -217,7 +217,7 @@ class PMA_File
* @access public
* @return string PMA_File::$_name
*/
function getName()
public function getName()
{
return $this->_name;
}
@ -230,7 +230,7 @@ class PMA_File
* @return boolean success
* @access public
*/
function setUploadedFile($name)
public function setUploadedFile($name)
{
$this->setName($name);
@ -252,7 +252,7 @@ class PMA_File
* @return boolean success
* @access public
*/
function setUploadedFromTblChangeRequest($key, $rownumber)
public function setUploadedFromTblChangeRequest($key, $rownumber)
{
if (! isset($_FILES['fields_upload'])
|| empty($_FILES['fields_upload']['name']['multi_edit'][$rownumber][$key])
@ -327,7 +327,7 @@ class PMA_File
* @access public
* @static
*/
function fetchUploadedFromTblChangeRequestMultiple($file, $rownumber, $key)
public function fetchUploadedFromTblChangeRequestMultiple($file, $rownumber, $key)
{
$new_file = array(
'name' => $file['name']['multi_edit'][$rownumber][$key],
@ -349,7 +349,7 @@ class PMA_File
* @return boolean success
* @access public
*/
function setSelectedFromTblChangeRequest($key, $rownumber = null)
public function setSelectedFromTblChangeRequest($key, $rownumber = null)
{
if (! empty($_REQUEST['fields_uploadlocal']['multi_edit'][$rownumber][$key])
&& is_string($_REQUEST['fields_uploadlocal']['multi_edit'][$rownumber][$key])
@ -369,7 +369,7 @@ class PMA_File
* @access public
* @return string error message
*/
function getError()
public function getError()
{
return $this->_error_message;
}
@ -380,7 +380,7 @@ class PMA_File
* @access public
* @return boolean whether an error occured or not
*/
function isError()
public function isError()
{
return ! empty($this->_error_message);
}
@ -395,7 +395,7 @@ class PMA_File
* @return boolean success
* @access public
*/
function checkTblChangeForm($key, $rownumber)
public function checkTblChangeForm($key, $rownumber)
{
if ($this->setUploadedFromTblChangeRequest($key, $rownumber)) {
// well done ...
@ -419,7 +419,7 @@ class PMA_File
* @return boolean success
* @access public
*/
function setLocalSelectedFile($name)
public function setLocalSelectedFile($name)
{
if (empty($GLOBALS['cfg']['UploadDir'])) {
return false;
@ -443,7 +443,7 @@ class PMA_File
* @access public
* @return boolean whether the file is readable or not
*/
function isReadable()
public function isReadable()
{
// suppress warnings from being displayed, but not from being logged
// any file access outside of open_basedir will issue a warning
@ -462,7 +462,7 @@ class PMA_File
* @access public
* @return boolean whether uploaded fiel is fine or not
*/
function checkUploadedFile()
public function checkUploadedFile()
{
if ($this->isReadable()) {
return true;
@ -513,7 +513,7 @@ class PMA_File
* @access protected
* @return string MIME type of compression, none for none
*/
function _detectCompression()
protected function detectCompression()
{
// suppress warnings from being displayed, but not from being logged
// f.e. any file access outside of open_basedir will issue a warning
@ -562,7 +562,7 @@ class PMA_File
*
* @return void
*/
function setDecompressContent($decompress)
public function setDecompressContent($decompress)
{
$this->_decompress = (bool) $decompress;
}
@ -572,7 +572,7 @@ class PMA_File
*
* @return object file handle
*/
function getHandle()
public function getHandle()
{
if (null === $this->_handle) {
$this->open();
@ -587,7 +587,7 @@ class PMA_File
*
* @return void
*/
function setHandle($handle)
public function setHandle($handle)
{
$this->_handle = $handle;
}
@ -598,7 +598,7 @@ class PMA_File
*
* @return void
*/
function errorUnsupported()
public function errorUnsupported()
{
$this->_error_message = sprintf(
__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'),
@ -611,7 +611,7 @@ class PMA_File
*
* @return bool
*/
function open()
public function open()
{
if (! $this->_decompress) {
$this->_handle = @fopen($this->getName(), 'r');
@ -669,7 +669,7 @@ class PMA_File
*
* @return string character set of the file
*/
function getCharset()
public function getCharset()
{
return $this->_charset;
}
@ -681,7 +681,7 @@ class PMA_File
*
* @return void
*/
function setCharset($charset)
public function setCharset($charset)
{
$this->_charset = $charset;
}
@ -692,10 +692,10 @@ class PMA_File
* @return string MIME type of compression, none for none
* @access public
*/
function getCompression()
public function getCompression()
{
if (null === $this->_compression) {
return $this->_detectCompression();
return $this->detectCompression();
}
return $this->_compression;
@ -709,7 +709,7 @@ class PMA_File
* @return boolean
* @todo this function is unused
*/
function advanceFilePointer($length)
public function advanceFilePointer($length)
{
while ($length > 0) {
$this->getNextChunk($length);
@ -726,7 +726,7 @@ class PMA_File
* @return bool|string
* @todo this function is unused
*/
function getNextChunk($max_size = null)
public function getNextChunk($max_size = null)
{
if (null !== $max_size) {
$size = min($max_size, $this->getChunkSize());
@ -808,7 +808,7 @@ class PMA_File
*
* @return integer the offset
*/
function getOffset()
public function getOffset()
{
return $this->_offset;
}
@ -818,7 +818,7 @@ class PMA_File
*
* @return integer the chunk size
*/
function getChunkSize()
public function getChunkSize()
{
return $this->_chunk_size;
}
@ -830,7 +830,7 @@ class PMA_File
*
* @return void
*/
function setChunkSize($chunk_size)
public function setChunkSize($chunk_size)
{
$this->_chunk_size = (int) $chunk_size;
}
@ -840,7 +840,7 @@ class PMA_File
*
* @return integer the length of the file content
*/
function getContentLength()
public function getContentLength()
{
return strlen($this->_content);
}
@ -850,7 +850,7 @@ class PMA_File
*
* @return boolean whether the end of the file has been reached
*/
function eof()
public function eof()
{
if ($this->getHandle()) {
return feof($this->getHandle());

View File

@ -29,7 +29,16 @@ class PMA_PDF extends TCPDF
/**
* Constructs PDF and configures standard parameters.
*
* @param string $orientation page orientation
* @param string $unit unit
* @param mixed $format the format used for pages
* @param boolean $unicode true means that the input text is unicode
* @param string $encoding charset encoding; default is UTF-8.
* @param boolean $diskcache if true reduce the RAM memory usage by caching
* temporary data on filesystem (slower).
*
* @return void
* @access public
*/
public function __construct($orientation = 'P', $unit = 'mm', $format = 'A4',
$unicode = true, $encoding = 'UTF-8', $diskcache = false
@ -65,6 +74,11 @@ class PMA_PDF extends TCPDF
/**
* Function to set alias which will be expanded on page rendering.
*
* @param string $name name of the alias
* @param string $value value of the alias
*
* @return void
*/
function SetAlias($name, $value)
{
@ -73,6 +87,8 @@ class PMA_PDF extends TCPDF
/**
* Improved with alias expading.
*
* @return void
*/
function _putpages()
{
@ -89,15 +105,23 @@ class PMA_PDF extends TCPDF
* Displays an error message
*
* @param string $error_message the error mesage
*
* @return void
*/
function Error($error_message = '')
{
PMA_Message::error(__('Error while creating PDF:') . ' ' . $error_message)->display();
PMA_Message::error(
__('Error while creating PDF:') . ' ' . $error_message
)->display();
exit;
}
/**
* Sends file as a download to user.
*
* @param string $filename file name
*
* @return void
*/
function Download($filename)
{

View File

@ -26,7 +26,7 @@ class PMA_RecentTable
* @access private
* @var string
*/
private $_pma_table;
private $_pmaTable;
/**
* Reference to session variable containing recently used tables.
@ -48,14 +48,14 @@ class PMA_RecentTable
if (strlen($GLOBALS['cfg']['Server']['pmadb'])
&& strlen($GLOBALS['cfg']['Server']['recent'])
) {
$this->_pma_table
$this->_pmaTable
= PMA_Util::backquote($GLOBALS['cfg']['Server']['pmadb']) . "."
. PMA_Util::backquote($GLOBALS['cfg']['Server']['recent']);
}
$server_id = $GLOBALS['server'];
if (! isset($_SESSION['tmp_user_values']['recent_tables'][$server_id])) {
$_SESSION['tmp_user_values']['recent_tables'][$server_id]
= isset($this->_pma_table) ? $this->getFromDb() : array();
= isset($this->_pmaTable) ? $this->getFromDb() : array();
}
$this->tables =& $_SESSION['tmp_user_values']['recent_tables'][$server_id];
}
@ -82,7 +82,7 @@ class PMA_RecentTable
{
// Read from phpMyAdmin database, if recent tables is not in session
$sql_query
= " SELECT `tables` FROM " . $this->_pma_table .
= " SELECT `tables` FROM " . $this->_pmaTable .
" WHERE `username` = '" . $GLOBALS['cfg']['Server']['user'] . "'";
$row = PMA_DBI_fetch_array(PMA_queryAsControlUser($sql_query));
@ -102,7 +102,7 @@ class PMA_RecentTable
{
$username = $GLOBALS['cfg']['Server']['user'];
$sql_query
= " REPLACE INTO " . $this->_pma_table . " (`username`, `tables`)" .
= " REPLACE INTO " . $this->_pmaTable . " (`username`, `tables`)" .
" VALUES ('" . $username . "', '"
. PMA_Util::sqlAddSlashes(
json_encode($this->tables)
@ -144,7 +144,7 @@ class PMA_RecentTable
public function getHtmlSelectOption()
{
// trim and save, in case where the configuration is changed
if ($this->trim() && isset($this->_pma_table)) {
if ($this->trim() && isset($this->_pmaTable)) {
$this->saveToDb();
}
@ -201,7 +201,7 @@ class PMA_RecentTable
array_unshift($this->tables, $table_arr);
$this->tables = array_merge(array_unique($this->tables, SORT_REGULAR));
$this->trim();
if (isset($this->_pma_table)) {
if (isset($this->_pmaTable)) {
return $this->saveToDb();
}
}

View File

@ -45,46 +45,46 @@ class FormDisplay
* Paths changed so that they can be used as HTML ids, indexed by paths
* @var array
*/
private $_translated_paths = array();
private $_translatedPaths = array();
/**
* Server paths change indexes so we define maps from current server
* path to the first one, indexed by work path
* @var array
*/
private $_system_paths = array();
private $_systemPaths = array();
/**
* Language strings which will be sent to PMA_messages JS variable
* Will be looked up in $GLOBALS: str{value} or strSetup{value}
* @var array
*/
private $_js_lang_strings = array();
private $_jsLangStrings = array();
/**
* Tells whether forms have been validated
* @var bool
*/
private $_is_validated = true;
private $_isValidated = true;
/**
* Dictionary with user preferences keys
* @var array
*/
private $_userprefs_keys;
private $_userprefsKeys;
/**
* Dictionary with disallowed user preferences keys
* @var array
*/
private $_userprefs_disallow;
private $_userprefsDisallow;
/**
* Constructor
*/
public function __construct()
{
$this->_js_lang_strings = array(
$this->_jsLangStrings = array(
'error_nan_p' => __('Not a positive number'),
'error_nan_nneg' => __('Not a non-negative number'),
'error_incorrect_port' => __('Not a valid port number'),
@ -106,13 +106,13 @@ class FormDisplay
public function registerForm($form_name, array $form, $server_id = null)
{
$this->_forms[$form_name] = new Form($form_name, $form, $server_id);
$this->_is_validated = false;
$this->_isValidated = false;
foreach ($this->_forms[$form_name]->fields as $path) {
$work_path = $server_id === null
? $path
: str_replace('Servers/1/', "Servers/$server_id/", $path);
$this->_system_paths[$work_path] = $path;
$this->_translated_paths[$work_path] = str_replace('/', '-', $work_path);
$this->_systemPaths[$work_path] = $path;
$this->_translatedPaths[$work_path] = str_replace('/', '-', $work_path);
}
}
@ -145,7 +145,7 @@ class FormDisplay
*/
private function _validate()
{
if ($this->_is_validated) {
if ($this->_isValidated) {
return;
}
@ -157,7 +157,7 @@ class FormDisplay
$paths[] = $form->name;
// collect values and paths
foreach ($form->fields as $path) {
$work_path = array_search($path, $this->_system_paths);
$work_path = array_search($path, $this->_systemPaths);
$values[$path] = $cf->getValue($work_path);
$paths[] = $path;
}
@ -170,7 +170,7 @@ class FormDisplay
if (is_array($errors) && count($errors) > 0) {
$this->_errors = array();
foreach ($errors as $path => $error_list) {
$work_path = array_search($path, $this->_system_paths);
$work_path = array_search($path, $this->_systemPaths);
// field error
if (!$work_path) {
// form error, fix path
@ -179,7 +179,7 @@ class FormDisplay
$this->_errors[$work_path] = $error_list;
}
}
$this->_is_validated = true;
$this->_isValidated = true;
}
/**
@ -242,12 +242,12 @@ class FormDisplay
);
foreach ($form->fields as $field => $path) {
$work_path = array_search($path, $this->_system_paths);
$translated_path = $this->_translated_paths[$work_path];
$work_path = array_search($path, $this->_systemPaths);
$translated_path = $this->_translatedPaths[$work_path];
// always true/false for user preferences display
// otherwise null
$userprefs_allow = isset($this->_userprefs_keys[$path])
? !isset($this->_userprefs_disallow[$path])
$userprefs_allow = isset($this->_userprefsKeys[$path])
? !isset($this->_userprefsDisallow[$path])
: null;
// display input
$this->_displayFieldInput(
@ -277,7 +277,7 @@ class FormDisplay
if (!$js_lang_sent) {
$js_lang_sent = true;
$js_lang = array();
foreach ($this->_js_lang_strings as $strName => $strValue) {
foreach ($this->_jsLangStrings as $strName => $strValue) {
$js_lang[] = "'$strName': '" . PMA_jsFormat($strValue, false) . '\'';
}
$js[] = "$.extend(PMA_messages, {\n\t" . implode(",\n\t", $js_lang) . '})';
@ -424,8 +424,8 @@ class FormDisplay
}
foreach ($this->_errors as $system_path => $error_list) {
if (isset($this->_system_paths[$system_path])) {
$path = $this->_system_paths[$system_path];
if (isset($this->_systemPaths[$system_path])) {
$path = $this->_systemPaths[$system_path];
$name = PMA_lang_name($path);
} else {
$name = $GLOBALS["strConfigForm_$system_path"];
@ -448,10 +448,10 @@ class FormDisplay
$cf = ConfigFile::getInstance();
foreach (array_keys($this->_errors) as $work_path) {
if (!isset($this->_system_paths[$work_path])) {
if (!isset($this->_systemPaths[$work_path])) {
continue;
}
$canonical_path = $this->_system_paths[$work_path];
$canonical_path = $this->_systemPaths[$work_path];
$cf->set($work_path, $cf->getDefault($canonical_path));
}
}
@ -522,8 +522,8 @@ class FormDisplay
: false;
// grab POST values
foreach ($form->fields as $field => $system_path) {
$work_path = array_search($system_path, $this->_system_paths);
$key = $this->_translated_paths[$work_path];
$work_path = array_search($system_path, $this->_systemPaths);
$key = $this->_translatedPaths[$work_path];
$type = $form->getOptionType($field);
// skip groups
@ -548,14 +548,14 @@ class FormDisplay
// user preferences allow/disallow
if ($is_setup_script
&& isset($this->_userprefs_keys[$system_path])
&& isset($this->_userprefsKeys[$system_path])
) {
if (isset($this->_userprefs_disallow[$system_path])
if (isset($this->_userprefsDisallow[$system_path])
&& isset($_POST[$key . '-userprefs-allow'])
) {
unset($this->_userprefs_disallow[$system_path]);
unset($this->_userprefsDisallow[$system_path]);
} else if (!isset($_POST[$key . '-userprefs-allow'])) {
$this->_userprefs_disallow[$system_path] = true;
$this->_userprefsDisallow[$system_path] = true;
}
}
@ -649,7 +649,7 @@ class FormDisplay
if ($is_setup_script) {
$cf->set(
'UserprefsDisallow',
array_keys($this->_userprefs_disallow)
array_keys($this->_userprefsDisallow)
);
}
}
@ -735,13 +735,13 @@ class FormDisplay
*/
private function _loadUserprefsInfo()
{
if ($this->_userprefs_keys === null) {
$this->_userprefs_keys = array_flip(PMA_read_userprefs_fieldnames());
if ($this->_userprefsKeys === null) {
$this->_userprefsKeys = array_flip(PMA_readUserprefsFieldNames());
// read real config for user preferences display
$userprefs_disallow = defined('PMA_SETUP')
? ConfigFile::getInstance()->get('UserprefsDisallow', array())
: $GLOBALS['cfg']['UserprefsDisallow'];
$this->_userprefs_disallow = array_flip($userprefs_disallow);
$this->_userprefsDisallow = array_flip($userprefs_disallow);
}
}

View File

@ -18,7 +18,8 @@ require_once 'libraries/plugins/export/TableProperty.class.php';
/**
* Handles the export for the CodeGen class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage CodeGen
*/
class ExportCodegen extends ExportPlugin
{
@ -242,7 +243,7 @@ class ExportCodegen extends ExportPlugin
private function _handleNHibernateCSBody($db, $table, $crlf)
{
$lines = array();
$result = PMA_DBI_query(
sprintf(
'DESC %s.%s', PMA_Util::backquote($db),

View File

@ -16,8 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the CSV format
*
* @todo add descriptions for all vars/methods
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage CSV
*/
class ExportCsv extends ExportPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/export/ExportCsv.class.php';
/**
* Handles the export for the CSV-Excel format
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage CSV-Excel
*/
class ExportExcel extends ExportCsv
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the HTML-Word format
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage HTML-Word
*/
class ExportHtmlword extends ExportPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the JSON format
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage JSON
*/
class ExportJson extends ExportPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the Latex format
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage Latex
*/
class ExportLatex extends ExportPlugin
{
@ -441,7 +442,7 @@ class ExportLatex extends ExportPlugin
$dates = false
) {
global $cfgRelation;
/**
* Get the unique keys in the table
*/

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the MediaWiki class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage MediaWiki
*/
class ExportMediawiki extends ExportPlugin
{

View File

@ -19,7 +19,8 @@ require_once 'libraries/opendocument.lib.php';
/**
* Handles the export for the ODS class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage ODS
*/
class ExportOds extends ExportPlugin
{

View File

@ -4,7 +4,7 @@
* Set of functions used to build OpenDocument Text dumps of tables
*
* @package PhpMyAdmin-Export
* @subpackage ODS
* @subpackage ODT
*/
if (! defined('PHPMYADMIN')) {
exit;
@ -19,7 +19,8 @@ require_once 'libraries/opendocument.lib.php';
/**
* Handles the export for the ODT class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage ODT
*/
class ExportOdt extends ExportPlugin
{

View File

@ -18,7 +18,8 @@ require_once 'libraries/plugins/export/PMA_ExportPdf.class.php';
/**
* Handles the export for the PDF class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage PDF
*/
class ExportPdf extends ExportPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the PHP Array class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage PHP
*/
class ExportPhparray extends ExportPlugin
{

View File

@ -16,8 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the SQL class
*
* @todo add descriptions for all vars/methods
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage SQL
*/
class ExportSql extends ExportPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the Texy! text class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage Texy!text
*/
class ExportTexytext extends ExportPlugin
{

View File

@ -19,7 +19,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the XML class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage XML
*/
class ExportXml extends ExportPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ExportPlugin.class.php';
/**
* Handles the export for the YAML format
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage YAML
*/
class ExportYaml extends ExportPlugin
{

View File

@ -24,6 +24,16 @@ class PMA_ExportPdf extends PMA_PDF
var $tablewidths;
var $headerset;
/**
* Add page if needed.
*
* @param float $h cell height. Default value: 0
* @param mixed $y starting y position, leave empty for current position
* @param boolean $addpage if true add a page, otherwise only return
* the true/false state
*
* @return boolean true in case of page break, false otherwise.
*/
function checkPageBreak($h = 0, $y = '', $addpage = true)
{
if ($this->empty_string($y)) {
@ -68,6 +78,11 @@ class PMA_ExportPdf extends PMA_PDF
return false;
}
/**
* This method is used to render the page header.
*
* @return void
*/
function Header()
{
global $maxY;
@ -139,7 +154,7 @@ class PMA_ExportPdf extends PMA_PDF
$this->dataY = $maxY;
}
function morepagestable($lineheight=8)
function morepagestable($lineheight = 8)
{
// some things to set and 'remember'
$l = $this->lMargin;
@ -217,6 +232,13 @@ class PMA_ExportPdf extends PMA_PDF
$this->page = $maxpage;
}
/**
* Sets a set of attributes.
*
* @param array $attr array containing the attributes
*
* @return void
*/
function setAttributes($attr = array())
{
foreach ($attr as $key => $val) {
@ -224,6 +246,14 @@ class PMA_ExportPdf extends PMA_PDF
}
}
/**
* Defines the top margin.
* The method can be called before creating the first page.
*
* @param float $topMargin the margin
*
* @return void
*/
function setTopMargin($topMargin)
{
$this->tMargin = $topMargin;

View File

@ -1,7 +1,7 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* TableProperty class
* Holds the TableProperty class
*
* @package PhpMyAdmin-Export
* @subpackage CodeGen
@ -11,9 +11,10 @@ if (! defined('PHPMYADMIN')) {
}
/**
* Holds the TableProperty class
* TableProperty class
*
* @package PhpMyAdmin-Export
* @package PhpMyAdmin-Export
* @subpackage CodeGen
*/
class TableProperty
{
@ -30,31 +31,31 @@ class TableProperty
* @var string
*/
public $type;
/**
* Wheter the key is nullable or not
*
* @var bool
*/
public $nullable;
/**
* The key
*
* @var int
*
* @var int
*/
public $key;
/**
* Default value
*
*
* @var mixed
*/
public $defaultValue;
/**
* Extension
*
*
* @var string
*/
public $ext;
@ -62,8 +63,8 @@ class TableProperty
/**
* Constructor
*
* @param array $row table row
*
* @param array $row table row
*
* @return void
*/
function __construct($row)
@ -78,7 +79,7 @@ class TableProperty
/**
* Gets the pure type
*
*
* @return string type
*/
function getPureType()
@ -90,9 +91,9 @@ class TableProperty
return $this->type;
}
/**
/**
* Tells whether the key is null or not
*
*
* @return bool true if the key is not null, false otherwise
*/
function isNotNull()
@ -100,9 +101,9 @@ class TableProperty
return $this->nullable == "NO" ? "true" : "false";
}
/**
/**
* Tells whether the key is unique or not
*
*
* @return bool true if the key is unique, false otherwise
*/
function isUnique()
@ -112,7 +113,7 @@ class TableProperty
/**
* Gets the .NET primitive type
*
*
* @return string type
*/
function getDotNetPrimitiveType()
@ -146,7 +147,7 @@ class TableProperty
/**
* Gets the .NET object type
*
*
* @return string type
*/
function getDotNetObjectType()
@ -195,7 +196,7 @@ class TableProperty
/**
* Tells whether the key is primary or not
*
*
* @return bool true if the key is primary, false otherwise
*/
function isPK()
@ -205,7 +206,7 @@ class TableProperty
/**
* Formats a string for C#
*
*
* @param string $text string to be formatted
*
* @return string formatted text
@ -222,7 +223,7 @@ class TableProperty
/**
* Formats a string for XML
*
*
* @param string $text string to be formatted
*
* @return string formatted text
@ -244,7 +245,7 @@ class TableProperty
/**
* Formats a string
*
*
* @param string $text string to be formatted
*
* @return string formatted text

View File

@ -17,7 +17,8 @@ require_once 'libraries/plugins/ImportPlugin.class.php';
/**
* Handles the import for the CSV format
*
* @package PhpMyAdmin-Import
* @package PhpMyAdmin-Import
* @subpackage CSV
*/
class ImportCsv extends ImportPlugin
{

View File

@ -22,7 +22,8 @@ if ($GLOBALS['plugin_param'] !== 'table') {
/**
* Handles the import for the CSV format using load data
*
* @package PhpMyAdmin-Import
* @package PhpMyAdmin-Import
* @subpackage LDI
*/
class ImportLdi extends ImportPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ImportPlugin.class.php';
/**
* Handles the import for the MediaWiki format
*
* @package PhpMyAdmin-Import
* @package PhpMyAdmin-Import
* @subpackage MediaWiki
*/
class ImportMediawiki extends ImportPlugin
{

View File

@ -25,7 +25,8 @@ require_once 'libraries/plugins/ImportPlugin.class.php';
/**
* Handles the import for the ODS format
*
* @package PhpMyAdmin-Import
* @package PhpMyAdmin-Import
* @subpackage ODS
*/
class ImportOds extends ImportPlugin
{

View File

@ -25,7 +25,8 @@ require_once 'libraries/plugins/import/ShapeRecord.class.php';
/**
* Handles the import for ESRI Shape files
*
* @package PhpMyAdmin-Import
* @package PhpMyAdmin-Import
* @subpackage ESRI_Shape
*/
class ImportShp extends ImportPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/ImportPlugin.class.php';
/**
* Handles the import for the SQL format
*
* @package PhpMyAdmin-Import
* @package PhpMyAdmin-Import
* @subpackage SQL
*/
class ImportSql extends ImportPlugin
{

View File

@ -25,7 +25,8 @@ require_once 'libraries/plugins/ImportPlugin.class.php';
/**
* Handles the import for the XML format
*
* @package PhpMyAdmin-Import
* @package PhpMyAdmin-Import
* @subpackage XML
*/
class ImportXml extends ImportPlugin
{

View File

@ -15,7 +15,8 @@ require_once 'abstract/DownloadTransformationsPlugin.class.php';
/**
* Handles the download transformation for application octetstream
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Download
*/
class Application_Octetstream_Download extends DownloadTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/HexTransformationsPlugin.class.php';
/**
* Handles the hex transformation for application octetstream
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Hex
*/
class Application_Octetstream_Hex extends HexTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/InlineTransformationsPlugin.class.php';
/**
* Handles the inline transformation for image jpeg
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Inline
*/
class Image_JPEG_Inline extends InlineTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/ImageLinkTransformationsPlugin.class.php';
/**
* Handles the link transformation for image jpeg
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Link
*/
class Image_JPEG_Link extends ImageLinkTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/InlineTransformationsPlugin.class.php';
/**
* Handles the inline transformation for image png
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Inline
*/
class Image_PNG_Inline extends InlineTransformationsPlugin
{

View File

@ -17,7 +17,8 @@ require_once 'abstract/AppendTransformationsPlugin.class.php';
* Handles the append transformation for text plain.
* Has one option: the text to be appended (default '')
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Append
*/
class Text_Plain_Append extends AppendTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/DateFormatTransformationsPlugin.class.php';
/**
* Handles the date format transformation for text plain
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage DateFormat
*/
class Text_Plain_Dateformat extends DateFormatTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/ExternalTransformationsPlugin.class.php';
/**
* Handles the external transformation for text plain
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage External
*/
class Text_Plain_External extends ExternalTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/FormattedTransformationsPlugin.class.php';
/**
* Handles the formatted transformation for text plain
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Formatted
*/
class Text_Plain_Formatted extends FormattedTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/TextImageLinkTransformationsPlugin.class.php';
/**
* Handles the image link transformation for text plain
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage ImageLink
*/
class Text_Plain_Imagelink extends TextImageLinkTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/TextLinkTransformationsPlugin.class.php';
/**
* Handles the link transformation for text plain
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Link
*/
class Text_Plain_Link extends TextLinkTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/LongToIPv4TransformationsPlugin.class.php';
/**
* Handles the long to ipv4 transformation for text plain
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage LongToIPv4
*/
class Text_Plain_Longtoipv4 extends LongToIPv4TransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/SQLTransformationsPlugin.class.php';
/**
* Handles the sql transformation for text plain
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage SQL
*/
class Text_Plain_Sql extends SQLTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'abstract/SubstringTransformationsPlugin.class.php';
/**
* Handles the substring transformation for text plain
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Substring
*/
class Text_Plain_Substring extends SubstringTransformationsPlugin
{

View File

@ -16,7 +16,8 @@ require_once 'libraries/plugins/TransformationsPlugin.class.php';
/**
* Provides common methods for all of the append transformations plugins.
*
* @package PhpMyAdmin
* @package PhpMyAdmin-Transformations
* @subpackage Append
*/
abstract class AppendTransformationsPlugin extends TransformationsPlugin
{

View File

@ -121,8 +121,8 @@ function PMA_EVN_handleEditor()
)
. '<br />'
. __('MySQL said: ') . PMA_DBI_getError(null);
// We dropped the old item, but were unable to create the new one
// Try to restore the backup query
// We dropped the old item, but were unable to create
// the new one. Try to restore the backup query
$result = PMA_DBI_try_query($create_item);
if (! $result) {
// OMG, this is really bad! We dropped the query,
@ -517,7 +517,8 @@ function PMA_EVN_getEditorForm($mode, $operation, $item)
$retval .= "</tr>\n";
$retval .= "<tr>\n";
$retval .= " <td>" . __('On completion preserve') . "</td>\n";
$retval .= " <td><input type='checkbox' name='item_preserve'{$item['item_preserve']} /></td>\n";
$retval .= " <td><input type='checkbox'\n";
$retval .= " name='item_preserve'{$item['item_preserve']} /></td>\n";
$retval .= "</tr>\n";
$retval .= "<tr>\n";
$retval .= " <td>" . __('Definer') . "</td>\n";

View File

@ -14,9 +14,9 @@ if (! defined('PHPMYADMIN')) {
*
* @return void
*/
function PMA_userprefs_pageinit()
function PMA_userprefsPageInit()
{
$forms_all_keys = PMA_read_userprefs_fieldnames($GLOBALS['forms']);
$forms_all_keys = PMA_readUserprefsFieldNames($GLOBALS['forms']);
$cf = ConfigFile::getInstance();
$cf->resetConfigData(); // start with a clean instance
$cf->setAllowedKeys($forms_all_keys);
@ -39,7 +39,7 @@ function PMA_userprefs_pageinit()
*
* @return array
*/
function PMA_load_userprefs()
function PMA_loadUserprefs()
{
$cfgRelation = PMA_getRelationsParam();
if (! $cfgRelation['userconfigwork']) {
@ -76,7 +76,7 @@ function PMA_load_userprefs()
*
* @return true|PMA_Message
*/
function PMA_save_userprefs(array $config_array)
function PMA_saveUserprefs(array $config_array)
{
$cfgRelation = PMA_getRelationsParam();
$server = isset($GLOBALS['server'])
@ -137,7 +137,7 @@ function PMA_save_userprefs(array $config_array)
*
* @return array
*/
function PMA_apply_userprefs(array $config_data)
function PMA_applyUserprefs(array $config_data)
{
$cfg = array();
$blacklist = array_flip($GLOBALS['cfg']['UserprefsDisallow']);
@ -147,7 +147,7 @@ function PMA_apply_userprefs(array $config_data)
$blacklist['Error_Handler/gather'] = true;
$blacklist['DBG/sql'] = true;
}
$whitelist = array_flip(PMA_read_userprefs_fieldnames());
$whitelist = array_flip(PMA_readUserprefsFieldNames());
// whitelist some additional fields which are custom handled
$whitelist['ThemeDefault'] = true;
$whitelist['fontsize'] = true;
@ -171,7 +171,7 @@ function PMA_apply_userprefs(array $config_data)
*
* @return array
*/
function PMA_read_userprefs_fieldnames(array $forms = null)
function PMA_readUserprefsFieldNames(array $forms = null)
{
static $names;
@ -205,9 +205,9 @@ function PMA_read_userprefs_fieldnames(array $forms = null)
*
* @return void
*/
function PMA_persist_option($path, $value, $default_value)
function PMA_persistOption($path, $value, $default_value)
{
$prefs = PMA_load_userprefs();
$prefs = PMA_loadUserprefs();
if ($value === $default_value) {
if (isset($prefs['config_data'][$path])) {
unset($prefs['config_data'][$path]);
@ -217,7 +217,7 @@ function PMA_persist_option($path, $value, $default_value)
} else {
$prefs['config_data'][$path] = $value;
}
PMA_save_userprefs($prefs['config_data']);
PMA_saveUserprefs($prefs['config_data']);
}
/**
@ -231,7 +231,7 @@ function PMA_persist_option($path, $value, $default_value)
*
* @return void
*/
function PMA_userprefs_redirect(array $forms, array $old_settings, $file_name,
function PMA_userprefsRedirect(array $forms, array $old_settings, $file_name,
$params = null, $hash = null
) {
$reload_left_frame = isset($params['reload_left_frame']) && $params['reload_left_frame'];

View File

@ -4,15 +4,16 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2012-10-21 14:25+0200\n"
"PO-Revision-Date: 2012-08-01 05:43+0200\n"
"PO-Revision-Date: 2012-10-28 11:47+0200\n"
"Last-Translator: Madhura Jayaratne <madhura.cj@gmail.com>\n"
"Language-Team: sinhala <si@li.org>\n"
"Language-Team: Sinhala "
"<http://l10n.cihar.com/projects/phpmyadmin/master/si/>\n"
"Language: si\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Weblate 1.1\n"
"X-Generator: Weblate 1.2\n"
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
#: libraries/DisplayResults.class.php:808
@ -606,7 +607,6 @@ msgid "Output"
msgstr "ප්‍රතිදානය"
#: gis_data_editor.php:402
#, fuzzy
#| msgid ""
#| "Chose \"GeomFromText\" from the \"Function\" column and paste the below "
#| "string into the \"Value\" field"
@ -614,10 +614,11 @@ msgid ""
"Choose \"GeomFromText\" from the \"Function\" column and paste the string "
"below into the \"Value\" field"
msgstr ""
"\"ශ්‍රිතය\" තීරුවෙන් \"GeomFromText\" තෝරා පහත ඇති දේ \"අගය\" ක්ෂේත්‍රයට පිටපත් කරන්න"
"\"ශ්‍රිතය\" තීරුවෙන් \"GeomFromText\" තෝරා පහත ඇති දේ \"අගය\" ක්ෂේත්‍රයට පිටපත් "
"කරන්න"
#: import.php:93
#, fuzzy, php-format
#, php-format
#| msgid ""
#| "You probably tried to upload too large file. Please refer to "
#| "%sdocumentation%s for ways to workaround this limit."
@ -625,8 +626,8 @@ msgid ""
"You probably tried to upload a file that is too large. Please refer to "
"%sdocumentation%s for a workaround for this limit."
msgstr ""
"ඔබ උඩුගත කරන ගොනුව විශාල වැඩි විය හැක. මෙම සීමාවන් ඉක්මවීමේ ක්‍රම සඳහා කරුණාකර %sලියකියවිලි"
"%s බලන්න."
"ඔබ උඩුගත කිරීමට උත්සාහ කල ගොනුව විශාල වැඩි විය හැක. මෙම සීමාවන් ඉක්මවීමේ "
"ක්‍රම සඳහා කරුණාකර %sලියකියවිලි%s බලන්න."
#: import.php:232 import.php:497
msgid "Showing bookmark"
@ -3558,11 +3559,11 @@ msgstr "දකුණ"
#: libraries/config.values.php:71
msgid "Click"
msgstr ""
msgstr "ක්ලික් කිරීමෙන්"
#: libraries/config.values.php:72
msgid "Double click"
msgstr ""
msgstr "ද්විත්ව ක්ලික් කිරීමෙන්"
#: libraries/config.values.php:73 libraries/config.values.php:105
#: libraries/config/FormDisplay.tpl.php:225 libraries/relation.lib.php:96
@ -5029,13 +5030,12 @@ msgstr "ශීර්ෂක පුනරාවර්තනය"
#: libraries/config/messages.inc.php:361
msgid "Grid editing: trigger action"
msgstr ""
msgstr "ජාලය තුල සංස්කරණය: සංස්කරණය ඇරඹිය යුත්තේ"
#: libraries/config/messages.inc.php:362
#, fuzzy
#| msgid "Save all edited cells at once"
msgid "Grid editing: save all edited cells at once"
msgstr "සංස්කරණය කල කොටු සියල්ල එකවර සුරකින්න"
msgstr "ජාලය තුල සංස්කරණය: සංස්කරණය කල කොටු සියල්ල එකවර සුරකින්න"
#: libraries/config/messages.inc.php:363
msgid "Directory where exports can be saved on server"
@ -5083,6 +5083,8 @@ msgid ""
"authentication[/a] (not located in your document root; suggested: /etc/"
"swekey.conf)"
msgstr ""
"[a@http://swekey.com]SweKey දෘඩාංග සත්‍යාපනය[/a] සඳහා අවශ්‍ය වින්‍යාස ගොනුව "
"අඩංගු ස්ථානය.(ඔබගේ ලියකියවිලි මූලයේ අඩංගු නැත. යෝජිත: /etc/swekey.conf)"
#: libraries/config/messages.inc.php:374
msgid "SweKey config file"
@ -6275,7 +6277,6 @@ msgstr ""
"ඇරඹෙනු ඇත."
#: libraries/display_import.lib.php:287
#, fuzzy
#| msgid ""
#| "Allow the interruption of an import in case the script detects it is "
#| "close to the PHP timeout limit. <i>(This might be good way to import "
@ -6285,8 +6286,9 @@ msgid ""
"to the PHP timeout limit. <i>(This might be a good way to import large "
"files, however it can break transactions.)</i>"
msgstr ""
"කාල සීමාව අවසානයට ආසන්න බව දැණුනු විට අනයනනයට බාධා කිරීම සිදුකරන්න. <i>(විශාල ගොනු "
"ආනයනයට මෙය හොඳ ක්‍රමයක් වන නමුත් මෙමඟින් transactions බිඳීම සිදුවිය හැක.)</i>"
"කාල සීමාව අවසානයට ආසන්න බව දැණුනු විට අනයනනයට බාධා කිරීම සිදුකරන්න. "
"<i>(විශාල ගොනු ආනයනයට මෙය හොඳ ක්‍රමයක් වන නමුත් මෙමඟින් transactions බිඳීම "
"සිදුවිය හැක.)</i>"
#: libraries/display_import.lib.php:294
msgid "Number of rows to skip, starting from the first row:"
@ -6417,7 +6419,7 @@ msgstr ""
#: libraries/engines/myisam.lib.php:33
msgid "Automatic recovery mode"
msgstr ""
msgstr "ස්වයංක්‍රීය ප්‍රතිසාධන ප්‍රකාරය"
#: libraries/engines/myisam.lib.php:34
msgid ""

View File

@ -18,7 +18,7 @@ require_once 'libraries/config/Form.class.php';
require_once 'libraries/config/FormDisplay.class.php';
require 'libraries/config/user_preferences.forms.php';
PMA_userprefs_pageinit();
PMA_userprefsPageInit();
// handle form processing
@ -52,13 +52,13 @@ if (isset($_POST['revert'])) {
$error = null;
if ($form_display->process(false) && !$form_display->hasErrors()) {
// save settings
$old_settings = PMA_load_userprefs();
$result = PMA_save_userprefs(ConfigFile::getInstance()->getConfigArray());
$old_settings = PMA_loadUserprefs();
$result = PMA_saveUserprefs(ConfigFile::getInstance()->getConfigArray());
if ($result === true) {
// reload config
$GLOBALS['PMA_Config']->loadUserPreferences();
$hash = ltrim(filter_input(INPUT_POST, 'tab_hash'), '#');
PMA_userprefs_redirect(
PMA_userprefsRedirect(
$forms, $old_settings, 'prefs_forms.php',
array('form' => $form_param), $hash
);

View File

@ -18,7 +18,7 @@ require_once 'libraries/config/Form.class.php';
require_once 'libraries/config/FormDisplay.class.php';
require 'libraries/config/user_preferences.forms.php';
PMA_userprefs_pageinit();
PMA_userprefsPageInit();
$error = '';
if (isset($_POST['submit_export'])
@ -28,11 +28,11 @@ if (isset($_POST['submit_export'])
PMA_Response::getInstance()->disable();
$filename = 'phpMyAdmin-config-' . urlencode(PMA_getenv('HTTP_HOST')) . '.json';
PMA_downloadHeader($filename, 'application/json');
$settings = PMA_load_userprefs();
$settings = PMA_loadUserprefs();
echo json_encode($settings['config_data']);
exit;
} else if (isset($_POST['submit_get_json'])) {
$settings = PMA_load_userprefs();
$settings = PMA_loadUserprefs();
$response = PMA_Response::getInstance();
$response->addJSON('prefs', json_encode($settings['config_data']));
$response->addJSON('mtime', $settings['mtime']);
@ -164,8 +164,8 @@ if (isset($_POST['submit_export'])
}
// save settings
$old_settings = PMA_load_userprefs();
$result = PMA_save_userprefs($cf->getConfigArray());
$old_settings = PMA_loadUserprefs();
$result = PMA_saveUserprefs($cf->getConfigArray());
if ($result === true) {
if ($return_url) {
$query = explode('&', parse_url($return_url, PHP_URL_QUERY));
@ -183,15 +183,15 @@ if (isset($_POST['submit_export'])
}
// reload config
$GLOBALS['PMA_Config']->loadUserPreferences();
PMA_userprefs_redirect($forms, $old_settings, $return_url, $params);
PMA_userprefsRedirect($forms, $old_settings, $return_url, $params);
exit;
} else {
$error = $result;
}
}
} else if (isset($_POST['submit_clear'])) {
$old_settings = PMA_load_userprefs();
$result = PMA_save_userprefs(array());
$old_settings = PMA_loadUserprefs();
$result = PMA_saveUserprefs(array());
if ($result === true) {
$params = array();
if ($_SESSION['PMA_Theme_Manager']->theme->getId() != 'original') {
@ -208,7 +208,7 @@ if (isset($_POST['submit_export'])
}
$GLOBALS['PMA_Config']->removeCookie('pma_collaction_connection');
$GLOBALS['PMA_Config']->removeCookie('pma_lang');
PMA_userprefs_redirect($forms, $old_settings, 'prefs_manage.php', $params);
PMA_userprefsRedirect($forms, $old_settings, 'prefs_manage.php', $params);
exit;
} else {
$error = $result;

View File

@ -1460,7 +1460,7 @@ function printServerTraffic()
echo __('Show Full Queries');
}
echo '">';
echo '<img src="' . $GLOBALS['pmaThemeImage'] . 's_'
echo '<img src="' . $GLOBALS['pmaThemeImage']
. 's_' . ($show_full_sql ? 'partial' : 'full') . 'text.png" '
. 'alt="';
if ($show_full_sql) {

View File

@ -69,7 +69,7 @@ $options_array = array(
*
* @access public
*/
function PMA_generate_dropdown(
function PMA_generateDropdown(
$dropdown_question, $select_name, $choices, $selected_value
) {
echo htmlspecialchars($dropdown_question) . '&nbsp;&nbsp;';
@ -95,7 +95,7 @@ function PMA_generate_dropdown(
*
* @access public
*/
function PMA_backquote_split($text)
function PMA_backquoteSplit($text)
{
$elements = array();
$final_pos = strlen($text) - 1;
@ -204,7 +204,7 @@ if (isset($_REQUEST['destination_foreign'])) {
$master_field = $multi_edit_columns_name[$master_field_md5];
if (! empty($foreign_string)) {
list($foreign_db, $foreign_table, $foreign_field) = PMA_backquote_split($foreign_string);
list($foreign_db, $foreign_table, $foreign_field) = PMA_backquoteSplit($foreign_string);
if (! isset($existrel_foreign[$master_field])) {
// no key defined for this field
@ -523,7 +523,7 @@ if (count($columns) > 0) {
// won't display the clause if it's set as RESTRICT.
$on_delete = isset($existrel_foreign[$myfield]['on_delete'])
? $existrel_foreign[$myfield]['on_delete'] : 'RESTRICT';
PMA_generate_dropdown(
PMA_generateDropdown(
'ON DELETE',
'on_delete[' . $myfield_md5 . ']',
$options_array,
@ -534,7 +534,7 @@ if (count($columns) > 0) {
echo '<span class="formelement">' . "\n";
$on_update = isset($existrel_foreign[$myfield]['on_update'])
? $existrel_foreign[$myfield]['on_update'] : 'RESTRICT';
PMA_generate_dropdown(
PMA_generateDropdown(
'ON UPDATE',
'on_update[' . $myfield_md5 . ']',
$options_array,