public function __construct(Project_Build $build) { parent::__construct(); $this->_ptrProjectBuild = $build; $this->_buildId = $build->getId(); $this->_date = null; $this->_version = ''; }
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; }
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() : ''); }