You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: interface/lib/classes/aps_crawler.inc.php
+24-4Lines changed: 24 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -261,10 +261,13 @@ public function startCrawler()
261
261
// Get all known apps from the database and the highest known version
262
262
// Note: A dirty hack is used for numerical sorting of the VARCHAR field Version: +0 -> cast
263
263
// A longer but typesafe way would be: ORDER BY CAST(REPLACE(Version, '.', '') AS UNSIGNED) DESC
264
-
$existing_apps = $app->db->queryAllRecords("SELECT * FROM (
265
-
SELECT name AS Name, CONCAT(version, '-', CAST(`release` AS CHAR)) AS CurrentVersion
266
-
FROM aps_packages ORDER BY REPLACE(version, '.', '')+0 DESC, `release` DESC
267
-
) as Versions GROUP BY name");
264
+
$existing_apps = array();
265
+
$tmpres = $app->db->query("SELECT name as `Name`, CONCAT(version, '-', CAST(`release` AS CHAR)) AS CurrentVersion FROM aps_packages ORDER BY INET_ATON(SUBSTRING_INDEX(CONCAT(version,'.0.0.0'),'.',4)) DESC, `release` DESC");
$res = $app->db->query("SELECT `id`, `name`, `version`, `release`, `package_status` FROM `aps_packages` WHERE 1 ORDER BY `name` ASC, INET_ATON(SUBSTRING_INDEX(CONCAT(version,'.0.0.0'),'.',4)) DESC, `release` DESC");
0 commit comments