@@ -124,8 +124,9 @@ |
||
| 124 | 124 | $secondFallBackModuleDir = $secondFallBackModuleClassPath = $actualModule; |
| 125 | 125 | if ($actualModule != 'Users') { |
| 126 | 126 | $baseModule = $moduleHierarchyParts[0]; |
| 127 | - if ($baseModule == 'Settings') |
|
| 128 | - $baseModule = 'Settings:Vtiger'; |
|
| 127 | + if ($baseModule == 'Settings') { |
|
| 128 | + $baseModule = 'Settings:Vtiger'; |
|
| 129 | + } |
|
| 129 | 130 | $firstFallBackDir = str_replace(':', '.', $baseModule); |
| 130 | 131 | $firstFallBackClassPath = str_replace(':', '_', $baseModule); |
| 131 | 132 | } |
@@ -209,8 +209,9 @@ discard block |
||
| 209 | 209 | $needle = '$' . strtolower($this->module) . '-' . $parentFieldColumnMapping[$params['field']] . ':' . $column . '$'; |
| 210 | 210 | $this->processedDescription = str_replace($needle, $values[array_search($column, $fieldColumnMapping)], $this->processedDescription); |
| 211 | 211 | } |
| 212 | - if (!$params['owner']) |
|
| 213 | - $this->processedmodules[$module] = true; |
|
| 212 | + if (!$params['owner']) { |
|
| 213 | + $this->processedmodules[$module] = true; |
|
| 214 | + } |
|
| 214 | 215 | } |
| 215 | 216 | } |
| 216 | 217 | } |
@@ -253,7 +254,8 @@ discard block |
||
| 253 | 254 | $rows = $adb->num_rows($res); |
| 254 | 255 | if ($rows > 0) { |
| 255 | 256 | return true; |
| 256 | - } else |
|
| 257 | - return false; |
|
| 257 | + } else { |
|
| 258 | + return false; |
|
| 259 | + } |
|
| 258 | 260 | } |
| 259 | 261 | } |
@@ -37,8 +37,9 @@ discard block |
||
| 37 | 37 | |
| 38 | 38 | public function setConfig($key, $value) |
| 39 | 39 | { |
| 40 | - if (empty($key)) |
|
| 41 | - return; |
|
| 40 | + if (empty($key)) { |
|
| 41 | + return; |
|
| 42 | + } |
|
| 42 | 43 | $this->properties[$key] = $value; |
| 43 | 44 | //not neccessary for php5.x versions |
| 44 | 45 | self::$propertiesCache[$this->name] = $this->properties; |
@@ -46,8 +47,9 @@ discard block |
||
| 46 | 47 | |
| 47 | 48 | public function getConfig($key) |
| 48 | 49 | { |
| 49 | - if (empty($key)) |
|
| 50 | - return ''; |
|
| 50 | + if (empty($key)) { |
|
| 51 | + return ''; |
|
| 52 | + } |
|
| 51 | 53 | return $this->properties[$key]; |
| 52 | 54 | } |
| 53 | 55 | } |
@@ -28,8 +28,9 @@ |
||
| 28 | 28 | $blockid_list = '('; |
| 29 | 29 | for ($i = 0; $i < $noofrows; $i++) { |
| 30 | 30 | $blockid = $adb->query_result($result, $i, "blockid"); |
| 31 | - if ($i != 0) |
|
| 32 | - $blockid_list .= ', '; |
|
| 31 | + if ($i != 0) { |
|
| 32 | + $blockid_list .= ', '; |
|
| 33 | + } |
|
| 33 | 34 | $blockid_list .= $blockid; |
| 34 | 35 | $block_label[$blockid] = $adb->query_result($result, $i, "blocklabel"); |
| 35 | 36 | } |
@@ -61,8 +61,9 @@ |
||
| 61 | 61 | self::$modules[$module] = $CONFIG; |
| 62 | 62 | switch ($argsLength) { |
| 63 | 63 | case 2: |
| 64 | - if (!isset($CONFIG[$key])) |
|
| 65 | - return false; |
|
| 64 | + if (!isset($CONFIG[$key])) { |
|
| 65 | + return false; |
|
| 66 | + } |
|
| 66 | 67 | return $CONFIG[$key]; |
| 67 | 68 | break; |
| 68 | 69 | default: |
@@ -212,8 +212,9 @@ discard block |
||
| 212 | 212 | $adb = PearDatabase::getInstance(); |
| 213 | 213 | |
| 214 | 214 | // administrator's have assign privilege |
| 215 | - if (\vtlib\Functions::userIsAdministrator($this->user)) |
|
| 216 | - return true; |
|
| 215 | + if (\vtlib\Functions::userIsAdministrator($this->user)) { |
|
| 216 | + return true; |
|
| 217 | + } |
|
| 217 | 218 | |
| 218 | 219 | $idComponents = vtws_getIdComponents($webserviceId); |
| 219 | 220 | $userId = $idComponents[1]; |
@@ -353,8 +354,9 @@ discard block |
||
| 353 | 354 | $theme = vtws_preserveGlobal('theme', $this->user->theme); |
| 354 | 355 | $default_language = AppConfig::main('default_language'); |
| 355 | 356 | $current_language = vglobal('current_language'); |
| 356 | - if (empty($current_language)) |
|
| 357 | - $current_language = $default_language; |
|
| 357 | + if (empty($current_language)) { |
|
| 358 | + $current_language = $default_language; |
|
| 359 | + } |
|
| 358 | 360 | $current_language = vtws_preserveGlobal('current_language', $current_language); |
| 359 | 361 | |
| 360 | 362 | $this->computeAccess(); |
@@ -31,8 +31,9 @@ discard block |
||
| 31 | 31 | $page = empty($element['page']) ? 0 : intval($element['page']); // Page to start |
| 32 | 32 | |
| 33 | 33 | $acrossAllModule = false; |
| 34 | - if ($moduleName == 'Home') |
|
| 35 | - $acrossAllModule = true; |
|
| 34 | + if ($moduleName == 'Home') { |
|
| 35 | + $acrossAllModule = true; |
|
| 36 | + } |
|
| 36 | 37 | |
| 37 | 38 | // Pre-condition check |
| 38 | 39 | if (empty($moduleName)) { |
@@ -71,8 +72,10 @@ discard block |
||
| 71 | 72 | |
| 72 | 73 | // Get most recently tracked changes with limit |
| 73 | 74 | $start = $page * $MAXLIMIT; |
| 74 | - if ($start > 0) |
|
| 75 | - $start = $start + 1; // Adjust the start range |
|
| 75 | + if ($start > 0) { |
|
| 76 | + $start = $start + 1; |
|
| 77 | + } |
|
| 78 | + // Adjust the start range |
|
| 76 | 79 | $sql .= sprintf(' ORDER BY vtiger_modtracker_basic.id DESC LIMIT %s,%s', $start, $MAXLIMIT); |
| 77 | 80 | |
| 78 | 81 | $result = $adb->pquery($sql, $params); |
@@ -24,8 +24,9 @@ discard block |
||
| 24 | 24 | $fieldColumnMapping = $meta->getFieldColumnMapping(); |
| 25 | 25 | $columnFieldMapping = array_flip($fieldColumnMapping); |
| 26 | 26 | foreach ($row as $col => $val) { |
| 27 | - if (array_key_exists($col, $columnFieldMapping)) |
|
| 28 | - $newRow[$columnFieldMapping[$col]] = $val; |
|
| 27 | + if (array_key_exists($col, $columnFieldMapping)) { |
|
| 28 | + $newRow[$columnFieldMapping[$col]] = $val; |
|
| 29 | + } |
|
| 29 | 30 | } |
| 30 | 31 | $newRow = DataTransform::sanitizeData($newRow, $meta, true); |
| 31 | 32 | return $newRow; |
@@ -149,8 +150,9 @@ discard block |
||
| 149 | 150 | $allFields = $meta->getFieldColumnMapping(); |
| 150 | 151 | $newRow = []; |
| 151 | 152 | foreach ($allFields as $field => $col) { |
| 152 | - if (isset($row[$field])) |
|
| 153 | - $newRow[$field] = $row[$field]; |
|
| 153 | + if (isset($row[$field])) { |
|
| 154 | + $newRow[$field] = $row[$field]; |
|
| 155 | + } |
|
| 154 | 156 | } |
| 155 | 157 | if (isset($row[$recordString])) { |
| 156 | 158 | $newRow[$recordString] = $row[$recordString]; |
@@ -21,8 +21,9 @@ |
||
| 21 | 21 | // Cache the instance for re-use |
| 22 | 22 | $moduleRegex = "/[fF][rR][Oo][Mm]\s+([^\s;]+)/"; |
| 23 | 23 | $moduleName = ''; |
| 24 | - if (preg_match($moduleRegex, $q, $m)) |
|
| 25 | - $moduleName = trim($m[1]); |
|
| 24 | + if (preg_match($moduleRegex, $q, $m)) { |
|
| 25 | + $moduleName = trim($m[1]); |
|
| 26 | + } |
|
| 26 | 27 | |
| 27 | 28 | if (!isset($vtws_create_cache[$moduleName]['webserviceobject'])) { |
| 28 | 29 | $webserviceObject = VtigerWebserviceObject::fromQuery($adb, $q); |