Changeset 2388


Ignore:
Timestamp:
11/26/2011 2:11:18 AM (2 years ago)
Author:
lowjoel
Message:

Split the BuildBranch? class out to a separate file since we will be using it as a static data source.

Location:
trunk/website/scripts
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/website/scripts/Build.php

    r1935 r2388  
    144144    } 
    145145} 
    146  
    147 /** 
    148  * Represents a branch of all builds. 
    149  */ 
    150 class BuildBranch 
    151 { 
    152     private $ID; 
    153     private $Title; 
    154     private $Version; 
    155  
    156     private function __construct($branchId, $title, $version) 
    157     { 
    158         $this->ID = $branchId; 
    159         $this->Title = $title; 
    160         $this->Version = $version; 
    161     } 
    162  
    163     /** 
    164      * Gets the branches that are currently maintained. 
    165      * 
    166      * @return array The list of branches that are currently maintained. 
    167      */ 
    168     public static function Get() 
    169     { 
    170         return array( 
    171             'Eraser6' => new BuildBranch('Eraser6', 'Eraser 6.0', '6.0.8'), 
    172             'Eraser6.2' => new BuildBranch('Eraser6.2', 'Eraser 6.2', '6.1.0') 
    173         ); 
    174     } 
    175  
    176     public function __get($name) 
    177     { 
    178         return $this->$name; 
    179     } 
    180 } 
    181146?> 
  • trunk/website/scripts/BuildServer.php

    r2387 r2388  
    5555    http_digest_challenge(); 
    5656 
    57 require('Build.php'); 
    58 require('BuildUtil.php'); 
    59 require('Credentials.php'); 
    60 require('Database.php'); 
     57require_once('Build.php'); 
     58require_once('BuildUtil.php'); 
     59require_once('BuildBranch.php'); 
     60require_once('Credentials.php'); 
     61require_once('Database.php'); 
    6162 
    6263try 
     
    7071 
    7172    //Get the branch the notification is for 
    72     define('HTTP_WEB_ROOT', 'http://eraser.sourceforge.net'); 
    7373    $branch = $branches[$_GET['branch']]; 
    7474 
Note: See TracChangeset for help on using the changeset viewer.