[Phpmyadmin-devel] On the @uses comment tag
Michal Čihař
michal at cihar.com
Tue Jun 21 10:11:40 CEST 2011
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'
--
Michal Čihař | http://cihar.com | http://blog.cihar.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.phpmyadmin.net/pipermail/developers/attachments/20110621/4df2c9f1/attachment.sig>
More information about the Developers
mailing list