version 1.1.1.1, 2007/11/02 20:55:00
|
version 1.1.1.1.2.3, 2007/11/16 23:00:00
|
Line 24
|
Line 24
|
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
# SUCH DAMAGE. |
# SUCH DAMAGE. |
# |
# |
|
# $Paefchen: FreeBSD/tinderbox/webui/module/moduleBuilds.php,v 1.1.1.1.2.2 2007/11/15 15:31:35 as Exp $ |
# $MCom: portstools/tinderbox/webui/module/moduleBuilds.php,v 1.6 2005/12/26 22:33:53 marcus Exp $ |
# $MCom: portstools/tinderbox/webui/module/moduleBuilds.php,v 1.6 2005/12/26 22:33:53 marcus Exp $ |
# |
# |
|
|
require_once 'module/module.php'; |
|
|
|
class moduleBuilds extends module { |
class moduleBuilds extends module { |
|
|
function moduleBuilds() { | public function display_list_builds() { |
$this->module(); | |
} | |
| |
function display_list_builds() { | |
global $pkgdir; | |
global $pkguri; | |
| |
$builds = $this->TinderboxDS->getAllBuilds(); |
$builds = $this->TinderboxDS->getAllBuilds(); |
|
|
if( is_array( $builds ) && count( $builds ) > 0 ) { | if (is_array($builds) && count($builds) > 0) { |
$data = $this->get_list_data( $builds ); | $data = $this->get_list_data($builds); |
foreach( $data as $res ) | foreach ($data as $res) |
$sort[] = $res['name']; |
$sort[] = $res['name']; |
array_multisort( $sort, SORT_ASC, $data ); | array_multisort($sort, SORT_ASC, $data); |
$this->template_assign( 'data', $data ); | $this->template_assign('data', $data); |
$this->template_assign( 'no_list', false ); | $this->template_assign('no_list', false); |
} else { | |
$this->template_assign( 'no_list', true ); | |
} |
} |
|
else { |
|
$this->template_assign('no_list', true); |
|
} |
|
|
$this->template_assign( 'maintainers', $this->TinderboxDS->getAllMaintainers() ); |
$this->template_assign( 'maintainers', $this->TinderboxDS->getAllMaintainers() ); |
return $this->template_parse( 'list_builds.tpl' ); |
return $this->template_parse( 'list_builds.tpl' ); |
} |
} |
|
|
function get_list_data( $builds ) { |
function get_list_data( $builds ) { |
global $pkgdir; |
|
global $pkguri; |
|
|
|
$i = 0; |
$i = 0; |
foreach( $builds as $build ) { |
foreach( $builds as $build ) { |
$status = $build->getBuildStatus(); |
$status = $build->getBuildStatus(); |
Line 96 class moduleBuilds extends module {
|
Line 86 class moduleBuilds extends module {
|
$data[$i]['status_field_class'] = $status_field_class; |
$data[$i]['status_field_class'] = $status_field_class; |
$data[$i]['name'] = $name; |
$data[$i]['name'] = $name; |
$data[$i]['description'] = $description; |
$data[$i]['description'] = $description; |
if( is_dir( $pkgdir.'/'.$name ) ) { | if( is_dir( PKGDIR.'/'.$name ) ) { |
$data[$i]['packagedir'] = $pkguri.'/'.$name.'/'; | $data[$i]['packagedir'] = PKGURL.'/'.$name.'/'; |
} else { |
} else { |
$data[$i]['packagedir'] = false; |
$data[$i]['packagedir'] = false; |
} |
} |
$data[$i]['results'] = $results; |
$data[$i]['results'] = $results; |
$i++; |
$i++; |
} |
} |
|
|
return $data; |
return $data; |
|
|
} |
} |
|
|
function get_all_builds() { | public function get_all_builds() { |
$all_builds_raw = $this->TinderboxDS->getAllBuilds(); |
$all_builds_raw = $this->TinderboxDS->getAllBuilds(); |
$all_builds = array(); |
$all_builds = array(); |
foreach( $all_builds_raw as $build ) { |
foreach( $all_builds_raw as $build ) { |
Line 118 class moduleBuilds extends module {
|
Line 107 class moduleBuilds extends module {
|
return $all_builds; |
return $all_builds; |
} |
} |
} |
} |
|
|
?> |
?> |