Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Find bad things in Magento customisations
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getModel("
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getResourceModel("
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getSingleton("
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "SELECT.*FROM.*;[\"\']"
find . -name "*.php" -print | xargs grep --color=auto -iRnH "htmlEscape("
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "htmlEscape("
find ./app/code/local -name "*/Block/*.phtml" -print | xargs grep --color=auto -iRnH "SELECT.*FROM.*;[\"\']"
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "\$_[GET|REQUEST|SERVER|POST]"
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "public _construct"
find . -name "*.php" -print | xargs grep --color=auto -iRnH "public _construct"
@mjakubowski
Copy link

mjakubowski commented Jun 30, 2011

"$_[GET|REQUEST|SERVER|POST]" doesn't work as expected on my Suse VM and OSX.
It also finds variables starting with $_s..., $_p..., $_q... etc.

@nevvermind
Copy link

nevvermind commented Jun 8, 2015

Use \$_\(GET\|REQUEST\|SERVER\|POST\)" on mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment