Hi all
I've finally managed to bring testsuite to state where there are no
failures on ci.phpmyadmin.net. That means that whenever some failure
appears with your changes you should fix that (or I will hunt you
to fix that :-)).
--
Michal Čihař | http://cihar.com | http://blog.cihar.com
Hi Chanaka,
I stumbled upon this piece of code (random pick) :
PMA_CommonFunctions::getInstance()->backquote($_REQUEST['view']['name'])
and it made me wonder if using a singleton for PMA_CommonFunctions is
necessary, because basicaly PMA_Commonfunctions is a collection of
methods, not really a 'living' object.
So then I had a look at the class, and I discovered that the class has
no class variables (apart from the _instance variable) and an empty
constructor.
So basicly this should be a static class, with static methods, because
no instance is needed for it to work.
And the above piece of code will become :
PMA_CommonFunctions::backquote($_REQUEST['view']['name'])
BTW: If you convert it to a static class, don't forget to replace the
$this->method() calls by the static equivalent self::method().
BTW2 : you forgot to add the if (! defined('PHPMYADMIN')), check in
the beginning of the file, see [0].
[0] http://wiki.phpmyadmin.net/pma/File_template
--
Kind regards,
Dieter Adriaenssens
Atul,
I have been exchanging mails with you, about the conversion, and I think
we should go public on this.
We are working on Status>Monitor. One of the features there, is to be
able to select a time span and fetch the related queries from the slow
log or the general log.
After some research, it seems that the jqplotMouseDown and jqplotMouseUp
events will be helpful to return the starting and ending positions for
the time span; however, as you said, it would be interesting to change
the color in the dragged region.
This example [0] is promising, but I'm not sure it would work on a chart
that is still moving. The jqplotMouseMove event could be used instead of
.mousemove(), to get x/y coordinates relative to the chart itself.
[0] http://motyar.blogspot.ca/2010/02/draw-rectangle-with-jquery.html
--
Marc Delisle
http://infomarc.info
Hi,
starting from Atul's example, I added the rectangle-drawing code in [0].
Here you can draw many rectangles, but when this is integrated to
js/server_status_monitor.js, the jqplotMouseUp() will show the "Log
statistics" dialog and will erase the rectangle.
[0] http://jsfiddle.net/lem9/N4Pst/3/
--
Marc Delisle
http://infomarc.info
Hi,
When fixing coding style issues, I noticed a lot of mixed php and
html, especially in the files in the rootdir of the pma.
F.e. : <div id='<?php echo htmlentities($name); ?>' class='someclass'>
or even worse :
<?php
if ($something) {
?><p>Some conditional text</p>
<?php } ?>
<p>Some unconditional text</p>
It generates a lot of codingstyle errors : too long lines, wrong
indentation, ...
it is badly structured and thus difficult to read and to be honest, is ugly.
I'm thinking of starting to clean it up towards 4.0, using either
echo's or assigning the output html to a string and add it to the
appropriate Response class method.
f.e. :
<?php
$response = PMA_Response::getInstance();
$output = "";
\\ some code in between
if (something) {
$output .= "<p>Some conditional text</p>";
}
$output .= "Some unconditional text</p>";
\\ some code in between
$response->addHTML($output);
?>
Any thoughts?
--
Kind regards,
Dieter Adriaenssens
Hi all,
I was wondering how much of the different GSoC projects is merged in
master already?
I know about Rouslan's project, not being completely merged.
Regarding code quality. I noticed that some of the new code fails a
lot of code quality tests (mainly from Code Sniffer). So please run
PHPCS (Code Sniffer) [0] on your code and fix the issues.
[0] http://wiki.phpmyadmin.net/pma/CodeSniffer
--
Kind regards,
Dieter Adriaenssens