[development] deletion API summary, question

Dave Cohen drupal at dave-cohen.com
Fri Jul 21 19:04:45 UTC 2006


Chad,

Sounds like you're giving this some good thought and what you say here makes 
sense in my opinion.

I do have a fear though, that myself and others will become confused as to 
what "delete" means.  The word has a well understood meaning in drupal today, 
and to anyone familiar with SQL.  I'd like to see that meaning preserved.  If 
we change "delete" to mean "move to trash bin", then how will I 
describe "take something already in the trash bin and 'really delete' it from 
the database"?

I suggest we use a new term (perhaps "remove", "expunge", or "trash") to 
describe this thing that could mean "move to trash" or "delete from database" 
depending on configuration.  As a module developer, I like knowing that 
hook_delete means "delete from database".  And if my module needs to perform 
some task when content is moved to trash, I'd rather have a new hook_trash 
(or somesuch) be invoked.  Likewise for hook_nodeapi: $op == 'delete' or $op 
== 'trash'.

That's my 2 cents,

-Dave


On Friday 21 July 2006 08:58, Chad Phillips -- Apartment Lines wrote:
> as i mentioned a short time ago, i've been trying to flesh out a
> deletion API for drupal.  i thought i'd take a few minutes and
> discuss it's current state, and throw out some unfinished business to
> get perspective from other developers.
>


More information about the development mailing list