[Phpmyadmin-devel] For the Midterm Evaluation - All My Code to Date

Greetings everyone! I present to you, all my code to date! If you are curious enough to look over my code, please send me any suggestions that you may have. - An SVN diff file created against revision 12637 on July 9th (http://downloads.moonlapse.org/pma/midterm/pma_trunk.diff.zip) ... and for your convenience: - All my code files in the PMA directory structure as of this afternoon (http://downloads.moonlapse.org/pma/midterm/all_code.zip) Enjoy! -Derek Schaefer

Hi Dne Thu, 9 Jul 2009 13:42:06 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
Greetings everyone!
I present to you, all my code to date! If you are curious enough to look over my code, please send me any suggestions that you may have.
- An SVN diff file created against revision 12637 on July 9th (http://downloads.moonlapse.org/pma/midterm/pma_trunk.diff.zip)
One hunk fails to apply: patching file lang/english-utf-8.inc.php patching file libraries/zip_extension.lib.php patching file libraries/import.lib.php patching file libraries/import/xml.php patching file libraries/import/ods.php patching file libraries/database_interface.lib.php patching file libraries/export/xml.php Hunk #1 FAILED at 3. 1 out of 10 hunks FAILED -- saving rejects to file libraries/export/xml.php.rej patching file libraries/export/ods.php patching file libraries/opendocument.lib.php patching file libraries/config.default.php -- Michal Čihař | http://cihar.com | http://blog.cihar.com

Hi You can see this code live on our demo server: http://demo.phpmyadmin.net/gsoc-derek/ Please note that messages are present only in English language for now. -- Michal Čihař | http://cihar.com | http://blog.cihar.com

Hi Dne Thu, 9 Jul 2009 13:42:06 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
I present to you, all my code to date! If you are curious enough to look over my code, please send me any suggestions that you may have.
- An SVN diff file created against revision 12637 on July 9th (http://downloads.moonlapse.org/pma/midterm/pma_trunk.diff.zip)
Quick review: - Please stick with unix end of lines (libraries/import/ods.php) - Please avoid unrelated changes (eg. whitespace), feel free to submit them separately. - Was it really necessary to expand OpenDocumentNS? Otherwise it looks good, will test it more deeply during weekend. -- Michal Čihař | http://cihar.com | http://blog.cihar.com

Hi Dne Thu, 9 Jul 2009 13:42:06 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
I present to you, all my code to date! If you are curious enough to look over my code, please send me any suggestions that you may have.
- An SVN diff file created against revision 12637 on July 9th (http://downloads.moonlapse.org/pma/midterm/pma_trunk.diff.zip)
First usage comments: - Why does it create ODS_DB? It should rather use exiting one I think (If I had selected one). - It failed on quite simple spreadsheet (created by phpMyAdmin) - http://tmp.cihar.com/City.ods CREATE TABLE IF NOT EXISTS `City` ( ) ENGINE = MYISAM ; With tons of warnings: Runtime Notice in ./libraries/import/ods.php#65 Only variables should be assigned by reference Backtrace ./import.php#376: require(./libraries/import/ods.php) Runtime Notice in ./libraries/import/ods.php#69 Only variables should be assigned by reference Backtrace ./import.php#376: require(./libraries/import/ods.php) Notice in ./libraries/import/ods.php#85 Undefined index: ods_col_names Backtrace ./import.php#376: require(./libraries/import/ods.php) Notice in ./libraries/import/ods.php#131 Undefined variable: max_cols Backtrace ./import.php#376: require(./libraries/import/ods.php) Warning in ./libraries/Message.class.php#245 Missing argument 1 for PMA_Message::notice(), called in /srv/http/pma.cihar.com/gsoc-derek/libraries/import.lib.php on line 958 and defined Backtrace ./libraries/import.lib.php#958: PMA_Message::notice() ./libraries/import/ods.php#216: PMA_buildSQL( string ODS_DB, array, array, NULL, NULL, ) ./import.php#376: require(./libraries/import/ods.php) Notice in ./libraries/Message.class.php#247 Undefined variable: string Backtrace ./libraries/import.lib.php#958: PMA_Message::notice() ./libraries/import/ods.php#216: PMA_buildSQL( string ODS_DB, array, array, NULL, NULL, ) ./import.php#376: require(./libraries/import/ods.php) Warning in ./libraries/ob.lib.php#84 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784) Backtrace ./libraries/ob.lib.php#84: header(string X-ob_mode: 1) ./libraries/header.inc.php#24: PMA_outBufferPre() ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#23 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784) Backtrace ./libraries/header_http.inc.php#23: header(string Expires: Fri, 10 Jul 2009 13:08:32 GMT) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#24 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784) Backtrace ./libraries/header_http.inc.php#24: header(string Last-Modified: Fri, 10 Jul 2009 13:08:32 GMT) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#25 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784) Backtrace ./libraries/header_http.inc.php#25: header(string Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#26 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784) Backtrace ./libraries/header_http.inc.php#26: header(string Pragma: no-cache) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) Warning in ./libraries/header_http.inc.php#29 Cannot modify header information - headers already sent by (output started at /srv/http/pma.cihar.com/gsoc-derek/libraries/Message.class.php:784) Backtrace ./libraries/header_http.inc.php#29: header(string Content-Type: text/html; charset=utf-8) ./libraries/header.inc.php#30: require_once(./libraries/header_http.inc.php) ./libraries/common.lib.php#541: require_once(./libraries/header.inc.php) ./import.php#433: PMA_mysqlDie( string #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ENGINE=MyISAM' at line 1, string CREATE TABLE IF NOT EXISTS `City` () ENGINE=MyISAM;, string , string db_import.php?db=201.65.58.6&token=395723111a197f637d1c57533ee4da64, boolean 1, ) -- Michal Čihař | http://cihar.com | http://blog.cihar.com

On Fri, Jul 10, 2009 at 8:11 AM, Michal Čihař<michal@cihar.com> wrote:
Quick review:
- Please stick with unix end of lines (libraries/import/ods.php)
Certainly. I realized right after I submitted it that the file was still in DOS format, so the problem is now corrected.
- Please avoid unrelated changes (eg. whitespace), feel free to submit them separately.
Sure. I'll admit sometimes I can get a little OCD with code formatting.
- Was it really necessary to expand OpenDocumentNS?
To the extent that I did? Probably not. I can scale it back if you think it's appropriate. On Fri, Jul 10, 2009 at 8:11 AM, Michal Čihař<michal@cihar.com> wrote:
Hi
Dne Thu, 9 Jul 2009 13:42:06 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
I present to you, all my code to date! If you are curious enough to look over my code, please send me any suggestions that you may have.
- An SVN diff file created against revision 12637 on July 9th (http://downloads.moonlapse.org/pma/midterm/pma_trunk.diff.zip)
First usage comments:
- Why does it create ODS_DB? It should rather use exiting one I think (If I had selected one).
That was there for testing purposes. This is definitely something I will be adding. There is still a lot of work to be done on the ODS import plug-in.
- It failed on quite simple spreadsheet (created by phpMyAdmin) - http://tmp.cihar.com/City.ods
I looked at that ODS file, and I can tell it was exported with a previous version of the ODS export module. It's failing because I made some important changes to what was exported. Mainly, for each table the maximal number of columns is included. In the case of the table City: ... <table:table table:name="City"> <table:table-column table:number-columns-repeated="5" /> ... Without those critical lines, my plug-in will fail. I tried exporting City with my new version, and it imports quite smoothly.
CREATE TABLE IF NOT EXISTS `City` ( ) ENGINE = MYISAM ;
-- Michal Čihař | http://cihar.com | http://blog.cihar.com
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Quick question. Do you want us to periodically submit patches to you in order to keep our demo instances up to date? Thanks, Derek

Hi Dne Fri, 10 Jul 2009 13:13:29 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
Do you want us to periodically submit patches to you in order to keep our demo instances up to date?
If there are some important changes, I'll update the demo. Maybe we should rather grant you svn access and you could work on own branch. Marc, what do you think? -- Michal Čihař | http://cihar.com | http://phpmyadmin.cz

On Sat, Jul 11, 2009 at 3:55 PM, Michal Čihař<michal@cihar.com> wrote:
Hi
Dne Fri, 10 Jul 2009 13:13:29 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
Do you want us to periodically submit patches to you in order to keep our demo instances up to date?
If there are some important changes, I'll update the demo.
Maybe we should rather grant you svn access and you could work on own branch. Marc, what do you think?
Whatever is easier for your both. Even since I submitted my code, I have made some pretty significant improvements. Just a thought. I think it would be beneficial, especially for you as my mentor, to be able to readily view my working copy in order to better observe my progress. Blog posts are a great way to track events, but there's nothing quite like the real thing.
-- Michal Čihař | http://cihar.com | http://phpmyadmin.cz
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Michal Čihař a écrit :
Hi
Dne Fri, 10 Jul 2009 13:13:29 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
Do you want us to periodically submit patches to you in order to keep our demo instances up to date?
If there are some important changes, I'll update the demo.
Maybe we should rather grant you svn access and you could work on own branch. Marc, what do you think?
Yes, but merging branches is a big unknown for me so I suggest he would put his changes to trunk. -- Marc Delisle http://infomarc.info

Hi Dne Sat, 11 Jul 2009 18:32:19 -0400 Marc Delisle <marc@infomarc.info> napsal(a):
Yes, but merging branches is a big unknown for me so I suggest he would put his changes to trunk.
It should not be a big problem. I just thought that having separate tree for each feature would be better for review. -- Michal Čihař | http://cihar.com | http://phpmyadmin.cz

Michal Čihař a écrit :
Hi
Dne Sat, 11 Jul 2009 18:32:19 -0400 Marc Delisle <marc@infomarc.info> napsal(a):
Yes, but merging branches is a big unknown for me so I suggest he would put his changes to trunk.
It should not be a big problem. I just thought that having separate tree for each feature would be better for review.
We can make the experiment about merging back branches ;) Derek (drummingds1) added to project membership, with subversion access. -- Marc Delisle http://infomarc.info

Hi Dne Sun, 12 Jul 2009 07:20:43 -0400 Marc Delisle <marc@infomarc.info> napsal(a):
We can make the experiment about merging back branches ;)
Okay, I think it will be without problems :-).
Derek (drummingds1) added to project membership, with subversion access.
Derek please create branch of trunk under branches/gsoc and continue your work. If anybody else from students is interested in this approach, just ask Marc to give you SVN access :-). -- Michal Čihař | http://cihar.com | http://phpmyadmin.cz

On Sun, Jul 12, 2009 at 9:44 AM, Michal Čihař<michal@cihar.com> wrote:
Hi
Dne Sun, 12 Jul 2009 07:20:43 -0400 Marc Delisle <marc@infomarc.info> napsal(a):
We can make the experiment about merging back branches ;)
Okay, I think it will be without problems :-).
Derek (drummingds1) added to project membership, with subversion access.
Derek please create branch of trunk under branches/gsoc and continue your work.
Splendid, thanks! I'll be doing so today.
If anybody else from students is interested in this approach, just ask Marc to give you SVN access :-).
-- Michal Čihař | http://cihar.com | http://phpmyadmin.cz
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Hi Dne Fri, 10 Jul 2009 10:41:57 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
On Fri, Jul 10, 2009 at 8:11 AM, Michal Čihař<michal@cihar.com> wrote:
- Was it really necessary to expand OpenDocumentNS?
To the extent that I did? Probably not. I can scale it back if you think it's appropriate.
I think that only namespaces we use should be mentioned.
- It failed on quite simple spreadsheet (created by phpMyAdmin) - http://tmp.cihar.com/City.ods
I looked at that ODS file, and I can tell it was exported with a previous version of the ODS export module. It's failing because I made some important changes to what was exported. Mainly, for each table the maximal number of columns is included. In the case of the table City:
... <table:table table:name="City"> <table:table-column table:number-columns-repeated="5" /> ...
Without those critical lines, my plug-in will fail.
The import should handle any ODS file, not only those created by phpMyAdmin, so you should try to work even without this "critical" line. -- Michal Čihař | http://cihar.com | http://phpmyadmin.cz

On Sat, Jul 11, 2009 at 3:54 PM, Michal Čihař<michal@cihar.com> wrote:
Hi
Dne Fri, 10 Jul 2009 10:41:57 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
On Fri, Jul 10, 2009 at 8:11 AM, Michal Čihař<michal@cihar.com> wrote:
- Was it really necessary to expand OpenDocumentNS?
To the extent that I did? Probably not. I can scale it back if you think it's appropriate.
I think that only namespaces we use should be mentioned.
Alright, will do.
- It failed on quite simple spreadsheet (created by phpMyAdmin) - http://tmp.cihar.com/City.ods
I looked at that ODS file, and I can tell it was exported with a previous version of the ODS export module. It's failing because I made some important changes to what was exported. Mainly, for each table the maximal number of columns is included. In the case of the table City:
... <table:table table:name="City"> <table:table-column table:number-columns-repeated="5" /> ...
Without those critical lines, my plug-in will fail.
The import should handle any ODS file, not only those created by phpMyAdmin, so you should try to work even without this "critical" line.
Rather, I should say, those critical lines ARE included in true ODS files (one's created in Open Document Calc), but before now were not included in the PMA export.
-- Michal Čihař | http://cihar.com | http://phpmyadmin.cz
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Hi Dne Sat, 11 Jul 2009 16:27:16 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
Rather, I should say, those critical lines ARE included in true ODS files (one's created in Open Document Calc), but before now were not included in the PMA export.
Are they required by specification? If they are not mandatory, you can not rely on them being available. -- Michal Čihař | http://cihar.com | http://phpmyadmin.cz

On Sat, Jul 11, 2009 at 4:32 PM, Michal Čihař<michal@cihar.com> wrote:
Hi
Dne Sat, 11 Jul 2009 16:27:16 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
Rather, I should say, those critical lines ARE included in true ODS files (one's created in Open Document Calc), but before now were not included in the PMA export.
Are they required by specification? If they are not mandatory, you can not rely on them being available.
They appear to be omnipresent in at least the last view versions of Open Office, but I'll check the specification to ensure there won't be any compatibility problems and make changes if necessary.
-- Michal Čihař | http://cihar.com | http://phpmyadmin.cz
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

2009/7/11 Derek Schaefer <derek.schaefer@gmail.com>:
On Sat, Jul 11, 2009 at 4:32 PM, Michal Čihař<michal@cihar.com> wrote:
Hi
Dne Sat, 11 Jul 2009 16:27:16 -0500 Derek Schaefer <derek.schaefer@gmail.com> napsal(a):
Rather, I should say, those critical lines ARE included in true ODS files (one's created in Open Document Calc), but before now were not included in the PMA export.
Are they required by specification? If they are not mandatory, you can not rely on them being available.
They appear to be omnipresent in at least the last view versions of Open Office, but I'll check the specification to ensure there won't be any compatibility problems and make changes if necessary.
I read the spec., and while the tag itself IS required, it's value can be misleading. Also, I inspected an ODS file exported from Excel 07 and found that the value could vary wildly, although there are several areas of non-compliance with Microsoft Office's OpenDocument capabilities at present. Thus, I have decided to not rely on this tag for import purposes, but to continue exporting it. I will be making the changes necessary to compensate for not knowing the value of the widest column soon. -Derek
-- Michal Čihař | http://cihar.com | http://phpmyadmin.cz
------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
participants (3)
-
Derek Schaefer
-
Marc Delisle
-
Michal Čihař