@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | |
| 237 | 237 | private function _convert_to_localdata() : string |
| 238 | 238 | { |
| 239 | - return "var " . $this->_grid->get_identifier() . '_entries = ' . json_encode($this->get_rows()) . ";\n"; |
|
| 239 | + return "var " . $this->_grid->get_identifier() . '_entries = ' . json_encode($this->get_rows()) . ";\n"; |
|
| 240 | 240 | } |
| 241 | 241 | |
| 242 | 242 | private function _render_json() |
@@ -269,7 +269,7 @@ discard block |
||
| 269 | 269 | $this->_sort_field = $query['sidx']; |
| 270 | 270 | $this->_sort_direction = strtoupper($query['sord']); |
| 271 | 271 | } |
| 272 | - if ( !empty($query['_search']) |
|
| 272 | + if (!empty($query['_search']) |
|
| 273 | 273 | && $query['_search'] === 'true') { |
| 274 | 274 | foreach ($query as $field => $value) { |
| 275 | 275 | if (in_array($field, ['_search', 'nd', 'page', 'rows', 'sidx', 'sord'])) { |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | |
| 295 | 295 | $this->_total_rows = $query->count(); |
| 296 | 296 | |
| 297 | - if ( $this->_datatype == 'json' |
|
| 297 | + if ($this->_datatype == 'json' |
|
| 298 | 298 | && !empty($this->_results_per_page)) { |
| 299 | 299 | $query->set_limit($this->_results_per_page); |
| 300 | 300 | if (!empty($this->_offset)) { |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function set_privilege($privilege, $assignee = null, int $value = MIDCOM_PRIVILEGE_ALLOW, string $classname = '') : bool |
| 66 | 66 | { |
| 67 | - if ( !$this->can_do('midgard:update') |
|
| 67 | + if (!$this->can_do('midgard:update') |
|
| 68 | 68 | || !$this->can_do('midgard:privileges')) { |
| 69 | 69 | debug_add("Failed to set a privilege, midgard:update or midgard:privileges on " . static::class . " {$this->guid} not granted for the current user.", |
| 70 | 70 | MIDCOM_LOG_ERROR); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function unset_privilege($privilege, $assignee = null, string $classname = '') : bool |
| 96 | 96 | { |
| 97 | - if ( !$this->can_do('midgard:update') |
|
| 97 | + if (!$this->can_do('midgard:update') |
|
| 98 | 98 | || !$this->can_do('midgard:privileges')) { |
| 99 | 99 | debug_add("Failed to unset a privilege, midgard:update or midgard:privileges on " . static::class . " {$this->guid} not granted for the current user.", |
| 100 | 100 | MIDCOM_LOG_ERROR); |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | if ( !$this->can_do('midgard:update') |
| 205 | 205 | || !$this->can_do('midgard:parameters')) { |
| 206 | 206 | debug_add("Failed to set parameters, midgard:update or midgard:parameters on " . static::class . " {$this->guid} not granted for the current user.", |
| 207 | - MIDCOM_LOG_ERROR); |
|
| 207 | + MIDCOM_LOG_ERROR); |
|
| 208 | 208 | midcom_connection::set_error(MGD_ERR_ACCESS_DENIED); |
| 209 | 209 | return false; |
| 210 | 210 | } |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | if ( !$this->can_do('midgard:update') |
| 249 | 249 | || !$this->can_do('midgard:parameters')) { |
| 250 | 250 | debug_add("Failed to delete parameters, midgard:update or midgard:parameters on " . static::class . " {$this->guid} not granted for the current user.", |
| 251 | - MIDCOM_LOG_ERROR); |
|
| 251 | + MIDCOM_LOG_ERROR); |
|
| 252 | 252 | midcom_connection::set_error(MGD_ERR_ACCESS_DENIED); |
| 253 | 253 | return false; |
| 254 | 254 | } |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | return false; |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | - if ( !$this->can_do('midgard:update') |
|
| 204 | + if (!$this->can_do('midgard:update') |
|
| 205 | 205 | || !$this->can_do('midgard:parameters')) { |
| 206 | 206 | debug_add("Failed to set parameters, midgard:update or midgard:parameters on " . static::class . " {$this->guid} not granted for the current user.", |
| 207 | 207 | MIDCOM_LOG_ERROR); |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | return false; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - if ( !$this->can_do('midgard:update') |
|
| 248 | + if (!$this->can_do('midgard:update') |
|
| 249 | 249 | || !$this->can_do('midgard:parameters')) { |
| 250 | 250 | debug_add("Failed to delete parameters, midgard:update or midgard:parameters on " . static::class . " {$this->guid} not granted for the current user.", |
| 251 | 251 | MIDCOM_LOG_ERROR); |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | return false; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - if ( !$this->can_do('midgard:update') |
|
| 54 | + if (!$this->can_do('midgard:update') |
|
| 55 | 55 | || !$this->can_do('midgard:attachments')) { |
| 56 | 56 | debug_add("Failed to set parameters, midgard:update or midgard:attachments on " . static::class . " {$this->guid} not granted for the current user.", |
| 57 | 57 | MIDCOM_LOG_ERROR); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | return null; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - if ( !$this->can_do('midgard:update') |
|
| 74 | + if (!$this->can_do('midgard:update') |
|
| 75 | 75 | || !$this->can_do('midgard:attachments')) { |
| 76 | 76 | debug_add("Failed to set parameters, midgard:update or midgard:attachments on the " . static::class . " {$this->guid} not granted for the current user.", |
| 77 | 77 | MIDCOM_LOG_ERROR); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $attachment->parentguid = $this->guid; |
| 86 | 86 | |
| 87 | 87 | if (!$attachment->create()) { |
| 88 | - debug_add("Could not create the attachment '{$name}' for " . static::class . " {$this->guid}: " . midcom_connection::get_error_string(), |
|
| 88 | + debug_add("Could not create the attachment '{$name}' for " . static::class . " {$this->guid}: " . midcom_connection::get_error_string(), |
|
| 89 | 89 | MIDCOM_LOG_INFO); |
| 90 | 90 | return null; |
| 91 | 91 | } |