From 225fef295a1f6e9187c0ffc96eb85d8108ce89bb Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 20 Jan 2019 20:12:24 +0100 Subject: use mysql_query_package_version() even more often --- packages/index.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'packages/index.php') diff --git a/packages/index.php b/packages/index.php index d712423..1d3acca 100644 --- a/packages/index.php +++ b/packages/index.php @@ -129,10 +129,8 @@ require_once BASE . "/lib/format.php"; "`package_sources`.`pkgbase`," . "CONCAT(`r_a`.`name`,\"/\",`repositories`.`name`) AS `repo`," . "`architectures`.`name` AS `arch`," . - "CONCAT(IF(`binary_packages`.`epoch`=\"0\",\"\",CONCAT(`binary_packages`.`epoch`,\":\"))," . - "`binary_packages`.`pkgver`,\"-\"," . - "`binary_packages`.`pkgrel`,\".\"," . - "`binary_packages`.`sub_pkgrel`) AS `version`," . + mysql_query_package_version("binary_packages") . + " AS `version`," . "IF(`binary_packages`.`has_issues`,1,0) AS `has_issues`," . "`build_assignments`.`return_date` AS `build_date`," . "`binary_packages_in_repositories`.`last_moved` AS `move_date`," . @@ -165,7 +163,7 @@ require_once BASE . "/lib/format.php"; "pkgver" => array( "title" => "package version", "label" => "Version", - "mysql" => "CONCAT(`binary_packages`.`epoch`,\":\",`binary_packages`.`pkgver`,\"-\",`binary_packages`.`pkgrel`,\".\",`binary_packages`.`sub_pkgrel`)" + "mysql" => mysql_query_package_version("binary_packages") ), "bugs" => array( "title" => "bug status", @@ -226,10 +224,8 @@ require_once BASE . "/lib/format.php"; "`package_sources`.`pkgbase`," . "CONCAT(`r_a`.`name`,\"/\",`repositories`.`name`) AS `repo`," . "`architectures`.`name` AS `arch`," . - "CONCAT(IF(`binary_packages`.`epoch`=\"0\",\"\",CONCAT(`binary_packages`.`epoch`,\":\"))," . - "`binary_packages`.`pkgver`,\"-\"," . - "`binary_packages`.`pkgrel`,\".\"," . - "`binary_packages`.`sub_pkgrel`) AS `version`," . + mysql_query_package_version("binary_packages") . + " AS `version`," . "IF(`binary_packages`.`has_issues`,1,0) AS `has_issues`," . "`build_assignments`.`return_date` AS `build_date`," . "`binary_packages_in_repositories`.`last_moved` AS `move_date`," . -- cgit v1.2.3-70-g09d2