@@ -19,33 +19,26 @@ |
||
| 19 | 19 | if($service == "customerportal") |
| 20 | 20 | { |
| 21 | 21 | include("api/customerportal.php"); |
| 22 | - } |
|
| 23 | - elseif($service == "mobile") |
|
| 22 | + } elseif($service == "mobile") |
|
| 24 | 23 | { |
| 25 | 24 | include("api/mobile.php"); |
| 26 | - } |
|
| 27 | - elseif($service == "yetiportal") |
|
| 25 | + } elseif($service == "yetiportal") |
|
| 28 | 26 | { |
| 29 | 27 | include("api/yetiportal.php"); |
| 30 | - } |
|
| 31 | - elseif($service == "firefox") |
|
| 28 | + } elseif($service == "firefox") |
|
| 32 | 29 | { |
| 33 | 30 | include("api/firefoxtoolbar.php"); |
| 34 | - } |
|
| 35 | - elseif($service == "wordplugin") |
|
| 31 | + } elseif($service == "wordplugin") |
|
| 36 | 32 | { |
| 37 | 33 | include("api/wordplugin.php"); |
| 38 | - } |
|
| 39 | - elseif($service == "thunderbird") |
|
| 34 | + } elseif($service == "thunderbird") |
|
| 40 | 35 | { |
| 41 | 36 | include("api/thunderbirdplugin.php"); |
| 42 | - } |
|
| 43 | - else |
|
| 37 | + } else |
|
| 44 | 38 | { |
| 45 | 39 | echo "No Service Configured for ". strip_tags($service); |
| 46 | 40 | } |
| 47 | -} |
|
| 48 | -else |
|
| 41 | +} else |
|
| 49 | 42 | { |
| 50 | 43 | echo "<h1>YetiForceCRM API Services</h1>"; |
| 51 | 44 | echo "<li>YetiForceCRM Yeti Portal EndPoint URL -- Click <a href='api.php?service=yetiportal'>here</a></li>"; |
@@ -87,8 +87,9 @@ |
||
| 87 | 87 | public function process(Vtiger_Request $request) |
| 88 | 88 | { |
| 89 | 89 | $default_charset = AppConfig::main('default_charset'); |
| 90 | - if (empty($default_charset)) |
|
| 91 | - $default_charset = 'UTF-8'; |
|
| 90 | + if (empty($default_charset)) { |
|
| 91 | + $default_charset = 'UTF-8'; |
|
| 92 | + } |
|
| 92 | 93 | $mode = $request->getMode(); |
| 93 | 94 | if (!empty($mode) && $this->isMethodExposed($mode)) { |
| 94 | 95 | return $this->$mode($request); |
@@ -47,8 +47,9 @@ discard block |
||
| 47 | 47 | function _recaptcha_qsencode($data) |
| 48 | 48 | { |
| 49 | 49 | $req = ""; |
| 50 | - foreach ($data as $key => $value) |
|
| 51 | - $req .= $key . '=' . urlencode(stripslashes($value)) . '&'; |
|
| 50 | + foreach ($data as $key => $value) { |
|
| 51 | + $req .= $key . '=' . urlencode(stripslashes($value)) . '&'; |
|
| 52 | + } |
|
| 52 | 53 | |
| 53 | 54 | // Cut the last '&' |
| 54 | 55 | $req = substr($req, 0, strlen($req) - 1); |
@@ -83,8 +84,10 @@ discard block |
||
| 83 | 84 | |
| 84 | 85 | fwrite($fs, $http_request); |
| 85 | 86 | |
| 86 | - while (!feof($fs)) |
|
| 87 | - $response .= fgets($fs, 1160); // One TCP-IP packet |
|
| 87 | + while (!feof($fs)) { |
|
| 88 | + $response .= fgets($fs, 1160); |
|
| 89 | + } |
|
| 90 | + // One TCP-IP packet |
|
| 88 | 91 | fclose($fs); |
| 89 | 92 | $response = explode("\r\n\r\n", $response, 2); |
| 90 | 93 | |
@@ -83,8 +83,9 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | public function Output($filename, $type) |
| 85 | 85 | { |
| 86 | - if (is_null($this->focus)) |
|
| 87 | - return; |
|
| 86 | + if (is_null($this->focus)) { |
|
| 87 | + return; |
|
| 88 | + } |
|
| 88 | 89 | |
| 89 | 90 | $pdfgenerator = $this->getPDFGenerator(); |
| 90 | 91 | |
@@ -256,24 +257,32 @@ discard block |
||
| 256 | 257 | |
| 257 | 258 | $addressValues = []; |
| 258 | 259 | $addressValues[] = $resultrow['address']; |
| 259 | - if (!empty($resultrow['city'])) |
|
| 260 | - $addressValues[] = "\n" . $resultrow['city']; |
|
| 261 | - if (!empty($resultrow['state'])) |
|
| 262 | - $addressValues[] = "," . $resultrow['state']; |
|
| 263 | - if (!empty($resultrow['code'])) |
|
| 264 | - $addressValues[] = $resultrow['code']; |
|
| 265 | - if (!empty($resultrow['country'])) |
|
| 266 | - $addressValues[] = "\n" . $resultrow['country']; |
|
| 260 | + if (!empty($resultrow['city'])) { |
|
| 261 | + $addressValues[] = "\n" . $resultrow['city']; |
|
| 262 | + } |
|
| 263 | + if (!empty($resultrow['state'])) { |
|
| 264 | + $addressValues[] = "," . $resultrow['state']; |
|
| 265 | + } |
|
| 266 | + if (!empty($resultrow['code'])) { |
|
| 267 | + $addressValues[] = $resultrow['code']; |
|
| 268 | + } |
|
| 269 | + if (!empty($resultrow['country'])) { |
|
| 270 | + $addressValues[] = "\n" . $resultrow['country']; |
|
| 271 | + } |
|
| 267 | 272 | |
| 268 | 273 | $additionalCompanyInfo = []; |
| 269 | - if (!empty($resultrow['phone'])) |
|
| 270 | - $additionalCompanyInfo[] = "\n" . \includes\Language::translate("Phone: ", $this->moduleName) . $resultrow['phone']; |
|
| 271 | - if (!empty($resultrow['fax'])) |
|
| 272 | - $additionalCompanyInfo[] = "\n" . \includes\Language::translate("Fax: ", $this->moduleName) . $resultrow['fax']; |
|
| 273 | - if (!empty($resultrow['website'])) |
|
| 274 | - $additionalCompanyInfo[] = "\n" . \includes\Language::translate("Website: ", $this->moduleName) . $resultrow['website']; |
|
| 275 | - if (!empty($resultrow['vatid'])) |
|
| 276 | - $additionalCompanyInfo[] = "\n" . \includes\Language::translate("VAT ID: ", $this->moduleName) . $resultrow['vatid']; |
|
| 274 | + if (!empty($resultrow['phone'])) { |
|
| 275 | + $additionalCompanyInfo[] = "\n" . \includes\Language::translate("Phone: ", $this->moduleName) . $resultrow['phone']; |
|
| 276 | + } |
|
| 277 | + if (!empty($resultrow['fax'])) { |
|
| 278 | + $additionalCompanyInfo[] = "\n" . \includes\Language::translate("Fax: ", $this->moduleName) . $resultrow['fax']; |
|
| 279 | + } |
|
| 280 | + if (!empty($resultrow['website'])) { |
|
| 281 | + $additionalCompanyInfo[] = "\n" . \includes\Language::translate("Website: ", $this->moduleName) . $resultrow['website']; |
|
| 282 | + } |
|
| 283 | + if (!empty($resultrow['vatid'])) { |
|
| 284 | + $additionalCompanyInfo[] = "\n" . \includes\Language::translate("VAT ID: ", $this->moduleName) . $resultrow['vatid']; |
|
| 285 | + } |
|
| 277 | 286 | |
| 278 | 287 | $modelColumnLeft = array( |
| 279 | 288 | 'logo' => "storage/Logo/" . $resultrow['logoname'], |
@@ -430,8 +439,9 @@ discard block |
||
| 430 | 439 | { |
| 431 | 440 | $valueString = ''; |
| 432 | 441 | foreach ($values as $value) { |
| 433 | - if (empty($value)) |
|
| 434 | - continue; |
|
| 442 | + if (empty($value)) { |
|
| 443 | + continue; |
|
| 444 | + } |
|
| 435 | 445 | $valueString .= $value . $delimeter; |
| 436 | 446 | } |
| 437 | 447 | return rtrim($valueString, $delimeter); |
@@ -16,10 +16,11 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $entity = false; |
| 18 | 18 | if ($mixed) { |
| 19 | - if (is_numeric($mixed)) |
|
| 20 | - $entity = isset(self::$moduleEntityCacheById[$mixed]) ? self::$moduleEntityCacheById[$mixed] : false; |
|
| 21 | - else |
|
| 22 | - $entity = isset(self::$moduleEntityCacheByName[$mixed]) ? self::$moduleEntityCacheByName[$mixed] : false; |
|
| 19 | + if (is_numeric($mixed)) { |
|
| 20 | + $entity = isset(self::$moduleEntityCacheById[$mixed]) ? self::$moduleEntityCacheById[$mixed] : false; |
|
| 21 | + } else { |
|
| 22 | + $entity = isset(self::$moduleEntityCacheByName[$mixed]) ? self::$moduleEntityCacheByName[$mixed] : false; |
|
| 23 | + } |
|
| 23 | 24 | } |
| 24 | 25 | if (!$entity) { |
| 25 | 26 | $adb = \PearDatabase::getInstance(); |
@@ -31,10 +32,11 @@ discard block |
||
| 31 | 32 | self::$moduleEntityCacheById[$row['tabid']] = $row; |
| 32 | 33 | } |
| 33 | 34 | if ($mixed) { |
| 34 | - if (is_numeric($mixed)) |
|
| 35 | - return self::$moduleEntityCacheById[$mixed]; |
|
| 36 | - else |
|
| 37 | - return self::$moduleEntityCacheByName[$mixed]; |
|
| 35 | + if (is_numeric($mixed)) { |
|
| 36 | + return self::$moduleEntityCacheById[$mixed]; |
|
| 37 | + } else { |
|
| 38 | + return self::$moduleEntityCacheByName[$mixed]; |
|
| 39 | + } |
|
| 38 | 40 | } |
| 39 | 41 | } |
| 40 | 42 | return $entity; |
@@ -80,8 +80,9 @@ |
||
| 80 | 80 | $fieldlists = explode(',', $fieldsname); |
| 81 | 81 | $fl = []; |
| 82 | 82 | foreach ($fieldlists as $w => $c) { |
| 83 | - if (count($fl)) |
|
| 84 | - $fl[] = "' '"; |
|
| 83 | + if (count($fl)) { |
|
| 84 | + $fl[] = "' '"; |
|
| 85 | + } |
|
| 85 | 86 | $fl[] = $c; |
| 86 | 87 | } |
| 87 | 88 | $fieldsname = $adb->concat($fl); |
@@ -115,22 +115,26 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | $limit_start_rec = ($start - 1) * $listMaxEntriesPerPage; |
| 117 | 117 | |
| 118 | - if ($adb->isPostgres()) |
|
| 119 | - $list_result = $adb->pquery($query . |
|
| 118 | + if ($adb->isPostgres()) { |
|
| 119 | + $list_result = $adb->pquery($query . |
|
| 120 | 120 | " OFFSET $limit_start_rec LIMIT $listMaxEntriesPerPage ", []); |
| 121 | - else |
|
| 122 | - $list_result = $adb->pquery($query . |
|
| 121 | + } else { |
|
| 122 | + $list_result = $adb->pquery($query . |
|
| 123 | 123 | " LIMIT $limit_start_rec, $listMaxEntriesPerPage ", []); |
| 124 | + } |
|
| 124 | 125 | |
| 125 | 126 | $header = []; |
| 126 | 127 | $header[] = $mod_strings['LBL_LIST_PRODUCT_NAME']; |
| 127 | - if (getFieldVisibilityPermission('Products', $current_user->id, 'productcode') == '0') |
|
| 128 | - $header[] = $mod_strings['LBL_PRODUCT_CODE']; |
|
| 129 | - if (getFieldVisibilityPermission('Products', $current_user->id, 'unit_price') == '0') |
|
| 130 | - $header[] = $mod_strings['LBL_PRODUCT_UNIT_PRICE']; |
|
| 128 | + if (getFieldVisibilityPermission('Products', $current_user->id, 'productcode') == '0') { |
|
| 129 | + $header[] = $mod_strings['LBL_PRODUCT_CODE']; |
|
| 130 | + } |
|
| 131 | + if (getFieldVisibilityPermission('Products', $current_user->id, 'unit_price') == '0') { |
|
| 132 | + $header[] = $mod_strings['LBL_PRODUCT_UNIT_PRICE']; |
|
| 133 | + } |
|
| 131 | 134 | $header[] = $mod_strings['LBL_PB_LIST_PRICE']; |
| 132 | - if (isPermitted("PriceBooks", "EditView", "") == 'yes' || isPermitted("PriceBooks", "Delete", "") == 'yes') |
|
| 133 | - $header[] = $mod_strings['LBL_ACTION']; |
|
| 135 | + if (isPermitted("PriceBooks", "EditView", "") == 'yes' || isPermitted("PriceBooks", "Delete", "") == 'yes') { |
|
| 136 | + $header[] = $mod_strings['LBL_ACTION']; |
|
| 137 | + } |
|
| 134 | 138 | |
| 135 | 139 | $currency_id = $focus->column_fields['currency_id']; |
| 136 | 140 | $numRows = $adb->num_rows($list_result); |
@@ -146,10 +150,12 @@ discard block |
||
| 146 | 150 | |
| 147 | 151 | $entries = []; |
| 148 | 152 | $entries[] = textlength_check($adb->query_result($list_result, $i, "productname")); |
| 149 | - if (getFieldVisibilityPermission('Products', $current_user->id, 'productcode') == '0') |
|
| 150 | - $entries[] = $adb->query_result($list_result, $i, "productcode"); |
|
| 151 | - if (getFieldVisibilityPermission('Products', $current_user->id, 'unit_price') == '0') |
|
| 152 | - $entries[] = CurrencyField::convertToUserFormat($unit_price, null, true); |
|
| 153 | + if (getFieldVisibilityPermission('Products', $current_user->id, 'productcode') == '0') { |
|
| 154 | + $entries[] = $adb->query_result($list_result, $i, "productcode"); |
|
| 155 | + } |
|
| 156 | + if (getFieldVisibilityPermission('Products', $current_user->id, 'unit_price') == '0') { |
|
| 157 | + $entries[] = CurrencyField::convertToUserFormat($unit_price, null, true); |
|
| 158 | + } |
|
| 153 | 159 | |
| 154 | 160 | $entries[] = CurrencyField::convertToUserFormat($listprice, null, true); |
| 155 | 161 | $action = ""; |
@@ -159,12 +165,14 @@ discard block |
||
| 159 | 165 | $action .= '<img src="' . vtiger_imageurl('blank.gif', $theme) . '" border="0" />'; |
| 160 | 166 | } |
| 161 | 167 | if (isPermitted("PriceBooks", "Delete", "") == 'yes' && isPermitted('Products', 'Delete', $entity_id) == 'yes') { |
| 162 | - if ($action != "") |
|
| 163 | - $action .= ' | '; |
|
| 168 | + if ($action != "") { |
|
| 169 | + $action .= ' | '; |
|
| 170 | + } |
|
| 164 | 171 | $action .= '<img src="' . vtiger_imageurl('delete.gif', $theme) . '" onclick="if(confirm(\'' . \includes\Language::translate('ARE_YOU_SURE') . '\')) deletePriceBookProductRel(' . $entity_id . ',' . $pricebook_id . ');" alt="' . \includes\Language::translate('LBL_DELETE') . '" title="' . \includes\Language::translate('LBL_DELETE') . '" style="cursor:pointer;" border="0">'; |
| 165 | 172 | } |
| 166 | - if ($action != "") |
|
| 167 | - $entries[] = $action; |
|
| 173 | + if ($action != "") { |
|
| 174 | + $entries[] = $action; |
|
| 175 | + } |
|
| 168 | 176 | $entries_list[] = $entries; |
| 169 | 177 | } |
| 170 | 178 | $navigationOutput[] = getRecordRangeMessage($list_result, $limit_start_rec, $noofrows); |
@@ -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 | } |
@@ -32,14 +32,18 @@ discard block |
||
| 32 | 32 | } else { |
| 33 | 33 | $cache_file_name = $cachedFileName; |
| 34 | 34 | } |
| 35 | - if (empty($width)) |
|
| 36 | - $width = '400'; |
|
| 37 | - if (empty($height)) |
|
| 38 | - $height = '300'; |
|
| 39 | - if ($target === false) |
|
| 40 | - $target = []; |
|
| 41 | - if (empty($color)) |
|
| 42 | - $color = 'black'; |
|
| 35 | + if (empty($width)) { |
|
| 36 | + $width = '400'; |
|
| 37 | + } |
|
| 38 | + if (empty($height)) { |
|
| 39 | + $height = '300'; |
|
| 40 | + } |
|
| 41 | + if ($target === false) { |
|
| 42 | + $target = []; |
|
| 43 | + } |
|
| 44 | + if (empty($color)) { |
|
| 45 | + $color = 'black'; |
|
| 46 | + } |
|
| 43 | 47 | |
| 44 | 48 | $alts = []; |
| 45 | 49 | $temp = []; |
@@ -48,8 +52,9 @@ discard block |
||
| 48 | 52 | $pos = substr_count($name, " "); |
| 49 | 53 | $alts[] = $name; |
| 50 | 54 | //If the daatx value of a string is greater, adding '\n' to it so that it'll cme inh 2nd line |
| 51 | - if (strlen($name) >= 14) |
|
| 52 | - $name = substr($name, 0, 44); |
|
| 55 | + if (strlen($name) >= 14) { |
|
| 56 | + $name = substr($name, 0, 44); |
|
| 57 | + } |
|
| 53 | 58 | if ($pos >= 2) { |
| 54 | 59 | $val = explode(" ", $name); |
| 55 | 60 | $n = count($val) - 1; |
@@ -102,8 +107,9 @@ discard block |
||
| 102 | 107 | |
| 103 | 108 | for ($i = 0; $i < count($yaxisData); $i++) { |
| 104 | 109 | $x = 1 + $i; |
| 105 | - if ($yaxisData[$i] >= $max) |
|
| 106 | - $max = $yaxisData[$i]; |
|
| 110 | + if ($yaxisData[$i] >= $max) { |
|
| 111 | + $max = $yaxisData[$i]; |
|
| 112 | + } |
|
| 107 | 113 | $dataset->addPoint( |
| 108 | 114 | $x, $yaxisData[$i], array( |
| 109 | 115 | 'url' => $target[$i], |
@@ -125,8 +131,9 @@ discard block |
||
| 125 | 131 | $bplot->setFillStyle($fill); |
| 126 | 132 | |
| 127 | 133 | //You can change the width of the bars if you like |
| 128 | - if (!empty($xaxisData)) |
|
| 129 | - $bplot->setBarWidth($barwidth / count($xaxisData), "%"); |
|
| 134 | + if (!empty($xaxisData)) { |
|
| 135 | + $bplot->setBarWidth($barwidth / count($xaxisData), "%"); |
|
| 136 | + } |
|
| 130 | 137 | $bplot->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL, 'white', 'white'))); |
| 131 | 138 | $xaxis = & $plotarea->getAxis(IMAGE_GRAPH_AXIS_X); |
| 132 | 139 | $yaxis = & $plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); |
@@ -150,8 +157,9 @@ discard block |
||
| 150 | 157 | $ticks = get_tickspacing(round(($max * 1.1) + 0.5)); |
| 151 | 158 | |
| 152 | 159 | // First make the labels look right |
| 153 | - if ($charttype == 'horizontal') |
|
| 154 | - $yaxis->setFontAngle('vertical'); |
|
| 160 | + if ($charttype == 'horizontal') { |
|
| 161 | + $yaxis->setFontAngle('vertical'); |
|
| 162 | + } |
|
| 155 | 163 | $yaxis->setLabelInterval($ticks[0]); |
| 156 | 164 | $yaxis->setTickOptions(-5, 0); |
| 157 | 165 | $yaxis->setLabelInterval($ticks[1], 2); |
@@ -165,8 +173,9 @@ discard block |
||
| 165 | 173 | $xaxis->setDataPreprocessor($array_data); |
| 166 | 174 | $xaxis->forceMinimum(0.5); |
| 167 | 175 | $xaxis->forceMaximum(0.5 + count($yaxisData)); |
| 168 | - if ($charttype == 'vertical') |
|
| 169 | - $xaxis->setFontAngle('vertical'); |
|
| 176 | + if ($charttype == 'vertical') { |
|
| 177 | + $xaxis->setFontAngle('vertical'); |
|
| 178 | + } |
|
| 170 | 179 | $xaxis->setLabelInterval(1); |
| 171 | 180 | $xaxis->setTickOptions(0, 0); |
| 172 | 181 | $xaxis->setLabelInterval(2, 2); |
@@ -218,12 +227,15 @@ discard block |
||
| 218 | 227 | $cache_file_name = $cachedFileName; |
| 219 | 228 | } |
| 220 | 229 | |
| 221 | - if (empty($width)) |
|
| 222 | - $width = '500'; |
|
| 223 | - if (empty($height)) |
|
| 224 | - $height = '400'; |
|
| 225 | - if ($target === false) |
|
| 226 | - $target = []; |
|
| 230 | + if (empty($width)) { |
|
| 231 | + $width = '500'; |
|
| 232 | + } |
|
| 233 | + if (empty($height)) { |
|
| 234 | + $height = '400'; |
|
| 235 | + } |
|
| 236 | + if ($target === false) { |
|
| 237 | + $target = []; |
|
| 238 | + } |
|
| 227 | 239 | |
| 228 | 240 | $alts = []; |
| 229 | 241 | $temp = []; |
@@ -232,8 +244,9 @@ discard block |
||
| 232 | 244 | $pos = substr_count($name, " "); |
| 233 | 245 | $alts[] = $name; |
| 234 | 246 | //If the datax value of a string is greater, adding '\n' to it so that it'll come in 2nd line |
| 235 | - if (strlen($name) >= 14) |
|
| 236 | - $name = substr($name, 0, 34); |
|
| 247 | + if (strlen($name) >= 14) { |
|
| 248 | + $name = substr($name, 0, 34); |
|
| 249 | + } |
|
| 237 | 250 | if ($pos >= 2) { |
| 238 | 251 | $val = explode(" ", $name); |
| 239 | 252 | $n = count($val) - 1; |
@@ -297,8 +310,9 @@ discard block |
||
| 297 | 310 | $pcvalues[$yaxisData[$i]] = sprintf('%0.1f%%', 100 * $yaxisData[$i] / $sum); |
| 298 | 311 | $fills->addColor($colors[$i]); |
| 299 | 312 | } |
| 300 | - if ($sum == 0) |
|
| 301 | - return null; |
|
| 313 | + if ($sum == 0) { |
|
| 314 | + return null; |
|
| 315 | + } |
|
| 302 | 316 | // create the pie chart and associate the filling colours |
| 303 | 317 | $gbplot = & $plotarea->addNew('pie', $dataset); |
| 304 | 318 | $plotarea->setPadding(array('top' => 0, 'bottom' => 0, 'left' => 0, 'right' => ($width / 20))); |
@@ -361,8 +375,9 @@ discard block |
||
| 361 | 375 | $restrictedModules = false; |
| 362 | 376 | foreach ($reportModules as $mod) { |
| 363 | 377 | if (isPermitted($mod, 'index') != 'yes' || \includes\Modules::isModuleActive($mod) == false) { |
| 364 | - if (!is_array($restrictedModules)) |
|
| 365 | - $restrictedModules = []; |
|
| 378 | + if (!is_array($restrictedModules)) { |
|
| 379 | + $restrictedModules = []; |
|
| 380 | + } |
|
| 366 | 381 | $restrictedModules[] = $mod; |
| 367 | 382 | } |
| 368 | 383 | } |
@@ -409,12 +424,12 @@ discard block |
||
| 409 | 424 | $groupFieldValue = $valueComp[1]; |
| 410 | 425 | } |
| 411 | 426 | if ($dateField) { |
| 412 | - if (!empty($groupFieldValue)) |
|
| 413 | - $groupByFields[] = CustomReportUtils::getXAxisDateFieldValue($groupFieldValue, $criteria); |
|
| 414 | - else |
|
| 415 | - $groupByFields[] = "Null"; |
|
| 416 | - } |
|
| 417 | - else if (in_array($fieldname, array_keys($referenceFields))) { |
|
| 427 | + if (!empty($groupFieldValue)) { |
|
| 428 | + $groupByFields[] = CustomReportUtils::getXAxisDateFieldValue($groupFieldValue, $criteria); |
|
| 429 | + } else { |
|
| 430 | + $groupByFields[] = "Null"; |
|
| 431 | + } |
|
| 432 | + } else if (in_array($fieldname, array_keys($referenceFields))) { |
|
| 418 | 433 | if (count($referenceFields[$fieldname]) > 1) { |
| 419 | 434 | $refenceModule = CustomReportUtils::getEntityTypeFromName($decodedGroupFieldValue, $referenceFields[$fieldname]); |
| 420 | 435 | } else { |
@@ -443,10 +458,10 @@ discard block |
||
| 443 | 458 | $advanceSearchCondition = CustomReportUtils::getAdvanceSearchCondition($fieldDetails, $criteria, $groupFieldValue); |
| 444 | 459 | if ($module == 'Calendar') { |
| 445 | 460 | $link_val = "index.php?module=" . $module . "&query=true&action=ListView&" . $advanceSearchCondition; |
| 446 | - } else |
|
| 447 | - $link_val = "index.php?module=" . $module . "&query=true&action=index&" . $advanceSearchCondition; |
|
| 448 | - } |
|
| 449 | - else { |
|
| 461 | + } else { |
|
| 462 | + $link_val = "index.php?module=" . $module . "&query=true&action=index&" . $advanceSearchCondition; |
|
| 463 | + } |
|
| 464 | + } else { |
|
| 450 | 465 | $cvid = \vtlib\Deprecated::getIdOfCustomViewByNameAll($module); |
| 451 | 466 | $esc_search_str = urlencode($decodedGroupFieldValue); |
| 452 | 467 | if ($single == 'DT') { |