index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2023-05-25 11:59:06 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-05-25 11:59:06 +0200 |
commit | 1538f32162e2dbdfdf58aff296db7100cf7a6575 (patch) | |
tree | 25ecb7bbd71bf52c28399b4e1f5ee46547d36354 /lib/mysql-joins.php | |
parent | 7303adbf16925ba8f9c40b5735363b8576265eef (diff) |
-rw-r--r-- | lib/mysql-joins.php | 54 |
diff --git a/lib/mysql-joins.php b/lib/mysql-joins.php index 3649bec..b0fdb89 100644 --- a/lib/mysql-joins.php +++ b/lib/mysql-joins.php @@ -284,6 +284,24 @@ function mysql_join_binary_packages_dependencies ($table_left="", $table_right=" } return $result; } +function mysql_join_binary_packages_gpg_keys ($table_left="", $table_right="") { + $result = ""; + $result .= ' JOIN `gpg_keys`'; + if (!empty($table_right)) { + $result .= ' AS `'.$table_right.'`'; + } + if (!empty($table_left)) { + $result .= ' ON `'.$table_left.'`.`signing_key`='; + } else { + $result .= ' ON `binary_packages`.`signing_key`='; + } + if (!empty($table_right)) { + $result .= '`'.$table_right.'`.`id`'; + } else { + $result .= '`gpg_keys`.`id`'; + } + return $result; +} function mysql_join_binary_packages_in_repositories_binary_packages ($table_left="", $table_right="") { $result = ""; $result .= ' JOIN `binary_packages`'; @@ -896,27 +914,27 @@ function mysql_join_failed_builds_fail_reasons ($table_left="", $table_right="") } return $result; } -function mysql_join_git_repositories_upstream_repositories ($table_left="", $table_right="") { +function mysql_join_gpg_keys_allowed_email_actions ($table_left="", $table_right="") { $result = ""; - $result .= ' JOIN `upstream_repositories`'; + $result .= ' JOIN `allowed_email_actions`'; if (!empty($table_right)) { $result .= ' AS `'.$table_right.'`'; } if (!empty($table_left)) { $result .= ' ON `'.$table_left.'`.`id`='; } else { - $result .= ' ON `git_repositories`.`id`='; + $result .= ' ON `gpg_keys`.`id`='; } if (!empty($table_right)) { - $result .= '`'.$table_right.'`.`git_repository`'; + $result .= '`'.$table_right.'`.`gpg_key`'; } else { - $result .= '`upstream_repositories`.`git_repository`'; + $result .= '`allowed_email_actions`.`gpg_key`'; } return $result; } -function mysql_join_gpg_keys_allowed_email_actions ($table_left="", $table_right="") { +function mysql_join_gpg_keys_binary_packages ($table_left="", $table_right="") { $result = ""; - $result .= ' JOIN `allowed_email_actions`'; + $result .= ' JOIN `binary_packages`'; if (!empty($table_right)) { $result .= ' AS `'.$table_right.'`'; } @@ -926,9 +944,9 @@ function mysql_join_gpg_keys_allowed_email_actions ($table_left="", $table_right $result .= ' ON `gpg_keys`.`id`='; } if (!empty($table_right)) { - $result .= '`'.$table_right.'`.`gpg_key`'; + $result .= '`'.$table_right.'`.`signing_key`'; } else { - $result .= '`allowed_email_actions`.`gpg_key`'; + $result .= '`binary_packages`.`signing_key`'; } return $result; } @@ -1382,24 +1400,6 @@ function mysql_join_toolchain_order_package_sources ($table_left="", $table_righ } return $result; } -function mysql_join_upstream_repositories_git_repositories ($table_left="", $table_right="") { - $result = ""; - $result .= ' JOIN `git_repositories`'; - if (!empty($table_right)) { - $result .= ' AS `'.$table_right.'`'; - } - if (!empty($table_left)) { - $result .= ' ON `'.$table_left.'`.`git_repository`='; - } else { - $result .= ' ON `upstream_repositories`.`git_repository`='; - } - if (!empty($table_right)) { - $result .= '`'.$table_right.'`.`id`'; - } else { - $result .= '`git_repositories`.`id`'; - } - return $result; -} function mysql_join_upstream_repositories_package_sources ($table_left="", $table_right="") { $result = ""; $result .= ' JOIN `package_sources`'; |