Skip to content

Proper way to issue update notice within FreePBX #15

@lgaetz

Description

@lgaetz

from /libraries/notifications.class.php

/**
      * Add an Update Notification Message
      * 
      * @param string $module Raw name of the module requesting
      * @param string $id ID of the notification
      * @param string $display_text The text that will be displayed as the subject/header of the message
      * @param string $extended_text The extended text of the notification when it is expanded
      * @param string $link The link that is set to the notification
      * @param bool $reset Reset notification on module update
      * @param bool $candelete If the notification can be deleted by the user on the notifications display page
      * @return int Returns the number of notifications per module & id
      */
    function add_update($module, $id, $display_text, $extended_text="", $link="", $reset=false, $candelete=false) {
        $this->_add_type(NOTIFICATION_TYPE_UPDATE, $module, $id, $display_text, $extended_text, $link, $reset, $candelete);
        $this->_freepbx_log(FPBX_LOG_UPDATE, $module, $id, $display_text);

invoke like this:

$nt = notifications::create($db);
$nt->add_update('lenny', ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions