1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-07 12:59:15 +00:00

revert all plugin base class related changes to keep compatibility with extant plugins (for the time being)

This commit is contained in:
Andrew Dolgov
2021-11-13 19:36:24 +03:00
parent edd476e7fe
commit 9845d5fd15
3 changed files with 11 additions and 305 deletions

View File

@@ -1,33 +0,0 @@
#!/bin/sh
TMPFILE=$(mktemp)
grep 'hook_.*(' ../classes/pluginhost.php | sed -e 's#[\t ]*/[* ]*##' \
-e 's# [*]/$##' \
-e 's# *(byref) *##' \
-e 's#GLOBAL: ##' | while read F; do
cat << EOF >> $TMPFILE
function $F {
user_error("Dummy method invoked.", E_USER_ERROR);
}
EOF
done
cat ../classes/plugin-template.php | while IFS=\n read L; do
case $L in
*PluginTemplate* )
echo "$L" | sed 's/PluginTemplate/Plugin/'
;;
*AUTO_GENERATED_HOOKS_GO_HERE* )
echo "\t/* plugin hook methods (auto-generated) */\n"
cat $TMPFILE
;;
* )
echo "$L"
;;
esac
done > ../classes/plugin.php
rm -f -- $TMPFILE