Skip to content

Commit

Permalink
Add forced index on frontend itemlist model
Browse files Browse the repository at this point in the history
...and change update endpoints (to updates.getk2.org)
  • Loading branch information
fevangelou committed Jun 9, 2024
1 parent 0158036 commit 71bc24f
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![K2](https://getk2.org/downloads/logo/k2_logo.png)
![K2](https://updates.getk2.org/images/k2_logo.png)
***

# Changelog
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![K2](https://getk2.org/downloads/logo/k2_logo.png)
![K2](https://updates.getk2.org/images/k2_logo.png)
***

You've already been there... Joomla is a great content management system. In fact it's considered one of the best in the world. But the default article system in Joomla is both spartan and confusing to configure and template in newer versions! In Joomla 1.5 it was just a title and your content body. In Joomla 2.5 article images where introduced as separate fields (but without any auto-resizing) and in Joomla 3.x tags where introduced as a separate component. Have you seen the options to configure all these?
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_k2/jupgrade/j16upgrade.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<!DOCTYPE jupgrade>
<jupgrade>
<collection>http://getk2.org/app/collection.xml</collection>
<collection>https://updates.getk2.org/collection.xml</collection>
<installer>
<file>administrator/components/com_k2/jupgrade/j16upgrade.php</file>
<class>jUpgradeComponentK2</class>
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_k2/jupgrade/j25upgrade.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<!DOCTYPE jupgrade>
<jupgrade>
<collection>http://getk2.org/app/collection.xml</collection>
<collection>https://updates.getk2.org/collection.xml</collection>
<installer>
<file>administrator/components/com_k2/jupgrade/j25upgrade.php</file>
<class>jUpgradeComponentK2</class>
Expand Down
2 changes: 1 addition & 1 deletion administrator/components/com_k2/k2.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
$k2ComponentFooter .= '
<!-- K2 Update Service -->
<script type="text/javascript">var K2_INSTALLED_VERSION = \''.K2_CURRENT_VERSION.'\';</script>
<script type="text/javascript" src="https://getk2.org/app/update.js?t='.date('Ymd_H').'"></script>
<script type="text/javascript" src="https://updates.getk2.org/update.js?t='.date('Ymd_H').'"></script>
';
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions components/com_k2/models/itemlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getData($ordering = null)
$query .= " USE INDEX (idx_item)";
}

$query .= " INNER JOIN #__k2_categories AS c ON c.id = i.catid";
$query .= " INNER JOIN #__k2_categories AS c USE INDEX (category) ON c.id = i.catid";

if ($ordering == 'best') {
$query .= " LEFT JOIN #__k2_rating AS r ON r.itemID = i.id";
Expand Down Expand Up @@ -623,7 +623,7 @@ public function getRelatedItems($itemID, $tags, $params)

$query = "SELECT itemID
FROM #__k2_tags_xref
WHERE tagID IN ({$sql})
WHERE tagID IN({$sql})
AND itemID != {$itemID}
GROUP BY itemID";
$db->setQuery($query);
Expand Down
2 changes: 1 addition & 1 deletion docs/collection.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" ?>
<extensionset name="K2" description="K2 Extensions List">
<extension name="K2" element="com_k2" type="component" version="1.6" detailsurl="https://getk2.org/app/update.xml"/>
<extension name="K2" element="com_k2" type="component" version="1.6" detailsurl="https://updates.getk2.org/update.xml"/>
</extensionset>
2 changes: 1 addition & 1 deletion k2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</sql>
</uninstall>
<updateservers>
<server type="extension" priority="1" name="K2">http://getk2.org/app/update.xml</server>
<server type="extension" priority="1" name="K2">https://updates.getk2.org/update.xml</server>
</updateservers>
<files folder="components/com_k2">
<folder>controllers</folder>
Expand Down

0 comments on commit 71bc24f

Please sign in to comment.