summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2011-02-05 11:09:56 +0100
committerRemi Collet <fedora@famillecollet.com>2011-02-05 11:09:56 +0100
commitad09d023481f03b6dc835bf86f2999e40ab63b37 (patch)
tree16618319228978a42372402d5b8fa53544a97de0
parenteb425e1bee76cb6ec7196506954229e77eea82ef (diff)
fix co-maintainer list : only approved ones
-rw-r--r--class/FedoraClient.php1
-rwxr-xr-xfedcli.php11
-rw-r--r--pkgdb-ajax.php17
-rw-r--r--scripts/rpmphp.js10
-rw-r--r--zoom.php11
5 files changed, 25 insertions, 25 deletions
diff --git a/class/FedoraClient.php b/class/FedoraClient.php
index 42a590b..62f8eac 100644
--- a/class/FedoraClient.php
+++ b/class/FedoraClient.php
@@ -98,6 +98,7 @@ abstract class FedoraClient
// Follow redirect
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_MAXREDIRS, 5);
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// Set standard headers
curl_setopt(
diff --git a/fedcli.php b/fedcli.php
index 40b5b0c..a604ae8 100755
--- a/fedcli.php
+++ b/fedcli.php
@@ -118,13 +118,20 @@ function Package() {
echo $branch.":\t".$pack['owner'];
$i=0;
+ $tmp = array();
foreach ($pack['people'] as $user) {
if (isset($user['aclOrder']['commit']['statuscode']) && $user['aclOrder']['commit']['statuscode']==3) {
- echo ($i++ ? ", " : " (").$user['username'];
+ $tmp[] = $user['username'];
}
}
- echo ($i ? ")\n" : "\n");
+ if (count($tmp)) {
+ sort($tmp);
+ echo " (".implode($tmp, ', ').")\n";
+ } else {
+ echo "\n";
+ }
}
+
}
function Version() {
diff --git a/pkgdb-ajax.php b/pkgdb-ajax.php
index a2b84ae..65c5724 100644
--- a/pkgdb-ajax.php
+++ b/pkgdb-ajax.php
@@ -64,18 +64,15 @@ if ( !isset($name) || !$name ) {
unset($fedpkg[$k]['package']['statuscode']);
unset($fedpkg[$k]['package']['upstreamurl']);
$people = $fedpkg[$k]['people'];
- $new_people = null;
+ $tmp = array();
foreach ( $people as $p ) {
- $new_people[] = array(
- 'username' => $p['username'],
- 'aclOrder' => array(
- 'commit' => array(
- 'statuscode' => $p['aclOrder']['commit']['statuscode']
- )
- )
- );
+ if (isset($p['aclOrder']['commit']['statuscode'])
+ && $p['aclOrder']['commit']['statuscode']==3) {
+ $tmp[] = $p['username'];
+ }
}
- $fedpkg[$k]['people'] = $new_people;
+ sort($tmp);
+ $fedpkg[$k]['people'] = implode($tmp, ', ');
$fedpkg[$k]['package']['description'] = nl2br($fedpkg[$k]['package']['description']);
}
}
diff --git a/scripts/rpmphp.js b/scripts/rpmphp.js
index 91f4fb9..ba3411d 100644
--- a/scripts/rpmphp.js
+++ b/scripts/rpmphp.js
@@ -39,15 +39,7 @@ function initZoomJS(name)
if ( _owner_cell ) {
_owner_cell.empty().text(_data.owner);
_maintainers_cell = $('#pkgdb_' + k + '_maintainers');
- _maintainers = '';
- if ( _data.people != null ) {
- $.each(
- _data.people,
- function(){
- _maintainers += this.username + ', ';
- }
- )
- }
+ _maintainers = _data.people;
_maintainers_cell.empty().text(_maintainers.slice(0, -2));
}
}
diff --git a/zoom.php b/zoom.php
index f20c730..8b00270 100644
--- a/zoom.php
+++ b/zoom.php
@@ -75,13 +75,16 @@ function getBranchPeople($params)
$ret_tmp = $fedpkg[$branch]['people'];
}
}
- if ( $people == 'people') {
+ if ( $people == 'people' && is_array($ret_tmp)) {
+ $tmp = array();
foreach ( $ret_tmp as $r ) {
- if ( $ret !== null ) {
- $ret .= ', ';
+ if (isset($r['aclOrder']['commit']['statuscode'])
+ && $r['aclOrder']['commit']['statuscode']==3) {
+ $tmp[] = $r['username'];
}
- $ret .= $r['username'];
}
+ sort($tmp);
+ $ret = implode($tmp, ', ');
}
return $ret;
}