Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
billtomczak committed Apr 4, 2019
1 parent ddf3465 commit 4320c60
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
21 changes: 10 additions & 11 deletions src/admin/models/sitemaps.php
Expand Up @@ -12,7 +12,6 @@

defined('_JEXEC') or die();


class OSMapModelSitemaps extends JModelList
{
public function __construct($config = array())
Expand Down Expand Up @@ -60,8 +59,8 @@ protected function getListQuery()
$query->where('sitemap.name LIKE ' . $db->quote('%' . $search . '%'));
}

$ordering = $this->getState('list.ordering');
$direction = $this->getState('list.direction');
$ordering = $this->getState('list.ordering');
$direction = $this->getState('list.direction');
$query->order($ordering . ' ' . $direction);

return $query;
Expand Down Expand Up @@ -116,23 +115,23 @@ public function getItems()
}

/**
* Method to change the published state of one or more records.
*
* @param array &$pks A list of the primary keys to change.
* @param integer $value The value of the published state.
* Publish/Unpublish method
*
* @return boolean True on success.
* @param int[] $pks
* @param int $value
*
* @since 12.2
* @return bool
*/
public function publish(&$pks, $value = 1)
public function publish($pks, $value = 1)
{
$db = $this->getDbo();

$pks = array_filter(array_map('intval', $pks));

$query = $db->getQuery(true)
->set('published = ' . $db->quote($value))
->update('#__osmap_sitemaps')
->where('id IN (' . implode(',', $pks) . ')');
->where(sprintf('id IN (%s)', join(',', $pks)));

return $db->setQuery($query)->execute();
}
Expand Down
3 changes: 1 addition & 2 deletions src/admin/views/sitemaps/view.html.php
Expand Up @@ -60,7 +60,7 @@ public function display($tpl = null)
$this->filterForm = $model->getFilterForm();
$this->activeFilters = $model->getActiveFilters();

if (count($errors = $model->getErrors())) {
if ($errors = $model->getErrors()) {
throw new Exception(implode("\n", $errors));
}

Expand Down Expand Up @@ -176,5 +176,4 @@ protected function getLink($item, $type, $lang = null)

return $router->routeURL('index.php?' . http_build_query($query));
}

}

0 comments on commit 4320c60

Please sign in to comment.