Topic: SQL field in admin interface

After some issues on a vbulletin board ... I just figured out an useful feature in the admin interface of PunBB (not for moderators, only admins)

An SQL page, with a field to write/paste SQL Querys. So that it's possible to make querys directed at the database without needing to install myphpadmin or similar ...

And the output of selects etc can be as simple as just doing a foreach key=>value loop.

Sure, people getting rid of their admin rights still cannot use it, but for other debug purposes etc I'd guess it can be very handy.

Perhaps it doesn't fit the std package, but it really shouldn't need to be that big or complicated.


Perhaps combine it with a backup feature on the same page?  smile

Re: SQL field in admin interface

It's a good idea. I'll put it on the list.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: SQL field in admin interface

Yes, it's a great idea :) I like it!

4

Re: SQL field in admin interface

Would it be a huge job for somebody to write a fixadmin script for people who have locked themselves out i.e. something that could access the punbb database and restore admin rights? Or maybe there already is one and I've missed it.

5

Re: SQL field in admin interface

Rickard wrote:

It's a good idea. I'll put it on the list.

Just when you think you've finished something along comes some bright spark .....

Re: SQL field in admin interface

Paul wrote:

Would it be a huge job for somebody to write a fixadmin script for people who have locked themselves out i.e. something that could access the punbb database and restore admin rights? Or maybe there already is one and I've missed it.

Probably possible to do a page like the page that ends maintenence mode. Upload it, it searches the users and gives a dropdown, just select user and then delete the script ... but, it could be a bit risky, if someone doesn't remove it afterwards, then admins would be free for all sad

Re: SQL field in admin interface

Frank H wrote:
Paul wrote:

Would it be a huge job for somebody to write a fixadmin script for people who have locked themselves out i.e. something that could access the punbb database and restore admin rights? Or maybe there already is one and I've missed it.

Probably possible to do a page like the page that ends maintenence mode. Upload it, it searches the users and gives a dropdown, just select user and then delete the script ... but, it could be a bit risky, if someone doesn't remove it afterwards, then admins would be free for all :(

You could make it so that if an admin already exists, the script refuses to "create" another one.

Re: SQL field in admin interface

aah ... didn't think of that ... I was into the line of giving the user with the lowest id the admin rights ... (as it's usually the owner that registers first) ... but it didn't feel right... 

but making it work only if there isn't any admins is probably better smile