Skip to content

Commit

Permalink
[CS] Code style Tabs must be used to indent lines; round 1 (#19350)
Browse files Browse the repository at this point in the history
* Tabs must be used to indent lines; round 1

Tabs must be used to indent lines; spaces are not allowed

* Fix some indent issues not fixed by the auto fixer

nothing is perfect, sometimes we need to make some minor adjustments.

* fix line issue

* Make suggested changes to reflect general code style

* Add space after ;

- correct indenting
- remove extra ;
- correct spaces

*   was on it's own line

* fix missing semicolon

* align equals

replace tab with spaces on line 25

* remove extra space

* fix missing semicolons

fix some spacing around operators
  • Loading branch information
photodude authored and zero-24 committed Feb 7, 2018
1 parent 7757e61 commit 9c12740
Show file tree
Hide file tree
Showing 20 changed files with 214 additions and 217 deletions.
4 changes: 2 additions & 2 deletions administrator/templates/hathor/cpanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<div class="title-ua">
<h1 class="title"><?php echo $this->params->get('showSiteName') ? $app->get('sitename') . ' ' . JText::_('JADMINISTRATION') : JText::_('JADMINISTRATION'); ?></h1>
<div id="skiplinkholder"><p><a id="skiplink" href="#skiptarget"><?php echo JText::_('TPL_HATHOR_SKIP_TO_MAIN_CONTENT'); ?></a></p></div>
</div>
</div>
</div><!-- end header -->
<!-- Main Menu Navigation -->
<div id="nav">
Expand All @@ -113,7 +113,7 @@
<jdoc:include type="message" />
<!-- Sub Menu Navigation -->
<div id="no-submenu"></div>
<div class="clr"></div>
<div class="clr"></div>
<!-- Beginning of Actual Content -->
<div id="element-box">
<p id="skiptargetholder"><a id="skiptarget" class="skip" tabindex="-1"></a></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ul class="subext">
<?php foreach ($this->toc as $k => $v):?>
<li>
<?php $url = JHelp::createUrl('JHELP_'.strtoupper($k)); ?>
<?php $url = JHelp::createUrl('JHELP_'.strtoupper($k)); ?>
<?php echo JHtml::_('link', $url, $v, array('target' => 'helpFrame'));?>
</li>
<?php endforeach;?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,22 @@
<th width="1%" class="nowrap center hidden-phone">
<span class="icon-publish hasTooltip" aria-hidden="true" title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>"><span class="element-invisible"><?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?></span></span>
</th>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?>
<th width="1%" class="nowrap center hidden-phone">
<span class="icon-unpublish hasTooltip" aria-hidden="true" title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>"><span class="element-invisible"><?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?></span></span>
</th>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) : ?>
<th width="1%" class="nowrap center hidden-phone">
<span class="icon-archive hasTooltip" aria-hidden="true" title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>"><span class="element-invisible"><?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?></span></span>
</th>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_trashed')) : ?>
<th width="1%" class="nowrap center hidden-phone">
<span class="icon-trash hasTooltip" aria-hidden="true" title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>"><span class="element-invisible"><?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?></span></span>
</th>
<?php endif;?>
<?php endif; ?>
<th class="access-col">
<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?>
</th>
Expand Down Expand Up @@ -179,35 +179,35 @@
<span><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, isset($this->ordering[$item->parent_id][$orderkey + 1]), 'categories.orderdown', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span>
<?php endif; ?>
<?php $disabled = $saveOrder ? '' : 'disabled="disabled"'; ?>
<input type="text" name="order[]" value="<?php echo $orderkey + 1; ?>" <?php echo $disabled ?> class="text-area-order" title="<?php echo $item->title; ?> order" />
<input type="text" name="order[]" value="<?php echo $orderkey + 1; ?>" <?php echo $disabled; ?> class="text-area-order" title="<?php echo $item->title; ?> order" />
<?php else : ?>
<?php echo $orderkey + 1; ?>
<?php endif; ?>
</td>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_published')) : ?>
<td class="center">
<a title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS');?>" href="<?php echo JRoute::_('index.php?option=' . $component . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level);?>">
<a title="<?php echo JText::_('COM_CATEGORY_COUNT_PUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . '&filter[category_id]=' . (int) $item->id . '&filter[published]=1' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_published; ?></a>
</td>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_unpublished')) : ?>
<td class="center">
<a title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS');?>" href="<?php echo JRoute::_('index.php?option=' . $component . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level);?>">
<a title="<?php echo JText::_('COM_CATEGORY_COUNT_UNPUBLISHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . '&filter[category_id]=' . (int) $item->id . '&filter[published]=0' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_unpublished; ?></a>
</td>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_archived')) : ?>
<td class="center">
<a title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS');?>" href="<?php echo JRoute::_('index.php?option=' . $component . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level);?>">
<a title="<?php echo JText::_('COM_CATEGORY_COUNT_ARCHIVED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . '&filter[category_id]=' . (int) $item->id . '&filter[published]=2' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_archived; ?></a>
</td>
<?php endif;?>
<?php endif; ?>
<?php if (isset($this->items[0]) && property_exists($this->items[0], 'count_trashed')) : ?>
<td class="center">
<a title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS');?>" href="<?php echo JRoute::_('index.php?option=' . $component . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level);?>">
<a title="<?php echo JText::_('COM_CATEGORY_COUNT_TRASHED_ITEMS'); ?>" href="<?php echo JRoute::_('index.php?option=' . $component . '&filter[category_id]=' . (int) $item->id . '&filter[published]=-2' . '&filter[level]=' . (int) $item->level); ?>">
<?php echo $item->count_trashed; ?></a>
</td>
<?php endif;?>
<?php endif; ?>
<td class="center">
<?php echo $this->escape($item->access_level); ?>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
<?php echo $this->form->getInput('misc'); ?>
</fieldset>
</div>
<div class="col options-section">
<?php echo JHtml::_('sliders.start', 'contact-slider'); ?>
<div class="col options-section">
<?php echo JHtml::_('sliders.start', 'contact-slider'); ?>
<?php echo JHtml::_('sliders.panel', JText::_('JGLOBAL_FIELDSET_PUBLISHING'), 'publishing-details'); ?>

<fieldset class="panelform">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}
else
{
JoomlaInstaller.showLoading();
JoomlaInstaller.showLoading();
form.installtype.value = 'folder';
form.submit();
}
Expand Down Expand Up @@ -109,53 +109,52 @@
);
?>
<div id="installer-install" class="clearfix">
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_installer&view=install');?>" method="post" name="adminForm" id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif;?>

<?php if ($this->showJedAndWebInstaller && !$this->showMessage) : ?>
<div class="alert j-jed-message" style="margin-bottom: 20px; line-height: 2em; color:#333333; clear:both;">
<a href="index.php?option=com_config&view=component&component=com_installer&path=&return=<?php echo urlencode(base64_encode(JUri::getInstance())); ?>" class="close hasTooltip icon-options" data-dismiss="alert" title="<?php echo str_replace('"', '&quot;', JText::_('COM_INSTALLER_SHOW_JED_INFORMATION_TOOLTIP')); ?>"></a>
<p><?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_INFO'); ?>&nbsp;<?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_TOS'); ?></p>
<input class="btn" type="button" value="<?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_ADD_TAB'); ?>" onclick="Joomla.submitbuttonInstallWebInstaller()" />
</div>
<?php endif; ?>

<?php if ($this->ftp) : ?>
<?php echo $this->loadTemplate('ftp'); ?>
<?php endif; ?>
<div class="width-70 fltlft">

<?php $firstTab = JEventDispatcher::getInstance()->trigger('onInstallerViewBeforeFirstTab', array()); ?>

<?php // Show installation fieldsets ?>
<?php $tabs = JEventDispatcher::getInstance()->trigger('onInstallerAddInstallationTab', array()); ?>
<?php foreach ($tabs as $tab) : ?>
<fieldset class="uploadform">
<?php echo $tab['content']; ?>
</fieldset>
<?php endforeach; ?>

<?php $lastTab = JEventDispatcher::getInstance()->trigger('onInstallerViewAfterLastTab', array()); ?>

<?php $tabs = array_merge($firstTab, $tabs, $lastTab); ?>
<?php if (!$tabs) : ?>
<?php JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_NO_INSTALLATION_PLUGINS_FOUND'), 'warning'); ?>
<?php endif; ?>


<input type="hidden" name="type" value="" />
<input type="hidden" name="installtype" value="upload" />
<input type="hidden" name="task" value="install.install" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</form>
<form enctype="multipart/form-data" action="<?php echo JRoute::_('index.php?option=com_installer&view=install');?>" method="post" name="adminForm" id="adminForm">
<?php if (!empty($this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif;?>

<?php if ($this->showJedAndWebInstaller && !$this->showMessage) : ?>
<div class="alert j-jed-message" style="margin-bottom: 20px; line-height: 2em; color:#333333; clear:both;">
<a href="index.php?option=com_config&view=component&component=com_installer&path=&return=<?php echo urlencode(base64_encode(JUri::getInstance())); ?>" class="close hasTooltip icon-options" data-dismiss="alert" title="<?php echo str_replace('"', '&quot;', JText::_('COM_INSTALLER_SHOW_JED_INFORMATION_TOOLTIP')); ?>"></a>
<p><?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_INFO'); ?>&nbsp;<?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_TOS'); ?></p>
<input class="btn" type="button" value="<?php echo JText::_('COM_INSTALLER_INSTALL_FROM_WEB_ADD_TAB'); ?>" onclick="Joomla.submitbuttonInstallWebInstaller()" />
</div>
<?php endif; ?>

<?php if ($this->ftp) : ?>
<?php echo $this->loadTemplate('ftp'); ?>
<?php endif; ?>
<div class="width-70 fltlft">

<?php $firstTab = JEventDispatcher::getInstance()->trigger('onInstallerViewBeforeFirstTab', array()); ?>

<?php // Show installation fieldsets ?>
<?php $tabs = JEventDispatcher::getInstance()->trigger('onInstallerAddInstallationTab', array()); ?>
<?php foreach ($tabs as $tab) : ?>
<fieldset class="uploadform">
<?php echo $tab['content']; ?>
</fieldset>
<?php endforeach; ?>

<?php $lastTab = JEventDispatcher::getInstance()->trigger('onInstallerViewAfterLastTab', array()); ?>

<?php $tabs = array_merge($firstTab, $tabs, $lastTab); ?>
<?php if (!$tabs) : ?>
<?php JFactory::getApplication()->enqueueMessage(JText::_('COM_INSTALLER_NO_INSTALLATION_PLUGINS_FOUND'), 'warning'); ?>
<?php endif; ?>

<input type="hidden" name="type" value="" />
<input type="hidden" name="installtype" value="upload" />
<input type="hidden" name="task" value="install.install" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</form>
</div>
<div id="loading"></div>
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@
<th class="width-10">
<?php echo JText::_('JDATE'); ?>
</th>
<th class="width-15 center">
<?php echo JText::_('JAUTHOR'); ?>
</th>
<th class="width-15 center">
<?php echo JText::_('JAUTHOR'); ?>
</th>
<th>
<?php echo JHtml::_('grid.sort', 'COM_INSTALLER_HEADING_FOLDER', 'folder', $listDirn, $listOrder); ?>
</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,31 @@
<?php echo JText::_('COM_INSTALLER_VALUE_CLIENT_SELECT'); ?>
</label>
<select name="filter_client_id" id="filter_client_id">
<?php echo JHtml::_('select.options', array('0' => JText::_('JSITE'), '1' => JText::_('JADMINISTRATOR')), 'value', 'text', $this->state->get('filter.client_id'), true);?>
<?php echo JHtml::_('select.options', array('0' => JText::_('JSITE'), '1' => JText::_('JADMINISTRATOR')), 'value', 'text', $this->state->get('filter.client_id'), true); ?>
</select>

<label class="selectlabel" for="filter_status">
<label class="selectlabel" for="filter_status">
<?php echo JText::_('COM_INSTALLER_VALUE_STATE_SELECT'); ?>
</label>
<select name="filter_status" id="filter_status">
<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
<?php echo JHtml::_('select.options', InstallerHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.status'), true);?>
<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED'); ?></option>
<?php echo JHtml::_('select.options', InstallerHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.status'), true); ?>
</select>

<label class="selectlabel" for="filter_type">
<label class="selectlabel" for="filter_type">
<?php echo JText::_('COM_INSTALLER_VALUE_TYPE_SELECT'); ?>
</label>
<select name="filter_type" id="filter_type">
<option value=""><?php echo JText::_('COM_INSTALLER_VALUE_TYPE_SELECT');?></option>
<?php echo JHtml::_('select.options', InstallerHelper::getExtensionTypes(), 'value', 'text', $this->state->get('filter.type'), true);?>
<option value=""><?php echo JText::_('COM_INSTALLER_VALUE_TYPE_SELECT'); ?></option>
<?php echo JHtml::_('select.options', InstallerHelper::getExtensionTypes(), 'value', 'text', $this->state->get('filter.type'), true); ?>
</select>

<label class="selectlabel" for="filter_folder">
<?php echo JText::_('COM_INSTALLER_VALUE_FOLDER_SELECT'); ?>
</label>
<select name="filter_folder" id="filter_folder">
<option value=""><?php echo JText::_('COM_INSTALLER_VALUE_FOLDER_SELECT');?></option>
<?php echo JHtml::_('select.options', array_merge(InstallerHelper::getExtensionGroupes(), array('*' => JText::_('COM_INSTALLER_VALUE_FOLDER_NONAPPLICABLE'))), 'value', 'text', $this->state->get('filter.folder'), true);?>
<option value=""><?php echo JText::_('COM_INSTALLER_VALUE_FOLDER_SELECT'); ?></option>
<?php echo JHtml::_('select.options', array_merge(InstallerHelper::getExtensionGroupes(), array('*' => JText::_('COM_INSTALLER_VALUE_FOLDER_NONAPPLICABLE'))), 'value', 'text', $this->state->get('filter.folder'), true); ?>
</select>

<button type="submit" id="filter-go">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<?php endif; ?>
<fieldset id="filter-bar">
<legend class="element-invisible"><?php echo JText::_('JSEARCH_FILTER_LABEL'); ?></legend>
<div class="filter-search">
Expand All @@ -46,8 +46,8 @@
<?php echo JText::_('JOPTION_SELECT_PUBLISHED'); ?>
</label>
<select name="filter_published" id="filter_published">
<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
<?php echo JHtml::_('select.options', JHtml::_('languages.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?>
<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED'); ?></option>
<?php echo JHtml::_('select.options', JHtml::_('languages.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true); ?>
</select>

<button type="submit" id="filter-go">
Expand Down Expand Up @@ -133,7 +133,7 @@
<?php endif; ?>
</td>
<td class="center">
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'languages.', $canChange);?>
<?php echo JHtml::_('jgrid.published', $item->published, $i, 'languages.', $canChange); ?>
</td>
<td class="order">
<?php if ($canChange) : ?>
Expand All @@ -146,18 +146,18 @@
<span><?php echo $this->pagination->orderDownIcon($i, $this->pagination->total, true, 'languages.orderup', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span>
<?php endif; ?>
<?php endif; ?>
<?php $disabled = $saveOrder ? '' : 'disabled="disabled"'; ?>
<input type="text" name="order[]" size="5" value="<?php echo $item->ordering;?>" <?php echo $disabled ?> class="text-area-order" />
<?php $disabled = $saveOrder ? '' : 'disabled="disabled"'; ?>
<input type="text" name="order[]" size="5" value="<?php echo $item->ordering; ?>" <?php echo $disabled; ?> class="text-area-order" />
<?php else : ?>
<?php echo $item->ordering; ?>
<?php endif; ?>
</td>
<td class="center">
<?php if ($item->home == '1') : ?>
<?php echo JText::_('JYES');?>
<?php echo JText::_('JYES'); ?>
<?php else:?>
<?php echo JText::_('JNO');?>
<?php endif;?>
<?php echo JText::_('JNO'); ?>
<?php endif; ?>
</td>
<td class="center">
<?php echo $this->escape($item->lang_id); ?>
Expand Down
4 changes: 2 additions & 2 deletions administrator/templates/hathor/html/com_menus/item/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@
<li><?php echo $this->form->getLabel('id'); ?>
<?php echo $this->form->getInput('id'); ?></li>

<li><?php echo $this->form->getLabel('client_id'); ?>
<li><?php echo $this->form->getLabel('client_id'); ?>
<?php echo $this->form->getInput('client_id'); ?></li>
</ul>
</ul>

</fieldset>
</div>
Expand Down
Loading

0 comments on commit 9c12740

Please sign in to comment.