Dotclear

source: plugins/cinecturlink2/inc/lib.cinecturlink2.activityreport.php @ 2023

Revision 2023, 2.4 KB checked in by JcDenis, 14 years ago (diff)

cinecturlink2 0.5:

  • Added a public page with navigation and categories
  • Added RSS/Atom feeds
  • Added new sort option on widget
  • Added support of plugin sitemap
  • Added support of plugin rateIt (first step)
  • Fixed author note on new link
  • Fixed typo
  • Prepared DC 2.2 Break
Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3# This file is part of cinecturlink2, a plugin for Dotclear 2.
4#
5# Copyright (c) 2009-2010 JC Denis and contributors
6# jcdenis@gdwd.com
7#
8# Licensed under the GPL version 2.0 license.
9# A copy of this license is available in LICENSE file or at
10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11# -- END LICENSE BLOCK ------------------------------------
12
13if (!defined('DC_RC_PATH')){return;}
14
15# This file is used with plugin activityReport
16$core->activityReport->addGroup('cinecturlink2',__('Plugin cinecturlink2'));
17
18# from BEHAVIOR cinecturlink2AfterAddLink in cinecturlink2/inc/class.cinecturlink2.php
19$core->activityReport->addAction(
20     'cinecturlink2',
21     'create',
22     __('link creation'),
23     __('A new cineturlink named "%s" was added by "%s"'),
24     'cinecturlink2AfterAddLink',
25     array('cinecturlink2ActivityReportBehaviors','addLink')
26);
27# from BEHAVIOR cinecturlink2AfterUpdLink in cinecturlink2/inc/class.cinecturlink2.php
28$core->activityReport->addAction(
29     'cinecturlink2',
30     'update',
31     __('updating link'),
32     __('Cinecturlink named "%s" has been updated by "%s"'),
33     'cinecturlink2AfterUpdLink',
34     array('cinecturlink2ActivityReportBehaviors','updLink')
35);
36# from BEHAVIOR cinecturlink2BeforeDelLink in cinecturlink2/inc/class.cinecturlink2.php
37$core->activityReport->addAction(
38     'cinecturlink2',
39     'delete',
40     __('link deletion'),
41     __('Cinecturlink named "%s" has been deleted by "%s"'),
42     'cinecturlink2BeforeDelLink',
43     array('cinecturlink2ActivityReportBehaviors','delLink')
44);
45
46class cinecturlink2ActivityReportBehaviors
47{
48     public static function addLink($cur)
49     {
50          global $core;
51
52          $logs = array(
53               $cur->link_title,
54               $core->auth->getInfo('user_cn')
55          );
56
57          $core->activityReport->addLog('cinecturlink2','create',$logs);
58     }
59     public static function updLink($cur,$id)
60     {
61          global $core;
62          $C2 = new cinecturlink2($core);
63          $rs = $C2->getLinks(array('link_id'=>$id));
64
65          $logs = array(
66               $rs->link_title,
67               $core->auth->getInfo('user_cn')
68          );
69
70          $core->activityReport->addLog('cinecturlink2','update',$logs);
71     }
72     public static function delLink($id)
73     {
74          global $core;
75          $C2 = new cinecturlink2($core);
76          $rs = $C2->getLinks(array('link_id'=>$id));
77
78          $logs = array(
79               $rs->link_title,
80               $core->auth->getInfo('user_cn')
81          );
82
83          $core->activityReport->addLog('cinecturlink2','delete',$logs);
84     }
85}
86?>
Note: See TracBrowser for help on using the repository browser.

Sites map