Skip to content

Commit

Permalink
Merge pull request joomla#13292 from frankmayer/unnecessary-double-qu…
Browse files Browse the repository at this point in the history
…otes-in-administrator-no-1

Replace unnecessary double quotes in administrator #1
  • Loading branch information
wilsonge committed Dec 20, 2016
2 parents 8f8d419 + 42f708a commit dbeb881
Show file tree
Hide file tree
Showing 33 changed files with 97 additions and 99 deletions.
2 changes: 1 addition & 1 deletion administrator/components/com_admin/models/sysinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public function &getInfo()
'sapi_name' => php_sapi_name(),
'version' => $version->getLongVersion(),
'platform' => $platform->getLongVersion(),
'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "",
'useragent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
);

return $this->info;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function admin_postinstall_languageaccess340_condition()
$query = $db->getQuery(true)
->select($db->quoteName('access'))
->from($db->quoteName('#__languages'))
->where($db->quoteName('access') . " = " . $db->quote('0'));
->where($db->quoteName('access') . ' = ' . $db->quote('0'));
$db->setQuery($query);
$db->execute();
$numRows = $db->getNumRows();
Expand Down
4 changes: 2 additions & 2 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -1929,7 +1929,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}

// Step 1: Drop indexes later to be added again with column lengths limitations at step 2
$fileName1 = JPATH_ROOT . "/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql";
$fileName1 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql';

if (is_file($fileName1))
{
Expand All @@ -1953,7 +1953,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}

// Step 2: Perform the index modifications and conversions
$fileName2 = JPATH_ROOT . "/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql";
$fileName2 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql';

if (is_file($fileName2))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function display($tpl = null)
}

header('MIME-Version: 1.0');
header('Content-Disposition: attachment; filename="systeminfo-' . date("c") . '.json"');
header('Content-Disposition: attachment; filename="systeminfo-' . date('c') . '.json"');
header('Content-Transfer-Encoding: binary');

$data = $this->getLayoutData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function display($tpl = null)

header('Content-Type: text/plain; charset=utf-8');
header('Content-Description: File Transfer');
header('Content-Disposition: attachment; filename="systeminfo-' . date("c") . '.txt"');
header('Content-Disposition: attachment; filename="systeminfo-' . date('c') . '.txt"');
header('Cache-Control: must-revalidate');

$data = $this->getLayoutData();
Expand Down Expand Up @@ -117,9 +117,9 @@ protected function renderSection($sectionName, $sectionData, $level = 0)

$margin = ($level > 0) ? str_repeat("\t", $level) : null;

$lines[] = $margin . "=============";
$lines[] = $margin . '=============';
$lines[] = $margin . $sectionName;
$lines[] = $margin . "=============";
$lines[] = $margin . '=============';
$level++;

foreach ($sectionData as $name => $value)
Expand All @@ -131,7 +131,7 @@ protected function renderSection($sectionName, $sectionData, $level = 0)
continue;
}

$lines[] = "";
$lines[] = '';
$lines[] = $this->renderSection($name, $value, $level);
}
else
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_banners/tables/banner.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function check()

if (trim(str_replace('-', '', $this->alias)) == '')
{
$this->alias = JFactory::getDate()->format("Y-m-d-H-i-s");
$this->alias = JFactory::getDate()->format('Y-m-d-H-i-s');
}

// Check the publish down date is not earlier than publish up.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,19 @@
<?php echo $item->contact; ?>
</td>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_published > 0) echo "badge-success"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=1'); ?>">
<a class="badge <?php if ($item->count_published > 0) echo 'badge-success'; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=1'); ?>">
<?php echo $item->count_published; ?></a>
</td>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_unpublished > 0) echo "badge-important"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=0'); ?>">
<a class="badge <?php if ($item->count_unpublished > 0) echo 'badge-important'; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=0'); ?>">
<?php echo $item->count_unpublished; ?></a>
</td>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_archived > 0) echo "badge-info"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=2'); ?>">
<a class="badge <?php if ($item->count_archived > 0) echo 'badge-info'; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=2'); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_trashed > 0) echo "badge-inverse"; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=-2'); ?>">
<a class="badge <?php if ($item->count_trashed > 0) echo 'badge-inverse'; ?>" href="<?php echo JRoute::_('index.php?option=com_banners&view=banners&filter[client_id]=' . (int) $item->id . '&filter[published]=-2'); ?>">
<?php echo $item->count_trashed; ?></a>
</td>
<td class="small hidden-phone">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@
'modalWidth' => '40',
'footer' => '<a class="btn" data-dismiss="modal" type="button"'
. ' onclick="jQuery(\'#downloadModal iframe\').contents().find(\'#closeBtn\').click();">'
. JText::_("COM_BANNERS_CANCEL") . '</a>'
. JText::_('COM_BANNERS_CANCEL') . '</a>'
. '<button class="btn btn-success" type="button"'
. ' onclick="jQuery(\'#downloadModal iframe\').contents().find(\'#exportBtn\').click();">'
. JText::_("COM_BANNERS_TRACKS_EXPORT") . '</button>',
. JText::_('COM_BANNERS_TRACKS_EXPORT') . '</button>',
)
); ?>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

if ($data['view'] instanceof CacheViewCache)
{
JFactory::getDocument()->addStyleDeclaration("
JFactory::getDocument()->addStyleDeclaration('
/* Fixed filter field in search bar */
.js-stools .js-stools-client_id {
float: left;
Expand All @@ -31,7 +31,7 @@
.js-stools .js-stools-container-bar .js-stools-field-filter .chzn-container {
padding: 3px 0;
}
");
');

// Client id filter doesn't have to activate the filter bar
unset($data['view']->activeFilters['client_id']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<a role="button" class="btn" data-dismiss="modal" aria-hidden="true">' . JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>',
'footer' => '<a role="button" class="btn" data-dismiss="modal" aria-hidden="true">' . JText::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>',
)
);
}
Expand All @@ -217,13 +217,13 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
'modalWidth' => '80',
'footer' => '<a role="button" class="btn" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'category\', \'cancel\', \'item-form\'); return false;">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>'
. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
. '<a role="button" class="btn btn-primary" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'category\', \'save\', \'item-form\'); return false;">'
. JText::_("JSAVE") . '</a>'
. JText::_('JSAVE') . '</a>'
. '<a role="button" class="btn btn-success" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'category\', \'apply\', \'item-form\'); return false;">'
. JText::_("JAPPLY") . '</a>',
. JText::_('JAPPLY') . '</a>',
)
);
}
Expand All @@ -246,13 +246,13 @@ function jSelectCategory_" . $this->id . "(id, title, object) {
'modalWidth' => '80',
'footer' => '<a role="button" class="btn" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'category\', \'cancel\', \'item-form\'); return false;">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>'
. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
. '<a role="button" class="btn btn-primary" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'category\', \'save\', \'item-form\'); return false;">'
. JText::_("JSAVE") . '</a>'
. JText::_('JSAVE') . '</a>'
. '<a role="button" class="btn btn-success" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'category\', \'apply\', \'item-form\'); return false;">'
. JText::_("JAPPLY") . '</a>',
. JText::_('JAPPLY') . '</a>',
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,18 @@
// Get the parents of item for sorting
if ($item->level > 1)
{
$parentsStr = "";
$parentsStr = '';
$_currentParentId = $item->parent_id;
$parentsStr = " " . $_currentParentId;
$parentsStr = ' ' . $_currentParentId;
for ($i2 = 0; $i2 < $item->level; $i2++)
{
foreach ($this->ordering as $k => $v)
{
$v = implode("-", $v);
$v = "-" . $v . "-";
if (strpos($v, "-" . $_currentParentId . "-") !== false)
$v = implode('-', $v);
$v = '-' . $v . '-';
if (strpos($v, '-' . $_currentParentId . '-') !== false)
{
$parentsStr .= " " . $k;
$parentsStr .= ' ' . $k;
$_currentParentId = $k;
break;
}
Expand All @@ -157,7 +157,7 @@
}
else
{
$parentsStr = "";
$parentsStr = '';
}
?>
<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->parent_id; ?>" item-id="<?php echo $item->id ?>" parents="<?php echo $parentsStr ?>" level="<?php echo $item->level ?>">
Expand Down Expand Up @@ -220,25 +220,25 @@
</td>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_published')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_published > 0) echo "badge-success"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php if ($item->count_published > 0) echo 'badge-success'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_published; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_unpublished > 0) echo "badge-important"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php if ($item->count_unpublished > 0) echo 'badge-important'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_unpublished; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_archived > 0) echo "badge-info"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php if ($item->count_archived > 0) echo 'badge-info'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_trashed')) : ?>
<td class="center btns hidden-phone hidden-tablet">
<a class="badge <?php if ($item->count_trashed > 0) echo "badge-inverse"; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level); ?>">
<a class="badge <?php if ($item->count_trashed > 0) echo 'badge-inverse'; ?>" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . ($section ? '&view=' . $section : '') . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_trashed; ?></a>
</td>
<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@
}
else
{
$lang = "";
$lang = '';
}
}
elseif (!JLanguageMultilang::isEnabled())
{
$lang = "";
$lang = '';
}
?>
<tr class="row<?php echo $i % 2; ?>">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
if (task == "category.cancel" || document.formvalidator.isValid(document.getElementById("item-form")))
{
jQuery("#permissions-sliders select").attr("disabled", "disabled");
' . $this->form->getField("description")->save() . '
' . $this->form->getField('description')->save() . '
Joomla.submitform(task, document.getElementById("item-form"));
// @deprecated 4.0 The following js is not needed since __DEPLOY_VERSION__.
Expand Down
28 changes: 14 additions & 14 deletions administrator/components/com_config/view/application/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ public function render()

// Required data
$requiredData = array(
"sitename" => null,
"offline" => null,
"access" => null,
"list_limit" => null,
"MetaDesc" => null,
"MetaKeys" => null,
"MetaRights" => null,
"sef" => null,
"sitename_pagetitles" => null,
"debug" => null,
"debug_lang" => null,
"error_reporting" => null,
"mailfrom" => null,
"fromname" => null
'sitename' => null,
'offline' => null,
'access' => null,
'list_limit' => null,
'MetaDesc' => null,
'MetaKeys' => null,
'MetaRights' => null,
'sef' => null,
'sitename_pagetitles' => null,
'debug' => null,
'debug_lang' => null,
'error_reporting' => null,
'mailfrom' => null,
'fromname' => null
);

$this->data = array_intersect_key($this->data, $requiredData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@
<?php echo $field->input; ?>
<?php else : ?>
<div class="control-group"<?php echo $datashowon; ?>>
<?php if ($name != "permissions") : ?>
<?php if ($name != 'permissions') : ?>
<div class="control-label">
<?php echo $field->label; ?>
</div>
<?php endif; ?>
<div class="<?php if ($name != "permissions") : ?>controls<?php endif; ?>">
<div class="<?php if ($name != 'permissions') : ?>controls<?php endif; ?>">
<?php echo $field->input; ?>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function jSelectContact_" . $this->id . "(id, title, object) {
'width' => '800px',
'bodyHeight' => '70',
'modalWidth' => '80',
'footer' => '<a role="button" class="btn" data-dismiss="modal" aria-hidden="true">' . JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>',
'footer' => '<a role="button" class="btn" data-dismiss="modal" aria-hidden="true">' . JText::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>',
)
);
}
Expand All @@ -207,15 +207,15 @@ function jSelectContact_" . $this->id . "(id, title, object) {
'footer' => '<a role="button" class="btn" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \''
. $this->id . '\', \'add\', \'contact\', \'cancel\', \'contact-form\', \'jform_id\', \'jform_name\'); return false;">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>'
. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
. '<a role="button" class="btn btn-primary" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \''
. $this->id . '\', \'add\', \'contact\', \'save\', \'contact-form\', \'jform_id\', \'jform_name\'); return false;">'
. JText::_("JSAVE") . '</a>'
. JText::_('JSAVE') . '</a>'
. '<a role="button" class="btn btn-success" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \''
. $this->id . '\', \'add\', \'contact\', \'apply\', \'contact-form\', \'jform_id\', \'jform_name\'); return false;">'
. JText::_("JAPPLY") . '</a>',
. JText::_('JAPPLY') . '</a>',
)
);
}
Expand All @@ -239,15 +239,15 @@ function jSelectContact_" . $this->id . "(id, title, object) {
'footer' => '<a role="button" class="btn" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \'' . $this->id
. '\', \'edit\', \'contact\', \'cancel\', \'contact-form\', \'jform_id\', \'jform_name\'); return false;">'
. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>'
. JText::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
. '<a role="button" class="btn btn-primary" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \''
. $this->id . '\', \'edit\', \'contact\', \'save\', \'contact-form\', \'jform_id\', \'jform_name\'); return false;">'
. JText::_("JSAVE") . '</a>'
. JText::_('JSAVE') . '</a>'
. '<a role="button" class="btn btn-success" aria-hidden="true"'
. ' onclick="window.processModalEdit(this, \''
. $this->id . '\', \'edit\', \'contact\', \'apply\', \'contact-form\', \'jform_id\', \'jform_name\'); return false;">'
. JText::_("JAPPLY") . '</a>',
. JText::_('JAPPLY') . '</a>',
)
);
}
Expand Down

0 comments on commit dbeb881

Please sign in to comment.