|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 | Next > |
|
|
Refactoring: Displaying query resultsHi All,
I have a doubt of using @see tag in Docblock comments for functions. In the comments of functions PMA_getTable() and PMA_getTableBody() in display_tbl.lib.php file, @see tag is used for different purposes. As I feel PMA_getTableBody() used that corrrectly. What should be the actual behavior ? Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Fri, Jun 8, 2012 at 10:58 AM, Chanaka Dharmarathna <pe.chanaka.ck@...> wrote: Hi All, Hi All, I am fixing some code violations in my code now. For remove code violation of large comparison in a if condition, what would be the better approach ? Ex:- if ((PMA_strlen($wkbval) > $GLOBALS['cfg']['LimitChars']) && ($_SESSION['tmp_user_values']['display_text'] == self::DISPLAY_PARTIAL_TEXT) ) { // code } Is that good to use tempory variable insted of using $_SESSION['tmp_user_values']['display_text'] ? Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsLe 2012-06-09 15:44, Chanaka Dharmarathna a écrit :
> On Fri, Jun 8, 2012 at 10:58 AM, Chanaka Dharmarathna < > pe.chanaka.ck@...> wrote: > >> Hi All, >> >> I have a doubt of using *@see* tag in Docblock comments for functions. >> In the comments of functions PMA_getTable() and PMA_getTableBody() in >> display_tbl.lib.php file, @see tag is used for different purposes. >> As I feel PMA_getTableBody() used that corrrectly. >> What should be the actual behavior ? >> >> Regards ! >> -- >> ____________________________________ >> >> Chanaka Indrajith >> Bsc.Computer Engineering Undergraduate >> Faculty of Engineering >> University of Peradeniya >> Sri Lanka >> ____________________________________ >> >> > Hi All, > > I am fixing some code violations in my code now. > For remove code violation of large comparison in a if condition, what would > be the better approach ? > > Ex:- > if ((PMA_strlen($wkbval) > $GLOBALS['cfg']['LimitChars']) > && ($_SESSION['tmp_user_values']['display_text'] == > self::DISPLAY_PARTIAL_TEXT) > ) { > // code > } > > Is that good to use tempory variable insted of using > $_SESSION['tmp_user_values']['display_text'] ? > > Regards ! Chanaka, what kind of code violation is it? A line too long? If it's the case, well we should adjust our violations tests because for me, introducing an unneeded temporary variable just for that would reduce readability. -- Marc Delisle http://infomarc.info ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query results2012/6/9 Chanaka Dharmarathna <pe.chanaka.ck@...>:
> > > On Fri, Jun 8, 2012 at 10:58 AM, Chanaka Dharmarathna > <pe.chanaka.ck@...> wrote: >> >> Hi All, >> >> I have a doubt of using @see tag in Docblock comments for functions. >> In the comments of functions PMA_getTable() and PMA_getTableBody() in >> display_tbl.lib.php file, @see tag is used for different purposes. >> As I feel PMA_getTableBody() used that corrrectly. >> What should be the actual behavior ? >> >> Regards ! >> -- >> ____________________________________ >> >> Chanaka Indrajith >> Bsc.Computer Engineering Undergraduate >> Faculty of Engineering >> University of Peradeniya >> Sri Lanka >> ____________________________________ >> > > Hi All, > > I am fixing some code violations in my code now. > For remove code violation of large comparison in a if condition, what would > be the better approach ? > > Ex:- > if ((PMA_strlen($wkbval) > $GLOBALS['cfg']['LimitChars']) > && ($_SESSION['tmp_user_values']['display_text'] == > self::DISPLAY_PARTIAL_TEXT) > ) { > // code > } > > Is that good to use tempory variable insted of using > $_SESSION['tmp_user_values']['display_text'] ? It depends : If the value of $_SESSION['tmp_user_values']['display_text'] is used later on in the code, you could assign it to a shorter local (temporary) variable, and use that variable with a shorter name, in the if statement and further on in the code. If it is used only oncet you might consider assigning the result of $_SESSION['tmp_user_values']['display_text'] == self::DISPLAY_PARTIAL_TEXT to a local (temporary) variable and use that variable in the if statement. Hope this helps! -- Kind regards, Dieter Adriaenssens ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Sun, Jun 10, 2012 at 5:02 AM, Marc Delisle <marc@...> wrote: Le 2012-06-09 15:44, Chanaka Dharmarathna a écrit : Hi Marc, Thanks for replying. Yes, code sniffer gives warning saying line is too long. I also feel its not a good idea to use temporary variable if only it is not used couple of time. Shall we define convention for this kind of scenario so that everywhere handle this kind of situation in same way. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Sun, Jun 10, 2012 at 11:21 PM, Dieter Adriaenssens <dieter.adriaenssens@...> wrote: 2012/6/9 Chanaka Dharmarathna <pe.chanaka.ck@...>: Hi Dieter, Thanks for your reply. I agreed your first point. But I feels little odd in the second point because only for one place we use an additional variable. Its better if we can put that kind of conditions to two lines. Currently it gives errors by code sniffer. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
NOT A PROGRAMMERI NEED TO REDIRECT MY WEBSITE.... HOW AND WHERE CAN I DO THAT????
From: Chanaka Dharmarathna <pe.chanaka.ck@...> To: phpmyadmin-devel@... Sent: Monday, June 11, 2012 4:02 PM Subject: Re: [Phpmyadmin-devel] Refactoring: Displaying query results On Sun, Jun 10, 2012 at 11:21 PM, Dieter Adriaenssens <dieter.adriaenssens@...> wrote: 2012/6/9 Chanaka Dharmarathna <pe.chanaka.ck@...>: Hi Dieter, Thanks for your reply. I agreed your first point. But I feels little odd in the second point because only for one place we use an additional variable. Its better if we can put that kind of conditions to two lines. Currently it gives errors by code sniffer. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: NOT A PROGRAMMERLe 2012-06-11 16:26, Maria Medina a écrit :
> I NEED TO REDIRECT MY WEBSITE.... HOW AND WHERE CAN I DO THAT???? You could contact your web host provider, not this list. -- Marc Delisle http://infomarc.info ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Tue, Jun 12, 2012 at 1:32 AM, Chanaka Dharmarathna <pe.chanaka.ck@...> wrote:
Hi Michal, I'll moving into refactoring common.lib.php file. I'm intending to use the same improvements for this file as DisplayResults.class.php , including creating common.lib.php as a class. Is there any suggestions from your side ? Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Thu, Jun 14, 2012 at 12:58 AM, Chanaka Dharmarathna <pe.chanaka.ck@...> wrote:
Hi All, I have already create a class for display_tbl.lib.php and PMA_getDataCellForBlobField() in master used the PMA_mimeDefaultFunction() function as a global function. EX : $str = 'PMA_mimeDefaultFunction'; $str($parameters); I have moved the PMA_mimeDefaultFunction() from display_tbl.lib.php (in master) to common.lib.php file due to the way it has used inside display_tbl.lib.php. Now I'm implementing class behavior in common.lib.php file. So can anyone tell me a file, which contain global function, to where I should again move this PMA_mimeDefaultFunction(). Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsLe 2012-06-16 00:26, Chanaka Dharmarathna a écrit :
> Hi All, > > I have already create a class for display_tbl.lib.php > andPMA_getDataCellForBlobField() in master used the > PMA_mimeDefaultFunction() function as a global function. > EX : > $str = 'PMA_mimeDefaultFunction'; > $str($parameters); > > I have moved the PMA_mimeDefaultFunction() from display_tbl.lib.php (in > master) to common.lib.php file due to the way it has used inside > display_tbl.lib.php. > > Now I'm implementing class behavior in common.lib.php file. > So can anyone tell me a file, which contain global function, to where I > should again move this PMA_mimeDefaultFunction(). > > Regards ! Chanaka, I believe that this function should not be global, as it's only called from other functions in libraries/DisplayResults.class.php, right? -- Marc Delisle http://infomarc.info ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Sun, Jun 17, 2012 at 4:39 PM, Marc Delisle <marc@...> wrote: Le 2012-06-16 00:26, Chanaka Dharmarathna a écrit : Hi Marc, Sorry for little bit delay to respond. I first try to use this function while it is inside the PMA_DisplayResults class. But if there is any field with transformations, it does not work properly. So that put it as a global function. But I can again consider on that after completing the implement class behavior of common.lib.php file For just now I move PMA_mimeDefaultFunction() function to core.lib.php file. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Mon, Jun 18, 2012 at 6:36 PM, Chanaka Dharmarathna <pe.chanaka.ck@...> wrote:
Hi Michal, There are many places which are using functions in common.lib.php file. After implement the class behavior for this file, all the other places need to call those functions using an object of PMA_CommonFunctions class. Even in the same file I may need to create several objects of the PMA_CommonFunctions class. (files with global functions) So I' thinking of using global variable (in $GLOBALS super global array) to store an object of PMA_CommonFunctions class and introduce a global function (may be under core.lib.php) to get that object by checking whether the global variable is set or not. So that even inside the procedural code segments, that function can be used. Its highly appreciated if you can give me your feedback on this approach. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn 19/06/12 09:35, Chanaka Dharmarathna wrote:
> On Mon, Jun 18, 2012 at 6:36 PM, Chanaka Dharmarathna< > pe.chanaka.ck@...> wrote: > >> >> >> On Sun, Jun 17, 2012 at 4:39 PM, Marc Delisle<marc@...> wrote: >> >>> Le 2012-06-16 00:26, Chanaka Dharmarathna a écrit : >>> >>>> Hi All, >>>> >>>> I have already create a class for display_tbl.lib.php >>>> andPMA_getDataCellForBlobField() in master used the >>>> PMA_mimeDefaultFunction() function as a global function. >>>> EX : >>>> $str = 'PMA_mimeDefaultFunction'; >>>> $str($parameters); >>>> >>>> I have moved the PMA_mimeDefaultFunction() from display_tbl.lib.php (in >>>> master) to common.lib.php file due to the way it has used inside >>>> display_tbl.lib.php. >>>> >>>> Now I'm implementing class behavior in common.lib.php file. >>>> So can anyone tell me a file, which contain global function, to where I >>>> should again move this PMA_mimeDefaultFunction(). >>>> >>>> Regards ! >>> >>> Chanaka, >>> I believe that this function should not be global, as it's only called >>> from other functions in libraries/DisplayResults.class.php, right? >>> >>> -- >>> Marc Delisle >>> http://infomarc.info >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> Phpmyadmin-devel mailing list >>> Phpmyadmin-devel@... >>> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel >>> >> >> Hi Marc, >> >> Sorry for little bit delay to respond. >> I first try to use this function while it is inside the PMA_DisplayResults >> class. >> But if there is any field with transformations, it does not work properly. >> >> So that put it as a global function. >> But I can again consider on that after completing the implement class >> behavior of common.lib.php file >> For just now I move PMA_mimeDefaultFunction() function to core.lib.php >> file. >> >> >> Regards ! >> -- >> ____________________________________ >> >> Chanaka Indrajith >> Bsc.Computer Engineering Undergraduate >> Faculty of Engineering >> University of Peradeniya >> Sri Lanka >> ____________________________________ >> >> > Hi Michal, > > There are many places which are using functions in common.lib.php file. > After implement the class behavior for this file, all the other places need > to call those functions using an object of PMA_CommonFunctions class. > Even in the same file I may need to create several objects of the > PMA_CommonFunctions class. (files with global functions) > > So I' thinking of using global variable (in $GLOBALS super global array) to > store an object of PMA_CommonFunctions class and introduce a global > function (may be under core.lib.php) to get that object by checking whether > the global variable is set or not. > So that even inside the procedural code segments, that function can be used. > Its highly appreciated if you can give me your feedback on this approach. > > Regards ! What you seem to want is a singleton [0]. In a few words: the constructor is private, the instance is in a static variable and a public getInstance method allows access to the instance. You can also have a look at the PMA_Response class for a concrete example. Bye, Rouslan [0]: http://en.wikipedia.org/wiki/Singleton_pattern ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Tue, Jun 19, 2012 at 2:37 PM, Rouslan Placella <rouslan@...> wrote:
Hi Rouslan, Thanks for your quick and valuable information. Singleton pattern definitely use only one object and it save the memory. I'll use that. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsOn Tue, Jun 19, 2012 at 3:23 PM, Chanaka Dharmarathna <pe.chanaka.ck@...> wrote:
Hi Michal, I almost did the modifications related to introduce class behavior of common.lib.php file. It is quite time consuming task since there are lot of files to do the minor modifications. Now I'm facing to a problem. Due to this changes code has not working properly. (I didn't commit the code yet since it is not working) Is there any log file or something where we can see code is breaking? Since this is not just one file its very hard to find out the errors. Looking for suggestions to debug this code. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsHi
First comment: Please try to remove useless previous discussion when posting new email. Dne Fri, 22 Jun 2012 00:57:35 +0530 Chanaka Dharmarathna <pe.chanaka.ck@...> napsal(a): > I almost did the modifications related to introduce class behavior of > common.lib.php file. > It is quite time consuming task since there are lot of files to do the > minor modifications. Indeed, it will take some time. > Now I'm facing to a problem. > Due to this changes code has not working properly. (I didn't commit the > code yet since it is not working) > Is there any log file or something where we can see code is breaking? > Since this is not just one file its very hard to find out the errors. > Looking for suggestions to debug this code. What kind of error do you get? Do you have enabled gathering and displaying of errors [1]? [1]: http://wiki.phpmyadmin.net/pma/Config#Error_Handler -- Michal Čihař | http://cihar.com | http://blog.cihar.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsHi Michal,
First comment: Please try to remove useless previous discussion when Sure, I'll follow your instructions.
Actually I got nothing after login to PMA. I had only enabled display errors but not others. But now I am debugging the error points after following suggested link. Thanks for your great guide. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query results
Hi Marc, I'm going to look into getting PMA_mimeDefaultFunction() function inside PMA_DisplayResults class. (currently it is under core.lib.php) I think it is possible to use this function inside that class, and call directly ($this->_mimeDefaultFunction()) instead of using additional string to store method name. (current way) Then the default function for the mime transformation is inside a class. But the other existing transformations functions are still global functions. If that is not good (feels not good), those also should convert to classes. And if other transformations converted to classes, in which way I can create objects of those classes. Should I need to use string to store the class name and then use it as belows. $class_name = 'TestClass'; $ob = new $class_name($params); It is very helpful for me if you can share your suggestions. Regards ! -- ____________________________________ Chanaka Indrajith Bsc.Computer Engineering Undergraduate Faculty of Engineering University of Peradeniya Sri Lanka ____________________________________ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
|
|
Re: Refactoring: Displaying query resultsLe 2012-06-27 22:04, Chanaka Dharmarathna a écrit :
>>> Hi All, >>> >>> I have already create a class for display_tbl.lib.php >>> andPMA_getDataCellForBlobField() in master used the >>> PMA_mimeDefaultFunction() function as a global function. >>> EX : >>> $str = 'PMA_mimeDefaultFunction'; >>> $str($parameters); >>> >>> I have moved the PMA_mimeDefaultFunction() from display_tbl.lib.php (in >>> master) to common.lib.php file due to the way it has used inside >>> display_tbl.lib.php. >>> >>> Now I'm implementing class behavior in common.lib.php file. >>> So can anyone tell me a file, which contain global function, to where I >>> should again move this PMA_mimeDefaultFunction(). >>> >>> Regards ! >> >> Chanaka, >> I believe that this function should not be global, as it's only called >> from other functions in libraries/DisplayResults.class.php, right? >> >> > Hi Marc, > > I'm going to look into getting PMA_mimeDefaultFunction() function inside > PMA_DisplayResults class. (currently it is under core.lib.php) > I think it is possible to use this function inside that class, and call > directly ($this->_mimeDefaultFunction()) instead of using additional string > to store method name. (current way) > > Then the default function for the mime transformation is inside a class. > But the other existing transformations functions are still global functions. > If that is not good (feels not good), those also should convert to classes. > > And if other transformations converted to classes, in which way I can > create objects of those classes. > Should I need to use string to store the class name and then use it as > belows. > > $class_name = 'TestClass'; > $ob = new $class_name($params); > > It is very helpful for me if you can share your suggestions. > > Regards ! Hi Chanaka, maybe others, especially Alex Marin, would have an idea to share with you. I have not yet studied his new plugin system for transformations. -- Marc Delisle http://infomarc.info ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@... https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel |
| < Prev | 1 - 2 - 3 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |