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");
Copy file name to clipboardExpand all lines: server/lib/classes/aps_installer.inc.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -306,7 +306,7 @@ private function prepareDatabase($task, $sxe)
306
306
$db_id = parent::getXPathValue($sxe, '//db:id');
307
307
if(empty($db_id)) return; // No database needed
308
308
309
-
$mysqlver_res = $app->db->queryOneRecord('SELECT VERSION() as ver;');
309
+
$mysqlver_res = $app->db->queryOneRecord('SELECT VERSION() as ver');
310
310
$mysqlver = $mysqlver_res['ver'];
311
311
312
312
$tmp = $app->db->queryOneRecord("SELECT value FROM aps_instances_settings WHERE name = 'main_database_password' AND instance_id = ?", $task['instance_id']);
0 commit comments