removing posts

This commit is contained in:
Diego 2017-07-17 20:03:28 +02:00
parent 0676b0b768
commit 24b6c23e62
3 changed files with 20350 additions and 0 deletions

BIN
phpcs.phar Normal file

Binary file not shown.

20310
phpdcd.phar Normal file

File diff suppressed because it is too large Load Diff

40
search.sh Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
# Execute this script in the root directory of the project
# Ex: /search.sh bl-kernel/dbpages.class.php
CLASS_FILENAME=$1
echo "Class name"
CLASS_NAME=`grep "class " $CLASS_FILENAME | awk '{print $2}' | xargs`
echo "Search Object"
OBJECT_NAME=`find -name "*.php" -exec grep "new $CLASS_NAME" {} \; | awk '{print $1}' | xargs`
echo "List of methods"
grep "public function" $CLASS_FILENAME | awk '{print $3}' | tr "(" " " | awk '{print $1}' > /tmp/methods.list
while read -r METHOD
do
echo ""
echo "-------------------------------------"
echo "Searching for $CLASS_NAME->$METHOD("
echo "-------------------------------------"
grep -r -w "$CLASS_NAME->$METHOD(" *
let STATUS=$?
if [ $STATUS -eq 1 ]
then
echo "Searching for this->$METHOD( inside $CLASS_FILENAME"
echo "-------------------------------------"
grep -r -w "this->$METHOD(" $CLASS_FILENAME
let STATUS=$?
if [ $STATUS -eq 1 ]
then
echo "Not found"
fi
fi
echo "-------------------------------------"
done < /tmp/methods.list