Archive for the ‘Summer of Code 2010’ Category

User preferences – weeks 11 and 12

August 16th, 2010 No comments

My last Summer of Code report for my user preferences project. During last two weeks I worked on fixing bugs and improving code documentation. The most notable changes include:

  • fixed <select> handling
  • fixed regular expression validation when phpMyAdmin custom error handler is set
  • removed debug code, made CSS caching aware of user preferences changes
  • fixed configuration merge when importing settings
  • added information about setup script to “manage your settings” tab, as some people are not aware that such feature exists
  • cleaned up comments
Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 10

August 1st, 2010 No comments

Despite encountering some bugs in my code, I managed to finish all planned tasks, i.e.:

  • some fields have an additional comment (denoted by a blue “i” next to them), with an information whether required PHP extension is available (for compression and validator), or whether field value has an upper limit (MaxDbList, MaxTableList)
  • users can change only_db and hide_db values

Other changes and fixed bugs:

  • user preferences forms now work correctly without output buffering
  • removed superfluous ob_end_clean() which caused page rendering to fail when OBGzip was enabled
  • fixed config file generation in setup script when users clicks Download without showing preview
  • further improvements to array formatting in config files generated by setup script
  • fixed some fields not saving due to equality conversions (eg. 0 == ‘auto’)
  • selected tab is kept selected when settings are saved

Additionally, “Validator” tab has been removed from user preferences.

In the next two weeks I intend to find and remove remaining bugs, check code comments and improve documentation.

Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 9

July 27th, 2010 No comments

Things done in week 8, aside from styling changes and bugfixes:

  • connection collation and language are saved to user preferences
  • better tab menu – tabs that don’t fit into the first line of menu are collapsed into a submenu; when window size changes, items are added to it or removed, depending on current window size
  • cleaned up config tabs JavaScript to be simpler, using jQuery’s functions
  • Developer tab (controlled by UserprefsDeveloperTab setting) with debugging options
  • Warnings tab with options to disable mcrypt, Suhosin and pmadb warnings
  • SQL Validator tab, allows users to enable SQL validation provided by Mimer SQL Validator Web Service
  • changes in Server tabs in setup script

This week I want to improve configuration forms and make them easier to use: include some more information (eg. whether required extension is available at all). I have yet to decide whether do it by adding information somewhere near such option, or use validation message for that.

Next, I want to look into allowing users to set only_db and hide_db.

Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 8

July 19th, 2010 No comments

Tasks completed this week:

  • HTML 5 local storage – proper UI, if pmadb is unavailable user is asked whether settings from browser should be imported
  • import – allow to import configurations that fail validation, invalid fields are skipped
  • UI – CSS for Darkblue/orange theme, shorter inputs for numeric inputs
  • validation – valdiators can be configured by taking additional arguments, one field can have many attached valdiators
  • MaxDbList and MaxTableList options – in user preferences forms their values are bounded by the original value
  • bugs fixed: user preferences didn’t work correctly with fontsize and DefaultTheme, “restore default value” button in forms was always displayed, added a few missing string escapes in phpMyAdmin code, added missing validations for a few options, added missing comments to some functions

This week I want to:

  • store connection collation and language in user preferences
  • allow users to disable some options (eg. “Validate SQL” link, main frame information) which are enabled, but without the possibility to enable them
  • experiment with phpMyAdmin tabs and figure out a good way to hide some rarely used options under a menu link, something like:
    “Option 1” “Option 2” “More >”
    Hovering over “More” would show a vertical menu with hidden options, users wolud be able to determine which options should go into this menu
  • if I will have enough time, look into allowing users to set only_db and hide_db
collation_connection lang

Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 7

July 12th, 2010 No comments

Import and export for files in JSON format and for HTML 5 local storage is almost complete. There are still a few things that don’t work and a few I want to add, but basic functionality is there.

User preferences are moved to server top level menu, along with a new page for import and export.

This week I will finish preferences import/export, and try to catch and fix all remaining bugs. The next task is to check whether all user-editable string inputs are safe to use and add value escaping where it is needed.

Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 6

July 5th, 2010 No comments

Import and export options are in place. After giving it some more thought, I settled on manually copying all options to configuration files. It meant more work to get it done, but allowed me to group similar formats and keep form list short. Also, loading everything from plugin files would mean reading a dozen of additional files and storing a big cache array in session.

Besides taking care of the remaining options, I finally removed all unnecessary strings from and finished refactoring of old code.

This week I plan to add import and export functionality for user preferences, and HTML 5 persistent storage.

Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 5

June 28th, 2010 No comments

Changes for the previous week:

  • setup script generates nicely formatted arrays when needed
  • new configuration oprion: $cfg['UserprefsDisallow'], allows to disallow user modifications to some values
    each setting in setup script that can be overridden by users now has a checkbox which allows to modify UserprefsDisallow
  • disabled options are marked as such in user preferences panel, tabs now have icons (I reused already available ones)
  • user preferences are applied immediately after save (at least from a user’s viewpoint), if any changed setting concerns the navigation frame, it is reloaded

In the meantime, Michal Čihař set up demo servers with all Summer of Code projects, updated to reflect current state of our repositories. If you are interested how we are doing, take a look:

My original plans for this week consisted mostly of clean up of refactored code, which is already done, so now I intend to take a closer look at import and export plugins. I have not decided yet whether I will duplicate all settings and put them in my configuration forms (the easy and inflexible way), or change plugins in a way allowing me to automatically read required information directly from their files (more complex but flexible, all future plugins and changes would not require any changes to user preferences).

Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 4

June 21st, 2010 No comments

Report for 4th week of Google Summer of Code.

Saving settings to database took me longer than I anticipated, so not everything I planned got done during this week. After finding a proper way to handle pmadb and finding a good place to call settings loading, I hit an unexpected problem with input validation – setup script’s code allowed to actually save incorrect data after showing a warning (what, after writing it myself two years ago, I totally forgot). I modified the approach for user preferences to disallow it, so that users will be able to save only forms that pass all validation rules.

So in short, tasks done:

  • forms are properly styled
  • user preferences are integrated with phpMyAdmin: saving and loading works
  • added proper error handling when submitting forms with erroneous data

My plans for the next week include integration with setup script (setting which options can be configured by end users). If I find time between learning for my exams, I will also clear my backlog – add Import and Export options.

Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 3

June 13th, 2010 No comments

Week 3 progress report for user preferences.

Things done:

  • added proper form display for most options, along with proper styling, default value setting and JavaScript validation
  • refactored setup script JavaScript code and fixed all comments to conform to JSDoc
  • added validation and translation strings for some new options

Tasks for the next week:

  • finish form display
  • add user preferences saving to pmadb
  • take care of Import and Export forms
Categories: phpMyAdmin, Summer of Code 2010 Tags:

User preferences – week 2

June 9th, 2010 No comments

Week 2 progress report.

I refactored most of setup script’s form handling classes to be more generic, settings’ medatada and validation information is now stored in config.values.php. All forms except for Import and Export tabs are defined.

This week I want to have first forms displayed, value reset and saving will come at a later date.

Categories: phpMyAdmin, Summer of Code 2010 Tags: