Sunday, November 29, 2015

phpMyAdmin work during eighth and ninth weeks

Last two weeks were dedicated completely to code refactoring where I converted a couple of server level page to MVC architecture. This is a continuation of what started during the last GSoC where we started to take up MVC architecture.

I started with server_variables.php page and created a new controller named ServerVariablesController to handle all interactions from the page. Refactoring included moving the HTML generation to 'View' (using templating) and organizing previous functions into methods and introducing instance variables where appropriate. 

Server databases page was also refactored in a similar manner. Additionally, the functionalities of display_create_database.lib.php, db_create.php and build_html_for_db.lib.php were integrated into the new controller. Moreover, some functionalities that supported both ajax and non-ajax behavior (that used to facilitate scenarios with JavaScript disabled) was simplified. Towards the end of the period, server charsets page was refactored in a similar manner.

Code refactoring
Refactor server variables page to use MVC architecture
Refactor server databases page to use MVC architecture
Simplify database dropping
Merge the functionalities of display_create_database.lib.php, db_create.php and build_html_for_db.lib.php into ServerDatabasesController
Refactor server charsets page to use MVC architecture
Organize controllers into a better package hierarchy

I also engaged in fixing coding style violations, both introduced by refactoring as well as the ones that already existed. Further, I updated the test suite to account for newly introduced controller classes and now removed functions.

Coding style improvements
Fix coding style violations

Unit testing
Update unit tests for new controller classes

Sunday, November 22, 2015

phpMyAdmin work during sixth and seventh weeks

During the two week I attended to a combination of bugs, features/improvements, code refactoring as well as code quality improvements. However, most of the time was spent on bugs as there were number of bugs being reported. Following are the bugs fixed and investigated during the two weeks.

Bugs fixed
issue #11476 Errors instead of git info when PHP has no gzip support
issue #11630 Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given
issue #11632 Exporting GIS visualization ignores start and row count
issue #11639 Bug with the MainBackground Color
issue #11647 Restrict configuration NavigationTreeDbSeparator to strings
Indicate when there are no parameters for parameter binding in SQL query box
Profiling checkbox is missing

Bugs investigated
issue #11637 "AS" from the main table of the query is being deleted when you are exporting a query
issue #11651 Issue while creating tables
issue #11659 Totally turn off autocomplete and sql syntax check

Among the new features implemented, issue #11641, which requested to disable one of the relational features, was discussed during the team meeting and it was suggested to use a special value for the same configuration directive to disable the feature. This was implemented targeting future 4.6 release. Additionally, as part of minimizing the upload footprint, GIS features were adjusted to function without bulky OpenLayers library. Moreover, profiling chart now uses the generic charting mechanism which facilitate moving to a new charting library with less hassle.

New features/Improvements
issue #11641 Ability to disable the navigationhiding Feature
issue #11654 Use a slider for Internal relations
Make OpenLayers library optional for GIS visualization
Link license.php
Use generic charting mechanism for profiling chart as well

Additionally, following refactoring and code quality improvement work was carried out during the period.

Code Refactoring
Refactoring GIS visualization page
Move controllers to appropriate packages

Code quality
Fix style violations in JS code

Sunday, November 1, 2015

phpMyAdmin work during third, fourth and fifth weeks

I did not engage in phpMyAdmin development work during the fourth week while I was less active during the third week due to personal engagements. So, here is a combined blog post for third, fourth and fifth weeks.

During the period I worked on fixing the bugs reported by users as well as those reported by the automated error reporting mechanism. I cleaned up automatically reported errors by exporting them to GitHub tracker, linking them where necessary and by fixing them. Following are the bugs fixed and investigated during the period. 

Bugs Fixed
#11551 Fatal error when switched to master from QA_4_5
#11594 'only_db' config option bug when db names contain underscore and are grouped
#11603 Namespace clash for class Error
#11606 PMA_Util not found when changing password
#11607 Unable to change password from Login information tab
#11610 Undefined variable: res_rel
#11611 Warning while exporting schema to PDF
#11612 Undefined index: new_row_format
#11614 Undefined variable: db
#11617 Getting real row count is not allowed for views
#11622 Reloading privileges is not allowed

Bugs Investigated
#11556 Cannot create table, please enter a valid length keeps coming up
#11568 Erroneous handling of tables with FKs to other databases
#11577 Table aliases ignored when using intellisense
#11583 Cross DB foreign key constraints results in undefined offsets

A security issues was reported during the period and I contributed by coordinating and generating security announcements.

Security Issues
Content spoofing Issue in phpMyAdmin

Additionally, I engaged in some code refactoring and code quality improvements. Refactoring was on `DatabaseStructureController` as highlighted by Marc due to long method lengths. Moreover, unit tests related to PHP classes were renamed to be consistent with the corresponding names of the classes they are testing.

Refactoring and code quality improvements
Refactor DatabaseStructureController
Fix issues reported by PHPCS
Fix issues reported by JSLint

Unit testing
Rename and organize test classes

Feature enhancements
Add supported file format for Archive storage engine