[Phpmyadmin-devel] On the @uses comment tag
Tyron Madlener
tyronx at gmail.com
Tue Jun 21 11:04:37 CEST 2011
On Tue, Jun 21, 2011 at 10:38 AM, Michal Čihař <michal at cihar.com> wrote:
> Hi
>
> please keep reply on the mailing list :-)
I wish I could tell gmail to automatically use the mailing list address :/
>
> Dne Tue, 21 Jun 2011 10:35:41 +0200
> Tyron Madlener <tyronx at gmail.com> napsal(a):
>
>> On Tue, Jun 21, 2011 at 10:11 AM, Michal Čihař <michal at cihar.com> wrote:
>> > Hi
>> >
>> > Dne Mon, 20 Jun 2011 17:55:57 +0200
>> > Tyron Madlener <tyronx at gmail.com> napsal(a):
>> >
>> >> Since they are all in the same format and unique we could just run a
>> >> regexp over all pma php files that removes those lines.
>> >> Something like this (untested):
>> >>
>> >> replace('.');
>> >> function replace($dir) {
>> >> $rdir = opendir($dir);
>> >> while($file=readdir($rdir)) {
>> >> if(is_dir($dir.'/'.$file) && $file!='.' && $file!='..')
>> >> replace($dir.'/'.$file);
>> >> else {
>> >> $text = file_get_contents($file);
>> >> $fp = fopen($file,'w');
>> >> fwrite($fp, preg_replace("/^\s*\*\s*@uses.*/m",'',$text));
>> >> fclose($fp);
>> >> }
>> >> }
>> >
>> > Well there are many ways to remove it, but the question is whether we
>> > want to :-).
>> >
>> > PS: I would rather use:
>> >
>> > find . -name '*.php' | xargs sed -i '/^[[:space:]]*\* @uses /D'
>>
>> Well that one liner totally owns my php code snippet of course :(
>>
>> I'd also agree in removing those, the time invested in keeping them
>> up-to-date is probably greater than any time advantages gained in
>> having them.
>>
>> >
>> > --
>> > Michal Čihař | http://cihar.com | http://blog.cihar.com
>> >
>>
>
>
> --
> Michal Čihař | http://cihar.com | http://blog.cihar.com
>
More information about the Developers
mailing list