Project

General

Profile

Task #26505 » findPHP4ConstructorsT3.sh

Updated shell script to find PHP4 constructors - Stefano Kowalke, 2011-05-24 11:33

 
#! /bin/bash
# Usage: findPHP4ConstructorsT3.sh <path>
# <path> The path your files are in

constructors=(t3lib_cli template t3lib_folderTree t3lib_htmlmail t3lib_install t3lib_superadmin t3lib_TCEforms t3lib_xml TBE_browser_recordList localPageTree localFolderTree filelistFolderTree recordHistory webPageTree localPageTree localFolderTree tslib_fe tslib_pibase tslib_menu_filterMenuPagesHook localPageTree tx_indexedsearch_lexer tx_install tx_lowlevel_admin_core tx_lowlevel_cleaner_core tx_lowlevel_cleanflexform tx_lowlevel_deleted tx_lowlevel_double_files tx_lowlevel_lost_files tx_lowlevel_missing_files tx_lowlevel_missing_relations tx_lowlevel_orphan_records tx_lowlevel_rte_images tx_lowlevel_cleanflexform tx_lowlevel_versions)

for i in $(find $1 -name "*.php" -or -name "*.inc"); do
for constructor in ${constructors[@]}; do
grep -HirnP "(::|>)$constructor {0,}\(" $i;
done
done
(2-2/2)