Planet phpMyAdmin

December 09, 2014

Madhura Jayaratne

phpMyAdmin work during the ninth week

This was a four day week since I was on leave on 3rd Wednesday.

During the week I was more engaged in code improvement work opposed to putting effort on bug fixing compared to previous weeks. The jQuery and jQuery-ui versions phpMyAdmin was using were too outdated and it needed an upgrade for sometime. jQuery was stuck at version 1.8 since there were major changes in upgrading from 1.8 to 1.9. This included a set of methods removed such as .live() and .die() methods which were deprecated for sometime. However, these methods were heavily used in phpMyAdmin making phpMyAdmin stuck at version 1.8.

I started with going through the upgrade guide for jQuery 1.9 [1] and inspecting the phpMyAdmin for possible breakages in case of an jQuery upgrade. There were heaps of .live() and .die() methods to be replaced and more instances of other methods removed. 

Then I went on to check each of jQuery plugins for their updates as most of them were pre 1.9. Some of them had updates - the ones that are actively being developed -, while for the others, I had to patch them to be compatible with jQuery 1.9+. Now after much effort phpMyAdmin uses jQuery version 1.11.1 and jQuery-ui version 1.11.2.

Code improvements
Making code compatible with jQuery 1.9+ and upgrading phpMyAdmin to use latest versions of jQuery and jQuery-ui
Upgrading phpMyAdmin to use latest versions of jQuery plugins where newer versions are available and upgrading other jQuery plugins to be compatible with jQuery 1.9+

Bug Fixes
#4615 SQL highlighting in process list breaks on auto refresh
#4616 Warning on db structure print view page
#4618 Page scrolls while GIS visualization is zoomed in/out with mousewheel

Security fixese
#4611 DOS attack with long passwords (coordination)
#4612 XSS vulnerability in redirection mechanism (coordination)

[1] http://jquery.com/upgrade-guide/1.9/

by Madhura (noreply@blogger.com) at December 09, 2014 12:07 PM

December 05, 2014

Michal Čihař

Weblate 2.1

Weblate 2.1 has been released today. It comes with native Mercurial support, user interface cleanup and various other fixes.

Full list of changes for 2.1:

  • Added support for Mercurial repositories.
  • Replaced Glyphicon font by Awesome.
  • Added icons for social authentication services.
  • Better consistency of button colors and icons.
  • Documentation improvements.
  • Various bugfixes.
  • Automatic hiding of columns in translation listing for small screens.
  • Changed configuration of filesystem paths.
  • Improved SSH keys handling and storage.
  • Improved repository locking.
  • Customizable quality checks per source string.

You can find more information about Weblate on http://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user. Ready to run appliances will be soon available in SUSE Studio Gallery.

Weblate is also being used https://hosted.weblate.org/ as official translating service for phpMyAdmin, Gammu, Weblate itself and others.

If you are free software project which would like to use Weblate, I'm happy to help you with set up or even host Weblate for you.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far!

Filed under: English phpMyAdmin SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at December 05, 2014 02:25 PM

December 03, 2014

Madhura Jayaratne

phpMyAdmin work during the eighth week

As mentioned in my last blog post I started working on the token mismatch issue that we received a lot of complaints about for so long. The main issue was that both http and config authentications were not able to refresh the page when when PHP session expires. I implemented a solution similar to what we used for cookie authentication on session timeout which would refresh the page with new token. 

I also attended to regular bug fixes reported within the week. Altogether here is the list of bugs fixed and attended.

Bugs fixed
#4605 Unseen messages in tracking
#4606 Tracking report export as SQL dump does not work
#4607 Syntax Error during db_copy operation
#4608 SELECT permission issues with relations and restricted access
#4227 Token mismatch when using HTTP AUTH and the SESSION expires
#4280 Error: Token mismatch
#4387 Token mismatch (one server http auth, one cookie)
#3893 Token mismatch error on every action

Bugs attended
#4569 Issues with Relation View dropdowns
#4409 Not displaying results of archive table

During the latter part of the week I concentrated on refactoring and code improvements. I improved the database and table level tracking pages with facility to enable/disable tracking for multiple tables, ability to delete multiple versions of tracking etc. I also worked on displaying results of multiple queries. This involved quite a lot of changes since most of the work had been done assuming that only one result set would be displayed. This work continued to the next week. So here is the list of feature requests and refactoring done during the week.

Feature requests
#1562 Allow tracking multiple table at once from database level tracking page
#1564 Improve action message on Tracking page

Refactoring and code improvements
Refactoring database level and table level tracking pages
Refactoring query results display page to facilitate display results of multiple queries at once

PS: I took the day off on Monday, the 24th.

by Madhura (noreply@blogger.com) at December 03, 2014 01:19 AM

November 27, 2014

Madhura Jayaratne

phpMyAdmin work during the seventh week

This week was quite busy with a lot security fixes. At the beginning of the week 5 security vulnerabilities were reported and I spent most of Monday and Tuesday doing fixes, porting them to other branches, preparing security advisories and communicating with reporter, security team and CVE team.

Following are the list of security vulnerabilities fixed.

Security fixes
#4594 Path Traversal in File Inclusion of GIS Factory
#4595 Path Traversal can lead to leakage of line count
#4596 XSS through exception stack
#4597 XSS through pma_fontsize cookie
#4598 XSS in multi submit

During the week I was also engaged in usual bug fixing and following bug fixes are now ready to be released with the next release.

Bug fixes
#4057 db/table query string parameters no longer work
#4444 No insert statement produced in SQL export for queries with alias
#4591 Spinner in navigation running forever
#4599 Input field is erased after keyboard language switch
#4602 Exporting selected rows export all rows of the query
#4603 Field disabled when internal relations used

Additionally, I also attended to the following bugs.

Bugs attended
#4254 Unable to log in after timeout had been exceeded (cookie)
#4008 Unable to log back in after session expired
#3773 No tables shown because of privileges of views
#4367 Import status infinite loop
#4295 Problem when session expires while importing file

Towards the end of the week, I had a look at the token mismatch issue that were reported to us several time. I will update you on the progress of this in the next post.

by Madhura (noreply@blogger.com) at November 27, 2014 04:36 PM

November 18, 2014

Michal Čihař

Mercurial support in Weblate

Weblate has started as a translation system tightly bound to Git version control system. This was in no means design decision, but rather it was the version control I've used. But this has shown not to be sufficient and other systems were requested as well. And Mercurial is first of them to be supported.

Weblate 2.0 already had separated VCS layer and adding another system to that is quite easy if you know the VCS you're adding. Unfortunately this wasn't the case for me with Mercurial as I've never used it for anything more serious than cloning a repository, committing fixes and pushing it back. Weblate needs a bit more than that, especially in regard to remote branches. But nevertheless I've figured out all operations and the implementation is ready in our Git.

In case somebody is interested in adding support for another version control, patches are always welcome!

Filed under: English phpMyAdmin SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at November 18, 2014 05:00 PM

Madhura Jayaratne

phpMyAdmin work during the third week

This blog post was due for sometime. However, I couldn't write it since I was busy attending the GSoC Reunion and doing some sight seeing in the USA afterwards.

During the third week of work I continued to focus on stabilizing the code for upcoming version 4.3 release. I was mainly attending to performance improvements related to the usage of information_schema. Following are the bugs addressed by the performance improvements

#3869 Count(*) on information_scheme.INNODB_BUFFER_PAGE with a huge bufferpool
#4243 Super slow page rendering with tens of thousands of DBs
#4513 phpmyadmin run very slow (information_schema)

Additionally hide_db, only_db directives were fixed as part of performance improvements fixing the following bug

#3820 hide_db, only_db not working in left panel

Further following bugs were also fixed

#4259 reCaptcha sound session expired problem
#4560 PHP error on master branch
#4564 Designer: spaces in table name with edit table link generates bad links
#4557 PHP fatal error
#4568 Date displayed incorrectly when charting a timeline
#4561 PHP error in transformations
#4431 Wiki page on charts is out of date

Two security issues were also identified and fixed during the third week.

#4562 XSS in debug SQL output
#4563 XSS in monitor query analyzer

by Madhura (noreply@blogger.com) at November 18, 2014 02:33 PM

phpMyAdmin work during the fifth week

I am back from the holiday going to GSoC Reunion and doing some wonderful sightseeing in the USA. During the fifth week of work (first week of November) I attended to  a mix of performance improvements as well as a couple of bug fixes.

I got access to the test server prepared by Ann + J.M. and could test the performance improvements done for the environments with thousands of databases. Even though I could achieve reasonable performance for privileged user, unprivileged users were still seeing long delays. Even 'SHOW DATABASES' queries were as slow as queries on information_schema. The only fast query to access database list was 'SHOW DATABASES LIKE '<db_name>' queries. So the navigation was updated to parse the GRANTS for the user to identify the database he/she has access to and those were used with 'SHOW DATABASES LIKE' queries to get the list of databases.

In addition to the above I attended to the following fixes during the week.

Bug fixes
#4577 Multi row actions causes full page reloads
#3481 Designer relations in IE 8 - partial fix
#4582 Debug SQL works only for the first page

Bugs attended
#3046 Tracking + MySQL interactive_timeout yields error
#3554 copy paste with middle mouseclick in colored sqlbox
#3073 auth_type signon - odd behaviour at ex- and importing

Security fixes
#4578 Undisclosed vulnerability
#4579 Undisclosed vulnerability

Refactoring
Refactoring Node class of the navigation

P.S: I was on leave on Friday due to personal reasons

by Madhura (noreply@blogger.com) at November 18, 2014 02:33 PM

phpMyAdmin work during the sixth week

During the week I mostly attended to bugs. Please find below the list of bugs fixed and attended during the week.

Bug fixes
#4582 Debug SQL works only for the first page
#4581 Some links in query_result doesn't work
#4404 Recordset return from procedure display nothing
#4584 Edit dialog for routines is too long for smaller displays
#4585 Multi query results not shown
#4588 Moving, renaming, dropping actions in table operations page results in token mismatch
#4589 Can not add new procedures

Bugs attended
#3588 X-WebKit-CSP Header breaks Safari
#3940 Content Security Policy errors with Safari 5.1
#4061 No error message when calling an insert stored procedure with too few parameters
#4590 "Browse Foreign Values" not working

In addition to the above I was occupied with upgrading the result showing for multiple queries. Earlier it is at a very primitive level where all the rows are shown without limiting and no additional browsing features present. I refactored the result showing mechanism to reuse it for the multiple queries. However, it was decided that the changes might make the upcoming release 4.3 unstable and now it is targeted for version 4.4. Here is the pull request

https://github.com/phpmyadmin/phpmyadmin/pull/1397

Following feature requests were also implemented during the week

Feature requests
#1556 Disabling Show all
#1553 InnoDB presently supports one FULLTEXT index creation at a time

by Madhura (noreply@blogger.com) at November 18, 2014 02:33 PM

November 06, 2014

Michal Čihař

Weblate 2.0

Weblate 2.0 has been released today. It comes with lot of improvements in backend and completely new user interface.

Full list of changes for 2.0:

  • New responsive UI using Bootstrap.
  • Rewritten VCS backend.
  • Documentation improvements.
  • Added whiteboard for site wide messages.
  • Configurable strings priority.
  • Added support for JSON file format.
  • Fixed generating mo files in certain cases.
  • Added support for GitLab notifications.
  • Added support for disabling translation suggestions.
  • Django 1.7 support.
  • ACL projects now have user management.
  • Extended search possibilites.
  • Give more hints to translators about plurals.
  • Fixed Git repository locking.
  • Compatibility with older Git versions.
  • Improved ACL support.
  • Added buttons for per language quotes and other special chars.
  • Support for exporting stats as JSONP.

You can find more information about Weblate on http://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user. Ready to run appliances will be soon available in SUSE Studio Gallery.

Weblate is also being used https://hosted.weblate.org/ as official translating service for phpMyAdmin, Gammu, Weblate itself and others.

If you are free software project which would like to use Weblate, I'm happy to help you with set up or even host Weblate for you.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far!

Filed under: English phpMyAdmin SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at November 06, 2014 01:00 PM

October 20, 2014

Michal Čihař

Hosted Weblate has new UI

The biggest part of this HackWeek will be spent on Weblate. The major task is to complete new UI for it. There have been already some blog posts about that here, so regular readers of my blog already know it is using Twitter Bootstrap.

Today it has reached point where I think it's good enough for wider testing and I've deployed it at Hosted Weblate (see Weblate website for conditions for getting hosting there).

I expect there will be some rough edges, so don't hesitate to report any issues, so that I can quickly fix them.

Filed under: English phpMyAdmin SUSE Weblate | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 20, 2014 01:00 PM

Enca 1.16

As a first tiny project in this HackWeek, Enca 1.16 has been just released. It mostly brings small code cleanups and missing aliases for languages, but fixes also some minor bugs found by Coverity Scan.

If you don't know Enca, it is an Extremely Naive Charset Analyser. It detects character set and encoding of text files and can also convert them to other encodings using either a built-in converter or external libraries and tools like libiconv, librecode, or cstocs.

Full list of changes for 1.16 release:

  • Fixed typo in Belarusian language name
  • Added aliases for Chinese and Yugoslavian languages

Still enca is in maintenance mode only and I have no intentions to write new features. However there is no limitation to other contributors :-).

You can download from http://cihar.com/software/enca/.

Filed under: Enca English SUSE | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 20, 2014 08:00 AM

October 15, 2014

Madhura Jayaratne

Working for phpMyAdmin and my work during the first week

I started working for phpMyAdmin on 1st October after my work proposal got selected for the phpMyAdmin Developer Position (one year contract). Here I am blogging about what I did during the first week. However, going forward I will probably write my blog posts during weekends rather than mid week.

Anyways, here is what I did during the last week.

Bug fixes
#4259 reCaptcha sound session expired problem
#4547 Micro history does not work in Users page
#4548 Inline editing a field converts tab to spaces
#4551 Wrong test in source code
#4552 Incorrect routines display for database due to case insensitive checks
#4553 Add index dialog does not open on choosing index from create table
#4537 BLOB inline-view JPG column transformation does not work for anything except simple queries
#4252 Database-level permission bug for db names containing underscores
#3120 events are not exported when using xml

Bug investigations
#4303 "New" link in navi panel is shown even if no privileges (out of date)
#4309 Cannot create/edit events and procedures (out of date)
#4495 Comment lines in multiquery
#4255 Can't enter when session die
#3154 No db table entry for users with table_priv only and no host

Feature requests
#1542 Better error reporting in Designer; can get stuck Processing

Security issues
#4544 XSS vulnerabilities in table search and table structure pages

Refactoring
Users page refactoring

Improvements
Proper privilege checks in procudures, events and triggers to enable editing, adding new ones
Various coding style and doc improvements

by Madhura (noreply@blogger.com) at October 15, 2014 06:00 AM

phpMyAdmin work during the second week

The second week of my work was relatively a short one since I had to take 2 days (8th Oct Wednesday and 13th Oct Monday) off. So effectively I only worked for 3 days (9th, 10th and 14th) during the second week.

As suggested in the monthly IRC meeting I focused more on stabilizing the code for the upcoming alpha release of version 4.3. I stated with performance improvements related to the usage of information_schema which was a problem since version 4.1. The work carried out can be found at pull request 1375 [1]

In addition to that the following bug was fixed.
#4556 Fast filters for tables, views etc. should be governed by NavigationTreeDisplayItemFilterMinimum

I also did some bug tracker clean up which which resulted in me attending to the following bugs
#3154 No db table entry for users with table_priv only and no host
#4277 Export problems - low execution time
#3165 Redundant Foreign Keys not supported

[1] https://github.com/phpmyadmin/phpmyadmin/pull/1375

by Madhura (noreply@blogger.com) at October 15, 2014 06:00 AM

October 08, 2014

Chirayu Chiripal

A new beginning with phpMyAdmin

After successfully completing my Google Summer of Code 2014 (GSoC) project, today, I officially became committee member of the phpMyAdmin project unanimously. Thanks to all team members for invitation. I must say that GSoC’14 was a great experience. I learned a lot in those 12 weeks. Special thanks to my mentor Isaac Bennetch for the guidance throughout the project. I would also like to thank other team members & developers: Marc Delisle (lem9), Michal Čihař (nijel), Hugues Peccatte (Tithugues), Madhura Jayaratne (madhuracj), Atul Pratap Singh (zixtor) for the support.


Filed under: Uncategorized

by chirayu45 at October 08, 2014 05:33 PM

Michal Čihař

Wammu 0.37

It has been more than three years since last release of Wammu and I've decided it's time to push changes made in the Git repos to the users. So here comes Wammu 0.37.

The list of changes is not really huge, but in total that means 1470 commits in git (most of that are translations):

  • Translation updates (Indonesian, Spanish, ...).
  • Add export of contact to XML.
  • Add Get all menu option.
  • Added appdata metadata.

I will not make any promises for future releases (if there will be any) as the tool is not really in active development.

Filed under: English Gammu Wammu | 0 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 08, 2014 10:00 AM

October 02, 2014

Michal Čihař

Merging Weblate instances

For quite some time, I've been running translation server for projects where I am involved at l10n.cihar.com. Historically this used Pootle, but when we had more and more problems with that, I've written Weblate and started to use it there.

As Weblate become more popular and I got requests to help people with running it, I've realized that it might be good idea to run server where I could host translations for other projects. This is when Hosted Weblate was born.

After some time, I've realized that it really makes little sense to run and maintain separate servers for these sets of projects, so I've decided to move all translations from l10n.cihar.com to hosted.weblate.org. Today this move was completed by moving translations for phpMyAdmin.

Filed under: English phpMyAdmin Weblate | 3 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at October 02, 2014 10:00 AM

August 22, 2014

Dhananjay Nakrani

Final evaluation of Google Summer of Code-2014 Project

Here it comes, the final evaluation results for my Google Summer of Code Project.

Again, I’m proud to announce that I have successfully passed it!! 8-) Time for one more and final paycheck. Also going to get some goodies from Google very soon.

On a side note, I am planning to work with phpMyAdmin as a volunteer-developer. My next task is to solve Issue#43 of error-reporting-server. I have already found one other cause (than indexing) for that problem. Will soon start working on it.

I will be posting a full article about my GSoC experience shortly.
Keep following!


by dhananjay92 at August 22, 2014 08:33 PM

August 18, 2014

Bimal Yashodha

GSoC 2014 week 13

As the GSoC 2014 has officially comes to it's end, I'm really happy that I could finish all my planned tasks successfully.

As a final change, I did some modifications in the exporting functionality, including few UI changes as follows:




Initially all the exporting types had same set of exporting options, although for some types, those options are not relevant. Now as shown above, upon selecting the export type, only the relevant exporting options will be shown. 

Apart from this modification, as I described in my last week's post, the whole schema exporting was re-factored in such a way that, it's now a plugin. So that in future, users can easily add new exporting types.  


by Bimal Yashodha (noreply@blogger.com) at August 18, 2014 06:12 PM

Ashutosh Dhundhara

GSoC 2014: Final report

13th week and final week of my project is over. Most of my work was over last to last week. I devoted my last week in improving the existing code and features and fixing some bugs.

Following are some keys accomplishments of last week:

  • RFE #1492 (Remove the distinct query window).
  • RFE #919 improvement.
  • Fixing of some issues reported by Scrutinizer and coding style (link).

This marks the end of my GSoC 2014 project.

Hoping for best in the final evaluation!


by ashutoshdhundhara at August 18, 2014 03:56 PM

August 11, 2014

Bimal Yashodha

GSoC 2014 week 12

After spending almost 12 weeks, I've not come to the final stage of the GSoC 2014. As a quick re-cap, my project was about merging "relational schema editor" funcationalities into the "designer", and make it functionally rich while introducing the OOP concepts into the code base and improve.

In this project I had 5 main tasks:

  • Provide single GUI editor for "relational schema editor" and  "designer".
  • Direct export of schema from "designer"
  • Introducing a client side storage for the designer, to make users enable to use the designer, even without doing the necessary configurations. And also export those designs in currently available formats.
  • Reduce code duplication in schema handling.
  • OOPing the designer code.  
As at now, I've successfully covered all these tasks and also did the following modifications:
  • Moved HTML codes of the pmd_designer to another file and only kept logic handling.
  • Designer exporting was re-factored as plugins.
The last two modifications will help further enhancement of the code and also the modularity and scalability.

To provide more information about making exporting functions as plugins, I've used the same approach which had used in "exporting data". "schema" folder was moved into the plugins folder and "SchemaPlugin.php" class controls the exporting through provided all four types. Export_Relation_Schema.class.php acts as the parent class of the export and all other schema classes are inherited from his class, by which OOP concepts are preserved, while removing code duplications.


by Bimal Yashodha (noreply@blogger.com) at August 11, 2014 07:14 PM

Ashutosh Dhundhara

GSoC 2014: Week 12

12th week of my GSoC 2014 project is over.

Key Accomplishments last week : RFE #1123 (under review)
Key tasks that stalled        : NONE
Code                          : rfe_1123
Tasks in upcoming week        : RFE #1492

By the end of this week I should have completed my project. But I will need 2-3 days more to finish it. Now I am left with only one task.

Last week I successfully implemented RFE #1123. It was quite confusing feature to implement. There were so many constraints and points to consider. But with the help of my mentor I was able to finish it. Although, it was my task to implement, but if we evaluate it on the basis of efforts made, all credit goes to my mentor Marc Delisle.

With this ‘Zero configuration’ feature, the user will be offered to create the configuration storage in the current database from the ‘Operations’ tab. If the PMA tables already exist in the current database, they will be used.

rfe_1123

This week I am going to work on RFE #1492, not all of it but only a part. This task was overlapping with one of my fellow GSoCer, Edward Cheng. So it was decided that I will look after the “Removal of separate Query window” part of this feature request.

I think I will be able to finish it by tomorrow thus getting some time for reviewing the whole project once again.


by ashutoshdhundhara at August 11, 2014 11:25 AM

Smita Kumari

GSoC'14 Project - wrapping up

My Google Summer of Code 2014 project has almost come to an end as today is soft "pencil down" date. It has been a great summer for me, I learnt a lot during the time. Worked on two amazing features Central list of columns and automated normalization upto Third Normal Form (3NF) for a widely used software phpMyAdmin . I hope to see these in later releases of phpMyAdmin.

First one month of the project, I worked on Central list of columns. As the name suggest, Central columns feature enables to maintain a central list of columns per database to avoid similar name for the same data element and consistency of data type for the same data element. You can use the central list of columns to add an element to any table structure in that database which will save from writing similar column name and column definition.

Remaining next two months I gave to automated normalization which is named as "Improve table structure" within phpMyAdmin and can be found on table structure page.  A wizard is presented to user which asks question about the elements during the various steps for normalization and new structure is proposed accordingly to make table into the First/Second/Third Normal form. On startup of the wizard, user gets to select upto what normal form they want to normalize the table structure.
As I see one added advantage of the automated normalization feature within phpMyAdmin can be even used to teach Database Normalization concept to students as it takes user to each and every step with a small explanation about the steps involved. As we know, we learn more by doing something with our hands than read about that same thing in a book. 

Both of these features are ready to use and can be forked on git from phpMyAdmin master branch. Here you can have a list of unnormalized tables on which you can test the normalizations. I would to love to have your valuable feedback on both the features. It may have few unexpected bugs that I didn't come across, feel free to report on phpMyAdmin bug list, I will be happy to resolve.

The last week, My task was to complete writing the Unit tests for Third normal form(3NF) which has already been reviewed and merged by my mentor. I have also completed the required documentation part that has also been merged. So I believe I have nothing left to do as part of my this year GSoC project with the help of one great mentor :-) but of course I will continue to improve my work and will keep maintaining these in my free time even after the summer. It was fun working during the summer. First time I experienced working on Open source project and it has been a good time and rewarding. I'll try my best to keep contributing for the open source community in future specially for phpMyAdmin.

I would like to say thank you to all the amazing people who made it possible specially Marc Delisle, My mentor who spent countless hours with reviewing my code, understanding to my problems and giving me some good suggestions.

by Smita Kumari (noreply@blogger.com) at August 11, 2014 06:28 AM

August 07, 2014

Madhura Jayaratne

Retrospect - continued...

If you missed the first part of this post you can find it here.<o:p></o:p>

Last week I concluded the blog post telling you how my FOSS life began with phpMyAdmin. It was just after the GSoC and the team was preparing to release the version 3.4 of phpMyAdmin. There was a lot of testing going on, bringing a continuous stream of bugs. This was a good opportunity for me to get a good hang of the code. I fixed quite a number of bugs. None of the alpha, beta or a release candidate version went without a fix from me. Version 3.4 was released soon and it was quite fascinating to see people using what you have contributed.<o:p></o:p>

I was still an undergrad and wanted to take part in the 2011 version of GSoC. Initially I wasn’t sure whether I could apply under phpMyAdmin since I was already a team member. However Marc Delisle, one of the project admins helped me clear my doubts and I chose to apply for project idea that was due for some time. The project was about supporting geographical data types in phpMyAdmin. My knowledge on the area was very limited, so I started doing my own little research. I tried out other database engines that had GIS support such as PostgreSQL and SQLServer and their clients. This helped me write a better proposal.<o:p></o:p>

To my delight, the project got accepted. I was going to spend my entire summer with phpMyAdmin!!! Michal Čihař, the other project admin was my mentor. My project covered quite a lot of areas related to geographical data types in phpMyAdmin. It included providing an interface to enter geographic data, visualizing them, exporting them, importing from ESRI format for GIS data as well as searching with geographical data specific functions. This covered most of the areas of the phpMyAdmin code and by the end of the summer I was more confident with the code. GSoC was a great experience for me, getting to know my mentor, the team and community well. <o:p></o:p>

2011 was quite an eventful year in my life. I graduated in December and started working. Of course this limited the hours I could put for phpMyAdmin, but I managed to contribute much during the weekends. Another very much looked forward to event was closing by. The team decided to meet in real life at FOSDEM 2012 in Brussels. All expenses covered visit to the best FOSS conference in Europe plus meeting the phpMyAdmin team!!! How cool is that!!! This was the first time I visited the Europe and this was an amazing experience to me. Subzero temperatures and snow was all new to me who is coming from a tropical country where the sun shines the whole year along. The conference was very rich with what it had to offer and it was a great opportunity for developing a closer friendship with my fellow team members. I did not forget to spend some time doing sightseeing in this beautiful country.<o:p></o:p>

GSoC 2013 edition was another milestone in my Open Source life. I was asked by the phpMyAdmin team whether I would like to mentor a GSoC project. The proposal submission period was a one big rush with a lot of discussions going on in the developer’s mailing list and receiving a large number of patches. Students were digging into the code as phpMyAdmin required the potential candidates to display their familiarity with code by submitting patches for bugs or new features. Reviewing proposals was very interesting with proposals varying from students who did not even know what phpMyAdmin is written in to student who knew very well the product as well the their proposed projects.<o:p></o:p>

I chose to co-mentor a project that was aimed at improving the testing mechanism and testing coverage of phpMyAdmin with Michal Čihař. It was indeed a very interesting project. It’s only when you are trying to write unit tests, you find the problems in the architecture. The student was willing to even improve the code by refactoring. He was enthusiastic about the project and quickly grabbed techniques like mocking for testing. It was a pleasure to co-mentor a student who’s enthusiastic and willing to learn. Even I learnt a lot on the technology front and from my co-mentor about mentoring a student.<o:p></o:p>


So this is how my FOSS life started and evolved, thanks to GSoC. I’m contributing to the project to date and I never seem to get bored doing that. Since FOSDEM 2012 I have met the team members twice, once in picture perfect Switzerland and more recently in Germany. I have developed stronger friendships with my fellow team members and even visited them in their home countries and looking forward to receive them back in Sri Lanka. I am mentoring a GSoC project this year as well. All in all I find it very satisfying to being able to contribute to this great work.<o:p></o:p>

by Madhura (noreply@blogger.com) at August 07, 2014 09:47 AM

August 04, 2014

Bimal Yashodha

GSoC 2014 week 11

As the program coming to its final stages, as planned before, I'm gradually reaching to the completion of my project.

During the past weeks, I've been working on the combined tasks: 

  • Reducing huge duplication of code in schema handling
  • OOPing the designer code
While doing these two aspects, as part of re-factoring, I separated out all the HTML codes from the pmd_general.php to a new library file pmd_general.lib.php. So all the logics which were handled by the pmd_general.php will remain there and the HTML codes will be retrieved from the pmd_general.lib.php file through function calls.

Also as a part of removing the code duplications in schema exporting, I'm trying to re-factor the existing 4 schema exporting types into 4 different plugins, as done in data export funcationalities in "export.php" file. So that when ever a new schema exporting method is needed, it can be easily plugged into the existing system.  

by Bimal Yashodha (noreply@blogger.com) at August 04, 2014 06:38 PM

Ashutosh Dhundhara

GSoC 2014: Week 11

11th week of my GSoC 2014 project is over.

Key Accomplishments last week : RFE #919,RFE #1491
Key tasks that stalled        : NONE
Code                          : rfe_919, about to create a PR for RFE #1491
Tasks in upcoming week        : RFE #1123

Last week I successfully completed RFE #919. It was quite a big feature to implement. Last week I also improved the ‘LEFT JOIN’ generation in QBE interface in case of Internal relations (commit). Now left join appears in a way that all rows of parent table appears whether they have any matching rows in the child table or not. This is the general requirement of any user.

Last week I also aimed for RFE #1491 which I have completed. I wanted to confirm the output of the feature with my mentor before creating a PR. I just got the reply of my mentor that results are fine. I am going to create a PR right after this post.

This week I am going to work on RFE #1123 (Zeroconf PMA tables support) which I feel is somewhat big feature to implement. Soon I will engage myself in a discussion regarding this feature on the mailing list. Hope to finish this feature before the end of this week.


by ashutoshdhundhara at August 04, 2014 12:06 PM

Chirayu Chiripal

GSoC 2014 Week #12: Improved notification when attempting to insert invalid data

Week #12 Task:  Improved notification when attempting to insert invalid data
Scheduled Deadline: August 04, 2014
Completed On: August 04, 2014

How it was done: In this week, I improved the validation of various fields:

  • Integer type column fields: Considered range of all integer types (TINYINT, INT, BIGINT, etc.) including SIGNED or UNSIGNED attribute by adding data-min & data-max attributes to the field which specifies the minimum and maximum value of the field respectively which is checked when field value is changed using JavaScript. But as JavaScript supports upto 53 bit numbers (after that approximation comes into play) which was not enough for MySQL point of view which has support for 64 bit Integer also. We needed precision upto 64 bits so the best option was to compare numbers as strings and not as number actually. So, I created a big_ints.js file which is BigInts library of phpMyAdmin. Currently, it has BigInts.compare and BigInts.lpad function only as those were required for this task. The BigInts.compare function compares the two number in string of any size (practically limited to the maximum size of string in JS) which also supports negative numbers as well as numbers with leading zeros for e.g. 0001 when compared with 1 will be considered as equal.
  • AES_ENCRYPT, AES_DECRYPT validation: The output of AES_ENCRYPT and AES_DECRYPT is in binary, so applying these functions to varchar or char types doesn’t makes sense. So, whenever AES_ENCRYPT or AES_DECRYPT is chosen in function column then it checks whether the column is of BINARY or BLOB types. Otherwise it will turn the function column field red denoting that this function is not applicable to current field.
  • Character columns length validation: Earlier HTML maxlength property was used to allow user only to enter that many characters into the field but from the discussion on mailing lists it seemed that it was better to allow user to continue even if we feel that it is not correct and let MySQL truncate the data accordingly. So, I changed maxlength to data-maxlength and used it to check whether length has exceeded the maximum length supported by column and indicate it by turning the field red. I also tested this with multibyte character sets in which one character may take more than one byte for storage and it was found that JS length property handles it efficiently and we can rely on it.
  • MD5 validation: The output of MD5() is a string of 32 hexadecimal digits irrespective of data length. So, using this function on varchar(5) like columns where column size is 5 (less than 32) will cause the result to be truncated and to indicate that we turn the function column field red.

Code: https://github.com/phpmyadmin/phpmyadmin/commit/11ae13f1772ad74aca63e069ca629089534ad58e
Key accomplishments last week: Improved notification when attempting to insert invalid data.
Key tasks that stalled: None.


Filed under: GSoC 2014

by chirayu45 at August 04, 2014 11:25 AM

Smita Kumari

GSoC'14 week 12: List of tasks to accomlish

The last week of project is starting today. For the last 11 weeks, I worked on adding two new features Central list of columns to the phpMyAdmin and automated normalization upto 3NF.
During last week, 11th week of the project I was working on coding for normalization to 3NF. That work is still under review, yet to be merged. So this week some time may go in fixing the bugs/suggestions if any from my project mentor Marc Delisle or other phpMyAdmin members.
Also after the 3NF gets merged, this week I have to write unit tests for the codes written for Third normal form.
In summary, List of tasks to accomplish includes:
  • Fix bugs, implement suggestions if any to 3NF.
  • Write unit test for the codes written for Third normal form (3NF).
I would also like to request other phpMyAdmin members to checkout the automated normalization and give me your valuable feedbacks if any. Here you can have a list of unnormalized tables on which you can perform the normalizations.

by Smita Kumari (noreply@blogger.com) at August 04, 2014 10:50 AM

GSoC'14 coding week 11: Automated normalization to 3NF

This week started with me coming back to my college on Monday after my summer vacations. So the actual coding work I started on Tuesday. As I had mentioned in my last blog, this week I was supposed to complete the normalization to Third normal form. From the definition of Third normal form, to convert a table which is in 2NF into 3NF we check for transitive dependencies. Since after 2NF, all the columns are completely dependent on complete primary key so to find the transitive dependency we need to just check if there any non primary columns which determines other non primary column. for example, let say a table has columns pk1, pk2, col1, col2, col3 which is in 2NF implies (pk1, pk2) - > col1, col2, col3. Now if let say col1->col2 then we can say col2 transitively depends on (pk1, pk2) as (pk1, pk2)-> col1 and col1->col2 .
So to find out the transitive dependencies, for each of the non primary columns, I'm asking if it depends on any other non primary columns.
After second normal form, original table may split into more than one tables so I needed to process all those tables for Third normal form simultaneously.
These pictures shows the flow of 3NF starting from the new tables created during 2NF.

That's all for the 11th week. Feel free to give your feedback on my work for automated normalization and central list of columns in phpMyAdmin. Checkout my next blog for the tasks I need to accomplish during the 12th and last week of my GSoC'14 project.

by Smita Kumari (noreply@blogger.com) at August 04, 2014 10:23 AM

July 29, 2014

Dhananjay Nakrani

Week-12: php Error Reporting (GSoC’14 project)

12th week of my GSoC project is over now. The objective of this week’s work was to finish remaining tasks from previous weeks.

Tasks Completed this Week:

The project was estimated to finish in 12 weeks in the proposed schedule for this project. Since couple of the things are still remaining from the proposed tasks, I am extending the project to one more week. This week, that is Week#13, will be the last week for this project. The remaining task, task#4.3, will be completed this week only.

One more task, namely issue#43, was assigned to me by my mentor, Michal. Since it is not part of GSoC it is excluded from the current schedule. I will work on it as a volunteer after completion of this project.

Week#13 Tasks:

Objective:
⇒ Give Final Touch to the developed Code.
⇒ Complete Stalled Tasks.
    ⇒ Correct redirection after user logs in.


by dhananjay92 at July 29, 2014 05:45 AM

July 28, 2014

Bimal Yashodha

GSoC 2014 week 10

Under re-formatting and OOPing the code, I did some changes to the pmd_general.php file. Now the functions and HTML codes are separated. HTML codes have moved to another file, and all the logic are in the pmd_general.php file.

Also I'm currently developing designer as a separate component, and will post more details about it in another blog post.

by Bimal Yashodha (noreply@blogger.com) at July 28, 2014 07:27 PM

Chirayu Chiripal

GSoC 2014 Week #11: Navigation state lost on reload

Week #11 Task:  RFE #1426 Navigation state lost on reload
Scheduled Deadline: July 28, 2014
Completed On: July 26, 2014 (to be reviewed)

How it was done: The idea to implement this was to save the current navigation tree state in sessionStorage and then restore the navigation tree from that on page load. Also, as most of the operations in phpMyAdmin are now AJAXified, many operations changed the state of navigation tree, so there was need to update the navigation tree state in sessionStorage in such situations. To achieve this following ideas came to my mind:

  1. Listen to DOM (HTML structure) changes in the navigation tree div and update the state in sessionStorage. After googling a bit to find out if such event exists or not, I found something called Mutation Observers. This seemed to be perfect solution at first sight but after probing it little further, I found that this was not supported by some of the old versions of the browsers (not that old) [MutationObserver compatibility table from caniuse.com]. So this idea was dropped.
  2. Listen for event which gets fired before page reload and update state in sessionStorage before actual reloads happen. That event was onbeforeunload/onunload but the behavior of this event was not consistent across different browsers (browsers impose some restrictions on the code which can be used inside event handler for this event and this restrictions varied from browser to browser). The reason for such restriction was the misuse of this feature to stop a user from navigating away and throwing annoying popups. So, I kept this idea aside for a while.
  3. Call update function to save state in sessionStorage at those places where we update the navigation tree and restore from it whenever page loads. I prefered this method to implement this feature.
  • The browser compatibilty table for web storage (sessionStorage & localStorage) from Caniuse.
  • To check whether your browser supports web storage and to know its storage limit visit here.

Code: https://github.com/phpmyadmin/phpmyadmin/pull/1302
Key accomplishments last week: RFE #1426 Navigation state lost on reload
Key tasks that stalled: None.
Tasks in the upcoming week: Improved notification when attempting to insert invalid data.


Filed under: GSoC 2014

by chirayu45 at July 28, 2014 12:51 PM

Ashutosh Dhundhara

GSoC 2014: Week 10

10th week of my GSoC 2014 project is over.

Key Accomplishments last week : Finalized UI for RFE #919
Key tasks that stalled        : RFE #919
Code                          : NONE
Tasks in upcoming week        : RFE #919,RFE #1491

Last week I went on a discussion with my mentor and finalized UI for RFE #919. Below is the screenshot for the same.

rfe_919_2

I have almost finished the front-end part of this feature. I will try to finish this feature as soon as possible and start working on the next task (RFE #1491) before the starting of next week.


by ashutoshdhundhara at July 28, 2014 09:17 AM

July 27, 2014

Smita Kumari

GSoC'14 week 10 - 11

Time flies so quick. now that 10th week of the project is also over, just 2 weeks left to finish up the project.

Every week I used to write two blog posts, one with my accomplishment last week and other with the list of tasks to accomplish for the coming week but this time I chose to write just a single post for both the purpose as I don't have much to write about my 10th week accomplishment. This week I didn't work much. As tomorrow I'm leaving for college, this was the last week home this summer so most of time went in meeting friends and families. But yeah, I have finalized the work flow for 3NF on my end which doesn't differ a lot from 2NF though.  so I can start coding for 3NF immediately in the coming week as soon as I reach college and should not take much time to finish.

I hope, I'll  finish the coding of 3NF and get reviewed in this coming week which is 11th week of the project.

After that I'll have 1 more week remaining, in that I will write unit tests for 3NF and thinking to ask for reviews from phpMyAdmin members for any improvement or fix I can do in the code written during the summer.
Wish me luck! :-)

by Smita Kumari (noreply@blogger.com) at July 27, 2014 09:18 PM

Madhura Jayaratne

Retrospect

It was the year 2010 and I was into a 6 month internship which was a part of my Bachelor’s Degree. Somebody reminded me that the year’s GSoC program has been announced. Before I tell you anything more, I think I need to tell you about how GSoC was viewed by us at University of Moratuwa.

To us at University of Moratuwa, the GSoC was a big deal. By 2010, the University has topped in terms of the number of proposals accepted for a couple of consecutive years and everybody was so excited about the program. There was a strong motivation inside the university towards contributing to FOSS which encouraged students to apply for GSoC while the GSoC itself made people more aware about the FOSS world, creating a spiral effect. So all in all, winning a GSoC was something to be proud of at Mora.

So, determined to win a GSoC project I started exploring the project ideas. Let alone the project list, the organization list was so long. However, I found this interesting project idea in phpMyAdmin’s idea list which was about adding charts to phpMyAdmin. This was somewhat related to what I was doing at my internship. But I did not have any experience with FOSS communities. Communicating in mailing lists, going through code and documentation to understand the architecture, submitting patches was all new to me. But I did not have any choice; I communicated my interest on dev mailing list and started exploring the code. phpMyAdmin had a strict selection process where the students were required to submit patches to show their familiarity with the code. So the next logical step was to chose a bug from the bug tracker and submit a patch, which would have been little easier if I were more familiar with GIT, the version control system phpMyAdmin was using. phpMyAdmin wiki and other documentation was my savior, providing much valued insight into the project; I read every page of them.

It was very fascinating to see some of my patches getting accepted. Some patches received feedback from developers on how to improve and not so lucky patches got rejected. All in all it was quite interesting to contribute with phpMyAdmin project. I was enjoying the process very much. Then came the accepted list of GSoC projects for the year. Nope, you guessed it wrong, my project was not there! Someone else probably submitted a superior proposal. Was I sad? May be. But I was already enjoying contributing to FOSS.

After a couple of months, my internship had ended and I was back in the University. It was those days where you have more than enough time to do whatever you like. So why not fix a couple of bugs in phpMyAdmin! More interactions on dev mailing lists, more patches, more feedback and I was enjoying working with phpMyAdmin. Then came a surprise, an email from one of the project admins of phpMyAdmin asking whether I am interested in joining the phpMyAdmin team. I was over the moon, happily surprised, sent a reply saying yes. That is how my FOSS life began with phpMyAdmin.

To be continued …

by Madhura (noreply@blogger.com) at July 27, 2014 05:45 PM

July 22, 2014

Bimal Yashodha

GSoC 2014 week 8 and 9

Over the last two weeks I have done several things (I couldn't put my last week's post because I had to attend to a family matter, so I could work much on the project as planned).

First I completed the 3rd task, which was to enable the user to use designer, even though the designer related tables are not created. For this task, I used browser storage mechanism, this is Indexed DB. So now the user doesn't have to configure the php myadmin to use the designer, instead using a Indexed DB supported browser, user can use the designer similar to all other functions. Even the pdf exporting has been enable for those scenarios.

From the planned tasks,  "reducing huge duplication of code in schema handling" and  "OOP"ing the code are remaining. But as long as these two are going hand-in-hand, I started to do thse two tasks at the same time.


by Bimal Yashodha (noreply@blogger.com) at July 22, 2014 07:05 PM

July 21, 2014

Smita Kumari

GSoC'14 coding week 9: Writting unit tests

Week 9 of my GSoC project has been over. By week 8, coding for automated normalization to 1NF and 2NF was finished, So this week I wrote the unit tests for 1NF and 2NF. I wrote these unit tests using Test doubles Mock objects mechanism of PHPUnit, which provide a function getMock to automatically generate an object that can act as a test double for the specified original class. So within PhpMyadmin, I tried to Mock the DatabaseInterface, Thanks to Marc and Michal for the suggestion. Its an amazing concept to write the tests for the code block that have some components which cannot be used in the test environment for example database interactions in our case. Best part to writing unit tests is to get to see the increase in coverage reported by Coveralls :-). After this normalization unit tests patch the total coverage increment of PhpMyAdmin codebase reported was 0.8% and my code for 1NF and 2NF in normalization.lib.php shown to be covered 90%.

After done with writing test for 1NF and 2NF, I rewrote the unit tests for central list of columns code as well. Last time, I had written the test for only code segment which doesn't interact with database resulting the file central_columns.lib.php was being shown covered just around 37%. So I decided to improve those tests using Mock objects mechanism. It also resulted in overall increase in coverage by 0.52% and the file central_columns.lib.php is now covered 91% :-).

Apart from writing Unit tests, this week I also completed the pending task from last week, that was to add a new step in 1NF normalization. It allows user to move the repeating group of columns to new table. Repeating group is group of two or more columns which are closely related and and are all repeating the same attributes. for example, table storing phone1, phone2, phone3 forms repeating group which needs to be moved to another table that have original table's primary key columns and a new column phoneNumber in order to make the original table in 1NF.

That's all done for the week. In the coming weeks, I'll be working on automated normalization to 3NF.

by Smita Kumari (noreply@blogger.com) at July 21, 2014 12:46 PM

Chirayu Chiripal

GSoC 2014 Week #10: User privilege tab not shown in all relevant cases (Contd.)

Week #10 Task: RFE #1488 User privilege tab not shown in all relevant cases
Scheduled Deadline: July 14, 2014
Completed On: July 17, 2014 (to be reviewed)

How it was done: This week I continued the pending task from last week.

  • Added two variables is_createuser, is_grantuser. These denotes whether the logged in user has CREATE USER & GRANT OPTION privilege respectively. To check whether user has those privilege, I have used INFORMATION_SCHEMA.USER_PRIVILEGES table.
  • Now a user is shown, “Users” tab if (s)he is one of the following:
    1. is_superuser
    2. is_createuser
    3. is_grantuser
  • If a user doesn’t have SELECT privilege on mysql.user table then currently it is not possible to see list of users and their privileges even if a user has ALL privileges on particular database. So, in such cases we can’t provide them UI for changing the user privileges. But, if user has CREATE USER privilege then (s)he can still create new user but will be shown a message that (s)he doesn’t have enough privilege to view users.

    User having CREATE USER privilege but no SELECT privilege on mysql.user table.

    User having CREATE USER privilege but no SELECT privilege on mysql.user table.

  • Also, added a notice for the user, when they are changing the privileges of the account through which they are logged in.
    Notice for the user changing his own privilege.

    Notice for the user changing his own privilege.

    No notice when changing some other user privilege.

    No notice when changing some other user privilege.

  • Refactored few functions in order to remove duplicated code fragments from them.

Code: https://github.com/phpmyadmin/phpmyadmin/pull/1289
Key accomplishments last week: RFE #1488 User privilege tab not shown in all relevant cases.
Key tasks that stalled: None.
Tasks in the upcoming week: RFE #1426 Navigation state lost on reload


Filed under: GSoC 2014

by chirayu45 at July 21, 2014 12:46 PM

Smita Kumari

GSoC'14 week 10: List of tasks to accomplish

10th week of my GSoC project has started today, only 3 weeks left to finish the project now and I have 3NF automated normalization to finish up. As coding and writing unit tests for 1NF and 2NF is complete So this week, I'll start working on automated normalization to 3NF.
The main task this week will be to decide the steps involved in 3NF and finalized the questions to ask from user in order to generate the transitive dependencies needed to convert the relation to Third normal form.

by Smita Kumari (noreply@blogger.com) at July 21, 2014 12:38 PM

Ashutosh Dhundhara

GSoC 2014: Week 9

Ninth week of my GSoC 2014 project is over.

Key Accomplishments last week : RFE #908 (to be reviewed)
Key tasks that stalled        : NONE
Code                          : rfe_908
Tasks in upcoming week        : RFE #919

Last week I worked on RFE #908. The work is still under review.

rfe_908

 

This week I am going to work on RFE #919 (Multiple-column foreign key relation). Before starting any development, I will discuss this feature on mailing list.


by ashutoshdhundhara at July 21, 2014 11:55 AM

Dhananjay Nakrani

Week-11: php Error Reporting (GSoC’14 project)

11th week of my GSoC project is over now. The objective of this week’s work was to correct the redirection after user logs in.

Tasks Completed this Week:

  • Add Mass Action feature for Notifications. See 56367c1.
    ⇒ Now user can select multiple Notifications and mark them as read. It is implemented such that the feature of Mass Action on Notifications can be extended further for other actions too.
  • Add Cron Action to delete older Notifications. See df83964.
    ⇒ With this cron action, older notifications will be deleted. Currently the period is kept for 60 days (approx. two months), i.e. Notifications older than sixty days will be removed.
    ⇒ To do that, add following command to cron jobs.

    # Command to execute the Cron action
    # <php cli parser> app/webroot/cron_dispatcher.php <Relative URL of Cron Action>
    php app/webroot/cron_dispatcher.php /notifications/clean_old_notifs
    
    
  • Add Mass Action for Reports.
    STATUS: Incomplete.
    ⇒After adding one more column of check-boxes into the data tables, searching and sorting functionalities were affected. They’re being corrected currently. Commits will be pushed soon.

Week#12 Tasks:

Objective:
⇒ Write Final Tests & Give Final Touch to the developed Code.
⇒ Complete Stalled Tasks.

  • Fix the Sorting & Seraching functionalities in Mass Action for Reports.
  • Write test cases for Notifications Model & Controller.
  • Correct redirection after user logs in.

As per the project schedule, just one week(week#12) remaining in completion of my Google Summer of Code Project’14.
Hoping to complete the project in this week only. :-)


by dhananjay92 at July 21, 2014 04:22 AM

July 15, 2014

Michal Čihař

New UI for Weblate

For quite some time, I'm working on new UI for Weblate. As the time is always limited, the progress is not that fast as I would like to see, but I think it's time to show the current status to wider audience.

Almost all pages have been rewritten, the major missing parts are zen mode and source strings review. So it's time to play with it on our demo server. The UI is responsive, so it works more or less on different screen sizes, though I really don't expect people to translate on mobile phone, so not much tweaking was done for small resolutions.

Anyway I'd like to hear as much feedback as possible :-).

Filed under: English phpMyAdmin SUSE Weblate | 2 comments | Flattr this!

by Michal Čihař (michal@cihar.com) at July 15, 2014 04:00 PM

July 14, 2014

Ashutosh Dhundhara

GSoC 2014: Week 8

Eighth week of my GSoC 2014 project is over.

Key Accomplishments last week : Unit Tests for new code upto mid-term
Key tasks that stalled        : RFE #908
Code                          : unit_tests
Tasks in upcoming week        : RFE #908

Last week I wrote some automated unit tests for the new code upto mid-term. My target for last week was RFE #908. So I went on a discussion with my mentor (Marc Delisle) on the mailing  list and finalized the implementation details of this feature which are as follows:

(This is in context with the ‘Create table’ page when user hasn’t submitted the form )

  • Display a dialog when user selects PRIMARY, UNIQUE and INDEX for more than one columns.
  • The above dialog contains two options: ‘Create single-column index’ and ‘Create composite index’.
  • As the labels suggest, first option will create a single column index and when user will choose the second option, he will get a list of already created (temporary) indexes. Now he can choose any index (column combinations) from that list and add a column to that index to create a composite index.
  • When user will select any index from the list in case of  ‘composite’ index, he will get a option to re-order the columns in that index.
  • The user can add/remove any column from any index at any moment before submitting the form.
  • In case of PRIMARY index, the user will see only the ‘re-order’ part of the dialog.
  • This information about indexes is temporarily help in JS variables. So nothing is committed yet.

I have already started working on this and almost completed the front-end part. Soon I will share a image demonstration of the same.


by ashutoshdhundhara at July 14, 2014 12:02 PM

Chirayu Chiripal

GSoC 2014 Week #9: User privilege tab not shown in all relevant cases

Week #9 Task: RFE #1488 User privilege tab not shown in all relevant cases
Scheduled Deadline: July 14, 2014
Completed On: Not yet completed.

Follow up on RFE #637 Custom Field Handlers:
Few problems were encountered in my last week’s task i.e. RFE #637 Custom Field Handlers. My mentor, Isaac Bennetch, was having trouble with the auto-upgrade functionality. For him, the upgrade was not happening and the failure was not being detected also. I tried reproducing this problem but was unable to reproduce this on my machine.

So, we moved this discussion to the mailing list to find a solution. After discussing this on the developer mailing list, we found that the reason was the behaviour of the tryMultiQuery(), which actually returns the result of the first statement of the script and not the status of the whole script. We first thought that it was wrong but it was later found to be correct. So, we had to loop over the results of each statement being executed to detect whether whole script was executed or not. Thanks to Hugues for giving a code snippet which helped a lot in solving this problem. It was the case of half upgrade script being executed and then failing at some statement later which was not being detected by the patch and instead of disabling the transformation feature and reporting the problem to the user it bypassed silently. We were now able to detect failure but the problem was now that what to do in the case of half script gets executed and how to rollback it and how to confirm that rollback was done properly or not as it may also fail. As the upgrade script was not idempotent (Idempotence is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application. [Courtesy: Wikipedia]), it was not safe to execute it multiple times as it may lead to unstable condition of the pma__column_info table making it unusable. But I noticed that by modifying the upgrade script we can make it idempotent and fail-safe. So, this was also done. After improving the patch, the failure in upgrade resulted in disabled transformation and same was reported to the user.

For my mentor, it was still not upgrading automatically but it was detecting the upgrade failure and suggested to do a manual upgrade. It was later found that the his control user was not having the enough permissions to alter the structure of phpmyadmin database and it was not his fault too, as we had earlier suggested to grant only SELECT, INSERT, DELETE, UPDATE on phpmyadmin database (grant query in examples/create_tables.sql) and this permission problem will be faced by many of our users. But after granting this permission, auto-upgrade worked fine.

Thanks to my mentor for reporting this though it was the problem with permissions but it helped in detection of a case of half executed script which would have otherwise gone unnoticed and might have troubled our users later.

RFE #1488 User privilege tab not shown in all relevant cases:
As far as this feature is concerned, a user having GRANT_OPTION or CREATE USER privilege only should also be shown the user tab. Actually, such users are not of much use in practical and providing the GUI for them to manage user permissions is also not possible because to read the list of other users & their permission, a user need to have SELECT privilege on mysql database (See mysql documentation on SHOW GRANTS) and that’s how we identify a superuser.

Even if a user is having ALL Privileges on a specific database, he still need to have SELECT access to mysql database to read list of other users & their permissions. But we can still provide them access to create user interface as it does not require any SELECT privilege on mysql database though we are internally using SELECT statements on mysql database for “Add user” page for some tasks such as to detect whether user already exists or not. This is something that has to be managed in this task. We will display them a message that they do not have enough privileges to see list of users and on the other side, giving them access to create user page if they have privilege to do so. So, they will be having partial access to Users tab.

I have started to implement this and have managed to do this at Server > Users tab. However, the code is not yet ready for review also.

Users tab for user with CREATE USER privilege.

Users tab for user with CREATE USER privilege.

Code: https://github.com/D-storm/phpmyadmin/tree/FR-1488
Key accomplishments last week: Robust auto-upgrade failure detection for RFE #637 Custom Field Handlers.
Key tasks that stalled: RFE #1488 User privilege tab not shown in all relevant cases.
Tasks in the upcoming week: RFE #1488 User privilege tab not shown in all relevant cases (Contd.).


Filed under: GSoC 2014

by chirayu45 at July 14, 2014 11:17 AM

Smita Kumari

GSoC'14 week 9: List of tasks to accomplish

Last week, I almost finished the coding for conversion of a relation to second normal form which is under review. So during this week, a day or two may go in fixing the issues if came across any. Also I have a pending task to finish from last week that adds a new step to 1NF which moves the repeating group of columns to a new table.
And a new task that need to be finished during this week is writing Unit tests for 2NF. So that last 3 weeks, I can give completely to 3NF conversion.

So the list of tasks to accomplish includes:
  • Fixing issues for 2NF conversion if came across any.
  • Improve 1NF : add a step to move related repeating group of columns to another table eg columns like phoneNumber1, phoneNumber2, phoneNumber3 and so on can be moved to another table(primary_key, phoneNumber)
  • Write Unit tests for 2NF and if time permits improve Unit tests for 1NF as well.

by Smita Kumari (noreply@blogger.com) at July 14, 2014 10:03 AM

GSoC'14 coding week 8: Automated normalization to 2NF

In this post, I'm going to write down about my work during the week 8 of the project.
During week 7, I spent most of time in making the partial dependency list which continued to this week 8 as well. I improved the same a little during first 2 days of this week by first adding an option to use partial dependencies from automated generated dependencies where if user picks a dependency, it auto check the corresponding determinants for the columns, a nice suggestion from my mentor and then worked on fixing some coding related issues, improving performance etc.

On Wednesday evening, I have been to my grandparents place where I stayed till half day Saturday so couldn't give enough time to the project during the time, Also there I didn't have good internet access. After I came back on Saturday, I decided to finish at least conversion to 2NF. So rest of the Saturday and whole Sunday, I spent working on the next task to find out the new table structures that need to be formed for putting the relation in 2NF and creating/altering those tables. By Sunday late evening, I was able to finish these and have put for review. With the list of partial dependencies, we also show the new tables structures that needs to have to put the table in 2NF as per the marked dependencies, there user also have options to edit the new table names. By default, I have kept the first table name same as the original table name and other table names as 'table2', 'table3' and so on which user can edit.

On click of Go, new tables get created that make the relation in to second normal form. Also, If original table have data then new tables gets the unique data rows as well that belongs to its corresponding columns.
But one task that I had kept for this week as mentioned in my last blog that adds a new step to 1NF as an improvement, remains pending. During week 9 starting today, I'll finish this improvement to 1NF with priority.

by Smita Kumari (noreply@blogger.com) at July 14, 2014 09:46 AM

Dhananjay Nakrani

Week-10: php Error Reporting (GSoC’14 project)

10th week of my GSoC project is over now. The objective of this week’s work was to complete the implementation of Issue#31, Issue#34 and suppress error reporting in case @ is used.

Tasks Completed this Week:

  • In phpMyAdmin, stop collecting errors in case @ is used. That is stop collecting errors wherever failure handling is done explicitly.
    ⇒ This issue was pointed out by Marc Delisle. Thank you Marc. :-)
    ⇒ Function error_reporting() was used here. It’s an inbuilt function that returns the level of error reporting. Whenever @ is used, it returns zero (0). So I added a simple check in the PMA_Error_Handler::handleError() to just ignore that error whenever it returns zero (0).
    ⇒ See Pull#1278.
  • Complete Issue#31: Provide notifications for each new Error Report.
    ⇒ Fixed failing tests issues and clean up some codes. Rest was done last week only.
    ⇒ See Pull#56 for more details.

Stalled tasks this Week:

  • Implementation of Issue#34: Mass action feature.
  • Show correct ticket creator.

Week#11 Tasks:

Objectives:
⇒ Redirect User to appropriate page after he logs in. [Proposal#4.3]
⇒ Complete Stalled tasks of Week#10.


by dhananjay92 at July 14, 2014 05:31 AM

July 07, 2014

Chirayu Chiripal

GSoC 2014 Week #8: Custom Field Handlers (Contd.)

Week #8 Task: RFE #637 Custom Field Handlers (Contd.)
Scheduled Deadline: July 07, 2014
Completed On: July 07, 2014 (to be reviewed)

How it was done: After a bit of planning and extending the base class TransformationsPlugin to IOTransformationsPlugin to support input oriented transformation system last week, this week’s task was to implement the plan. Here is the list of steps in brief:

  • Added 2 new columns input_transformation and input_transformation_options to pma__column_info table and added the input fields for the same in create table and edit table structure forms.
  • Created separate directories for transformation plugins as discussed last week and moved the current output transformations plugins, except few plugins which could be used as it is for input transformation plugins also without any modifications. See current directory tree here: http://pastebin.com/pEu86t1i
  • Called input transformation plugin methods at appropriate positions as discussed in last week plan.
  • Added 3 new input oriented transformation plugins: Text/Plain Regex Validation, Text/Plain File Upload, Image/JPEG Upload.
  • Removed some backward compatibility code with this feature because after this feature is merged then an update is required to pma__column_info table and hence it was going to cause a BC (Backward compatibility) break. Those backward compatible code were:
    • Replacement of ‘class.php’ to ‘inc.php’ in the transformation name.
    • Replacement of ‘__’ in the place of last ‘_’ in the transformation name.
    • Replacement of ‘octetstream’ with ‘octet-stream’ in mimetype.
  • To make previous transformations to work with this changes, I created one SQL script (upgrade_column_info_4_3_0+.sql) to update the table and fix the BC break.
  • To further improve the user experience, added logic to detect outdated pma__column_info and apply these changes automatically for the user.

Example 1 – Regex Validation Plugin:

Settinp up Regex Validation transformation on column

Settinp up Regex Validation transformation on column


Validation failure display error message and aborts insert operation.

Validation failure display error message and aborts insert operation.

Example 2 – Image Upload Plugin:

Setting up Image Upload transformation on a column

Setting up Image Upload transformation on a column


Insert Form w/ Image Upload transformation on a column

Insert Form w/ Image Upload transformation on a column


Code: https://github.com/phpmyadmin/phpmyadmin/pull/1276
Key accomplishments last week: Implemented RFE #637 Custom Field Handlers.
Key tasks that stalled: None.
Tasks in the upcoming week: RFE #1488 User privilege tab not shown in all relevant cases.


Filed under: GSoC 2014

by chirayu45 at July 07, 2014 09:08 PM

Bimal Yashodha

GSoC 2014 week 7

During the previous week, I was working on the task: "enhancing the usability of the designer", by which implementing a client side database to carry out the "designer" funcationalities.

After analyzing all available client side data store mechanisms, I decided to go ahead with Indexed database, as it's much faster than WebSQL and It is the recommended data storage mechanism by W3C.

According to the new work-flow, the "Designer" tab will be always shown. Earlier it was shown only if the "table_coords" and "pdf_pages" tables are available.

Now the system works as follows:
First it checks whether the relevant tables exist in the database.
If not, It will create client side data store and start working with that.

by Bimal Yashodha (noreply@blogger.com) at July 07, 2014 06:29 PM

Ashutosh Dhundhara

GSoC 2014: Week 7

Seventh week of my GSoC 2014 project is over.

Key Accomplishments last week : NONE
Key tasks that stalled        : NONE
Code                          : NONE
Tasks in upcoming week        : RFE #908

Last week I was supposed to complete RFE #856. I attempted to implement this feature as discussed in my last post. Same can be seen in this Pull Request. But my mentor, Marc Delisle, pointed out that this approach won’t scale up for big exports which is very much true. So I tried to find a different solution. I also tried asking on stackoverflow.com but failed to find a solution to this. So I am moving to my next task RFE #908. I am having quite a few ideas regarding this feature but I will discuss those on the mailing list first and update this post very soon.


by ashutoshdhundhara at July 07, 2014 01:55 PM

Smita Kumari

GSoC'14 week 8: List of tasks to accomplish

Last week I worked mostly on creation of partial dependency list in case table has composite primary key, which is going to be used for converting the table in second normal form. So the priority this week will be to convert the relation to 2NF by making new tables if needed as per partial dependencies.

List of tasks to accomplish:
  • Work on the suggestions if any in creating the partial dependency list.
  • Convert the table to second normal form.
  • If time permits, Improve 1NF : add a step to move related repeating group of columns to another table eg columns like phoneNumber1, phoneNumber2, phoneNumber3 and so on can be moved to another table(primary_key, phoneNumber)

by Smita Kumari (noreply@blogger.com) at July 07, 2014 08:12 AM

GSoC'14 coding week 7: Making partial dependency list

The week 7 of my project is over and in this post I'm going to summarize what all I done in this 7th week of the project.
The week started with improving 1NF where previously I was looking for unique column to be present but since for 2NF we need to have primary key so in 1NF we decided to force primary key itself.
Then I learnt to set up the selenium server and run the phpUnit selenium tests, thanks to this post from phpMyAdmin wiki. It's an amazing technology, it perform automated testing using system browser. Tests run directly in the specified browser just as real users do. It makes testing the behaviour of the system/program easy and makes sure the expected behaviour is not breaking.
I wrote the selenium test for normalization to 1NF that automatically test the expected behaviour for converting a relation to 1NF. Though it needs some improvements in the sense currently I have asserted the texts of various steps for validation but texts might change so I'll try to improve the tests as much as possible to assert the elements class/name/id instead.

Then the main task for the week started, Making partial dependency list (in case relation has composite primary key ) for converting the relation to 2NF. That is the first step towards conversion to 2NF.
If the primary key of the table is not composite then at first step of 2NF itself, It says "Table is already in second normal form".  Another case where primary key is composite but all columns of the table is part of primary key then also it says "Table is already in second normal form" as there exists no Non-primary column(s) to have partial dependencies.
Then it comes to the case where table has composite primary key and there exist some non-primary columns. Here we need to find the partial dependencies if any.
To find the partial dependencies,  for each non-primary columns of the table I have given users the option to choose minimal set from primary keys whose values are sufficient to determine the value of the column. I'm not sure, how much clear is this question to users, but  couldn't find any better way. Your suggestions are most welcome if have any better ways to know the partial dependencies. Though this part is under review, If it's not good enough then I'm sure my mentor will have some nice suggestions as always :-).

If the table that is being normalized to 2NF have some pre-populated data then I have given user an option to check the possible partial dependency list based on data in the table. For this, in the backend I check for all the subset of columns in primary key if they seems to determine any of the non-primary column(s), and display the result to user which can help user to know some of the partial dependencies and can be helpful in answering the question.

This  process for automated generation of partial dependency list based on data is not very efficient if the table have primary key composed of more than 5 columns as it check for all possible combinations (of length 1 to length-1) of primary columns with all other non primary columns of the table.

After selecting the partial dependencies, user comes to another screen which ask to confirm the partial dependencies marked by user, from this screen can go back and edit their selection as well.

That's all I did for this week, more for next week where priority will be to convert the relation to 2NF by making new tables if needed as per partial dependencies.

by Smita Kumari (noreply@blogger.com) at July 07, 2014 07:03 AM

Dhananjay Nakrani

Week-9: php Error Reporting (GSoC’14 project)

9th week of my GSoC project is over now. This post describes the progress in my GSoC’14 project during that week. The objective of this week’s work was to implement solutions of Issue#31 and Issue34.

Tasks Completed this Week:

  • Issue#31: Provide notifications for each new Error Report.
    Commits List: Compare 05a80cf…8921188
    Current Status: Tests needs to be fixed.
    ⇒ Now users are notified whenever a new Error Report is received. This helps the developers in keeping track of newly reported Error Reports.
    ⇒ A new element Notification was added to the existing code base of error-reporting-server. Each Notification associates a Developer and a Report, that is each Notification belongs to one Report and one Developer. Each Developer has a set of Notification.
    ⇒ Model of Notification is simple and can be explained by following ER Diagram. Links represent the foreign key relations. Note that I’ve omitted not-so-required fields by putting dots (...) there.
    Notifications Schema

    Notifications Schema

    ⇒ A New Notification for each developer is created every time a new Error Report is received.
    ⇒ Count of pending notifications is displayed on the navigation panel of the each page.
    Screenshot Notification Count

    Screenshot Pending Notification Count


    ⇒ The Notification page shows all the pending notifications (new reports actually) in a list view. Right now the check-boxes are put in front of every row but they do not do any work. They will be useful in Issue#34:Mass Action. Similar to Reports page, here also jQuery datatables plugin is used to display the table of notifications.
    Screenshot Notification Page

    Screenshot Notification Page


    ⇒ Whenever user visits the newly added error report, corresponding notification is removed. That essentially means that the Error Report is marked read and since we want to prevent our notifications table from clogging up, we don’t store read entries. I will also be implementing a cron action under Notifications Controller which will remove entries older than a specific time X from Notification table. That also, as you may have correctly suspected, is to prevent database from getting clogged up. The notifications policy can be stated as the “error-reporting-server remembers notifications up to X time only“!

Stalled tasks this Week:

  • Fix remaining test failures in implementation of Issue#31.
    ⇒ Currently in the PHPUnit tests, Notification::addNotifications() is not able to save notifications into the table!! And that’s why it logs the error message at L#178 @ Incident.php
    ⇒ Please suggest me if you know the solution to it. :-)
  • Implementation of Issue#34: Mass Action feature on Reports.

Week#10 Tasks:

Objectives:
⇒ Display Correct ticket Creator. See Section#4.2 of proposal for more details.
⇒ Complete Stalled tasks of Week#9.
⇒ In phpMyAdmin, stop collecting errors in case @ is used. That is stop collecting errors wherever failure handling is done explicitly.


by dhananjay92 at July 07, 2014 04:50 AM

June 30, 2014

Bimal Yashodha

GSoC 2014 week 6

First, I was really glad to received the email saying that I got through the mid-term evaluation. I need to thank my mentor Madhura Jayarathne for the guidance provided and all others, supported through the mailing list, to achieve this milestone.

During the mid evaluation period, I did some more improvements in the exporting functionality based on the review comments. Also in the show/hide tables in the designer view.

The major task for this few weeks is to enhance the usability of the designer. That is, to use the designer, users need to do some configurations explicitly, which, most of the time, will not be done by the users, hence these funcationalities will never be used.

So the main goal of this task is to provide a mechanism in such a way that, users will not need to configure anything, but still should be able to use the designer. For that "Client side databases" will be used.

After analyzing currently available technologies:
  • Web storage
  • Web Sql database
  • Indexed database
are the most commonly used. Web storage uses a "key-value" pair method to store objects in the browser. Although it's a simple mechanism, It's performance decreases as the data become large and complex. Web Sql database is a normal "SQL" - relational database, and has good performance even for the large data sets. But because of low agility and being deprecated, users are moving away from that.

On the other hand Indexed database is made up by combining all the strengths of both web-storage and Web Sql databases. So its more powerful than any of the above two. Also its browser compatibility is increasing.



by Bimal Yashodha (noreply@blogger.com) at June 30, 2014 07:21 PM

Ashutosh Dhundhara

GSoC 2014: Week 6

Sixth week of my GSoC 2014 project is over. I am glad to tell that I passed the mid term evaluations :-)

Key Accomplishments last week : RFE #654
Key tasks that stalled        : NONE
Code                          : rfe_654
Tasks in upcoming week        : RFE #856

Last week I successfully added ‘Range search capability on Search page.’

rfe_654

This week I am going to work on RFE #856.
Currently any MySQL error encountered during export gets printed into the target export file. So user isn’t aware of any error until the export is completed.

I will try to achieve this by:

  1. First generating the whole export content and catch all MySQL errors during the process.
  2. If there is no error while generating the export, the start the file download at the client, else display the error and abort the export process.

by ashutoshdhundhara at June 30, 2014 03:25 PM

Smita Kumari

GSoC'14 week 7: List of tasks to accomplish

This week and onwards, I'll be working on making the functional dependency list which will help to convert the table structure in 2NF and 3NF.
For 2NF, we just need to ask users about if any of the non-key columns can be derived using part of the primary key in case the primary key is composite (consist of more than one columns) . Also for 1NF as I wrote in my last blog, I have checked for unique columns (Unique index or primary key) but for 2NF we will need to have primary key. so first thing I'll need to do is to make sure primary key exist, if not ask user to convert unique index to primary key. Another thing, we may do is to check for just primary key during 1NF not unique index. I need suggestion from phpMyAdmin members on this.
So the list of tasks of this week:
  • Improve the 1NF conversion and fix glitches if comes across any.
  • Write phpUnit tests for 1NF. I'll try to learn to setup and write the selenium test as well so that the functions consisting the database connection can also be covered, As most of the codes written for normalization is interacting with database.
  • Make the functional dependency list needed to convert the table to 2NF.

by Smita Kumari (noreply@blogger.com) at June 30, 2014 12:11 PM

GSoC'14 coding week 6 : Automated normalization to 1NF

The 6th week of my GSoC project has been over and this week I tried to finish the automated normalization to 1NF. And that is complete from my side but may have little glitches that I will be solving in coming weeks with 2NF and 3NF during that flow for normalization will become more clear.
The week started with having reviews on work flow of 1NF, I got some good suggestions from my mentor. Then I started working on implementation part. First I started with making model dialog to do normalization procedure but then I realize that won't look good as we'll have lot of text to display which may look cluttered on small screen space and may need to open another dialog for some purpose at later stage. So then I created a separate page that takes user through various steps of 1NF. The starting link that says "Improve table structure", is kept on tbl_structure page which takes user to initial screen.
There user gets radio options to choose up to what levels they want to normalize the relation.

For now, only choosing 1NF works, choosing the other two options takes to a coming soon page.
So normalizing to first normal form actually start here. First step (1.1) is to make all the the columns atomic. This step let user split the columns into more than one column. The split option is available to only column types which falls under string category these are columns of type char,varchar, text, binary, blob, enum and set.  As I thought the other columns which fall under numeric category (int, decimal, float etc) or date and time category can't be split, they are atomic by itself. Please correct me if I'm wrong.

This steps repeats till user chooses the option "No such column".
Then the process goes to step 1.2, where we check if the unique column exist. if there is any primary key or unique index exist on some columns then the process move to step 1.3. If no such column exist then the step 1.2 let user create a primary key or unique index on existing columns. As well as an option to add a new column to the table as primary key if it's not possible to make existing columns as unique.


The next and final step 1.3 for 1NF, lets user to remove any redundant column from the table. Where user get option to select one or more columns to remove from the table. or user may choose not to remove anything.

After processing this step, it finishes the 1NF and system shows the message that the Table is in 1NF now.
Please checkout my next blog for the task to accomplish for the week 7.

by Smita Kumari (noreply@blogger.com) at June 30, 2014 11:56 AM

Chirayu Chiripal

GSoC 2014 Week #7: Custom Field Handlers

Week #7 Task: RFE #637 Custom Field Handlers
Scheduled Deadline: July 07, 2014
Completed On: Not yet completed

Functional requirements:

  • REQ #1: Mechanism to allow users to manipulate the data before inserting into database.
  • REQ #2: Mechanism to allow users to validate input data before insertion and abort the insertion if validation fails.
  • REQ #3: Mechanism to change the current input/textarea fields to something else such as image tag with file upload button (as soon as image is selected it would display the image) on insert/edit page.

Requirements – Solution mapping: To fulfil the requirements mentioned above I have defined one abstract class IOTransformationsPlugin which extends TransformationsPlugin used currently. The class definition is like this:

abstract class IOTransformationsPlugin extends TransformationsPlugin
{   /**
     * REQ #1 will be satisfied by applyTransformation() defined 
     * in TransformationsPlugin.
     * By calling applyTransformation() before insertion we can 
     * manipulate the data and also set success variable for REQ #2
     */

    // specifies whether transformation was successful or not
    // for REQ #2 to fail the insertion.
    protected $success = true;

    // to store the error message in case of failed transformations
    // for REQ #2, in case of failed insertion it will store the error message.
    protected $error = '';

    /**
     * for REQ #3,
     * Returns the html for input field to override default textarea.
     * Note: Return empty string if default textarea is required.
     *
     * @param array $options column name & id
     *
     * @return string the html for input field
     */
    public function getInputHtml($options)
    {
        return '';
    }

    /**
     * for REQ #3, it may be possible that plugin needs to initialize
     * and handle or validate the field using javascript, then this
     * method will be useful. For e.g. replacing textarea with codemirror
     * and initialization of it using javascript.
     *
     * Returns the array of scripts (filename) required for plugin
     * initialization and handling
     *
     * @return array javascripts to be included
     */
    public function getScripts()
    {
        return array();
    }

    /**
     * for REQ #2, if isSuccess() returns false
     * then this method will be used to get the
     * error information.
     *
     * Returns the error message
     *
     * @return string error
     */
    public function getError()
    {
        return $this->error;
    }

    /**
     * for REQ #2, after calling applyTransformation()
     * this method will be called to check whether
     * transformation was successful or not.
     * If it was successful then it will proceed with
     * insert operation otherwise it will abort it 
     * displaying the error message returned by getError()
     *
     * Returns the success status
     *
     * @return bool
     */
    public function isSuccess()
    {
        return $this->success;
    }
}
  • This class can be used to create both Browser & Input transformation plugins however if Browser transformation plugin is required then TransformationsPlugin class can also be used.
  • To distinguish whether plugin is for Browser or Input transformations we can do something like this:
    • Input specific transformation plugins are saved into libraries/plugins/transformations/input/ directory.
    • Browser/Output specific transformation plugins are saved into libraries/plugins/transformations/output/ directory.
    • A plugin can be used for both Browser & Input transformations, in such cases they are saved into libraries/plugins/transformations/ directory.

Code: https://github.com/D-storm/phpmyadmin/tree/FR-637
Key accomplishments last week: Analysis of RFE #637 & some coding.
Key tasks that stalled: None.
Tasks in the upcoming week: RFE #637 Custom Field Handlers (contd.)


Filed under: GSoC 2014

by chirayu45 at June 30, 2014 11:13 AM

June 29, 2014

Dhananjay Nakrani

Week-8: php Error Reporting (GSoC’14 project)

8th week of my GSoC project is over now. The objective of this week’s work was to add the feature of ‘changing Error Report Status upon change in Associated Bug Ticket of SourceForge.’

Tasks Completed this Week:

  • Change Error Report status upon change in associated bug ticket on sourceforge.net. See Pull#53.
    ⇒ A cron job is set up to perform this action periodically. More about setting up the cron job is described at the end of this post.
    ⇒ For this purpose Sourceforge’s Allura API was used.
  • UnLink Error reports with existing bug ticket. See Pull#54.
    ⇒ I realized that sometimes it may be required to unlink the error report (already linked with bug ticket on SF.net). So this feature was added. This was not proposed as a part of my GSoC project.
  • Solve Issue#42 : Assign milestone from the PMA version automatically while creating bug ticket on SF. See Pull#55.
    ⇒ In PMA’s error-reporting-server there’s a feature of creating a bug ticket (on SourceForge bug tracker) from error report. In that, milestone of the new bug ticket should be assigned from PMA’s version.

Week#9 Tasks:

Objective:
⇒ Implement Issue#34 & Issue#31


Cron Jobs in CakePHP App:

⇒ In this week’s work I learned a technique of running cron jobs in CakePHP applications without breaking MVC architecture. Here’s how it can be done.

  1. Create a Cron Dispatcher:
    ⇒ Copy app/webroot/index.php file in the same directory i.e. app/webroot/.
    ⇒ Now modify that newly copied script to dispatch the cron actions. Original that script does some Core CakePHP initializations and dispatches to the appropriate action. In newly copied script, change that to take command line arguments instead. That script should also do some logging so that debugging in case of failures becomes easy.
  2. Create Cron Actions:
    ⇒ Create actions under desired Controller which is to be executed as a cron job. See SourceForgeController::sync_ticket_statuses()
    ⇒ Now if you want to execute that action under cron job only then you should put a check in it. Simply define a constant in the cron job dispatcher script (before dispatching) and check if that same constant is defined or not. If it’s not defined then that means the action is called somewhere other than cron job, like directly from user. In my code see constant CRON_DISPATCHER which determines whether the action is dispatched from cron dispatcher or not.
  3. Execute Cron Job:
    Now run the cron job as a command. It will be as follows.

    # <php cli parser> app/webroot/cron_dispatcher.php <relative URL of cron action>
    # For our case the command will be
    php app/webroot/cron_dispatcher.php /source_forge/sync_ticket_statuses
    

⇒ This way any action can be executed in CakePHP application without breaking its MVC architecture. Slick, isn’t it?!

Feel free to give your valuable suggestions. :-)


by dhananjay92 at June 29, 2014 06:10 AM

June 28, 2014

Dhananjay Nakrani

GSoC Midterm Evaluations

It’s 28th June, the declaration day of Midterm evaluations results.
I’m proud to say, I’ve passed it. Yes, now it’s time for one more paycheck from Google.  Haha!! 8-)
More importantly I’m glad because I could perform as per my mentor’s expectations.

One more thing. Google announces 1 year free ACM Student Membership to all GSoC Students. Well, that was completely unexpected. Yeaayy, another Happy moment. That membership will be very helpful during my Masters studies. :-)

Two tasks from my post midterm evaluation schedule have already been completed.
I will be posting this week’s progress in a couple of days. Keep following. ;-)


by dhananjay92 at June 28, 2014 06:52 AM

June 23, 2014

Bimal Yashodha

GSoC 2014 week 5

As the project has now come to the mid-term evaluation, I've almost completed my first two tasks, as I planned initially. Still I'm getting some feed-backs for the changes I did, but in overall, I've successfully covered all tasks.

Now with the new designer page, a user can:

  • create new pages 
  • edit a page
  • delete a page
  • save changes to a new page or an existing page
  • export pages in various formats.
With these changes done, we can remove the existing "Edit or export relational schema" functionality from the phpmyadmin.


by Bimal Yashodha (noreply@blogger.com) at June 23, 2014 06:05 PM