diff --git a/db_datadict.php b/db_datadict.php index b03619d492..0d3accc6b0 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -45,10 +45,8 @@ if ($cfgRelation['commwork']) { * Displays DB comment */ if ($comment) { - ?> -

-

- ' . __('Database comment: ') + . '' . htmlspecialchars($comment) . '

'; } // end if } diff --git a/libraries/Advisor.class.php b/libraries/Advisor.class.php index 29cb1483c0..b8764a5c6c 100644 --- a/libraries/Advisor.class.php +++ b/libraries/Advisor.class.php @@ -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'); } diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 3bbbe22eeb..3d62595996 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -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 diff --git a/libraries/File.class.php b/libraries/File.class.php index 02b91746a1..c020446f60 100644 --- a/libraries/File.class.php +++ b/libraries/File.class.php @@ -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()); diff --git a/libraries/PDF.class.php b/libraries/PDF.class.php index cef7761bf5..66e05a300e 100644 --- a/libraries/PDF.class.php +++ b/libraries/PDF.class.php @@ -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) { diff --git a/libraries/RecentTable.class.php b/libraries/RecentTable.class.php index 3fbc538a93..d83272a6a5 100644 --- a/libraries/RecentTable.class.php +++ b/libraries/RecentTable.class.php @@ -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(); } } diff --git a/libraries/config/FormDisplay.class.php b/libraries/config/FormDisplay.class.php index cb1442a8d1..333b88a584 100644 --- a/libraries/config/FormDisplay.class.php +++ b/libraries/config/FormDisplay.class.php @@ -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); } } diff --git a/libraries/plugins/export/ExportCodegen.class.php b/libraries/plugins/export/ExportCodegen.class.php index 87a75812a0..d0a2216a4c 100644 --- a/libraries/plugins/export/ExportCodegen.class.php +++ b/libraries/plugins/export/ExportCodegen.class.php @@ -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), diff --git a/libraries/plugins/export/ExportCsv.class.php b/libraries/plugins/export/ExportCsv.class.php index 5c25503603..add779405a 100644 --- a/libraries/plugins/export/ExportCsv.class.php +++ b/libraries/plugins/export/ExportCsv.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportExcel.class.php b/libraries/plugins/export/ExportExcel.class.php index 7217d6ded3..b8e8b020fc 100644 --- a/libraries/plugins/export/ExportExcel.class.php +++ b/libraries/plugins/export/ExportExcel.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportHtmlword.class.php b/libraries/plugins/export/ExportHtmlword.class.php index 55afa2afff..f6e5acbf78 100644 --- a/libraries/plugins/export/ExportHtmlword.class.php +++ b/libraries/plugins/export/ExportHtmlword.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportJson.class.php b/libraries/plugins/export/ExportJson.class.php index 1c41206973..299e248c02 100644 --- a/libraries/plugins/export/ExportJson.class.php +++ b/libraries/plugins/export/ExportJson.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportLatex.class.php b/libraries/plugins/export/ExportLatex.class.php index 09b6f84bbc..66891b6d33 100644 --- a/libraries/plugins/export/ExportLatex.class.php +++ b/libraries/plugins/export/ExportLatex.class.php @@ -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 */ diff --git a/libraries/plugins/export/ExportMediawiki.class.php b/libraries/plugins/export/ExportMediawiki.class.php index 2ee4acf098..a0ef4244ec 100644 --- a/libraries/plugins/export/ExportMediawiki.class.php +++ b/libraries/plugins/export/ExportMediawiki.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportOds.class.php b/libraries/plugins/export/ExportOds.class.php index cfa7cbabee..4a18f0cd57 100644 --- a/libraries/plugins/export/ExportOds.class.php +++ b/libraries/plugins/export/ExportOds.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportOdt.class.php b/libraries/plugins/export/ExportOdt.class.php index 26bda0c78c..ea3282c238 100644 --- a/libraries/plugins/export/ExportOdt.class.php +++ b/libraries/plugins/export/ExportOdt.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportPdf.class.php b/libraries/plugins/export/ExportPdf.class.php index ed40ca9ecc..ffabb96efa 100644 --- a/libraries/plugins/export/ExportPdf.class.php +++ b/libraries/plugins/export/ExportPdf.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportPhparray.class.php b/libraries/plugins/export/ExportPhparray.class.php index 3208121262..cbe5e2c039 100644 --- a/libraries/plugins/export/ExportPhparray.class.php +++ b/libraries/plugins/export/ExportPhparray.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportSql.class.php b/libraries/plugins/export/ExportSql.class.php index 6315c17ca6..ca17a2d617 100644 --- a/libraries/plugins/export/ExportSql.class.php +++ b/libraries/plugins/export/ExportSql.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportTexytext.class.php b/libraries/plugins/export/ExportTexytext.class.php index f005f827fd..3aa609c345 100644 --- a/libraries/plugins/export/ExportTexytext.class.php +++ b/libraries/plugins/export/ExportTexytext.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportXml.class.php b/libraries/plugins/export/ExportXml.class.php index af0a91738b..f911d522cd 100644 --- a/libraries/plugins/export/ExportXml.class.php +++ b/libraries/plugins/export/ExportXml.class.php @@ -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 { diff --git a/libraries/plugins/export/ExportYaml.class.php b/libraries/plugins/export/ExportYaml.class.php index 7c2585139e..044daeee47 100644 --- a/libraries/plugins/export/ExportYaml.class.php +++ b/libraries/plugins/export/ExportYaml.class.php @@ -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 { diff --git a/libraries/plugins/export/PMA_ExportPdf.class.php b/libraries/plugins/export/PMA_ExportPdf.class.php index f094f8deb3..54f85e2521 100644 --- a/libraries/plugins/export/PMA_ExportPdf.class.php +++ b/libraries/plugins/export/PMA_ExportPdf.class.php @@ -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; diff --git a/libraries/plugins/export/TableProperty.class.php b/libraries/plugins/export/TableProperty.class.php index bc544a8774..a928a6c3d1 100644 --- a/libraries/plugins/export/TableProperty.class.php +++ b/libraries/plugins/export/TableProperty.class.php @@ -1,7 +1,7 @@ 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 diff --git a/libraries/plugins/import/ImportCsv.class.php b/libraries/plugins/import/ImportCsv.class.php index fc202d45e7..c50f671dca 100644 --- a/libraries/plugins/import/ImportCsv.class.php +++ b/libraries/plugins/import/ImportCsv.class.php @@ -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 { diff --git a/libraries/plugins/import/ImportLdi.class.php b/libraries/plugins/import/ImportLdi.class.php index fd236179b2..b38e74b052 100644 --- a/libraries/plugins/import/ImportLdi.class.php +++ b/libraries/plugins/import/ImportLdi.class.php @@ -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 { diff --git a/libraries/plugins/import/ImportMediawiki.class.php b/libraries/plugins/import/ImportMediawiki.class.php index 9a1500f0ac..767c966c1d 100644 --- a/libraries/plugins/import/ImportMediawiki.class.php +++ b/libraries/plugins/import/ImportMediawiki.class.php @@ -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 { diff --git a/libraries/plugins/import/ImportOds.class.php b/libraries/plugins/import/ImportOds.class.php index 89da1e35f0..be54fc7a35 100644 --- a/libraries/plugins/import/ImportOds.class.php +++ b/libraries/plugins/import/ImportOds.class.php @@ -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 { diff --git a/libraries/plugins/import/ImportShp.class.php b/libraries/plugins/import/ImportShp.class.php index 0ec378242a..9f0c15b390 100644 --- a/libraries/plugins/import/ImportShp.class.php +++ b/libraries/plugins/import/ImportShp.class.php @@ -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 { diff --git a/libraries/plugins/import/ImportSql.class.php b/libraries/plugins/import/ImportSql.class.php index 46e3007b01..146485a231 100644 --- a/libraries/plugins/import/ImportSql.class.php +++ b/libraries/plugins/import/ImportSql.class.php @@ -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 { diff --git a/libraries/plugins/import/ImportXml.class.php b/libraries/plugins/import/ImportXml.class.php index f3199a28b1..9c0e999592 100644 --- a/libraries/plugins/import/ImportXml.class.php +++ b/libraries/plugins/import/ImportXml.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Application_Octetstream_Download.class.php b/libraries/plugins/transformations/Application_Octetstream_Download.class.php index aa5019a93c..069eda719b 100644 --- a/libraries/plugins/transformations/Application_Octetstream_Download.class.php +++ b/libraries/plugins/transformations/Application_Octetstream_Download.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Application_Octetstream_Hex.class.php b/libraries/plugins/transformations/Application_Octetstream_Hex.class.php index e6d6c2af7b..f6f4297460 100644 --- a/libraries/plugins/transformations/Application_Octetstream_Hex.class.php +++ b/libraries/plugins/transformations/Application_Octetstream_Hex.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Image_JPEG_Inline.class.php b/libraries/plugins/transformations/Image_JPEG_Inline.class.php index 8b09df6cfd..501205a945 100644 --- a/libraries/plugins/transformations/Image_JPEG_Inline.class.php +++ b/libraries/plugins/transformations/Image_JPEG_Inline.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Image_JPEG_Link.class.php b/libraries/plugins/transformations/Image_JPEG_Link.class.php index e55348a690..ca3c1d18ea 100644 --- a/libraries/plugins/transformations/Image_JPEG_Link.class.php +++ b/libraries/plugins/transformations/Image_JPEG_Link.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Image_PNG_Inline.class.php b/libraries/plugins/transformations/Image_PNG_Inline.class.php index 2fac38c809..40b709d87a 100644 --- a/libraries/plugins/transformations/Image_PNG_Inline.class.php +++ b/libraries/plugins/transformations/Image_PNG_Inline.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_Append.class.php b/libraries/plugins/transformations/Text_Plain_Append.class.php index 8bdf529fdd..567c2cc608 100644 --- a/libraries/plugins/transformations/Text_Plain_Append.class.php +++ b/libraries/plugins/transformations/Text_Plain_Append.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_Dateformat.class.php b/libraries/plugins/transformations/Text_Plain_Dateformat.class.php index 234ecdb36d..70db98aef7 100644 --- a/libraries/plugins/transformations/Text_Plain_Dateformat.class.php +++ b/libraries/plugins/transformations/Text_Plain_Dateformat.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_External.class.php b/libraries/plugins/transformations/Text_Plain_External.class.php index 11d7bb7744..18da613183 100644 --- a/libraries/plugins/transformations/Text_Plain_External.class.php +++ b/libraries/plugins/transformations/Text_Plain_External.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_Formatted.class.php b/libraries/plugins/transformations/Text_Plain_Formatted.class.php index 83bb8dca0f..3942a93e32 100644 --- a/libraries/plugins/transformations/Text_Plain_Formatted.class.php +++ b/libraries/plugins/transformations/Text_Plain_Formatted.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_Imagelink.class.php b/libraries/plugins/transformations/Text_Plain_Imagelink.class.php index e56f59faf6..670e52e8d7 100644 --- a/libraries/plugins/transformations/Text_Plain_Imagelink.class.php +++ b/libraries/plugins/transformations/Text_Plain_Imagelink.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_Link.class.php b/libraries/plugins/transformations/Text_Plain_Link.class.php index 06731da123..d1b17d5ec8 100644 --- a/libraries/plugins/transformations/Text_Plain_Link.class.php +++ b/libraries/plugins/transformations/Text_Plain_Link.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_Longtoipv4.class.php b/libraries/plugins/transformations/Text_Plain_Longtoipv4.class.php index 7f2004db99..9f58a45eb3 100644 --- a/libraries/plugins/transformations/Text_Plain_Longtoipv4.class.php +++ b/libraries/plugins/transformations/Text_Plain_Longtoipv4.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_Sql.class.php b/libraries/plugins/transformations/Text_Plain_Sql.class.php index 952d4fe7f6..1987ba9144 100644 --- a/libraries/plugins/transformations/Text_Plain_Sql.class.php +++ b/libraries/plugins/transformations/Text_Plain_Sql.class.php @@ -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 { diff --git a/libraries/plugins/transformations/Text_Plain_Substring.class.php b/libraries/plugins/transformations/Text_Plain_Substring.class.php index fc0ab02412..051ae51cd3 100644 --- a/libraries/plugins/transformations/Text_Plain_Substring.class.php +++ b/libraries/plugins/transformations/Text_Plain_Substring.class.php @@ -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 { diff --git a/libraries/plugins/transformations/abstract/AppendTransformationsPlugin.class.php b/libraries/plugins/transformations/abstract/AppendTransformationsPlugin.class.php index 08582e49c9..0fc3b4de77 100644 --- a/libraries/plugins/transformations/abstract/AppendTransformationsPlugin.class.php +++ b/libraries/plugins/transformations/abstract/AppendTransformationsPlugin.class.php @@ -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 { diff --git a/libraries/rte/rte_events.lib.php b/libraries/rte/rte_events.lib.php index 2309720261..7d4ce6cf37 100644 --- a/libraries/rte/rte_events.lib.php +++ b/libraries/rte/rte_events.lib.php @@ -121,8 +121,8 @@ function PMA_EVN_handleEditor() ) . '
' . __('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 .= "\n"; $retval .= "\n"; $retval .= " " . __('On completion preserve') . "\n"; - $retval .= " \n"; + $retval .= " \n"; diff --git a/libraries/user_preferences.lib.php b/libraries/user_preferences.lib.php index e67d564793..afc8b50d36 100644 --- a/libraries/user_preferences.lib.php +++ b/libraries/user_preferences.lib.php @@ -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']; diff --git a/po/si.po b/po/si.po index 8e21d17151..8b8daf5db4 100644 --- a/po/si.po +++ b/po/si.po @@ -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 \n" -"Language-Team: sinhala \n" +"Language-Team: Sinhala " +"\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. (This might be good way to import " @@ -6285,8 +6286,9 @@ msgid "" "to the PHP timeout limit. (This might be a good way to import large " "files, however it can break transactions.)" msgstr "" -"කාල සීමාව අවසානයට ආසන්න බව දැණුනු විට අනයනනයට බාධා කිරීම සිදුකරන්න. (විශාල ගොනු " -"ආනයනයට මෙය හොඳ ක්‍රමයක් වන නමුත් මෙමඟින් transactions බිඳීම සිදුවිය හැක.)" +"කාල සීමාව අවසානයට ආසන්න බව දැණුනු විට අනයනනයට බාධා කිරීම සිදුකරන්න. " +"(විශාල ගොනු ආනයනයට මෙය හොඳ ක්‍රමයක් වන නමුත් මෙමඟින් transactions බිඳීම " +"සිදුවිය හැක.)" #: 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 "" diff --git a/prefs_forms.php b/prefs_forms.php index 023d8ba18c..e613c0cd8e 100644 --- a/prefs_forms.php +++ b/prefs_forms.php @@ -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 ); diff --git a/prefs_manage.php b/prefs_manage.php index 5e38a4fbca..4644e55320 100644 --- a/prefs_manage.php +++ b/prefs_manage.php @@ -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; diff --git a/server_status.php b/server_status.php index baa38959df..1b2c3cd42e 100644 --- a/server_status.php +++ b/server_status.php @@ -1460,7 +1460,7 @@ function printServerTraffic() echo __('Show Full Queries'); } echo '">'; - echo '' . "\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,