GSoC 2015 : Weekly Report #5 : RFE #1594 & RFE#1060
RFE #1594 : More plain English config words
Tasks worked upon:
Scheduled Deadline: 28th June, 2015
Completed on: 12th June, 2015
1. We have config options for Default Tabs that the navigation links and icons link to. For example, we have $cfg[‘DefaultTabTable’] that decides to what tab of the Table view like ‘Structure’, ‘Browse’, ‘Insert’ etc. is linked to by clicking on the Table Name in the Navigation.
Similarly, we have options like $cfg[‘DefaultTabDatabase’], $cfg[‘DefaultTabServer’] and $cfg[‘NavigationTreeDefaultTabTable’] and $cfg[‘NavigationTreeDefaultTabTable2’]. Perviously, we had possible value of these options as script names like ‘db_structure.php’ (for Database structure), ‘sql.php’ (For browsing Table data) etc.
The RFE#1594 mentions that we should replace this with more plain English config words like ‘structure’, ‘search’, ‘insert’ etc.
I started to understand how the possible values are added in config.values.php, the default value set in config.default.php and went on to see where I have to make changes so that nothing is broken while shifting from old values to new values.
I added a new function getScriptNameForOption($target, $location) in Util.class.php which would return the script name (generally appended in html for links and all) by providing the currently set $cfg value through the parameter $target. In this, I also took care that the old values were also working as expected and did not break the links. $location was required because the config words were not unique now. For example, $cfg[‘DefaultTabTable’] = ‘structure’ would mean ‘tbl_structure.php’ while $cfg[‘DefaultTabDatabase’] = ‘structure’ would mean ‘db_structure.php’. $location would have possible values of ‘table’, ‘database’ and ‘server’.
Then, I searched where were we just appending the $cfg value to the links and replaced it with corresponding calls to the new function getScriptNameForOption($target, $location).
Later, Isaac suggested we present these possible values to the user in a better way and thus changed the config.values.php to adjust this. (By making ‘structure’ => __(‘Structure’) etc. ).
2. The RFE#1060 suggests that the ‘Designer settings’ like ‘Angular / Direct Links’, ‘Snap to Grid’ etc. should be remembered.
The first and foremost question was ‘How’ ? I could think of 2-3 alternatives at first.
First, to store it in sessionStorage provided by HTML5 browsers.
Second, to provide a $cfg option directive.
Third, to store it in pma configuration storage.
At first, I was aligned towards the second option but Isaac rightly pointed out that it may not be so easy to remember/ store through the UI as we can not write the new value to config.inc.php.
Then, we decided to go on with sessionStorage and I have implemented it with  which is currently open for discussion and review.
But today, Marc pointed out that the user may want persistent and that he thinks we should store it in the configuration storage instead. This is also seeming right to me.
Let’s see. We will discuss and close accordingly. The update will be posted here next week.
Implemented with: 1. RFE#1594- 
Also some small errors in RFE#1594’s implementation were later fixed in .
 : https://github.com/phpmyadmin/phpmyadmin/pull/1732
 : https://github.com/phpmyadmin/phpmyadmin/commit/cad0eda2c71b7bcb6b9c2e328a9ae63d9e3ada30
 : https://github.com/phpmyadmin/phpmyadmin/commit/79b43e1c8a74670f2f07d0137170907bc6537d18