Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/components/com_tjucm/administrator/controllers/types.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ public function export()

$exportData = array();

$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('actionlog', 'tjucm');
$dispatcher->trigger('tjUcmOnAfterTypeExport', array($cids));

foreach ($cids as $cid)
{
$ucmTypeTable = Table::getInstance('Type', 'TjucmTable');
Expand Down Expand Up @@ -369,6 +373,10 @@ public function import()
}
}
}

$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('actionlog', 'tjucm');
$dispatcher->trigger('tjUcmOnAfterTypeImport', array($ucmTypeId));
}
}

Expand Down
10 changes: 10 additions & 0 deletions src/components/com_tjucm/administrator/models/type.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public function __construct($config = array())
JLoader::import('components.com_tjucm.classes.funlist', JPATH_ADMINISTRATOR);
$this->common = new TjucmFunList;

$config['event_after_delete'] = 'tjUcmOnAfterTypeDelete';
$config['event_change_state'] = 'tjUcmOnAfterTypeChangeState';

parent::__construct($config);
}

Expand Down Expand Up @@ -381,6 +384,13 @@ public function save($data)

if (parent::save($data))
{
$id = (int) $this->getState($this->getName() . '.id');
$data['typeId'] = $id;
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('actionlog', 'tjucm');
$isNew = ($data['id'] != 0) ? false : true;
$dispatcher->trigger('tjUcmOnAfterTypeSave', array($data, $isNew));

return true;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><title></title>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
; @package TJUCM
; @subpackage Actionlog.TJUCM
; @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
; @license GNU General Public License version 2 or later
; Note: All ini files need to be saved as UTF-8

PLG_ACTIONLOG_TJUCM="Action Log - TJUCM"
PLG_ACTIONLOG_TJUCM_XML_DESCRIPTION="Record the actions of users on the site for extension TJUCM so they can be reviewed if required."
PLG_ACTIONLOG_TJUCM_LOG_ACTION_TYPE_SAVE="Log action for type creation?"
PLG_ACTIONLOG_TJUCM_LOG_ACTION_TYPE_DELETE="Log action for type delete?"
PLG_ACTIONLOG_TJUCM_LOG_ACTION_TYPE_UPDATE="Log action for type update?"
PLG_ACTIONLOG_TJUCM_LOG_ACTION_TYPE_STATE_CHANGE="Log action for type state change?"
PLG_ACTIONLOG_TJUCM_LOG_ACTION_TYPE_IMPORT="Log action for type import?"
PLG_ACTIONLOG_TJUCM_LOG_ACTION_TYPE_EXPORT="Log action for type Export?"
PLG_ACTIONLOG_TJUCM_LOG_ACTION_TYPE_TRASH="Log action for type Trash?"
PLG_ACTIONLOG_TJUCM_LOG_ACTION_ITEM_DELETE="Log action for item delete?"
PLG_ACTIONLOG_TJUCM_LOG_ACTION_ITEM_SAVE="Log action for item creation?"

PLG_ACTIONLOG_TJUCM_TYPE_ADDED="User <a href=\"{accountlink}\">{username}</a> added a new UCM type <a href=\"{typelink}\">{title}</a> "
PLG_ACTIONLOG_TJUCM_TYPE_UPDATED="User <a href=\"{accountlink}\">{username}</a> updated the UCM type <a href=\"{typelink}\">{title}</a> "
PLG_ACTIONLOG_TJUCM_TYPE_DELETED="User <a href=\"{accountlink}\">{username}</a> deleted the UCM type \"{title}\" "
PLG_ACTIONLOGS_TJUCM_TYPE_UNPUBLISHED="User <a href=\"{accountlink}\">{username}</a> unpublished the UCM type <a href=\"{itemlink}\">{title}</a> "
PLG_ACTIONLOGS_TJUCM_TYPE_PUBLISHED="User <a href=\"{accountlink}\">{username}</a> published the UCM type <a href=\"{itemlink}\">{title}</a> "
PLG_ACTIONLOGS_TJUCM_TYPE_ARCHIVED="User <a href=\"{accountlink}\">{username}</a> archived the UCM type <a href=\"{itemlink}\">{title}</a> of client \"{identifier}\" "
PLG_ACTIONLOGS_TJUCM_TYPE_TRASHED="User <a href=\"{accountlink}\">{username}</a> trashed the UCM type <a href=\"{itemlink}\">{title}</a> "
PLG_ACTIONLOG_TJUCM_TYPE_EXPORTED="User <a href=\"{accountlink}\">{username}</a> exported the UCM type <a href=\"{itemlink}\">{title}</a> "
PLG_ACTIONLOG_TJUCM_TYPE_IMPORTED="User <a href=\"{accountlink}\">{username}</a> imported the UCM type <a href=\"{itemlink}\">{title}</a> "

PLG_ACTIONLOG_TJUCM_ITEM_DELETED="User <a href=\"{accountlink}\">{username}</a> has deleted item \"{id}\" "
PLG_ACTIONLOG_TJUCM_ITEM_ADDED="User <a href=\"{accountlink}\">{username}</a> has added item \"{id}\" "
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
; @package Jgive
; @subpackage Actionlog.jgive
; @copyright Copyright (C) 2009 - 2018 Techjoomla. All rights reserved.
; @license GNU General Public License version 2 or later
; Note: All ini files need to be saved as UTF-8

PLG_ACTIONLOG_JGIVE="Action Log - JGive"
PLG_ACTIONLOG_JGIVE_XML_DESCRIPTION="Record the actions of users on the site for extension JGive so they can be reviewed if required."
Loading