diff --git a/ChangeLog b/ChangeLog index b6f264f15e..06e361108a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,6 +32,9 @@ phpMyAdmin - ChangeLog - bug #4794 Server error viewing table content - bug Fix issues related to number of decimal places in time - bug #4853 Relation view between 1600 and 1780 px +- bug PHP 7 compatibility in php-gettext +- bug PHP 7 compatibility in bfShapeFiles +- bug PHP 7 session_regenerate_id() warning 4.4.2.0 (2015-04-13) - bug #4835 PMA_hideShowConnection not called after submit_num_fields diff --git a/js/functions.js b/js/functions.js index 4ab67448bd..4c2cee3613 100644 --- a/js/functions.js +++ b/js/functions.js @@ -3848,8 +3848,8 @@ AJAX.registerOnload('functions.js', function () { cache: false, type: 'POST', data: { - favorite_tables: (isStorageSupported('localStorage') && typeof window.localStorage['favorite_tables'] !== 'undefined') - ? window.localStorage['favorite_tables'] + favorite_tables: (isStorageSupported('localStorage') && typeof window.localStorage.favorite_tables !== 'undefined') + ? window.localStorage.favorite_tables : '' }, success: function (data) { diff --git a/libraries/bfShapeFiles/ShapeFile.lib.php b/libraries/bfShapeFiles/ShapeFile.lib.php index bf726a328c..795d0aa292 100644 --- a/libraries/bfShapeFiles/ShapeFile.lib.php +++ b/libraries/bfShapeFiles/ShapeFile.lib.php @@ -83,7 +83,7 @@ var $records; - function ShapeFile($shapeType, $boundingBox = array("xmin" => 0.0, "ymin" => 0.0, "xmax" => 0.0, "ymax" => 0.0), $FileName = NULL) { + public function __construct($shapeType, $boundingBox = array("xmin" => 0.0, "ymin" => 0.0, "xmax" => 0.0, "ymax" => 0.0), $FileName = NULL) { $this->shapeType = $shapeType; $this->boundingBox = $boundingBox; $this->FileName = $FileName; @@ -357,7 +357,7 @@ var $SHPData = array(); var $DBFData = array(); - function ShapeRecord($shapeType) { + public function __construct($shapeType) { $this->shapeType = $shapeType; } diff --git a/libraries/php-gettext/gettext.php b/libraries/php-gettext/gettext.php index 5064047cbd..3486e92f07 100644 --- a/libraries/php-gettext/gettext.php +++ b/libraries/php-gettext/gettext.php @@ -98,7 +98,7 @@ class gettext_reader { * @param object Reader the StreamReader object * @param boolean enable_cache Enable or disable caching of strings (default on) */ - function gettext_reader($Reader, $enable_cache = true) { + public function __construct($Reader, $enable_cache = true) { // If there isn't a StreamReader, turn on short circuit mode. if (! $Reader || isset($Reader->error) ) { $this->short_circuit = true; diff --git a/libraries/php-gettext/streams.php b/libraries/php-gettext/streams.php index 3cdc1584e1..ab947194a2 100644 --- a/libraries/php-gettext/streams.php +++ b/libraries/php-gettext/streams.php @@ -49,7 +49,7 @@ class StringReader { var $_pos; var $_str; - function StringReader($str='') { + public function __construct($str='') { $this->_str = $str; $this->_pos = 0; } @@ -86,7 +86,7 @@ class FileReader { var $_fd; var $_length; - function FileReader($filename) { + public function __construct($filename) { if (file_exists($filename)) { $this->_length=filesize($filename); @@ -143,7 +143,7 @@ class FileReader { // Preloads entire file in memory first, then creates a StringReader // over it (it assumes knowledge of StringReader internals) class CachedFileReader extends StringReader { - function CachedFileReader($filename) { + public function __construct($filename) { if (file_exists($filename)) { $length=filesize($filename); diff --git a/libraries/session.inc.php b/libraries/session.inc.php index 49a5d51a06..ea52ca540d 100644 --- a/libraries/session.inc.php +++ b/libraries/session.inc.php @@ -124,7 +124,12 @@ if (! isset($_SESSION[' PMA_token '])) { function PMA_secureSession() { // prevent session fixation and XSS - session_regenerate_id(true); + // (better to use session_status() if available) + if ((PMA_PHP_INT_VERSION >= 50400 && session_status() === PHP_SESSION_ACTIVE) + || (PMA_PHP_INT_VERSION < 50400 && session_id() !== '') + ) { + session_regenerate_id(true); + } $_SESSION[' PMA_token '] = md5(uniqid(rand(), true)); } ?> diff --git a/po/es.po b/po/es.po index 70928b96ad..6cb816cd56 100644 --- a/po/es.po +++ b/po/es.po @@ -4,14 +4,14 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2015-04-10 10:21-0400\n" -"PO-Revision-Date: 2015-03-05 21:07+0200\n" -"Last-Translator: Macofe \n" -"Language-Team: Spanish \n" +"PO-Revision-Date: 2015-04-15 22:05+0200\n" +"Last-Translator: Michal Čihař \n" +"Language-Team: Spanish " +"\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 2.3-dev\n" @@ -10608,10 +10608,9 @@ msgid "Purpose:" msgstr "" #: libraries/plugins/export/PMA_ExportPdf.class.php:494 -#, fuzzy #| msgid "MIME type" msgid "MIME" -msgstr "MIME-type" +msgstr "MIME" #: libraries/plugins/import/ImportCsv.class.php:63 #: libraries/plugins/import/ImportOds.class.php:75 diff --git a/po/fy.po b/po/fy.po index 396d70649d..e7f5b265f6 100644 --- a/po/fy.po +++ b/po/fy.po @@ -8,16 +8,16 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2015-04-10 10:21-0400\n" -"PO-Revision-Date: 2014-12-31 22:40+0200\n" -"Last-Translator: Robin van der Vliet \n" -"Language-Team: Frisian \n" +"PO-Revision-Date: 2015-04-15 22:05+0200\n" +"Last-Translator: Michal Čihař \n" +"Language-Team: Frisian " +"\n" +"Language: fy\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Language: fy\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 2.2-dev\n" +"X-Generator: Weblate 2.3-dev\n" #: changelog.php:36 license.php:28 #, php-format @@ -9757,10 +9757,9 @@ msgid "Purpose:" msgstr "" #: libraries/plugins/export/PMA_ExportPdf.class.php:494 -#, fuzzy #| msgid "MIME type" msgid "MIME" -msgstr "MIME-type" +msgstr "MIME" #: libraries/plugins/import/ImportCsv.class.php:63 #: libraries/plugins/import/ImportOds.class.php:75 diff --git a/po/it.po b/po/it.po index 0c33b95b87..eea33cb29f 100644 --- a/po/it.po +++ b/po/it.po @@ -4,7 +4,7 @@ msgstr "" "Project-Id-Version: phpMyAdmin 4.5.0-dev\n" "Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n" "POT-Creation-Date: 2015-04-10 10:21-0400\n" -"PO-Revision-Date: 2015-04-15 09:43+0200\n" +"PO-Revision-Date: 2015-04-15 23:57+0200\n" "Last-Translator: Stefano Martinelli \n" "Language-Team: Italian " "\n" @@ -5908,12 +5908,11 @@ msgid "Export views as tables" msgstr "Esporta le viste come tabelle" #: libraries/config/messages.inc.php:176 -#, fuzzy #| msgid "%sCreate%s missing phpMyAdmin configuration storage tables." msgid "Export related metadata from phpMyAdmin configuration storage" msgstr "" -"%sCreate%s mancano le tabelle di salvataggio della configurazione di " -"phpMyAdmin." +"Esporta i metadati correlati prelevandoli dall'area di configurazione di " +"phpMyAdmin" #: libraries/config/messages.inc.php:177 libraries/config/messages.inc.php:179 #: libraries/config/messages.inc.php:180 libraries/config/messages.inc.php:181 @@ -7588,12 +7587,13 @@ msgid "Skip locked tables" msgstr "Ignora le tabelle bloccate" #: libraries/config/messages.inc.php:773 -#, fuzzy #| msgid "A warning is displayed on the main page if Suhosin is detected." msgid "" "Disable the default warning that is displayed on the main page if Suhosin is " "detected." -msgstr "Mostra un avviso sulla pagina principale se viene rilevato Suhosin." +msgstr "" +"Disabilita l'avviso predefinito che è visualizzato sulla pagina principale " +"se viene rilevato Suhosin." #: libraries/config/messages.inc.php:774 msgid "Suhosin warning" @@ -8034,7 +8034,7 @@ msgstr "Numero di tabelle:" #: libraries/db_designer.lib.php:591 msgid "Toggle" -msgstr "" +msgstr "Scambia" #: libraries/db_designer.lib.php:614 msgid "See table structure" @@ -10141,6 +10141,8 @@ msgstr "Struttura stand-in per le viste" #: libraries/plugins/export/ExportJson.class.php:70 msgid "Output pretty-printed JSON (Use human-readable formatting)" msgstr "" +"Output JSON ben formattato per la stampa (Utilizza una formattazione per la " +"lettura facilitata)" #: libraries/plugins/export/ExportLatex.class.php:43 msgid "Content of table @TABLE@" @@ -10279,10 +10281,9 @@ msgstr "" "del database" #: libraries/plugins/export/ExportSql.class.php:161 -#, fuzzy #| msgid "Export method" msgid "Export metadata" -msgstr "Metodo di esportazione" +msgstr "Esporta i metadati" #: libraries/plugins/export/ExportSql.class.php:176 msgid "" @@ -10415,10 +10416,10 @@ msgid "It appears your database uses functions;" msgstr "Il tuo database sembra utilizzare le funzioni;" #: libraries/plugins/export/ExportSql.class.php:989 -#, fuzzy, php-format +#, php-format #| msgid "Metadata Headers" msgid "Metadata for %s" -msgstr "Intestazioni di Metadata" +msgstr "Metadati per %s" #: libraries/plugins/export/ExportSql.class.php:1352 msgid "It appears your database uses views;" @@ -10483,7 +10484,7 @@ msgstr "Tabella:" #: libraries/plugins/export/PMA_ExportPdf.class.php:118 msgid "Purpose:" -msgstr "" +msgstr "Scopo:" #: libraries/plugins/export/PMA_ExportPdf.class.php:494 msgid "MIME" @@ -11085,6 +11086,10 @@ msgid "" "'phpmyadmin'. You may go to 'Operations' tab of any database to set up the " "phpMyAdmin configuration storage there." msgstr "" +"Non possiedi i privilegi necessari per creare un database di nome " +"'phpmyadmin'. Puoi andare nella sezione 'Operazioni' di un qualunque " +"database per impostare in quel database la memorizzazione della " +"configurazione di phpMyAdmin." #: libraries/relation.lib.php:2005 #, php-format @@ -12172,7 +12177,7 @@ msgstr "" #: libraries/server_privileges.lib.php:818 msgid "Requires a valid X509 certificate." -msgstr "" +msgstr "Richiede un certificato X509 valido." #: libraries/server_privileges.lib.php:867 msgid "Resource limits" diff --git a/test/libraries/php-gettext/PMA_FileReader_test.php b/test/libraries/php-gettext/PMA_FileReader_test.php index df48e31174..c083d3ab9d 100644 --- a/test/libraries/php-gettext/PMA_FileReader_test.php +++ b/test/libraries/php-gettext/PMA_FileReader_test.php @@ -121,8 +121,10 @@ class PMA_FileReader_Test extends PHPUnit_Framework_TestCase public function testForNonExistingFile() { $file = new FileReader('./path/for/no/file.txt'); + // looking at the return value of a constructor is curious + // but the constructor returns a value $this->assertFalse( - $file->FileReader('./path/for/no/file.txt') + $file->__construct('./path/for/no/file.txt') ); } @@ -130,11 +132,11 @@ class PMA_FileReader_Test extends PHPUnit_Framework_TestCase { $reader = new CachedFileReader('./test/test_data/test.file'); $this->assertEquals( - $reader->CachedFileReader('./test/test_data/test.file'), + $reader->__construct('./test/test_data/test.file'), null ); $this->assertFalse( - $reader->CachedFileReader('./path/for/no/file.txt') + $reader->__construct('./path/for/no/file.txt') ); }