2021-08-25 23:06:22 +00:00
|
|
|
<?php
|
|
|
|
# -- BEGIN LICENSE BLOCK ----------------------------------
|
|
|
|
# This file is part of kUtRL, a plugin for Dotclear 2.
|
|
|
|
#
|
|
|
|
# Copyright (c) 2009-2011 JC Denis and contributors
|
|
|
|
# jcdenis@gdwd.com
|
|
|
|
#
|
|
|
|
# Licensed under the GPL version 2.0 license.
|
|
|
|
# A copy of this license is available in LICENSE file or at
|
|
|
|
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
# -- END LICENSE BLOCK ------------------------------------
|
|
|
|
|
|
|
|
# This file is used with plugin activityReport
|
|
|
|
|
2021-08-27 22:06:46 +00:00
|
|
|
if (!defined('DC_RC_PATH')) {
|
|
|
|
return null;
|
|
|
|
}
|
2021-08-25 23:06:22 +00:00
|
|
|
|
2021-08-27 22:06:46 +00:00
|
|
|
$core->activityReport->addGroup('kutrl', __('Plugin kUtRL'));
|
2021-08-25 23:06:22 +00:00
|
|
|
|
|
|
|
# from BEHAVIOR kutrlAfterCreateShortUrl in kUtRL/inc/lib.kutrl.srv.php
|
|
|
|
$core->activityReport->addAction(
|
2021-08-27 22:06:46 +00:00
|
|
|
'kutrl',
|
|
|
|
'create',
|
|
|
|
__('Short link creation'),
|
|
|
|
__('New short link of type "%s" and hash "%s" was created.'),
|
|
|
|
'kutrlAfterCreateShortUrl',
|
|
|
|
['kutrlActivityReportBehaviors', 'kutrlCreate']
|
2021-08-25 23:06:22 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
class kutrlActivityReportBehaviors
|
|
|
|
{
|
2021-08-27 22:06:46 +00:00
|
|
|
public static function kutrlCreate($rs)
|
|
|
|
{
|
|
|
|
$logs = [$rs->type,$rs->hash];
|
2021-08-25 23:06:22 +00:00
|
|
|
|
2021-08-27 22:06:46 +00:00
|
|
|
$GLOBALS['core']->activityReport->addLog('kutrl', 'create', $logs);
|
|
|
|
}
|
|
|
|
}
|