@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | $sReturn[] = 'submit();'; |
100 | 100 | } |
101 | 101 | if ($sReturn != []) { |
102 | - return ' onchange="javascript:' . implode('', $sReturn) . '"'; |
|
102 | + return ' onchange="javascript:'.implode('', $sReturn).'"'; |
|
103 | 103 | } |
104 | 104 | return ''; |
105 | 105 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | ]; |
117 | 117 | if (array_key_exists($identifier, $featArray)) { |
118 | 118 | if (is_null($translation[$identifier])) { |
119 | - return ' ' . $identifier . '="' . $featArray[$identifier] . '"'; |
|
119 | + return ' '.$identifier.'="'.$featArray[$identifier].'"'; |
|
120 | 120 | } |
121 | 121 | return $translation[$identifier]; |
122 | 122 | } |
@@ -141,15 +141,15 @@ discard block |
||
141 | 141 | $ftArray = []; |
142 | 142 | } |
143 | 143 | $featArray = $this->normalizeFeatureArray($ftArray); |
144 | - return '<select name="' . $selectName . '" ' |
|
145 | - . 'id="' . $this->buildSelectId($selectName, $featArray) . '" ' |
|
146 | - . 'size="' . $this->calculateSelectOptionsSize($aElements, $featArray) . '"' |
|
144 | + return '<select name="'.$selectName.'" ' |
|
145 | + . 'id="'.$this->buildSelectId($selectName, $featArray).'" ' |
|
146 | + . 'size="'.$this->calculateSelectOptionsSize($aElements, $featArray).'"' |
|
147 | 147 | . $this->eventOnChange($featArray) |
148 | 148 | . $this->featureArraySimpleTranslated($featArray, 'disabled') |
149 | 149 | . $this->featureArraySimpleTranslated($featArray, 'hidden') |
150 | 150 | . $this->featureArraySimpleTranslated($featArray, 'multiselect') |
151 | 151 | . $this->featureArraySimpleTranslated($featArray, 'style') |
152 | - . '>' . $this->setOptionsForSelect($aElements, $sDefaultValue, $featArray) . '</select>'; |
|
152 | + . '>'.$this->setOptionsForSelect($aElements, $sDefaultValue, $featArray).'</select>'; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | private function setOptionGroupEnd($crtGroup, $featArray) |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | if ($crtGroup != $tempString) { |
171 | 171 | $sReturn[] = $this->setOptionGroupEnd($crtGroup, $featArray); |
172 | 172 | $crtGroup = $tempString; |
173 | - $sReturn[] = '<optgroup label="' . str_replace($featArray['grouping'], '', $crtGroup) . '">'; |
|
173 | + $sReturn[] = '<optgroup label="'.str_replace($featArray['grouping'], '', $crtGroup).'">'; |
|
174 | 174 | } |
175 | 175 | } |
176 | 176 | return ['crtGroup' => $crtGroup, 'groupFooterHeader' => implode('', $sReturn)]; |
@@ -207,12 +207,12 @@ discard block |
||
207 | 207 | $aFH = $this->setOptionGroupFooterHeader($featArray, $value, $crtGroup); |
208 | 208 | $crtGroup = $aFH['crtGroup']; |
209 | 209 | $sReturn[] = $aFH['groupFooterHeader'] |
210 | - . '<option value="' . $key . '"' . $this->setOptionSelected($key, $sDefaultValue) |
|
211 | - . $this->featureArraySimpleTranslated($featArray, 'styleForOption') . '>' |
|
212 | - . str_replace(['&', $crtGroup], ['&', ''], $value) . '</option>'; |
|
210 | + . '<option value="'.$key.'"'.$this->setOptionSelected($key, $sDefaultValue) |
|
211 | + . $this->featureArraySimpleTranslated($featArray, 'styleForOption').'>' |
|
212 | + . str_replace(['&', $crtGroup], ['&', ''], $value).'</option>'; |
|
213 | 213 | } |
214 | 214 | $sReturn[] = $this->setOptionGroupEnd($crtGroup, $featArray); |
215 | - return $this->featureArraySimpleTranslated($featArray, 'include_null') . implode('', $sReturn); |
|
215 | + return $this->featureArraySimpleTranslated($featArray, 'include_null').implode('', $sReturn); |
|
216 | 216 | } |
217 | 217 | |
218 | 218 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | private function correctTableWithQuotesAsFieldPrefix($referenceTable) |
49 | 49 | { |
50 | 50 | if ($referenceTable != '') { |
51 | - return '`' . str_replace('`', '', $referenceTable) . '`.'; |
|
51 | + return '`'.str_replace('`', '', $referenceTable).'`.'; |
|
52 | 52 | } |
53 | 53 | return ''; |
54 | 54 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | private function sGlueFilterValIntoWhereStr($filterValue) |
82 | 82 | { |
83 | 83 | if (is_array($filterValue)) { |
84 | - return 'IN ("' . implode('", "', $filterValue) . '")'; |
|
84 | + return 'IN ("'.implode('", "', $filterValue).'")'; |
|
85 | 85 | } |
86 | 86 | return $this->sGlueFilterValueIntoWhereStringFinal($filterValue); |
87 | 87 | } |
@@ -94,13 +94,13 @@ discard block |
||
94 | 94 | 'NOT NULL|NULL', |
95 | 95 | ]; |
96 | 96 | if (in_array($filterValue, explode('|', $kFields[0]))) { |
97 | - return '= ' . $filterValue; |
|
97 | + return '= '.$filterValue; |
|
98 | 98 | } elseif (in_array($filterValue, explode('|', $kFields[1]))) { |
99 | 99 | return $filterValue; |
100 | 100 | } elseif (in_array($filterValue, explode('|', $kFields[2]))) { |
101 | - return 'IS ' . $filterValue; |
|
101 | + return 'IS '.$filterValue; |
|
102 | 102 | } |
103 | - return '= "' . $filterValue . '"'; |
|
103 | + return '= "'.$filterValue.'"'; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | private function sGlueFiltersIntoWhereArrayFilter($filters) |
113 | 113 | { |
114 | - return '(' . implode(') AND (', $filters) . ')'; |
|
114 | + return '('.implode(') AND (', $filters).')'; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | /** |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | $fltr = []; |
130 | 130 | unset($filterArray['LIMIT']); |
131 | 131 | foreach ($filterArray as $key => $value) { |
132 | - $fltr[] = '`' . $tableToApplyFilterTo . '`.`' . $key . '` ' . $this->sGlueFilterValIntoWhereStr($value); |
|
132 | + $fltr[] = '`'.$tableToApplyFilterTo.'`.`'.$key.'` '.$this->sGlueFilterValIntoWhereStr($value); |
|
133 | 133 | } |
134 | 134 | return $this->sManageDynamicFiltersFinal($fltr); |
135 | 135 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | { |
139 | 139 | if (count($filters) > 0) { |
140 | 140 | $sReturn = ['WHERE', $this->sGlueFiltersIntoWhereArrayFilter($filters)]; |
141 | - return implode(' ', $sReturn) . ' '; |
|
141 | + return implode(' ', $sReturn).' '; |
|
142 | 142 | } |
143 | 143 | return ''; |
144 | 144 | } |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | $filterArray = (is_array($filterArray) ? $filterArray : ['' => '']); |
160 | 160 | return 'SELECT ' |
161 | 161 | . '`C`.`TABLE_SCHEMA`, ' |
162 | - . $this->sQueryMySqlColumnsColumns() . ' ' |
|
162 | + . $this->sQueryMySqlColumnsColumns().' ' |
|
163 | 163 | . 'FROM `information_schema`.`COLUMNS` `C` ' |
164 | - . 'LEFT JOIN `information_schema`.`KEY_COLUMN_USAGE` `KCU` ON ((' . implode(') AND (', [ |
|
164 | + . 'LEFT JOIN `information_schema`.`KEY_COLUMN_USAGE` `KCU` ON (('.implode(') AND (', [ |
|
165 | 165 | '`C`.`TABLE_SCHEMA` = `KCU`.`TABLE_SCHEMA`', |
166 | 166 | '`C`.`TABLE_NAME` = `KCU`.`TABLE_NAME`', |
167 | 167 | '`C`.`COLUMN_NAME` = `KCU`.`COLUMN_NAME`', |
168 | - ]) . ')) ' |
|
168 | + ]).')) ' |
|
169 | 169 | . $this->sManageDynamicFilters($filterArray, 'C') |
170 | 170 | . 'GROUP BY `C`.`TABLE_SCHEMA`, `C`.`TABLE_NAME`, `C`.`COLUMN_NAME` ' |
171 | 171 | . 'ORDER BY `C`.`TABLE_SCHEMA`, `C`.`TABLE_NAME`, `C`.`ORDINAL_POSITION` ' |
@@ -192,20 +192,20 @@ discard block |
||
192 | 192 | { |
193 | 193 | return 'SELECT ' |
194 | 194 | . '`KCU`.`CONSTRAINT_SCHEMA`, ' |
195 | - . $this->sQueryMySqlIndexesColumns() . ' ' |
|
195 | + . $this->sQueryMySqlIndexesColumns().' ' |
|
196 | 196 | . 'FROM `information_schema`.`KEY_COLUMN_USAGE` `KCU` ' |
197 | - . 'INNER JOIN `information_schema`.`COLUMNS` `C` ON ((' . implode(') AND (', [ |
|
197 | + . 'INNER JOIN `information_schema`.`COLUMNS` `C` ON (('.implode(') AND (', [ |
|
198 | 198 | '`C`.`TABLE_SCHEMA` = `KCU`.`TABLE_SCHEMA`', |
199 | 199 | '`C`.`TABLE_NAME` = `KCU`.`TABLE_NAME`', |
200 | 200 | '`C`.`COLUMN_NAME` = `KCU`.`COLUMN_NAME`', |
201 | - ]) . ')) ' |
|
202 | - . 'LEFT JOIN `information_schema`.`REFERENTIAL_CONSTRAINTS` `RC` ON ((' . implode(') AND (', [ |
|
201 | + ]).')) ' |
|
202 | + . 'LEFT JOIN `information_schema`.`REFERENTIAL_CONSTRAINTS` `RC` ON (('.implode(') AND (', [ |
|
203 | 203 | '`KCU`.`CONSTRAINT_SCHEMA` = `RC`.`CONSTRAINT_SCHEMA`', |
204 | 204 | '`KCU`.`CONSTRAINT_NAME` = `RC`.`CONSTRAINT_NAME`', |
205 | - ]) . ')) ' |
|
205 | + ]).')) ' |
|
206 | 206 | . $this->sManageDynamicFilters($filterArray, 'KCU') |
207 | 207 | . 'ORDER BY `KCU`.`TABLE_SCHEMA`, `KCU`.`TABLE_NAME`' |
208 | - . $this->xtraSoring($filterArray, 'COLUMN_NAME') . ';'; |
|
208 | + . $this->xtraSoring($filterArray, 'COLUMN_NAME').';'; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | private function sQueryMySqlIndexesColumns() |
@@ -221,23 +221,23 @@ discard block |
||
221 | 221 | { |
222 | 222 | $tblAls = substr($tblName, 0, 1); |
223 | 223 | $colName = (is_null($adtnlCol) ? $tblName : $adtnlFltr); |
224 | - return '(SELECT COUNT(*) AS `No. of records` FROM `information_schema`.`' . $tblName . '` `' . $tblAls . '` ' |
|
225 | - . 'WHERE (`' . $tblAls . '`.`' . $lnkDbCol . '` = `S`.`SCHEMA_NAME`)' |
|
226 | - . (!is_null($adtnlCol) ? ' AND (`' . $tblAls . '`.`' . $adtnlCol . '` = "' . $adtnlFltr . '")' : '') |
|
227 | - . ') AS `' . ucwords(strtolower($colName)) . '`'; |
|
224 | + return '(SELECT COUNT(*) AS `No. of records` FROM `information_schema`.`'.$tblName.'` `'.$tblAls.'` ' |
|
225 | + . 'WHERE (`'.$tblAls.'`.`'.$lnkDbCol.'` = `S`.`SCHEMA_NAME`)' |
|
226 | + . (!is_null($adtnlCol) ? ' AND (`'.$tblAls.'`.`'.$adtnlCol.'` = "'.$adtnlFltr.'")' : '') |
|
227 | + . ') AS `'.ucwords(strtolower($colName)).'`'; |
|
228 | 228 | } |
229 | 229 | |
230 | 230 | protected function sQueryMySqlStatistics($filterArray = null) |
231 | 231 | { |
232 | 232 | return 'SELECT ' |
233 | 233 | . '`S`.`SCHEMA_NAME`, ' |
234 | - . $this->sQueryMySqlStatisticPattern('TABLES', 'TABLE_SCHEMA', 'TABLE_TYPE', 'BASE TABLE') . ', ' |
|
235 | - . $this->sQueryMySqlStatisticPattern('TABLES', 'TABLE_SCHEMA', 'TABLE_TYPE', 'VIEW') . ', ' |
|
236 | - . $this->sQueryMySqlStatisticPattern('COLUMNS', 'TABLE_SCHEMA') . ', ' |
|
237 | - . $this->sQueryMySqlStatisticPattern('TRIGGERS', 'EVENT_OBJECT_SCHEMA') . ', ' |
|
238 | - . $this->sQueryMySqlStatisticPattern('ROUTINES', 'ROUTINE_SCHEMA', 'ROUTINE_TYPE', 'Function') . ', ' |
|
239 | - . $this->sQueryMySqlStatisticPattern('ROUTINES', 'ROUTINE_SCHEMA', 'ROUTINE_TYPE', 'Procedure') . ', ' |
|
240 | - . $this->sQueryMySqlStatisticPattern('EVENTS', 'EVENT_SCHEMA') . ' ' |
|
234 | + . $this->sQueryMySqlStatisticPattern('TABLES', 'TABLE_SCHEMA', 'TABLE_TYPE', 'BASE TABLE').', ' |
|
235 | + . $this->sQueryMySqlStatisticPattern('TABLES', 'TABLE_SCHEMA', 'TABLE_TYPE', 'VIEW').', ' |
|
236 | + . $this->sQueryMySqlStatisticPattern('COLUMNS', 'TABLE_SCHEMA').', ' |
|
237 | + . $this->sQueryMySqlStatisticPattern('TRIGGERS', 'EVENT_OBJECT_SCHEMA').', ' |
|
238 | + . $this->sQueryMySqlStatisticPattern('ROUTINES', 'ROUTINE_SCHEMA', 'ROUTINE_TYPE', 'Function').', ' |
|
239 | + . $this->sQueryMySqlStatisticPattern('ROUTINES', 'ROUTINE_SCHEMA', 'ROUTINE_TYPE', 'Procedure').', ' |
|
240 | + . $this->sQueryMySqlStatisticPattern('EVENTS', 'EVENT_SCHEMA').' ' |
|
241 | 241 | . 'FROM `information_schema`.`SCHEMATA` `S` ' |
242 | 242 | . 'WHERE (`S`.`SCHEMA_NAME` NOT IN ("information_schema", "mysql", "performance_schema", "sys")) ' |
243 | 243 | . str_replace('WHERE', 'AND', $this->sManageDynamicFilters($filterArray, 'S')) |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | . ', `T`.`CREATE_OPTIONS`, `T`.`TABLE_COMMENT` ' |
259 | 259 | . 'FROM `information_schema`.`TABLES` `T` ' |
260 | 260 | . $this->sManageDynamicFilters($filterArray, 'T') |
261 | - . $this->xtraSoring($filterArray, 'TABLE_SCHEMA') . ';'; |
|
261 | + . $this->xtraSoring($filterArray, 'TABLE_SCHEMA').';'; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | /** |
@@ -273,8 +273,8 @@ discard block |
||
273 | 273 | { |
274 | 274 | $filters2 = implode(', ', array_diff($value, [''])); |
275 | 275 | if ($filters2 != '') { |
276 | - return '(' . $referenceTable . '`' . $key . '` IN ("' |
|
277 | - . str_replace(',', '","', str_replace(["'", '"'], '', $filters2)) . '"))'; |
|
276 | + return '('.$referenceTable.'`'.$key.'` IN ("' |
|
277 | + . str_replace(',', '","', str_replace(["'", '"'], '', $filters2)).'"))'; |
|
278 | 278 | } |
279 | 279 | return ''; |
280 | 280 | } |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | if ((substr($value, 0, 1) == '%') && (substr($value, -1) == '%')) { |
293 | 293 | $fTemp = 'LIKE'; |
294 | 294 | } |
295 | - return '(`' . $key . '` ' . $fTemp . '"' . $value . '")'; |
|
295 | + return '(`'.$key.'` '.$fTemp.'"'.$value.'")'; |
|
296 | 296 | } |
297 | 297 | |
298 | 298 | private function xtraSoring($filterArray, $filterValueToDecide) |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | protected function getFieldNameForDisplay($details) |
68 | 68 | { |
69 | - $tableUniqueId = $details['TABLE_SCHEMA'] . '.' . $details['TABLE_NAME']; |
|
69 | + $tableUniqueId = $details['TABLE_SCHEMA'].'.'.$details['TABLE_NAME']; |
|
70 | 70 | if ($details['COLUMN_COMMENT'] != '') { |
71 | 71 | return $details['COLUMN_COMMENT']; |
72 | 72 | } elseif (isset($this->advCache['tableStructureLocales'][$tableUniqueId][$details['COLUMN_NAME']])) { |
@@ -85,8 +85,8 @@ discard block |
||
85 | 85 | */ |
86 | 86 | protected function getFieldOutputTextFK($foreignKeysArray, $value, $iar) |
87 | 87 | { |
88 | - $query = $this->sQueryGenericSelectKeyValue([ |
|
89 | - '`' . $value['COLUMN_NAME'] . '`', |
|
88 | + $query = $this->sQueryGenericSelectKeyValue([ |
|
89 | + '`'.$value['COLUMN_NAME'].'`', |
|
90 | 90 | $foreignKeysArray[$value['COLUMN_NAME']][2], |
91 | 91 | $foreignKeysArray[$value['COLUMN_NAME']][0] |
92 | 92 | ]); |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return $this->setArrayToJson($aReturn); |
58 | 58 | } |
59 | 59 | $aReturn = $this->getContentFromUrlThroughCurlRawArray($fullURL, $features); |
60 | - return '{ ' . $this->packIntoJson($aReturn, 'info') . ', ' . $this->packIntoJson($aReturn, 'response') . ' }'; |
|
60 | + return '{ '.$this->packIntoJson($aReturn, 'info').', '.$this->packIntoJson($aReturn, 'response').' }'; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | return '<div>No MySQL connection detected</div>'; |
118 | 118 | } |
119 | 119 | $afRows = $this->mySQLconnection->affected_rows; |
120 | - return '<div>' . sprintf($this->lclMsgCmnNumber('i18n_Record', 'i18n_Records', $afRows), $afRows) . '</div>'; |
|
120 | + return '<div>'.sprintf($this->lclMsgCmnNumber('i18n_Record', 'i18n_Records', $afRows), $afRows).'</div>'; |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -189,9 +189,9 @@ discard block |
||
189 | 189 | private function packIntoJson($aReturn, $keyToWorkWith) |
190 | 190 | { |
191 | 191 | if ($this->isJsonByDanielGP($aReturn[$keyToWorkWith])) { |
192 | - return '"' . $keyToWorkWith . '": ' . $aReturn[$keyToWorkWith]; |
|
192 | + return '"'.$keyToWorkWith.'": '.$aReturn[$keyToWorkWith]; |
|
193 | 193 | } |
194 | - return '"' . $keyToWorkWith . '": {' . $aReturn[$keyToWorkWith] . ' }'; |
|
194 | + return '"'.$keyToWorkWith.'": {'.$aReturn[$keyToWorkWith].' }'; |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | /** |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | { |
206 | 206 | $postingUrl = filter_var($urlToSendTo, FILTER_VALIDATE_URL); |
207 | 207 | if ($postingUrl === false) { |
208 | - throw new \Exception('Invalid URL in ' . __FUNCTION__); |
|
208 | + throw new \Exception('Invalid URL in '.__FUNCTION__); |
|
209 | 209 | } |
210 | 210 | if ($params !== []) { |
211 | 211 | $cntFailErrMsg = $this->lclMsgCmn('i18n_Error_FailedToConnect'); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | $flPointer = fsockopen($pUrlParts['host'], $postingPort, $erN, $erM, 30); |
227 | 227 | if ($flPointer === false) { |
228 | - throw new \Exception($cntFailErrMsg . ': ' . $erN . ' (' . $erM . ')'); |
|
228 | + throw new \Exception($cntFailErrMsg.': '.$erN.' ('.$erM.')'); |
|
229 | 229 | } |
230 | 230 | fwrite($flPointer, $this->sendBackgroundPrepareData($pUrlParts, $postingString)); |
231 | 231 | fclose($flPointer); |
@@ -235,12 +235,12 @@ discard block |
||
235 | 235 | { |
236 | 236 | $this->initializeSprGlbAndSession(); |
237 | 237 | $out = []; |
238 | - $out[] = 'POST ' . $pUrlParts['path'] . ' ' . $this->tCmnSuperGlobals->server->get['SERVER_PROTOCOL']; |
|
239 | - $out[] = 'Host: ' . $pUrlParts['host']; |
|
240 | - $out[] = 'User-Agent: ' . $this->getUserAgentByCommonLib(); |
|
238 | + $out[] = 'POST '.$pUrlParts['path'].' '.$this->tCmnSuperGlobals->server->get['SERVER_PROTOCOL']; |
|
239 | + $out[] = 'Host: '.$pUrlParts['host']; |
|
240 | + $out[] = 'User-Agent: '.$this->getUserAgentByCommonLib(); |
|
241 | 241 | $out[] = 'Content-Type: application/x-www-form-urlencoded'; |
242 | - $out[] = 'Content-Length: ' . strlen($postingString); |
|
243 | - $out[] = 'Connection: Close' . "\r\n"; |
|
242 | + $out[] = 'Content-Length: '.strlen($postingString); |
|
243 | + $out[] = 'Connection: Close'."\r\n"; |
|
244 | 244 | $out[] = $postingString; |
245 | 245 | return implode("\r\n", $out); |
246 | 246 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | if ($iar !== []) { |
82 | 82 | $inAdtnl = array_merge($inAdtnl, $iar); |
83 | 83 | } |
84 | - return '<b>' . $this->getFieldValue($value) . '</b>' . $this->setStringIntoShortTag('input', $inAdtnl); |
|
84 | + return '<b>'.$this->getFieldValue($value).'</b>'.$this->setStringIntoShortTag('input', $inAdtnl); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
@@ -94,8 +94,8 @@ discard block |
||
94 | 94 | */ |
95 | 95 | private function getFieldOutputNumericNonFK($fkArray, $value, $iar = []) |
96 | 96 | { |
97 | - $query = $this->sQueryGenericSelectKeyValue([ |
|
98 | - '`' . $value['COLUMN_NAME'] . '`', |
|
97 | + $query = $this->sQueryGenericSelectKeyValue([ |
|
98 | + '`'.$value['COLUMN_NAME'].'`', |
|
99 | 99 | $fkArray[$value['COLUMN_NAME']][2], |
100 | 100 | $fkArray[$value['COLUMN_NAME']][0], |
101 | 101 | ]); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | if ($val[$cnm[0]] == $oCol) { |
152 | 152 | $vlQ = array_merge($val, ['LIMIT' => 2]); |
153 | 153 | $tFd = $this->setMySQLquery2Server($this->getForeignKeysQuery($vlQ), $cnm[1])['result']; |
154 | - $tgtFld = '`' . ($tFd[0][$cnm[0]] == $val[$cnm[0]] ? $tFd[1][$cnm[0]] : $tFd[0][$cnm[0]]) . '`'; |
|
154 | + $tgtFld = '`'.($tFd[0][$cnm[0]] == $val[$cnm[0]] ? $tFd[1][$cnm[0]] : $tFd[0][$cnm[0]]).'`'; |
|
155 | 155 | $aRt[$oCol] = [$this->glueDbTb($val[$cnm[2]], $val[$cnm[3]]), $val[$cnm[2]], $tgtFld]; |
156 | 156 | } |
157 | 157 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | } |
60 | 60 | $vlSlct = explode(',', $this->getFieldValue($val)); |
61 | 61 | $slctOptns = $this->getSetOrEnum2Array($tblSrc, $val['COLUMN_NAME']); |
62 | - return $this->setArrayToSelect($slctOptns, $vlSlct, $val['COLUMN_NAME'] . $adnlThings['suffix'], $inAdtnl); |
|
62 | + return $this->setArrayToSelect($slctOptns, $vlSlct, $val['COLUMN_NAME'].$adnlThings['suffix'], $inAdtnl); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | /** |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $inM = $this->setStringIntoTag($mCN[$dtl['COLUMN_NAME']], 'span', ['style' => 'font-style:italic;']); |
191 | 191 | } |
192 | 192 | } |
193 | - $lbl = '<span class="fake_label">' . $this->getFieldNameForDisplay($dtl) . '</span>'; |
|
193 | + $lbl = '<span class="fake_label">'.$this->getFieldNameForDisplay($dtl).'</span>'; |
|
194 | 194 | return ['label' => $lbl, 'input' => $inM]; |
195 | 195 | } |
196 | 196 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | } elseif (in_array($dtls['DATA_TYPE'], ['date', 'datetime', 'time', 'timestamp', 'year'])) { |
207 | 207 | $sReturn = $this->setNeededFieldSingleType($tblName, $dtls, $iar); |
208 | 208 | } |
209 | - return $this->getFieldCompletionType($dtls) . $sReturn; |
|
209 | + return $this->getFieldCompletionType($dtls).$sReturn; |
|
210 | 210 | } |
211 | 211 | |
212 | 212 | private function setNeededFieldSingleType($tblName, $dtls, $iar) |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | } |
76 | 76 | } |
77 | 77 | } |
78 | - return '<style type="text/css" media="' . $attr['media'] . '">' |
|
79 | - . $cssContent . '</style>'; |
|
78 | + return '<style type="text/css" media="'.$attr['media'].'">' |
|
79 | + . $cssContent.'</style>'; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
@@ -92,11 +92,11 @@ discard block |
||
92 | 92 | } |
93 | 93 | if (in_array($this->getClientRealIpAddress(), $hostsWithoutCDNrq)) { |
94 | 94 | return '<link rel="stylesheet" type="text/css" href="' |
95 | - . filter_var($cssFileName, FILTER_SANITIZE_STRING) . '" />'; |
|
95 | + . filter_var($cssFileName, FILTER_SANITIZE_STRING).'" />'; |
|
96 | 96 | } |
97 | 97 | $patternFound = $this->setCssFileCDN($cssFileName); |
98 | 98 | return '<link rel="stylesheet" type="text/css" href="' |
99 | - . filter_var($patternFound[1], FILTER_SANITIZE_STRING) . '" />'; |
|
99 | + . filter_var($patternFound[1], FILTER_SANITIZE_STRING).'" />'; |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -109,19 +109,19 @@ discard block |
||
109 | 109 | { |
110 | 110 | $cnt = implode(PHP_EOL, [ |
111 | 111 | '$(document).ready(function(){', |
112 | - '$("form#' . $frmId . '").submit(function(){', |
|
113 | - '$("form#' . $frmId . ' input[type=checkbox]").attr("readonly", true);', |
|
114 | - '$("form#' . $frmId . ' input[type=password]").attr("readonly", true);', |
|
115 | - '$("form#' . $frmId . ' input[type=radio]").attr("readonly", true);', |
|
116 | - '$("form#' . $frmId . ' input[type=text]").attr("readonly", true);', |
|
117 | - '$("form#' . $frmId . ' textarea").attr("readonly", true);', |
|
118 | - '$("form#' . $frmId . ' select").attr("readonly", true);', |
|
112 | + '$("form#'.$frmId.'").submit(function(){', |
|
113 | + '$("form#'.$frmId.' input[type=checkbox]").attr("readonly", true);', |
|
114 | + '$("form#'.$frmId.' input[type=password]").attr("readonly", true);', |
|
115 | + '$("form#'.$frmId.' input[type=radio]").attr("readonly", true);', |
|
116 | + '$("form#'.$frmId.' input[type=text]").attr("readonly", true);', |
|
117 | + '$("form#'.$frmId.' textarea").attr("readonly", true);', |
|
118 | + '$("form#'.$frmId.' select").attr("readonly", true);', |
|
119 | 119 | '$("input[type=submit]").attr("disabled", "disabled");', |
120 | - '$("input[type=submit]").attr("value", "' . $this->lclMsgCmn('i18n_Form_ButtonSaving') . '");', |
|
120 | + '$("input[type=submit]").attr("value", "'.$this->lclMsgCmn('i18n_Form_ButtonSaving').'");', |
|
121 | 121 | '});', |
122 | 122 | '});', |
123 | 123 | ]); |
124 | - return $this->setJavascriptContent(PHP_EOL . $cnt . PHP_EOL); |
|
124 | + return $this->setJavascriptContent(PHP_EOL.$cnt.PHP_EOL); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | /** |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | { |
134 | 134 | return $this->setJavascriptContent(implode('', [ |
135 | 135 | 'function loadAE(action) {', |
136 | - 'document.getElementById("' . $tabName . '").tabber.tabShow(1);', |
|
136 | + 'document.getElementById("'.$tabName.'").tabber.tabShow(1);', |
|
137 | 137 | '$("#DynamicAddEditSpacer").load(action', |
138 | 138 | '+"&specialHook[]=noHeader"', |
139 | 139 | '+"&specialHook[]=noMenu"', |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | */ |
153 | 153 | protected function setJavascriptContent($javascriptContent) |
154 | 154 | { |
155 | - return '<script type="text/javascript">' . $javascriptContent . '</script>'; |
|
155 | + return '<script type="text/javascript">'.$javascriptContent.'</script>'; |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | return $this->setJavascriptContent('function setQuest(a, b) { ' |
166 | 166 | . 'c = a.indexOf("_"); switch(a.slice(0, c)) { ' |
167 | 167 | . 'case \'delete\': ' |
168 | - . 'if (confirm(\'' . $this->lclMsgCmn('i18n_ActionDelete_ConfirmationQuestion') . '\')) { ' |
|
168 | + . 'if (confirm(\''.$this->lclMsgCmn('i18n_ActionDelete_ConfirmationQuestion').'\')) { ' |
|
169 | 169 | . 'window.location = document.location.protocol + "//" + ' |
170 | 170 | . 'document.location.host + document.location.pathname + ' |
171 | 171 | . '"?view=" + a + "&" + b; } break; } }'); |
@@ -183,11 +183,11 @@ discard block |
||
183 | 183 | $hostsWithoutCDNrq = []; |
184 | 184 | } |
185 | 185 | if (in_array($this->getClientRealIpAddress(), $hostsWithoutCDNrq)) { |
186 | - return '<script type="text/javascript" src="' . filter_var($jsFileName, FILTER_SANITIZE_STRING) |
|
186 | + return '<script type="text/javascript" src="'.filter_var($jsFileName, FILTER_SANITIZE_STRING) |
|
187 | 187 | . '"></script>'; |
188 | 188 | } |
189 | 189 | $patternFound = $this->setJavascriptFileCDN($jsFileName); |
190 | - return '<script type="text/javascript" src="' . $patternFound[1] . '"></script>' . $patternFound[2]; |
|
190 | + return '<script type="text/javascript" src="'.$patternFound[1].'"></script>'.$patternFound[2]; |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | /** |
@@ -198,14 +198,14 @@ discard block |
||
198 | 198 | */ |
199 | 199 | protected function setJavascriptFileContent($jsFileName) |
200 | 200 | { |
201 | - return '<script type="text/javascript">' . file_get_contents($jsFileName, true) . '</script>'; |
|
201 | + return '<script type="text/javascript">'.file_get_contents($jsFileName, true).'</script>'; |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | protected function updateDivTitleName($rememberGroupVal, $groupCounter) |
205 | 205 | { |
206 | 206 | $jsContent = '$(document).ready(function() { $("#tab_' |
207 | - . $this->cleanStringForId($rememberGroupVal) . '").attr("title", "' |
|
208 | - . $rememberGroupVal . ' (' . $groupCounter . ')"); });'; |
|
207 | + . $this->cleanStringForId($rememberGroupVal).'").attr("title", "' |
|
208 | + . $rememberGroupVal.' ('.$groupCounter.')"); });'; |
|
209 | 209 | return $this->setJavascriptContent($jsContent); |
210 | 210 | } |
211 | 211 |
@@ -41,10 +41,10 @@ discard block |
||
41 | 41 | public function setCalendarControl($controlName, $additionalStyle = '') |
42 | 42 | { |
43 | 43 | return $this->setStringIntoTag(' ', 'span', [ |
44 | - 'onclick' => 'javascript:NewCssCal(\'' . $controlName . '\',\'yyyyMMdd\',\'dropdown\',false,\'24\',false);', |
|
44 | + 'onclick' => 'javascript:NewCssCal(\''.$controlName.'\',\'yyyyMMdd\',\'dropdown\',false,\'24\',false);', |
|
45 | 45 | 'class' => 'fa fa-calendar', |
46 | - 'id' => $controlName . '_picker', |
|
47 | - 'style' => 'cursor:pointer;' . $additionalStyle, |
|
46 | + 'id' => $controlName.'_picker', |
|
47 | + 'style' => 'cursor:pointer;'.$additionalStyle, |
|
48 | 48 | ]); |
49 | 49 | } |
50 | 50 | |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | public function setCalendarControlWithTime($controlName, $additionalStyle = '') |
59 | 59 | { |
60 | 60 | return $this->setStringIntoTag(' ', 'span', [ |
61 | - 'onclick' => 'javascript:NewCssCal(\'' . $controlName . '\',\'yyyyMMdd\',\'dropdown\',true,\'24\',true);', |
|
61 | + 'onclick' => 'javascript:NewCssCal(\''.$controlName.'\',\'yyyyMMdd\',\'dropdown\',true,\'24\',true);', |
|
62 | 62 | 'class' => 'fa fa-calendar', |
63 | - 'id' => $controlName . '_picker', |
|
64 | - 'style' => 'cursor:pointer;' . $additionalStyle, |
|
63 | + 'id' => $controlName.'_picker', |
|
64 | + 'style' => 'cursor:pointer;'.$additionalStyle, |
|
65 | 65 | ]); |
66 | 66 | } |
67 | 67 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | if (!is_null($sHK) && (in_array('noHeader', $sHK))) { |
78 | 78 | return ''; |
79 | 79 | } |
80 | - return $this->setFooterCommonInjected($footerInjected) . '</body></html>'; |
|
80 | + return $this->setFooterCommonInjected($footerInjected).'</body></html>'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | protected function setFooterCommonInjected($footerInjected = null) |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | foreach ($headerFeatures as $key => $value) { |
118 | 118 | $aFeatures[] = $this->setHeaderFeatures($key, $value); |
119 | 119 | } |
120 | - return implode('', $fixedHeaderElements) . implode('', $aFeatures) . '</head>' . '<body>'; |
|
120 | + return implode('', $fixedHeaderElements).implode('', $aFeatures).'</head>'.'<body>'; |
|
121 | 121 | } |
122 | - $sReturn[] = implode('', $fixedHeaderElements) . '</head>' . '<body>' |
|
122 | + $sReturn[] = implode('', $fixedHeaderElements).'</head>'.'<body>' |
|
123 | 123 | . '<p style="background-color:red;color:#FFF;">The parameter sent to ' |
124 | - . __FUNCTION__ . ' must be a non-empty array</p>' . $this->setFooterCommon(); |
|
124 | + . __FUNCTION__.' must be a non-empty array</p>'.$this->setFooterCommon(); |
|
125 | 125 | throw new \Exception(implode('', $sReturn)); |
126 | 126 | } |
127 | 127 | |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | */ |
134 | 134 | private function setHeaderCssOrJavascript($value, $sCssOrJavascript) |
135 | 135 | { |
136 | - $strFunctionToCall = (string) 'set' . ucwords($sCssOrJavascript) . 'File'; |
|
136 | + $strFunctionToCall = (string) 'set'.ucwords($sCssOrJavascript).'File'; |
|
137 | 137 | if (is_array($value)) { |
138 | 138 | $aFeatures = []; |
139 | 139 | foreach ($value as $value2) { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | if (in_array($key, ['css', 'javascript'])) { |
158 | 158 | $sReturn = $this->setHeaderCssOrJavascript($value, $key); |
159 | 159 | } elseif ($key == 'title') { |
160 | - $sReturn = '<title>' . filter_var($value, FILTER_SANITIZE_STRING) . '</title>'; |
|
160 | + $sReturn = '<title>'.filter_var($value, FILTER_SANITIZE_STRING).'</title>'; |
|
161 | 161 | } |
162 | 162 | return $sReturn; |
163 | 163 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $this->handleLanguageIntoSession(); |
195 | 195 | return '<div class="upperRightBox">' |
196 | 196 | . '<div style="text-align:right;">' |
197 | - . '<span class="flag-icon flag-icon-' . strtolower(substr($this->tCmnSession->get('lang'), -2)) |
|
197 | + . '<span class="flag-icon flag-icon-'.strtolower(substr($this->tCmnSession->get('lang'), -2)) |
|
198 | 198 | . '" style="margin-right:2px;"> </span>' |
199 | 199 | . $aAvailableLanguages[$this->tCmnSession->get('lang')] |
200 | 200 | . '</div><!-- default Language -->' |
@@ -212,17 +212,17 @@ discard block |
||
212 | 212 | $linkWithoutLanguage = ''; |
213 | 213 | $alR = $this->tCmnSuperGlobals->query->all(); |
214 | 214 | if (count($alR) > 0) { |
215 | - $linkWithoutLanguage = $this->setArrayToStringForUrl('&', $alR, ['lang']) . '&'; |
|
215 | + $linkWithoutLanguage = $this->setArrayToStringForUrl('&', $alR, ['lang']).'&'; |
|
216 | 216 | } |
217 | 217 | $sReturn = []; |
218 | 218 | foreach ($aAvailableLanguages as $key => $value) { |
219 | 219 | if ($this->tCmnSession->get('lang') !== $key) { |
220 | - $sReturn[] = '<a href="?' . $linkWithoutLanguage . 'lang=' . $key . '" style="display:block;">' |
|
221 | - . '<span class="flag-icon flag-icon-' . strtolower(substr($key, -2)) |
|
222 | - . '" style="margin-right:2px;"> </span>' . $value . '</a>'; |
|
220 | + $sReturn[] = '<a href="?'.$linkWithoutLanguage.'lang='.$key.'" style="display:block;">' |
|
221 | + . '<span class="flag-icon flag-icon-'.strtolower(substr($key, -2)) |
|
222 | + . '" style="margin-right:2px;"> </span>'.$value.'</a>'; |
|
223 | 223 | } |
224 | 224 | } |
225 | - return '<div id="visibleOnHover">' . implode('', $sReturn) . '</div><!-- visibleOnHover end -->'; |
|
225 | + return '<div id="visibleOnHover">'.implode('', $sReturn).'</div><!-- visibleOnHover end -->'; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | 'class' => 'input_readonly', |
86 | 86 | 'value' => $sDefaultValue, |
87 | 87 | ]; |
88 | - return $this->setStringIntoShortTag('input', $inputFeatures) . $aElements[$sDefaultValue]; |
|
88 | + return $this->setStringIntoShortTag('input', $inputFeatures).$aElements[$sDefaultValue]; |
|
89 | 89 | } |
90 | 90 | return $this->setArrayToSelectNotReadOnly($aElements, $sDefaultValue, $selectName, $featArray); |
91 | 91 | } |
@@ -122,21 +122,21 @@ discard block |
||
122 | 122 | $sReturn = null; |
123 | 123 | $iRecPrPg = min($inRecPrPg, $iAllRec); |
124 | 124 | $iStartingPageRecord = $this->setStartingPageRecord($iCrtPgNo, $iRecPrPg, $iAllRec, $bKpFlPg); |
125 | - $sReturn .= '<span style="float:left;font-size:smaller;margin-top:1px; margin-right:1px;">' |
|
125 | + $sReturn .= '<span style="float:left;font-size:smaller;margin-top:1px; margin-right:1px;">' |
|
126 | 126 | . $this->setStringIntoTag($iAllRec, 'b') |
127 | 127 | . $this->lclMsgCmn('i18n_RecordsAvailableNowDisplaying') |
128 | 128 | . $this->setStringIntoTag(($iStartingPageRecord + 1), 'b') |
129 | - . ' - ' . $this->setStringIntoTag(min($iAllRec, ($iStartingPageRecord + $iRecPrPg)), 'b') |
|
129 | + . ' - '.$this->setStringIntoTag(min($iAllRec, ($iStartingPageRecord + $iRecPrPg)), 'b') |
|
130 | 130 | . ' </span>'; |
131 | 131 | switch ($iCrtPgNo) { |
132 | 132 | case 'first': |
133 | - $iCrtPgNo = ceil(($iStartingPageRecord + 1 ) / $iRecPrPg); |
|
133 | + $iCrtPgNo = ceil(($iStartingPageRecord + 1) / $iRecPrPg); |
|
134 | 134 | break; |
135 | 135 | case 'last': |
136 | 136 | $iCrtPgNo = ceil($iAllRec / $iRecPrPg); |
137 | 137 | break; |
138 | 138 | } |
139 | - $sReturn .= '<span style="float:right;font-size:smaller;margin-top:1px; margin-right:1px;">'; |
|
139 | + $sReturn .= '<span style="float:right;font-size:smaller;margin-top:1px; margin-right:1px;">'; |
|
140 | 140 | $iNumberOfPages = ceil($iAllRec / $iRecPrPg); |
141 | 141 | $sAdditionalArguments = ''; |
142 | 142 | if (isset($_GET)) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | if ($iCrtPgNo != 1) { |
152 | 152 | $sReturn .= $this->setStringIntoTag($this->lclMsgCmn('i18n_Previous'), 'a', [ |
153 | - 'href' => ('?page=' . ($iCrtPgNo - 1 ) . $sAdditionalArguments ), |
|
153 | + 'href' => ('?page='.($iCrtPgNo - 1).$sAdditionalArguments), |
|
154 | 154 | 'class' => 'pagination' |
155 | 155 | ]); |
156 | 156 | } else { |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | for ($counter = 1; $counter <= $iNumberOfPages; $counter++) { |
163 | 163 | $pages2display[$counter] = $counter; |
164 | 164 | } |
165 | - $sReturn .= '<span class="pagination"><form method="get" action="' . $this->tCmnSuperGlobals->getScriptName() . '">'; |
|
165 | + $sReturn .= '<span class="pagination"><form method="get" action="'.$this->tCmnSuperGlobals->getScriptName().'">'; |
|
166 | 166 | $sReturn .= $this->setArrayToSelect($pages2display, $this->tCmnSuperGlobals->get('page') |
167 | 167 | , 'page', ['size' => 1, 'autosubmit', 'id_no' => mt_rand()]); |
168 | 168 | if (isset($_GET)) { |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | foreach ($value as $value2) { |
173 | 173 | $sReturn .= $this->setStringIntoShortTag('input', [ |
174 | 174 | 'type' => 'hidden', |
175 | - 'name' => $key . '[]', |
|
175 | + 'name' => $key.'[]', |
|
176 | 176 | 'value' => $value2, |
177 | 177 | ]); |
178 | 178 | } |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $sReturn .= '</form></span>'; |
190 | 190 | if ($iCrtPgNo != $iNumberOfPages) { |
191 | 191 | $sReturn .= $this->setStringIntoTag($this->lclMsgCmn('i18n_Next'), 'a', [ |
192 | - 'href' => ('?page=' . ($iCrtPgNo + 1 ) . $sAdditionalArguments ), |
|
192 | + 'href' => ('?page='.($iCrtPgNo + 1).$sAdditionalArguments), |
|
193 | 193 | 'class' => 'pagination', |
194 | 194 | ]); |
195 | 195 | } else { |
@@ -225,9 +225,9 @@ discard block |
||
225 | 225 | break; |
226 | 226 | } |
227 | 227 | } else { |
228 | - $iStartingPageRecord = ($this->tCmnSuperGlobals->get('page') - 1 ) * $iRecordsPerPage; |
|
228 | + $iStartingPageRecord = ($this->tCmnSuperGlobals->get('page') - 1) * $iRecordsPerPage; |
|
229 | 229 | } |
230 | - if (($bKeepFullPage ) && (($iStartingPageRecord + $iRecordsPerPage ) > $iAllRecords)) { |
|
230 | + if (($bKeepFullPage) && (($iStartingPageRecord + $iRecordsPerPage) > $iAllRecords)) { |
|
231 | 231 | $iStartingPageRecord = $iAllRecords - $iRecordsPerPage; |
232 | 232 | } |
233 | 233 | return max(0, $iStartingPageRecord); |