1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved |
4
|
|
|
* This file is licensed under the GNU General Public License version 2. See the file COPYING. |
5
|
|
|
* |
6
|
|
|
* @author Marc Nazarian <[email protected]> |
7
|
|
|
* |
8
|
|
|
* IMMucSystemLog manage logs produced by the system |
9
|
|
|
* |
10
|
|
|
* Inherited concrete classes embedded in this file: |
11
|
|
|
* - IMMucJoinTheRoomSystemLog |
12
|
|
|
* - IMMucLeftTheRoomSystemLog |
13
|
|
|
* - IMMucChangeTopicSystemLog |
14
|
|
|
* |
15
|
|
|
*/ |
16
|
|
|
|
17
|
|
|
require_once('IMMucLog.class.php'); |
18
|
|
|
|
19
|
|
|
abstract class IMMucSystemLog extends IMMucLog { |
20
|
|
|
|
21
|
|
|
protected $_nickname; |
22
|
|
|
|
23
|
|
|
} |
24
|
|
|
|
25
|
|
|
class IMMucJoinTheRoomSystemLog extends IMMucSystemLog { |
26
|
|
|
|
27
|
|
|
function IMMucJoinTheRoomSystemLog($date, $nickname) { |
28
|
|
|
$this->_nickname = $nickname; |
29
|
|
|
parent::__construct($date, '', 'system', $GLOBALS['Language']->getText('plugin_im', 'muc_logs_join', array($nickname))); |
|
|
|
|
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
class IMMucLeftTheRoomSystemLog extends IMMucSystemLog { |
35
|
|
|
|
36
|
|
|
function IMMucLeftTheRoomSystemLog($date, $nickname) { |
37
|
|
|
$this->_nickname = $nickname; |
38
|
|
|
parent::__construct($date, '', 'system', $GLOBALS['Language']->getText('plugin_im', 'muc_logs_left', array($nickname))); |
|
|
|
|
39
|
|
|
} |
40
|
|
|
|
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
class IMMucChangeTopicSystemLog extends IMMucSystemLog { |
44
|
|
|
|
45
|
|
|
protected $_topic; |
46
|
|
|
|
47
|
|
|
function IMMucChangeTopicSystemLog($date, $nickname, $new_topic) { |
48
|
|
|
$this->_nickname = $nickname; |
49
|
|
|
$this->_topic = $new_topic; |
50
|
|
|
parent::__construct($date, '', 'system', $GLOBALS['Language']->getText('plugin_im', 'muc_logs_settopic', array($nickname, $new_topic))); |
|
|
|
|
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
?> |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.