--- FreeBSD/tinderbox/webui/module/moduleBuilds.php 2007/11/13 07:36:19 1.1.1.1.2.1 +++ FreeBSD/tinderbox/webui/module/moduleBuilds.php 2007/11/15 15:31:35 1.1.1.1.2.2 @@ -24,37 +24,32 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $Paefchen$ +# $Paefchen: FreeBSD/tinderbox/webui/module/moduleBuilds.php,v 1.1.1.1.2.1 2007/11/13 07:36:19 as Exp $ # $MCom: portstools/tinderbox/webui/module/moduleBuilds.php,v 1.6 2005/12/26 22:33:53 marcus Exp $ # class moduleBuilds extends module { public function display_list_builds() { - global $pkgdir; - global $pkguri; - $builds = $this->TinderboxDS->getAllBuilds(); - if( is_array( $builds ) && count( $builds ) > 0 ) { - $data = $this->get_list_data( $builds ); - foreach( $data as $res ) + if (is_array($builds) && count($builds) > 0) { + $data = $this->get_list_data($builds); + foreach ($data as $res) $sort[] = $res['name']; - array_multisort( $sort, SORT_ASC, $data ); - $this->template_assign( 'data', $data ); - $this->template_assign( 'no_list', false ); - } else { - $this->template_assign( 'no_list', true ); + array_multisort($sort, SORT_ASC, $data); + $this->template_assign('data', $data); + $this->template_assign('no_list', false); } + else { + $this->template_assign('no_list', true); + } $this->template_assign( 'maintainers', $this->TinderboxDS->getAllMaintainers() ); return $this->template_parse( 'list_builds.tpl' ); } function get_list_data( $builds ) { - global $pkgdir; - global $pkguri; - $i = 0; foreach( $builds as $build ) { $status = $build->getBuildStatus(); @@ -91,15 +86,15 @@ class moduleBuilds extends module { $data[$i]['status_field_class'] = $status_field_class; $data[$i]['name'] = $name; $data[$i]['description'] = $description; - if( is_dir( $pkgdir.'/'.$name ) ) { - $data[$i]['packagedir'] = $pkguri.'/'.$name.'/'; + printf (PKGDIR); + if( is_dir( PKGDIR.'/'.$name ) ) { + $data[$i]['packagedir'] = PKGURL.'/'.$name.'/'; } else { $data[$i]['packagedir'] = false; } $data[$i]['results'] = $results; $i++; } - return $data; }