示例#1
0
 public function __construct(Project_Build $build)
 {
     parent::__construct();
     $this->_ptrProjectBuild = $build;
     $this->_buildId = $build->getId();
     $this->_date = null;
     $this->_version = '';
 }
示例#2
0
 public static function getById(Project_Build $build, User $user, $access = Access::READ, array $options = array())
 {
     $ret = false;
     $access = (int) $access;
     // Unfortunately, no enums, no type hinting, no cry.
     $sql = 'SELECT pd.*' . ' FROM phpdepend' . $build->getProjectId() . ' pd, projectuser pu' . ' WHERE pu.projectid=?' . ' AND pu.userid=?' . ' AND pu.access & ?' . ' AND pd.buildid=?';
     $val = array($build->getProjectId(), $user->getId(), $access, $build->getId());
     if ($rs = Database::query($sql, $val)) {
         if ($rs->nextRow()) {
             $ret = self::_getObject($rs, $build);
         }
     }
     return $ret;
 }
示例#3
0
 public static function getForProjectBuildView(Project_Build $build, Project $project = null)
 {
     return CINTIENT_BASE_URL . "/project/history/?bid={$build->getId()}" . ($project instanceof Project ? '&pid=' . $project->getId() : '');
 }