[Bug] Switch af_unburn plugin to Config::get_user_agent()

After the recent switch to a configurable user agent in TinyTiny RSS, the af_unburn plugin also needs updating to use the new user agent function.

Best untested guess: modifying line 38 of init.php in ttrss-af-unburn:

-				curl_setopt($ch, CURLOPT_USERAGENT, SELF_USER_AGENT);
+				curl_setopt($ch, CURLOPT_USERAGENT, Config::get_user_agent());

The current code results in an E_WARNING for plugins.local/af_unburn/init.php:38:

Use of undefined constant SELF_USER_AGENT - assumed 'SELF_USER_AGENT' (this will throw an Error in a future version of PHP)
1. plugins.local/af_unburn/init.php(38): ttrss_error_handler(2, Use of undefined constant SELF_USER_AGENT - assumed 'SELF_USER_AGENT' (this will throw an Error in a future version of PHP), plugins.local/af_unburn/init.php, 38, [)
2. classes/pluginhost.php(198): hook_article_filter([{"owner_uid":XXXX,"guid":"YYYY,http:\/\/example.net\/202","guid_hashed":"{\"ver\":2,\"uid\":XXXX,\"hash\":\"SHA1:4882XXXX\"}","title":"Example 202","content":"<b>202 - Example<\/b><br \/>\n<br \/>\n<a href=...)
3. classes/rssutils.php(781): chain_hooks_callback(hook_article_filter, {Closure}, [{"owner_uid":2,"guid":"2,http:\/\/example.net\/202","guid_hashed":"{\"ver\":2,\"uid\":XXXX,\"hash\":\"SHA1:4882XXXX\"}","title":"202 - Example","content":"<b>202 - Example<\/b><br \/>\n<br \/>\n<a href=...)
4. update.php(230): update_rss_feed(ZZZZ, 1)

This may impact plugins beyond af_unburn as well. I have not yet tried this on the example instance. Let me know if any further information would be helpful!

thanks for reporting, unless someone files a PR (this could be you!) i’ll try to fix this tomorrow.

e: your diff needs a double bracket at the end.

https://git.tt-rss.org/fox/ttrss-af-unburn/commit/e0050a12f60843a940a5c3b14f80fc8d39dfb0d2

should be fixed now.

Thank you! Confirmed working here. And if I notice anything else in the future, I’ll look into setting up a Gitea account, too.