Test Failed
Push — master ( 647c72...cd42b5 )
by
unknown
10:25
created

includes/modules/class.stickynotelistmodule.php (1 issue)

Severity
1
<?php
2
	/**
3
	 * StickyNote Module
4
	 */
5
	class StickyNoteListModule extends ListModule
6
	{
7
		/**
8
		 * Constructor
9
		 * @param int $id unique id.
10
		 * @param array $data list of all actions.
11
		 */
12
		function __construct($id, $data)
13
		{
14
			parent::__construct($id, $data);
15
16
			$this->properties = $GLOBALS["properties"]->getStickyNoteListProperties();
17
18
			$this->start = 0;
19
		}
20
21
		/**
22
		 * Creates the notifiers for this module,
23
		 * and register them to the Bus.
24
		 */
25
		function createNotifiers()
26
		{
27
			$entryid = $this->getEntryID();
28
			$GLOBALS["bus"]->registerNotifier('stickynotelistnotifier', $entryid);
29
		}
30
31
		/**
32
		 * Executes all the actions in the $data variable.
33
		 * @return boolean true on success of false on fialure.
34
		 */
35
		function execute()
36
		{
37
			foreach($this->data as $actionType => $action)
38
			{
39
				if(isset($actionType)) {
40
					try {
41
						$store = $this->getActionStore($action);
42
						$entryid = $this->getActionEntryID($action);
43
44
						switch($actionType)
45
						{
46
							case "list":
47
								$this->messageList($store, $entryid, $action, $actionType);
48
								break;
49
							case "search":
50
								$this->search($store, $entryid, $action, $actionType);
51
								break;
52
							case "updatesearch":
53
								$this->updatesearch($store, $entryid, $action);
54
								break;
55
							case "stopsearch":
56
								$this->stopSearch($store, $entryid, $action);
57
								break;
58
							default:
59
								$this->handleUnknownActionType($actionType);
60
						}
61
					} catch (MAPIException $e) {
62
						$this->processException($e, $actionType);
63
					}
64
				}
65
			}
66
		}
67
68
		/**
69
		 * Function will be used to process private items in a list response,
70
		 * sticky notes doesn't have private items so function is overridden to not do 
71
		 * any processing.
72
		 * @param {Object} $item item properties
73
		 * @return {Object} item properties if its non private item otherwise empty array
74
		 */
75
		function processPrivateItem($item)
76
		{
77
			return $item;
78
		}
79
	}
80
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
81