diff options
-rw-r--r-- | class/FedoraClient.php | 1 | ||||
-rwxr-xr-x | fedcli.php | 11 | ||||
-rw-r--r-- | pkgdb-ajax.php | 17 | ||||
-rw-r--r-- | scripts/rpmphp.js | 10 | ||||
-rw-r--r-- | zoom.php | 11 |
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( @@ -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)); } } @@ -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; } |