@@ -199,10 +199,12 @@ |
||
199 | 199 | $totalCount = $this->get('totalCount'); |
200 | 200 | $startPaginFrom = $pageNumber - 2; |
201 | 201 | |
202 | - if ($pageNumber == $totalCount && 1 != $pageNumber) |
|
203 | - $startPaginFrom = $pageNumber - 4; |
|
204 | - if ($startPaginFrom <= 0 || 1 == $pageNumber) |
|
205 | - $startPaginFrom = 1; |
|
202 | + if ($pageNumber == $totalCount && 1 != $pageNumber) { |
|
203 | + $startPaginFrom = $pageNumber - 4; |
|
204 | + } |
|
205 | + if ($startPaginFrom <= 0 || 1 == $pageNumber) { |
|
206 | + $startPaginFrom = 1; |
|
207 | + } |
|
206 | 208 | |
207 | 209 | return $startPaginFrom; |
208 | 210 | } |
@@ -122,8 +122,9 @@ |
||
122 | 122 | |
123 | 123 | $pagingModel = new Vtiger_Paging_Model(); |
124 | 124 | $pagingModel->set('page', $pageNumber); |
125 | - if (vglobal('popupAjax')) |
|
126 | - $pagingModel->set('noLimit', true); |
|
125 | + if (vglobal('popupAjax')) { |
|
126 | + $pagingModel->set('noLimit', true); |
|
127 | + } |
|
127 | 128 | |
128 | 129 | $moduleModel = Vtiger_Module_Model::getInstance($moduleName); |
129 | 130 | $recordStructureInstance = Vtiger_RecordStructure_Model::getInstanceForModule($moduleModel); |
@@ -66,9 +66,9 @@ |
||
66 | 66 | public function getSearchParams($value) |
67 | 67 | { |
68 | 68 | $openTicketsStatus = Settings_SupportProcesses_Module_Model::getOpenTicketStatus(); |
69 | - if ($openTicketsStatus) |
|
70 | - $openTicketsStatus = implode(',', $openTicketsStatus); |
|
71 | - else { |
|
69 | + if ($openTicketsStatus) { |
|
70 | + $openTicketsStatus = implode(',', $openTicketsStatus); |
|
71 | + } else { |
|
72 | 72 | $allTicketStatus = Settings_SupportProcesses_Module_Model::getAllTicketStatus(); |
73 | 73 | $openTicketsStatus = implode(',', $allTicketStatus); |
74 | 74 | } |
@@ -14,7 +14,6 @@ |
||
14 | 14 | |
15 | 15 | /** |
16 | 16 | * Function returns Tickets grouped by Status |
17 | - * @param type $data |
|
18 | 17 | * @return array |
19 | 18 | */ |
20 | 19 | public function getOpenTickets() |
@@ -46,8 +46,9 @@ |
||
46 | 46 | |
47 | 47 | $viewer = $this->getViewer($request); |
48 | 48 | $moduleModel = Vtiger_Module_Model::getInstance('OSSTimeControl'); |
49 | - if ($moduleModel) |
|
50 | - $data = $moduleModel->getTimeUsers($recordId, $moduleName); |
|
49 | + if ($moduleModel) { |
|
50 | + $data = $moduleModel->getTimeUsers($recordId, $moduleName); |
|
51 | + } |
|
51 | 52 | $viewer->assign('MODULE_NAME', $moduleName); |
52 | 53 | $viewer->assign('DATA', $data); |
53 | 54 | $viewer->view('charts/ShowTimeHelpDesk.tpl', $moduleName); |
@@ -37,8 +37,9 @@ |
||
37 | 37 | { |
38 | 38 | $adb = PearDatabase::getInstance(); |
39 | 39 | |
40 | - if (count($this->fieldData) == 0) |
|
41 | - return; |
|
40 | + if (count($this->fieldData) == 0) { |
|
41 | + return; |
|
42 | + } |
|
42 | 43 | |
43 | 44 | if (!vtlib\Utils::CheckTable($this->tableName)) { |
44 | 45 | vtlib\Utils::CreateTable( |
@@ -84,7 +84,7 @@ |
||
84 | 84 | * Undo |
85 | 85 | * @param string $moduleName |
86 | 86 | * @param int $userId |
87 | - * @return int|bool |
|
87 | + * @return integer|null |
|
88 | 88 | */ |
89 | 89 | public function undo($moduleName, $userId) |
90 | 90 | { |
@@ -75,7 +75,7 @@ |
||
75 | 75 | |
76 | 76 | // maximum file size for uploaded files in bytes also used when uploading import files |
77 | 77 | // upload_maxsize default value = 3000000 |
78 | -$upload_maxsize = 52428800; // 50MB |
|
78 | +$upload_maxsize = 52428800; // 50MB |
|
79 | 79 | // flag to allow export functionality |
80 | 80 | // 'all' to allow anyone to use exports |
81 | 81 | // 'admin' to only allow admins to export |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | * Function to get start and end date of present calendar quarter |
267 | 267 | * @param int $month |
268 | 268 | * @param DateTime $dateObject |
269 | - * @return date range of present quarter |
|
269 | + * @return string[] range of present quarter |
|
270 | 270 | */ |
271 | 271 | public static function getPresentQuarterRange($month = null, &$dateObject = null) |
272 | 272 | { |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | * Function to get start and end date of previous calendar quarter |
300 | 300 | * @param int $month |
301 | 301 | * @param DateTime $dateObject |
302 | - * @return date range of present quarter |
|
302 | + * @return string[] range of present quarter |
|
303 | 303 | */ |
304 | 304 | public static function getPreviousQuarterRange($month = null, &$dateObject = null) |
305 | 305 | { |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | * Function to get start and end date of next calendar quarter |
334 | 334 | * @param int $month |
335 | 335 | * @param DateTime $dateObject |
336 | - * @return date range of present quarter |
|
336 | + * @return string[] range of present quarter |
|
337 | 337 | */ |
338 | 338 | public static function getNextQuarterRange($month = null, $dateObject = null) |
339 | 339 | { |
@@ -29,6 +29,9 @@ |
||
29 | 29 | return $ns . '-' . $key; |
30 | 30 | } |
31 | 31 | |
32 | + /** |
|
33 | + * @param string $namespace |
|
34 | + */ |
|
32 | 35 | public function set($namespace, $key, $value) |
33 | 36 | { |
34 | 37 | $this->connection->set($this->cacheKey($namespace, $key), $value); |
@@ -24,8 +24,9 @@ |
||
24 | 24 | |
25 | 25 | protected function cacheKey($ns, $key) |
26 | 26 | { |
27 | - if (is_array($key)) |
|
28 | - $key = implode('-', $key); |
|
27 | + if (is_array($key)) { |
|
28 | + $key = implode('-', $key); |
|
29 | + } |
|
29 | 30 | return $ns . '-' . $key; |
30 | 31 | } |
31 | 32 |
@@ -11,11 +11,17 @@ |
||
11 | 11 | class Vtiger_Cache_Connector_Memory |
12 | 12 | { |
13 | 13 | |
14 | + /** |
|
15 | + * @param string $key |
|
16 | + */ |
|
14 | 17 | public function set($key, $value) |
15 | 18 | { |
16 | 19 | $this->$key = $value; |
17 | 20 | } |
18 | 21 | |
22 | + /** |
|
23 | + * @param string $key |
|
24 | + */ |
|
19 | 25 | public function get($key) |
20 | 26 | { |
21 | 27 | return isset($this->$key) ? $this->$key : false; |