@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | elseif ($column['column_type'] == RTranslationTable::COLUMN_READONLY) |
| 48 | 48 | { |
| 49 | 49 | } |
| 50 | - elseif($column['fallback'] == 1) |
|
| 50 | + elseif ($column['fallback'] == 1) |
|
| 51 | 51 | { |
| 52 | 52 | $fallbackColumns[] = $column['name']; |
| 53 | 53 | $translateColumns[] = $column['name']; |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | if ($item) |
| 133 | 133 | { |
| 134 | 134 | // Get Access token and Authorization codes |
| 135 | - $db = $this->getDbo(); |
|
| 135 | + $db = $this->getDbo(); |
|
| 136 | 136 | |
| 137 | 137 | // There can be multiple access tokens that are not expired yet so we only load last one |
| 138 | 138 | $query = $db->getQuery(true) |
@@ -43,16 +43,13 @@ discard block |
||
| 43 | 43 | if ($column['column_type'] == RTranslationTable::COLUMN_PRIMARY) |
| 44 | 44 | { |
| 45 | 45 | $primaryKeys[] = $column['name']; |
| 46 | - } |
|
| 47 | - elseif ($column['column_type'] == RTranslationTable::COLUMN_READONLY) |
|
| 46 | + } elseif ($column['column_type'] == RTranslationTable::COLUMN_READONLY) |
|
| 48 | 47 | { |
| 49 | - } |
|
| 50 | - elseif($column['fallback'] == 1) |
|
| 48 | + } elseif($column['fallback'] == 1) |
|
| 51 | 49 | { |
| 52 | 50 | $fallbackColumns[] = $column['name']; |
| 53 | 51 | $translateColumns[] = $column['name']; |
| 54 | - } |
|
| 55 | - else |
|
| 52 | + } else |
|
| 56 | 53 | { |
| 57 | 54 | $translateColumns[] = $column['name']; |
| 58 | 55 | } |
@@ -105,8 +102,7 @@ discard block |
||
| 105 | 102 | if (!empty($data['formLinks'])) |
| 106 | 103 | { |
| 107 | 104 | $data['form_links'] = json_encode($data['formLinks']); |
| 108 | - } |
|
| 109 | - elseif (!empty($data['editForms'])) |
|
| 105 | + } elseif (!empty($data['editForms'])) |
|
| 110 | 106 | { |
| 111 | 107 | $data['form_links'] = json_encode($data['editForms']); |
| 112 | 108 | } |
@@ -159,8 +155,7 @@ discard block |
||
| 159 | 155 | $item->{$key} = $param; |
| 160 | 156 | } |
| 161 | 157 | } |
| 162 | - } |
|
| 163 | - else |
|
| 158 | + } else |
|
| 164 | 159 | { |
| 165 | 160 | $item->columns = array(); |
| 166 | 161 | $item->editForms = array(); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | if (!empty($xmlFiles)) |
| 91 | 91 | { |
| 92 | - $db = $this->getDbo(); |
|
| 92 | + $db = $this->getDbo(); |
|
| 93 | 93 | |
| 94 | 94 | $query = $db->getQuery(true) |
| 95 | 95 | ->select('CONCAT(' . $db->qn('client') . ', ' . $db->qn('name') . ', ' . $db->qn('version') . ')') |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | */ |
| 138 | 138 | protected function getListQuery() |
| 139 | 139 | { |
| 140 | - $db = $this->getDbo(); |
|
| 140 | + $db = $this->getDbo(); |
|
| 141 | 141 | |
| 142 | 142 | $query = $db->getQuery(true) |
| 143 | 143 | ->select('w.*') |
@@ -261,8 +261,7 @@ discard block |
||
| 261 | 261 | 'scopeDisplayName' => ucfirst($displayName) |
| 262 | 262 | ); |
| 263 | 263 | } |
| 264 | - } |
|
| 265 | - else |
|
| 264 | + } else |
|
| 266 | 265 | { |
| 267 | 266 | $operations[] = strtoupper(str_replace(array('read', 'create', 'update'), array('GET', 'PUT', 'POST'), $key)); |
| 268 | 267 | $displayName = !empty($method['displayName']) ? (string) $method['displayName'] : $key; |
@@ -342,8 +341,7 @@ discard block |
||
| 342 | 341 | { |
| 343 | 342 | JFile::delete($helperFilePath); |
| 344 | 343 | } |
| 345 | - } |
|
| 346 | - catch (Exception $e) |
|
| 344 | + } catch (Exception $e) |
|
| 347 | 345 | { |
| 348 | 346 | JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_REDCORE_WEBSERVICES_WEBSERVICE_DELETE_ERROR', $e->getMessage()), 'error'); |
| 349 | 347 | |
@@ -396,13 +394,11 @@ discard block |
||
| 396 | 394 | if ($this->installWebservice($table->client, $table->name . '_' . $i, $table->version, $table->path) !== false) |
| 397 | 395 | { |
| 398 | 396 | return true; |
| 399 | - } |
|
| 400 | - else |
|
| 397 | + } else |
|
| 401 | 398 | { |
| 402 | 399 | return false; |
| 403 | 400 | } |
| 404 | - } |
|
| 405 | - else |
|
| 401 | + } else |
|
| 406 | 402 | { |
| 407 | 403 | return false; |
| 408 | 404 | } |
@@ -68,7 +68,7 @@ |
||
| 68 | 68 | |
| 69 | 69 | if ($this->paymentName && (empty($item->payment_name) || $item->payment_name != $this->paymentName)) |
| 70 | 70 | { |
| 71 | - $db = $this->getDbo(); |
|
| 71 | + $db = $this->getDbo(); |
|
| 72 | 72 | $query = $db->getQuery(true) |
| 73 | 73 | ->select('p.params as plugin_params, p.name as plugin_name, p.element, p.enabled, p.extension_id') |
| 74 | 74 | ->select('CONCAT("plg_redpayment_", p.element) as plugin_path_name') |
@@ -83,8 +83,7 @@ |
||
| 83 | 83 | $item->params = $defaultPlugin->plugin_params; |
| 84 | 84 | $item->payment_name = $this->paymentName; |
| 85 | 85 | } |
| 86 | - } |
|
| 87 | - else |
|
| 86 | + } else |
|
| 88 | 87 | { |
| 89 | 88 | $this->paymentName = $item->payment_name; |
| 90 | 89 | $item->params = json_encode($item->params); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $app->redirect('index.php?option=com_redcore&view=translations'); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - $db = $this->getDbo(); |
|
| 41 | + $db = $this->getDbo(); |
|
| 42 | 42 | $query = $db->getQuery(true); |
| 43 | 43 | $item = new stdClass; |
| 44 | 44 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | |
| 177 | 177 | if (empty($id)) |
| 178 | 178 | { |
| 179 | - $db = $this->getDbo(); |
|
| 179 | + $db = $this->getDbo(); |
|
| 180 | 180 | $query = $db->getQuery(true) |
| 181 | 181 | ->select('rctranslations_id') |
| 182 | 182 | ->from($db->qn(RTranslationTable::getTranslationsTableName($translationTable->table, ''))) |
@@ -85,8 +85,7 @@ discard block |
||
| 85 | 85 | $item->rctranslations_modified_by = ''; |
| 86 | 86 | $item->rctranslations_language = JFactory::getApplication()->input->getString('language', ''); |
| 87 | 87 | $item->id = 0; |
| 88 | - } |
|
| 89 | - else |
|
| 88 | + } else |
|
| 90 | 89 | { |
| 91 | 90 | if (!empty($item->translation->rctranslations_originals)) |
| 92 | 91 | { |
@@ -143,8 +142,7 @@ discard block |
||
| 143 | 142 | if ($original = $this->getItem()) |
| 144 | 143 | { |
| 145 | 144 | $original = (array) $original->original; |
| 146 | - } |
|
| 147 | - else |
|
| 145 | + } else |
|
| 148 | 146 | { |
| 149 | 147 | $original = $app->input->get('original', array(), 'array'); |
| 150 | 148 | } |
@@ -165,8 +163,7 @@ discard block |
||
| 165 | 163 | if ($translationKey == 'no-language') |
| 166 | 164 | { |
| 167 | 165 | $data['rctranslations_language'] = $dataArr[$translationKey]['rctranslations_language']; |
| 168 | - } |
|
| 169 | - else |
|
| 166 | + } else |
|
| 170 | 167 | { |
| 171 | 168 | $data['rctranslations_language'] = $translationKey; |
| 172 | 169 | } |
@@ -235,8 +232,7 @@ discard block |
||
| 235 | 232 | if ($paramsChanged) |
| 236 | 233 | { |
| 237 | 234 | $data[$fieldName] = json_encode($data[$fieldName]); |
| 238 | - } |
|
| 239 | - else |
|
| 235 | + } else |
|
| 240 | 236 | { |
| 241 | 237 | $data[$fieldName] = ''; |
| 242 | 238 | } |
@@ -345,7 +345,7 @@ |
||
| 345 | 345 | else |
| 346 | 346 | { |
| 347 | 347 | $lang->load($extension->moduleName, JPATH_SITE, null, false, true) || |
| 348 | - $lang->load($extension->moduleName, JPATH_SITE . "/modules/" . $extension->moduleName, null, false, true); |
|
| 348 | + $lang->load($extension->moduleName, JPATH_SITE . "/modules/" . $extension->moduleName, null, false, true); |
|
| 349 | 349 | } |
| 350 | 350 | } |
| 351 | 351 | } |
@@ -53,8 +53,7 @@ discard block |
||
| 53 | 53 | false, |
| 54 | 54 | '/config' |
| 55 | 55 | ); |
| 56 | - } |
|
| 57 | - else |
|
| 56 | + } else |
|
| 58 | 57 | { |
| 59 | 58 | $form->loadFile('translations', false, '/config'); |
| 60 | 59 | } |
@@ -297,8 +296,7 @@ discard block |
||
| 297 | 296 | $query->leftJoin('#__modules as m ON m.module = e.element') |
| 298 | 297 | ->select('m.published as enabled, m.module as moduleName') |
| 299 | 298 | ->group('e.element'); |
| 300 | - } |
|
| 301 | - else |
|
| 299 | + } else |
|
| 302 | 300 | { |
| 303 | 301 | $query->select('e.enabled, e.folder'); |
| 304 | 302 | } |
@@ -310,8 +308,7 @@ discard block |
||
| 310 | 308 | if ($extensionType == 'plugin') |
| 311 | 309 | { |
| 312 | 310 | $elements[] = '(e.element LIKE ' . $db->q($extensionElement) . ' AND e.folder = ' . $db->quote($group) . ')'; |
| 313 | - } |
|
| 314 | - else |
|
| 311 | + } else |
|
| 315 | 312 | { |
| 316 | 313 | $elements[] = 'e.element LIKE ' . $db->q($extensionElement); |
| 317 | 314 | } |
@@ -341,8 +338,7 @@ discard block |
||
| 341 | 338 | $extensionName = strtolower('plg_' . $extension->folder . '_' . $extension->element); |
| 342 | 339 | $lang->load(strtolower($extensionName), JPATH_ADMINISTRATOR, null, false, true) |
| 343 | 340 | || $lang->load(strtolower($extensionName), JPATH_PLUGINS . '/' . $extension->folder . '/' . $extension->element, null, false, true); |
| 344 | - } |
|
| 345 | - else |
|
| 341 | + } else |
|
| 346 | 342 | { |
| 347 | 343 | $lang->load($extension->moduleName, JPATH_SITE, null, false, true) || |
| 348 | 344 | $lang->load($extension->moduleName, JPATH_SITE . "/modules/" . $extension->moduleName, null, false, true); |
@@ -79,7 +79,7 @@ |
||
| 79 | 79 | */ |
| 80 | 80 | protected function getListQuery() |
| 81 | 81 | { |
| 82 | - $db = $this->getDbo(); |
|
| 82 | + $db = $this->getDbo(); |
|
| 83 | 83 | |
| 84 | 84 | $query = $db->getQuery(true) |
| 85 | 85 | ->select('tt.*') |
@@ -144,7 +144,7 @@ |
||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | // Get Access token and Authorization codes |
| 147 | - $db = $this->getDbo(); |
|
| 147 | + $db = $this->getDbo(); |
|
| 148 | 148 | |
| 149 | 149 | // There can be multiple access tokens that are not expired yet so we only load last one |
| 150 | 150 | $query = $db->getQuery(true) |
@@ -92,8 +92,7 @@ discard block |
||
| 92 | 92 | { |
| 93 | 93 | return false; |
| 94 | 94 | } |
| 95 | - } |
|
| 96 | - catch (Exception $e) |
|
| 95 | + } catch (Exception $e) |
|
| 97 | 96 | { |
| 98 | 97 | $this->setError(JText::sprintf('COM_REDCORE_WEBSERVICE_ERROR_SAVING_XML', $e->getMessage())); |
| 99 | 98 | |
@@ -197,8 +196,7 @@ discard block |
||
| 197 | 196 | } |
| 198 | 197 | |
| 199 | 198 | $operationXml = $readXml->addChild($operationNameSplit[1]); |
| 200 | - } |
|
| 201 | - elseif ($operationNameSplit[0] == 'task' && count($operationNameSplit) > 1) |
|
| 199 | + } elseif ($operationNameSplit[0] == 'task' && count($operationNameSplit) > 1) |
|
| 202 | 200 | { |
| 203 | 201 | if (is_null($taskXml)) |
| 204 | 202 | { |
@@ -206,8 +204,7 @@ discard block |
||
| 206 | 204 | } |
| 207 | 205 | |
| 208 | 206 | $operationXml = $taskXml->addChild($operationNameSplit[1]); |
| 209 | - } |
|
| 210 | - else |
|
| 207 | + } else |
|
| 211 | 208 | { |
| 212 | 209 | $operationXml = $operationsXml->addChild($operationNameSplit[0]); |
| 213 | 210 | } |
@@ -469,12 +466,10 @@ discard block |
||
| 469 | 466 | { |
| 470 | 467 | $this->appendXML($xml, $child); |
| 471 | 468 | } |
| 472 | - } |
|
| 473 | - elseif ($originalXml->getName() == 'description') |
|
| 469 | + } elseif ($originalXml->getName() == 'description') |
|
| 474 | 470 | { |
| 475 | 471 | $xml = $this->addChildWithCDATA($targetXml, $originalXml->getName(), (string) $originalXml); |
| 476 | - } |
|
| 477 | - else |
|
| 472 | + } else |
|
| 478 | 473 | { |
| 479 | 474 | $xml = $targetXml->addChild($originalXml->getName(), (string) $originalXml); |
| 480 | 475 | } |
@@ -514,8 +509,7 @@ discard block |
||
| 514 | 509 | $this->xmlFile = RApiHalHelper::loadWebserviceConfiguration( |
| 515 | 510 | $item->name, $item->version, 'xml', $item->path, $item->client |
| 516 | 511 | ); |
| 517 | - } |
|
| 518 | - catch (Exception $e) |
|
| 512 | + } catch (Exception $e) |
|
| 519 | 513 | { |
| 520 | 514 | JFactory::getApplication()->enqueueMessage(JText::sprintf('COM_REDCORE_WEBSERVICE_ERROR_LOADING_XML', $e->getMessage()), 'error'); |
| 521 | 515 | } |
@@ -81,8 +81,7 @@ |
||
| 81 | 81 | if ($this->getAttribute('showFullName', 'false') == 'true') |
| 82 | 82 | { |
| 83 | 83 | $title = JText::_($value->name); |
| 84 | - } |
|
| 85 | - else |
|
| 84 | + } else |
|
| 86 | 85 | { |
| 87 | 86 | $title = $extension; |
| 88 | 87 | } |