@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | |
92 | 92 | $parentComplexity = $this->checkComplexityLevel($parentFolderData, $complexity, $parent_id); |
93 | 93 | if (isset($parentComplexity['error']) && $parentComplexity['error'] === true) { |
94 | - return $this->errorResponse($this->lang->get('error_folder_complexity_lower_than_top_folder') . " [<b>{$this->settings['TP_PW_COMPLEXITY'][$parentComplexity['valeur']][1]}</b>]"); |
|
94 | + return $this->errorResponse($this->lang->get('error_folder_complexity_lower_than_top_folder')." [<b>{$this->settings['TP_PW_COMPLEXITY'][$parentComplexity['valeur']][1]}</b>]"); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | return $this->createFolder($params, array_merge($parentFolderData, $parentComplexity), $options); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | ) { |
145 | 145 | DB::query( |
146 | 146 | 'SELECT * |
147 | - FROM ' . prefixTable('nested_tree') . ' |
|
147 | + FROM ' . prefixTable('nested_tree').' |
|
148 | 148 | WHERE title = %s AND personal_folder = 0', |
149 | 149 | $title |
150 | 150 | ); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | //check if parent folder is personal |
169 | 169 | $data = DB::queryFirstRow( |
170 | 170 | 'SELECT personal_folder, bloquer_creation, bloquer_modification |
171 | - FROM ' . prefixTable('nested_tree') . ' |
|
171 | + FROM ' . prefixTable('nested_tree').' |
|
172 | 172 | WHERE id = %i', |
173 | 173 | $parent_id |
174 | 174 | ); |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | // get complexity level for this folder |
208 | 208 | $data = DB::queryFirstRow( |
209 | 209 | 'SELECT valeur |
210 | - FROM ' . prefixTable('misc') . ' |
|
210 | + FROM ' . prefixTable('misc').' |
|
211 | 211 | WHERE intitule = %i AND type = %s', |
212 | 212 | $parent_id, |
213 | 213 | 'complex' |
@@ -278,11 +278,11 @@ discard block |
||
278 | 278 | */ |
279 | 279 | private function canCreateFolder($isPersonal, $user_is_admin, $user_is_manager, $user_can_manage_all_users, $user_can_create_root_folder) |
280 | 280 | { |
281 | - return (int)$isPersonal === 1 || |
|
282 | - (int)$user_is_admin === 1 || |
|
283 | - ((int)$user_is_manager === 1 || (int)$user_can_manage_all_users === 1) || |
|
281 | + return (int) $isPersonal === 1 || |
|
282 | + (int) $user_is_admin === 1 || |
|
283 | + ((int) $user_is_manager === 1 || (int) $user_can_manage_all_users === 1) || |
|
284 | 284 | ($this->settings['enable_user_can_create_folders'] ?? false) || |
285 | - ((int)$user_can_create_root_folder === 1); |
|
285 | + ((int) $user_can_create_root_folder === 1); |
|
286 | 286 | } |
287 | 287 | |
288 | 288 | /** |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $path = ''; |
363 | 363 | $tree_path = $tree->getPath(0, false); |
364 | 364 | foreach ($tree_path as $fld) { |
365 | - $path .= empty($path) ? $fld->title : '/' . $fld->title; |
|
365 | + $path .= empty($path) ? $fld->title : '/'.$fld->title; |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | $new_json = [ |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | |
379 | 379 | $cache_tree = DB::queryFirstRow( |
380 | 380 | 'SELECT increment_id, folders, visible_folders |
381 | - FROM ' . prefixTable('cache_tree') . ' |
|
381 | + FROM ' . prefixTable('cache_tree').' |
|
382 | 382 | WHERE user_id = %i', |
383 | 383 | (int) $user_id |
384 | 384 | ); |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | private function manageFolderPermissions($parent_id, $newId, $user_roles, $access_rights, $user_is_admin) |
420 | 420 | { |
421 | 421 | if ($parent_id !== 0 && $this->settings['subfolder_rights_as_parent'] ?? false) { |
422 | - $rows = DB::query('SELECT role_id, type FROM ' . prefixTable('roles_values') . ' WHERE folder_id = %i', $parent_id); |
|
422 | + $rows = DB::query('SELECT role_id, type FROM '.prefixTable('roles_values').' WHERE folder_id = %i', $parent_id); |
|
423 | 423 | foreach ($rows as $record) { |
424 | 424 | DB::insert(prefixTable('roles_values'), [ |
425 | 425 | 'role_id' => $record['role_id'], |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | 'type' => $record['type'], |
428 | 428 | ]); |
429 | 429 | } |
430 | - } elseif ((int)$user_is_admin !== 1) { |
|
430 | + } elseif ((int) $user_is_admin !== 1) { |
|
431 | 431 | foreach (array_unique(explode(';', $user_roles)) as $role) { |
432 | 432 | if (!empty($role)) { |
433 | 433 | DB::insert(prefixTable('roles_values'), [ |
@@ -445,7 +445,7 @@ discard block |
||
445 | 445 | */ |
446 | 446 | private function copyCustomFieldsCategories($parent_id, $newId) |
447 | 447 | { |
448 | - $rows = DB::query('SELECT id_category FROM ' . prefixTable('categories_folders') . ' WHERE id_folder = %i', $parent_id); |
|
448 | + $rows = DB::query('SELECT id_category FROM '.prefixTable('categories_folders').' WHERE id_folder = %i', $parent_id); |
|
449 | 449 | foreach ($rows as $record) { |
450 | 450 | DB::insert(prefixTable('categories_folders'), [ |
451 | 451 | 'id_category' => $record['id_category'], |
@@ -470,7 +470,7 @@ discard block |
||
470 | 470 | // Search for existing job |
471 | 471 | $count = DB::queryFirstRow( |
472 | 472 | 'SELECT COUNT(*) AS count |
473 | - FROM ' . prefixTable('background_tasks') . ' |
|
473 | + FROM ' . prefixTable('background_tasks').' |
|
474 | 474 | WHERE is_in_progress = %i AND process_type = %s AND arguments = %s', |
475 | 475 | 0, |
476 | 476 | 'user_build_cache_tree', |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | return [ |
505 | 505 | 'error' => true, |
506 | 506 | 'message' => $message, |
507 | - 'newId' => '' . $newIdSuffix, |
|
507 | + 'newId' => ''.$newIdSuffix, |
|
508 | 508 | ]; |
509 | 509 | } |
510 | 510 | } |