CommonDBTM::addMessageOnUpdateAction PHP Method

addMessageOnUpdateAction() public method

Add a message on update action
    function addMessageOnUpdateAction()
    {
        $addMessAfterRedirect = false;
        if (isset($this->input['_update'])) {
            $addMessAfterRedirect = true;
        }
        if (isset($this->input['_no_message']) || !$this->auto_message_on_action) {
            $addMessAfterRedirect = false;
        }
        if ($addMessAfterRedirect) {
            $link = $this->getFormURL();
            if (!isset($link)) {
                return;
            }
            // Do not display quotes
            if (isset($this->fields['name'])) {
                $this->fields['name'] = stripslashes($this->fields['name']);
            } else {
                //TRANS: %1$s is the itemtype, %2$d is the id of the item
                $this->fields['name'] = sprintf(__('%1$s - ID %2$d'), $this->getTypeName(1), $this->fields['id']);
            }
            if (isset($this->input['_no_message_link'])) {
                $display = $this->getNameID();
            } else {
                $display = $this->getLink();
            }
            //TRANS : %s is the description of the updated item
            Session::addMessageAfterRedirect(sprintf(__('%1$s: %2$s'), __('Item successfully updated'), $display));
        }
    }
CommonDBTM