30
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-05-31 21:40:50 +00:00

Apply auto cs fix from phpcbf

This commit is contained in:
Tuan Pham Ngoc 2021-08-15 22:12:14 +07:00
parent 2b960d4bed
commit 4805fc16f2
6 changed files with 19 additions and 14 deletions

View File

@ -348,4 +348,4 @@ class Com_WeblinksInstallerScript
$db->execute(); $db->execute();
} }
} }
} }

View File

@ -186,9 +186,11 @@ class CategoryModel extends ListModel
{ {
$nowDate = Factory::getDate()->toSql(); $nowDate = Factory::getDate()->toSql();
$query->where('(' . $db->quoteName('a.publish_up') $query->where('(' . $db->quoteName('a.publish_up')
. ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publish_up)') . ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publish_up)'
)
->where('(' . $db->quoteName('a.publish_down') ->where('(' . $db->quoteName('a.publish_down')
. ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publish_down)') . ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publish_down)'
)
->bind(':publish_up', $nowDate) ->bind(':publish_up', $nowDate)
->bind(':publish_down', $nowDate); ->bind(':publish_down', $nowDate);
} }

View File

@ -126,9 +126,11 @@ class WeblinkModel extends ItemModel
// Filter by start and end dates. // Filter by start and end dates.
$nowDate = Factory::getDate()->toSql(); $nowDate = Factory::getDate()->toSql();
$query->where('(' . $db->quoteName('a.publish_up') $query->where('(' . $db->quoteName('a.publish_up')
. ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publish_up)') . ' IS NULL OR ' . $db->quoteName('a.publish_up') . ' <= :publish_up)'
)
->where('(' . $db->quoteName('a.publish_down') ->where('(' . $db->quoteName('a.publish_down')
. ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publish_down)') . ' IS NULL OR ' . $db->quoteName('a.publish_down') . ' >= :publish_down)'
)
->bind(':publish_up', $nowDate) ->bind(':publish_up', $nowDate)
->bind(':publish_down', $nowDate); ->bind(':publish_down', $nowDate);
} }

View File

@ -37,7 +37,7 @@ $params = $this->state->get('params');
<?php if ($this->params->get('show_page_heading')) : ?> <?php if ($this->params->get('show_page_heading')) : ?>
<div class="page-header"> <div class="page-header">
<h1> <h1>
<?php echo $this->escape($this->params->get('page_heading')); ?> <?php echo $this->escape($this->params->get('page_heading')); ?>
</h1> </h1>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -32,13 +32,13 @@ if (!$canEdit)
</h2> </h2>
</div> </div>
<?php if ($canEdit) : ?> <?php if ($canEdit) : ?>
<div class="icons"> <div class="icons">
<div class="float-end"> <div class="float-end">
<div> <div>
<?php echo HTMLHelper::_('weblinkicon.edit', $this->item, $this->item->params); ?> <?php echo HTMLHelper::_('weblinkicon.edit', $this->item, $this->item->params); ?>
</div> </div>
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php // Content is generated by content plugin event "onContentAfterTitle" ?> <?php // Content is generated by content plugin event "onContentAfterTitle" ?>
<?php echo $this->item->event->afterDisplayTitle; ?> <?php echo $this->item->event->afterDisplayTitle; ?>

View File

@ -35,7 +35,8 @@ class WeblinksHelper
**/ **/
public static function getList($params, $app) public static function getList($params, $app)
{ {
/* @var \Joomla\Component\Weblinks\Site\Model\CategoryModel $model */ // @var \Joomla\Component\Weblinks\Site\Model\CategoryModel $model
$model = $app->bootComponent('com_weblinks')->getMVCFactory() $model = $app->bootComponent('com_weblinks')->getMVCFactory()
->createModel('Category', 'Site', ['ignore_request' => true]); ->createModel('Category', 'Site', ['ignore_request' => true]);