Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Applied coding standards to #25663.

  • Loading branch information...
commit 486b4bb1cd75de7d3418e78307fb9646d27a1b5f 1 parent cdbc3a3
@pjwiseman pjwiseman authored
Showing with 11 additions and 7 deletions.
  1. +11 −7 libraries/joomla/installer/adapters/component.php
View
18 libraries/joomla/installer/adapters/component.php
@@ -1271,32 +1271,36 @@ protected function _buildAdminMenus()
$query = $db->getQuery(true);
$query->select('id');
$query->from('#__menu');
- $query->where('menutype = '.$db->quote('main'));
+ $query->where('menutype = ' . $db->quote('main'));
$query->where('client_id = 1');
- $query->where('link = '.$db->quote('index.php?option='.$option));
- $query->where('type = '.$db->quote('component'));
+ $query->where('link = ' . $db->quote('index.php?option=' . $option));
+ $query->where('type = ' . $db->quote('component'));
$query->where('parent_id = 1');
$query->where('home = 0');
$db->setQuery($query);
$menu_id = $db->loadResult();
- if(!$menu_id) {
+ if (!$menu_id)
+ {
// Oops! Could not get the menu ID. Go back and rollback changes.
JError::raiseWarning(1, $table->getError());
return false;
- } else {
+ }
+ else
+ {
// Remove the old menu item
$query = $db->getQuery(true);
$query->delete('#__menu');
- $query->where('id = '.(int)$menu_id);
+ $query->where('id = ' . (int) $menu_id);
$db->setQuery($query);
$db->query();
// Retry creating the menu item
$table->setLocation(1, 'last-child');
- if (!$table->bind($data) || !$table->check() || !$table->store()) {
+ if (!$table->bind($data) || !$table->check() || !$table->store())
+ {
// Install failed, warn user and rollback changes
JError::raiseWarning(1, $table->getError());
return false;
Please sign in to comment.
Something went wrong with that request. Please try again.