@@ -184,7 +184,7 @@ |
||
| 184 | 184 | </div> |
| 185 | 185 | </div> |
| 186 | 186 | </div> |
| 187 | - <?php if ((++$column) % 3 == 0 ) : ?> |
|
| 187 | + <?php if ((++$column) % 3 == 0) : ?> |
|
| 188 | 188 | </div> |
| 189 | 189 | <div class="row"> |
| 190 | 190 | <?php endif; ?> |
@@ -110,9 +110,11 @@ |
||
| 110 | 110 | <h3><?php echo JText::_('COM_REDCORE_TRANSLATION_TABLE_CONTENT_ELEMENT_NO_FILES_AVAILABLE') ?></h3> |
| 111 | 111 | </div> |
| 112 | 112 | </div> |
| 113 | - <?php else : ?> |
|
| 113 | + <?php else { |
|
| 114 | + : ?> |
|
| 114 | 115 | <?php foreach ($contentElements as $contentElement): |
| 115 | 116 | $disabled = empty($contentElement->table) ? ' disabled="disabled" ' : ''; |
| 117 | +} |
|
| 116 | 118 | ?> |
| 117 | 119 | <div class="col-md-4"> |
| 118 | 120 | <div class="panel panel-default"> |
@@ -45,8 +45,7 @@ |
||
| 45 | 45 | if (in_array($tablePrefix . $tableName, $tableList)) |
| 46 | 46 | { |
| 47 | 47 | $columns = $db->getTableColumns('#__' . $tableName, false); |
| 48 | - } |
|
| 49 | - else |
|
| 48 | + } else |
|
| 50 | 49 | { |
| 51 | 50 | echo JText::_('COM_REDCORE_TRANSLATION_TABLE_DONT_EXIST'); |
| 52 | 51 | $app->close(); |
@@ -124,8 +124,7 @@ discard block |
||
| 124 | 124 | if ($status) |
| 125 | 125 | { |
| 126 | 126 | $app->enqueueMessage(JText::_('COM_REDCORE_PAYMENT_CAPTURE_PAYMENT_SUCCESS')); |
| 127 | - } |
|
| 128 | - else |
|
| 127 | + } else |
|
| 129 | 128 | { |
| 130 | 129 | $lastLog = RApiPaymentHelper::getLastPaymentLog($id); |
| 131 | 130 | $app->enqueueMessage(JText::sprintf('COM_REDCORE_PAYMENT_CAPTURE_PAYMENT_FAILED', $lastLog->message_text), 'error'); |
@@ -157,8 +156,7 @@ discard block |
||
| 157 | 156 | if ($status) |
| 158 | 157 | { |
| 159 | 158 | $app->enqueueMessage(JText::_('COM_REDCORE_PAYMENT_REFUND_PAYMENT_SUCCESS')); |
| 160 | - } |
|
| 161 | - else |
|
| 159 | + } else |
|
| 162 | 160 | { |
| 163 | 161 | $lastLog = RApiPaymentHelper::getLastPaymentLog($id); |
| 164 | 162 | $app->enqueueMessage(JText::sprintf('COM_REDCORE_PAYMENT_REFUND_PAYMENT_FAILED', $lastLog->message_text), 'error'); |
@@ -190,8 +188,7 @@ discard block |
||
| 190 | 188 | if ($status) |
| 191 | 189 | { |
| 192 | 190 | $app->enqueueMessage(JText::_('COM_REDCORE_PAYMENT_DELETE_PAYMENT_SUCCESS')); |
| 193 | - } |
|
| 194 | - else |
|
| 191 | + } else |
|
| 195 | 192 | { |
| 196 | 193 | $lastLog = RApiPaymentHelper::getLastPaymentLog($id); |
| 197 | 194 | $app->enqueueMessage(JText::sprintf('COM_REDCORE_PAYMENT_DELETE_PAYMENT_FAILED', $lastLog->message_text), 'error'); |
@@ -36,8 +36,7 @@ discard block |
||
| 36 | 36 | if (!is_array($cid) || count($cid) < 1) |
| 37 | 37 | { |
| 38 | 38 | JLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror'); |
| 39 | - } |
|
| 40 | - else |
|
| 39 | + } else |
|
| 41 | 40 | { |
| 42 | 41 | // Make sure the item ids are integers |
| 43 | 42 | jimport('joomla.utilities.arrayhelper'); |
@@ -127,8 +126,7 @@ discard block |
||
| 127 | 126 | $this->setError(JText::_('COM_REDCORE_WEBSERVICES_ERR_ZIP_ADAPTER_FAILURE')); |
| 128 | 127 | |
| 129 | 128 | return false; |
| 130 | - } |
|
| 131 | - elseif (!$packager->create($zipFile, $files)) |
|
| 129 | + } elseif (!$packager->create($zipFile, $files)) |
|
| 132 | 130 | { |
| 133 | 131 | $this->setError(JText::_('COM_REDCORE_WEBSERVICES_ERR_ZIP_CREATE_FAILURE')); |
| 134 | 132 | |
@@ -179,8 +177,7 @@ discard block |
||
| 179 | 177 | if ($webservice == 'all') |
| 180 | 178 | { |
| 181 | 179 | $this->batchWebservices('install'); |
| 182 | - } |
|
| 183 | - else |
|
| 180 | + } else |
|
| 184 | 181 | { |
| 185 | 182 | if ($model->installWebservice($client, $webservice, $version, $folder)) |
| 186 | 183 | { |
@@ -211,8 +208,7 @@ discard block |
||
| 211 | 208 | if ($webservice == 'all') |
| 212 | 209 | { |
| 213 | 210 | $this->batchWebservices('delete'); |
| 214 | - } |
|
| 215 | - else |
|
| 211 | + } else |
|
| 216 | 212 | { |
| 217 | 213 | $model->deleteWebservice($client, $webservice, $version, $folder); |
| 218 | 214 | } |
@@ -240,8 +236,7 @@ discard block |
||
| 240 | 236 | { |
| 241 | 237 | $app->enqueueMessage(JText::_('COM_REDCORE_WEBSERVICES_UPLOAD_SUCCESS')); |
| 242 | 238 | } |
| 243 | - } |
|
| 244 | - else |
|
| 239 | + } else |
|
| 245 | 240 | { |
| 246 | 241 | JFactory::getApplication()->enqueueMessage(JText::_('COM_REDCORE_WEBSERVICES_UPLOAD_FILE_NOT_FOUND'), 'warning'); |
| 247 | 242 | } |
@@ -309,8 +304,7 @@ discard block |
||
| 309 | 304 | if ($returnUrl = $this->input->get('return', '', 'Base64')) |
| 310 | 305 | { |
| 311 | 306 | $this->setRedirect(JRoute::_(base64_decode($returnUrl), false)); |
| 312 | - } |
|
| 313 | - else |
|
| 307 | + } else |
|
| 314 | 308 | { |
| 315 | 309 | parent::display(); |
| 316 | 310 | } |
@@ -332,8 +326,7 @@ discard block |
||
| 332 | 326 | if (empty($cid)) |
| 333 | 327 | { |
| 334 | 328 | JLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror'); |
| 335 | - } |
|
| 336 | - else |
|
| 329 | + } else |
|
| 337 | 330 | { |
| 338 | 331 | // Get the model. |
| 339 | 332 | $model = $this->getModel('Webservices'); |
@@ -346,8 +339,7 @@ discard block |
||
| 346 | 339 | { |
| 347 | 340 | $ntext = $this->text_prefix . '_N_ITEMS_COPIED'; |
| 348 | 341 | $this->setMessage(JText::plural($ntext, count($cid))); |
| 349 | - } |
|
| 350 | - else |
|
| 342 | + } else |
|
| 351 | 343 | { |
| 352 | 344 | $this->setMessage($model->getError(), 'error'); |
| 353 | 345 | } |
@@ -28,8 +28,7 @@ discard block |
||
| 28 | 28 | if ($this->input->get('layout', '') == 'manage' && $returnUrl = $this->input->get('return', '', 'Base64')) |
| 29 | 29 | { |
| 30 | 30 | $this->setRedirect(JRoute::_(base64_decode($returnUrl), false)); |
| 31 | - } |
|
| 32 | - else |
|
| 31 | + } else |
|
| 33 | 32 | { |
| 34 | 33 | parent::edit(); |
| 35 | 34 | } |
@@ -157,8 +156,7 @@ discard block |
||
| 157 | 156 | if ($errors[$i] instanceof Exception) |
| 158 | 157 | { |
| 159 | 158 | $app->enqueueMessage($errors[$i]->getMessage(), 'warning'); |
| 160 | - } |
|
| 161 | - else |
|
| 159 | + } else |
|
| 162 | 160 | { |
| 163 | 161 | $app->enqueueMessage($errors[$i], 'warning'); |
| 164 | 162 | } |
@@ -52,19 +52,16 @@ discard block |
||
| 52 | 52 | if (RTranslationTable::batchContentElements($option, 'install', $notifications = true)) |
| 53 | 53 | { |
| 54 | 54 | JFactory::getApplication()->enqueueMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_CONTENT_ELEMENT_INSTALLED'), 'message'); |
| 55 | - } |
|
| 56 | - else |
|
| 55 | + } else |
|
| 57 | 56 | { |
| 58 | 57 | $this->setMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_UNABLE_TO_INSTALL_XML'), 'error'); |
| 59 | 58 | } |
| 60 | - } |
|
| 61 | - else |
|
| 59 | + } else |
|
| 62 | 60 | { |
| 63 | 61 | if (RTranslationTable::installContentElement($option, $xmlFile, false, $notifications = true)) |
| 64 | 62 | { |
| 65 | 63 | JFactory::getApplication()->enqueueMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_CONTENT_ELEMENT_INSTALLED'), 'message'); |
| 66 | - } |
|
| 67 | - else |
|
| 64 | + } else |
|
| 68 | 65 | { |
| 69 | 66 | $this->setMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_UNABLE_TO_INSTALL_XML'), 'error'); |
| 70 | 67 | } |
@@ -90,8 +87,7 @@ discard block |
||
| 90 | 87 | if (!is_array($cid) || count($cid) < 1) |
| 91 | 88 | { |
| 92 | 89 | JLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror'); |
| 93 | - } |
|
| 94 | - else |
|
| 90 | + } else |
|
| 95 | 91 | { |
| 96 | 92 | // Make sure the item ids are integers |
| 97 | 93 | jimport('joomla.utilities.arrayhelper'); |
@@ -164,8 +160,7 @@ discard block |
||
| 164 | 160 | $this->setError(JText::_('COM_REDCORE_TRANSLATION_TABLE_ERR_ZIP_ADAPTER_FAILURE')); |
| 165 | 161 | |
| 166 | 162 | return false; |
| 167 | - } |
|
| 168 | - elseif (!$packager->create($zipFile, $files)) |
|
| 163 | + } elseif (!$packager->create($zipFile, $files)) |
|
| 169 | 164 | { |
| 170 | 165 | $this->setError(JText::_('COM_REDCORE_TRANSLATION_TABLE_ERR_ZIP_CREATE_FAILURE')); |
| 171 | 166 | |
@@ -212,8 +207,7 @@ discard block |
||
| 212 | 207 | if (!is_array($cid) || count($cid) < 1) |
| 213 | 208 | { |
| 214 | 209 | JLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror'); |
| 215 | - } |
|
| 216 | - else |
|
| 210 | + } else |
|
| 217 | 211 | { |
| 218 | 212 | // Make sure the item ids are integers |
| 219 | 213 | jimport('joomla.utilities.arrayhelper'); |
@@ -263,8 +257,7 @@ discard block |
||
| 263 | 257 | if (!is_array($cid) || count($cid) < 1) |
| 264 | 258 | { |
| 265 | 259 | JLog::add(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), JLog::WARNING, 'jerror'); |
| 266 | - } |
|
| 267 | - else |
|
| 260 | + } else |
|
| 268 | 261 | { |
| 269 | 262 | // Make sure the item ids are integers |
| 270 | 263 | jimport('joomla.utilities.arrayhelper'); |
@@ -274,8 +267,7 @@ discard block |
||
| 274 | 267 | if (RTranslationTable::purgeTables($cid)) |
| 275 | 268 | { |
| 276 | 269 | $this->setMessage(JText::plural($this->text_prefix . '_N_ITEMS_PURGED', count($cid))); |
| 277 | - } |
|
| 278 | - else |
|
| 270 | + } else |
|
| 279 | 271 | { |
| 280 | 272 | $this->setMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_UNABLE_TO_PURGE_TABLE'), 'error'); |
| 281 | 273 | } |
@@ -304,19 +296,16 @@ discard block |
||
| 304 | 296 | if (RTranslationTable::batchContentElements($option, 'delete')) |
| 305 | 297 | { |
| 306 | 298 | JFactory::getApplication()->enqueueMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_CONTENT_ELEMENT_DELETED'), 'message'); |
| 307 | - } |
|
| 308 | - else |
|
| 299 | + } else |
|
| 309 | 300 | { |
| 310 | 301 | $this->setMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_UNABLE_TO_DELETE_XML'), 'error'); |
| 311 | 302 | } |
| 312 | - } |
|
| 313 | - else |
|
| 303 | + } else |
|
| 314 | 304 | { |
| 315 | 305 | if (RTranslationTable::deleteContentElement($option, $xmlFile)) |
| 316 | 306 | { |
| 317 | 307 | JFactory::getApplication()->enqueueMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_CONTENT_ELEMENT_DELETED'), 'message'); |
| 318 | - } |
|
| 319 | - else |
|
| 308 | + } else |
|
| 320 | 309 | { |
| 321 | 310 | $this->setMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_UNABLE_TO_DELETE_XML'), 'error'); |
| 322 | 311 | } |
@@ -346,8 +335,7 @@ discard block |
||
| 346 | 335 | { |
| 347 | 336 | $app->enqueueMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_UPLOAD_SUCCESS')); |
| 348 | 337 | } |
| 349 | - } |
|
| 350 | - else |
|
| 338 | + } else |
|
| 351 | 339 | { |
| 352 | 340 | JFactory::getApplication()->enqueueMessage(JText::_('COM_REDCORE_TRANSLATION_TABLE_UPLOAD_FILE_NOT_FOUND'), 'warning'); |
| 353 | 341 | } |
@@ -86,7 +86,7 @@ |
||
| 86 | 86 | */ |
| 87 | 87 | public static function getTableRowCount($table) |
| 88 | 88 | { |
| 89 | - $db = JFactory::getDbo(); |
|
| 89 | + $db = JFactory::getDbo(); |
|
| 90 | 90 | $rowCount = array( |
| 91 | 91 | 'original_rows' => 0, |
| 92 | 92 | 'translation_rows' => array() |
@@ -111,8 +111,7 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | $rowCount['original_rows'] = $db->setQuery($query)->loadResult(); |
| 114 | - } |
|
| 115 | - catch (RuntimeException $e) |
|
| 114 | + } catch (RuntimeException $e) |
|
| 116 | 115 | { |
| 117 | 116 | JLog::add(JText::_('COM_REDCORE_TRANSLATION_TABLE_DONT_EXIST') . ' ' . $table->name, JLog::ERROR, 'jerror'); |
| 118 | 117 | } |
@@ -146,8 +145,7 @@ discard block |
||
| 146 | 145 | } |
| 147 | 146 | |
| 148 | 147 | $rowCount['translation_rows'] = $db->setQuery($query)->loadObjectList('rctranslations_language'); |
| 149 | - } |
|
| 150 | - catch (RuntimeException $e) |
|
| 148 | + } catch (RuntimeException $e) |
|
| 151 | 149 | { |
| 152 | 150 | JLog::add( |
| 153 | 151 | JText::_('COM_REDCORE_TRANSLATION_TABLE_DONT_EXIST') . ' ' . RTranslationTable::getTranslationsTableName($table->name), JLog::ERROR, 'jerror' |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | protected function getListQuery() |
| 59 | 59 | { |
| 60 | 60 | $table = RTranslationTable::setTranslationTableWithColumn($this->getState('filter.translationTableName', '')); |
| 61 | - $db = $this->getDbo(); |
|
| 61 | + $db = $this->getDbo(); |
|
| 62 | 62 | $query = $db->getQuery(true); |
| 63 | 63 | |
| 64 | 64 | if (empty($table)) |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | */ |
| 53 | 53 | protected function getListQuery() |
| 54 | 54 | { |
| 55 | - $db = $this->getDbo(); |
|
| 55 | + $db = $this->getDbo(); |
|
| 56 | 56 | |
| 57 | 57 | $queryDefaults = $db->getQuery(true) |
| 58 | 58 | ->select('p.params as plugin_params, p.name as plugin_name, p.element, p.enabled, p.extension_id') |