I find Execute PHP very useful, but I don't like having the textarea cluttering up my screen all the time. This simple patch adds a menu item to do the same thing.

CommentFileSizeAuthor
#9 devel_260207.patch1.75 KBdrewish
devel_exec_php.patch.txt730 bytesGribnif
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

moshe weitzman’s picture

OK. the intent of the block is so you can actually inject php into a page that you care about, and not on a page which does nothing but execute your php. one alternative would be to add a link in the devel links block to enable/disable the execute php block

Gribnif’s picture

I find it useful to be able to just run some code in the context of the current user, and I suspect others would also.

For instance, the developers I work with and I often use it to trigger a piece of code we're testing which can't easily be called in another way; or for database updates that are too complex to do in SQL alone; or perhaps to see, "If I give this function this set of parameters, what happens?" It's quite useful for more than what you originally intended.

dww’s picture

I don't see anything wrong with committing this code. It doesn't remove the PHP block for those who want it, and it's useful for folks who don't want the full block for whatever reasons.

@Moshe: Do you actually object to adding this?

moshe weitzman’s picture

the idea is fine by me. i have not reviewed the patch.

neochief’s picture

Status: Needs review » Reviewed & tested by the community

Works like a charm

moshe weitzman’s picture

Status: Reviewed & tested by the community » Fixed

Nice patch. Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

drewish’s picture

Version: 6.x-1.x-dev » 5.x-1.x-dev
Status: Closed (fixed) » Patch (to be ported)

i'm really missing this when i go back to D5.

drewish’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.75 KB
drewish’s picture

Status: Needs review » Fixed

did a little more testing then committed to DRUPAL-5.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.