> > Feature (closed)

add delete-option in detail views


Nov 22, 2006
Apr 15, 2012
Nov 22, 2006 / binder
Apr 15, 2012 / pixtur

Attached files

No files uploaded
we should add a detail-function to Page Functions () in detailviews, especially in personView.
We did some housework lately and it's annoying to delete person via lists! ;)


burger:Can I take care of this?

11 years ago (2. update 11 years ago)

If this new Page Function is okay for you then I would like assign to this task.


11 years ago

Is there a possibility to find out the from-page?
I mean something like 'personView' and not the encrypted from-variable.


11 years ago

Hi Tom,

I really would like to know:
  1. If I can work on this?
  2. And if yes. How can I find out the from-page?
Thanks in advance.

pixtur:Sure, go ahead...

11 years ago

Adding the from function is straight forward:

$from_handle= $PH->defineFromHandle(array('tsk'=>$task->id));

You need to provide the parameters that are necessary to return to this page. So for personView it would be:

$from_handle= $PH->defineFromHandle(array('person'=>$person->id));

The from handle is automatically stored by the PageHandler. So you actually do not need to care about the variable. In the PageHandler:

from std/class_pagehandler.inc.php

public function defineFromHandle($params=NULL) {
    $this->cur_page_md5= $md5;

$this->cur_page_md5= $md5 is then later be used by PageHandler->getUrl() if the requested PageHandle is defined as a PageHandleFunc.

burger:Changed and committed ...

11 years ago

I added a delete-functionality to personView, companyView and projView.

I had to change the code from ...

from projDelete

if(!$PH->showFromPage()) {

... to ...

from projDelete


... because otherwise I always got an error message.

I saw at tasksDelete that you kept the !$PH->showFromPage() and it works. Maybe you can check my code and find out the difference?

madlyr:Is it safe to remove person?

11 years ago

Is it safe to remove person?
What about changes, history list, tasks assigned to person, person comments, etc.?

I remember, that when I deleted manually from database person not used anywhere I got errors in History (projChanges list).


11 years ago (3. update 11 years ago)

I use the same function (personDelete) as if you would delete a person from e.g. personList. So if there is a problem with deletion then in personView is a problem with deletion too.

But you know that's not possible to delete a person who is related to a project or who was related to a project.

So I think there's nothing to worry about :-).

pixtur:about showfrompage() and deletion of Persons...

11 years ago

I will check your code about the useFromPage()...

About deleting of persons... Well that's the old problem again. I tried to forget about this one :) Deleted persons will be listed in the "Deleted Persons" section. As burger pointed out, deleting of persons in Projects is not possible, yet.