getDbo();
+ $db = $this->getDbo();
$query = $db->getQuery(true)
->delete($db->quoteName('#__banner_tracks'));
@@ -374,7 +374,7 @@ protected function getCategoryName()
if ($categoryId)
{
- $db = $this->getDbo();
+ $db = $this->getDbo();
$query = $db->getQuery(true)
->select('title')
->from($db->quoteName('#__categories'))
@@ -411,7 +411,7 @@ protected function getClientName()
if ($clientId)
{
- $db = $this->getDbo();
+ $db = $this->getDbo();
$query = $db->getQuery(true)
->select('name')
->from($db->quoteName('#__banner_clients'))
@@ -470,21 +470,21 @@ public function getContent()
{
if (!isset($this->content))
{
- $this->content = '"' . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_NAME')) . '","' .
- str_replace('"', '""', JText::_('COM_BANNERS_HEADING_CLIENT')) . '","' .
- str_replace('"', '""', JText::_('JCATEGORY')) . '","' .
- str_replace('"', '""', JText::_('COM_BANNERS_HEADING_TYPE')) . '","' .
- str_replace('"', '""', JText::_('COM_BANNERS_HEADING_COUNT')) . '","' .
- str_replace('"', '""', JText::_('JDATE')) . '"' . "\n";
+ $this->content = '"' . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_NAME')) . '","'
+ . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_CLIENT')) . '","'
+ . str_replace('"', '""', JText::_('JCATEGORY')) . '","'
+ . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_TYPE')) . '","'
+ . str_replace('"', '""', JText::_('COM_BANNERS_HEADING_COUNT')) . '","'
+ . str_replace('"', '""', JText::_('JDATE')) . '"' . "\n";
foreach ($this->getItems() as $item)
{
- $this->content .= '"' . str_replace('"', '""', $item->name) . '","' .
- str_replace('"', '""', $item->client_name) . '","' .
- str_replace('"', '""', $item->category_title) . '","' .
- str_replace('"', '""', ($item->track_type == 1 ? JText::_('COM_BANNERS_IMPRESSION') : JText::_('COM_BANNERS_CLICK'))) . '","' .
- str_replace('"', '""', $item->count) . '","' .
- str_replace('"', '""', $item->track_date) . '"' . "\n";
+ $this->content .= '"' . str_replace('"', '""', $item->name) . '","'
+ . str_replace('"', '""', $item->client_name) . '","'
+ . str_replace('"', '""', $item->category_title) . '","'
+ . str_replace('"', '""', ($item->track_type == 1 ? JText::_('COM_BANNERS_IMPRESSION') : JText::_('COM_BANNERS_CLICK'))) . '","'
+ . str_replace('"', '""', $item->count) . '","'
+ . str_replace('"', '""', $item->track_date) . '"' . "\n";
}
if ($this->getState('compressed'))
diff --git a/administrator/components/com_banners/tables/client.php b/administrator/components/com_banners/tables/client.php
index ae0e62f1fe4b9..998e63d87855d 100644
--- a/administrator/components/com_banners/tables/client.php
+++ b/administrator/components/com_banners/tables/client.php
@@ -86,10 +86,10 @@ public function publish($pks = null, $state = 1, $userId = 0)
// Update the publishing state for rows with the given primary keys.
$this->_db->setQuery(
- 'UPDATE ' . $this->_db->quoteName($this->_tbl) .
- ' SET ' . $this->_db->quoteName('state') . ' = ' . (int) $state .
- ' WHERE (' . $where . ')' .
- $checkin
+ 'UPDATE ' . $this->_db->quoteName($this->_tbl)
+ . ' SET ' . $this->_db->quoteName('state') . ' = ' . (int) $state
+ . ' WHERE (' . $where . ')'
+ . $checkin
);
try
diff --git a/administrator/components/com_banners/views/banner/tmpl/edit.php b/administrator/components/com_banners/views/banner/tmpl/edit.php
index 86d692d1854fc..4c299b4588fac 100644
--- a/administrator/components/com_banners/views/banner/tmpl/edit.php
+++ b/administrator/components/com_banners/views/banner/tmpl/edit.php
@@ -23,12 +23,12 @@
};
jQuery(document).ready(function ($){
$("#jform_type").on("change", function (a, params) {
-
+
var v = typeof(params) !== "object" ? $("#jform_type").val() : params.selected;
-
+
var img_url = $("#image, #url");
var custom = $("#custom");
-
+
switch (v) {
case "0":
// Image
diff --git a/administrator/components/com_banners/views/banners/tmpl/default.php b/administrator/components/com_banners/views/banners/tmpl/default.php
index f4eabd6ac8b5e..a87a929e44f0a 100644
--- a/administrator/components/com_banners/views/banners/tmpl/default.php
+++ b/administrator/components/com_banners/views/banners/tmpl/default.php
@@ -97,6 +97,7 @@
state, $i, 'clients.', $canChange); ?>
state === 2 ? 'un' : '') . 'archive', 'cb' . $i, 'clients');
diff --git a/administrator/components/com_banners/views/clients/view.html.php b/administrator/components/com_banners/views/clients/view.html.php
index 295aa03a86358..29f4b8aa4b1ae 100644
--- a/administrator/components/com_banners/views/clients/view.html.php
+++ b/administrator/components/com_banners/views/clients/view.html.php
@@ -128,12 +128,12 @@ protected function addToolbar()
protected function getSortFields()
{
return array(
- 'a.status' => JText::_('JSTATUS'),
- 'a.name' => JText::_('COM_BANNERS_HEADING_CLIENT'),
- 'contact' => JText::_('COM_BANNERS_HEADING_CONTACT'),
+ 'a.status' => JText::_('JSTATUS'),
+ 'a.name' => JText::_('COM_BANNERS_HEADING_CLIENT'),
+ 'contact' => JText::_('COM_BANNERS_HEADING_CONTACT'),
'client_name' => JText::_('COM_BANNERS_HEADING_CLIENT'),
- 'nbanners' => JText::_('COM_BANNERS_HEADING_ACTIVE'),
- 'a.id' => JText::_('JGRID_HEADING_ID')
+ 'nbanners' => JText::_('COM_BANNERS_HEADING_ACTIVE'),
+ 'a.id' => JText::_('JGRID_HEADING_ID')
);
}
}
diff --git a/administrator/components/com_banners/views/tracks/view.html.php b/administrator/components/com_banners/views/tracks/view.html.php
index f623d70ac5af1..0135cafaa5c40 100644
--- a/administrator/components/com_banners/views/tracks/view.html.php
+++ b/administrator/components/com_banners/views/tracks/view.html.php
@@ -104,7 +104,6 @@ protected function addToolbar()
JToolbarHelper::help('JHELP_COMPONENTS_BANNERS_TRACKS');
JHtmlSidebar::setAction('index.php?option=com_banners&view=tracks');
-
}
/**
@@ -117,10 +116,10 @@ protected function addToolbar()
protected function getSortFields()
{
return array(
- 'b.name' => JText::_('COM_BANNERS_HEADING_NAME'),
- 'cl.name' => JText::_('COM_BANNERS_HEADING_CLIENT'),
+ 'b.name' => JText::_('COM_BANNERS_HEADING_NAME'),
+ 'cl.name' => JText::_('COM_BANNERS_HEADING_CLIENT'),
'track_type' => JText::_('COM_BANNERS_HEADING_TYPE'),
- 'count' => JText::_('COM_BANNERS_HEADING_COUNT'),
+ 'count' => JText::_('COM_BANNERS_HEADING_COUNT'),
'track_date' => JText::_('JDATE')
);
}
diff --git a/components/com_banners/models/banner.php b/components/com_banners/models/banner.php
index 149da0c17cce6..1bba5df67f7bb 100644
--- a/components/com_banners/models/banner.php
+++ b/components/com_banners/models/banner.php
@@ -155,9 +155,9 @@ public function &getItem()
$db = $this->getDbo();
$query = $db->getQuery(true)
->select(
- 'a.clickurl as clickurl,' .
- 'a.cid as cid,' .
- 'a.track_clicks as track_clicks'
+ 'a.clickurl as clickurl,'
+ . 'a.cid as cid,'
+ . 'a.track_clicks as track_clicks'
)
->from('#__banners as a')
->where('a.id = ' . (int) $id)
diff --git a/components/com_banners/models/banners.php b/components/com_banners/models/banners.php
index 7b597feae4cce..c7a7e432c0a1e 100644
--- a/components/com_banners/models/banners.php
+++ b/components/com_banners/models/banners.php
@@ -54,27 +54,27 @@ protected function getStoreId($id = '')
*/
protected function getListQuery()
{
- $db = $this->getDbo();
- $query = $db->getQuery(true);
- $ordering = $this->getState('filter.ordering');
- $tagSearch = $this->getState('filter.tag_search');
- $cid = $this->getState('filter.client_id');
+ $db = $this->getDbo();
+ $query = $db->getQuery(true);
+ $ordering = $this->getState('filter.ordering');
+ $tagSearch = $this->getState('filter.tag_search');
+ $cid = $this->getState('filter.client_id');
$categoryId = $this->getState('filter.category_id');
- $keywords = $this->getState('filter.keywords');
- $randomise = ($ordering == 'random');
- $nullDate = $db->quote($db->getNullDate());
+ $keywords = $this->getState('filter.keywords');
+ $randomise = ($ordering == 'random');
+ $nullDate = $db->quote($db->getNullDate());
$query->select(
- 'a.id as id,' .
- 'a.type as type,' .
- 'a.name as name,' .
- 'a.clickurl as clickurl,' .
- 'a.cid as cid,' .
- 'a.description as description,' .
- 'a.params as params,' .
- 'a.custombannercode as custombannercode,' .
- 'a.track_impressions as track_impressions,' .
- 'cl.track_impressions as client_track_impressions'
+ 'a.id as id,'
+ . 'a.type as type,'
+ . 'a.name as name,'
+ . 'a.clickurl as clickurl,'
+ . 'a.cid as cid,'
+ . 'a.description as description,'
+ . 'a.params as params,'
+ . 'a.custombannercode as custombannercode,'
+ . 'a.track_impressions as track_impressions,'
+ . 'cl.track_impressions as client_track_impressions'
)
->from('#__banners as a')
->join('LEFT', '#__banner_clients AS cl ON cl.id = a.cid')
@@ -138,7 +138,7 @@ protected function getListQuery()
}
else
{
- $temp = array();
+ $temp = array();
$config = JComponentHelper::getParams('com_banners');
$prefix = $config->get('metakey_prefix');
@@ -204,7 +204,7 @@ public function getItems()
foreach ($this->cache['items'] as &$item)
{
- $parameters = new Registry;
+ $parameters = new Registry;
$parameters->loadString($item->params);
$item->params = $parameters;
}
@@ -223,9 +223,9 @@ public function getItems()
public function impress()
{
$trackDate = JFactory::getDate()->format('Y-m-d H');
- $items = $this->getItems();
- $db = $this->getDbo();
- $query = $db->getQuery(true);
+ $items = $this->getItems();
+ $db = $this->getDbo();
+ $query = $db->getQuery(true);
foreach ($items as $item)
{
@@ -256,7 +256,7 @@ public function impress()
if ($trackImpressions < 0)
{
- $config = JComponentHelper::getParams('com_banners');
+ $config = JComponentHelper::getParams('com_banners');
$trackImpressions = $config->get('track_impressions');
}
|