Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug after upgrade ruTorrent 4.3.4 (probably > 4.x) - RESOLVED - It is the best idea ? #1

Open
DavidFirefox opened this issue Jun 22, 2024 · 2 comments

Comments

@DavidFirefox
Copy link

DavidFirefox commented Jun 22, 2024

Hello,
Thanks for your work and plugin 🥇

(I not a programmer)
I have logoff 1.3

I'm just update my ruTorrent 3.x to the 4.3.4, I try to add logoff plugin and I have 2 issues in init.php :

  • line 2 : eval(getPluginConf("logoff"));
    Error in Apache log : AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function getPluginConf() in <directory>/plugins/logoff/init.php:2\nStack trace:\n#0 <directory>/php/getplugins.php(521): require_once()\n#1 {main}\n thrown in <directory>/plugins/logoff/init.php on line 2',
    I replaced it by eval(FileUtil::getPluginConf($plugin["name"]));
    I'm not sure if name is the correct value ? but it work and $plugin["logoff"]) don't work

  • line 4 : $me = getUser();
    Error in Apache log : AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function getUser() in <directory>/plugins/logoff/init.php:4\nStack trace:\n#0 <directory>/php/getplugins.php(521): require_once()\n#1 {main}\n thrown in <directory>/plugins/logoff/init.php on line 4'
    I replaced by $me = $_SERVER['REMOTE_USER'];
    It work well, and the logout popup show my login name !

Is it the best patch ?
Could you update the plugin ?

Thanks in advance
David

@DavidFirefox DavidFirefox changed the title Bug after upgrade ruTorrent 4.3.4 probably > 4.x - RESOLVED - It is the best idea ? Bug after upgrade ruTorrent 4.3.4 (probably > 4.x) - RESOLVED - It is the best idea ? Jun 22, 2024
@DavidFirefox
Copy link
Author

According to this : Novik/ruTorrent#2676
The final solution is (Thanks to Stickz) :

The fix for line 2 is : eval(FileUtil::getPluginConf("logoff"));
The fix for line 4 is $me = User::getUser();

So for me it work fine without warning on ruTorrent 4.3.4 👍

@DavidFirefox
Copy link
Author

I make an uptodate fork : https://github.com/DavidFirefox/logoff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant