$is_public,
$unix_name,
htmlspecialchars($description),
- $unix_name.".".$GLOBALS['sys_default_domain'],
- $unix_name.".".$GLOBALS['sys_default_domain'],
+ $unix_name.".".forge_get_config('web_host'),
+ $unix_name.".".forge_get_config('web_host'),
'P',
$unix_box,
$scm_box,
$homepage = ltrim($homepage);
if (!$homepage) {
- $homepage=$GLOBALS['sys_default_domain'].'/projects/'.$this->getUnixName().'/';
+ $homepage=forge_get_config('web_host').'/projects/'.$this->getUnixName().'/';
}
if (strlen(htmlspecialchars($short_description))>255) {
* @return boolean success.
*/
function removeUser($user_id) {
- global $SYS,$sys_database_type;
+ global $SYS;
if ($user_id==user_getid()) {
//users can remove themselves
// first have to purge any assignments that would cause
// conflict with existing assignment to 100
//
- if ($sys_database_type == 'mysql') {
- $res=db_mquery("
- SELECT pt.project_task_id
- FROM project_task pt, project_group_list pgl, project_assigned_to pat
- WHERE pt.group_project_id = pgl.group_project_id
- AND pat.project_task_id=pt.project_task_id
- AND pt.status_id='1' AND pgl.group_id='".$this->getID()."'
- AND pat.assigned_to_id='$user_id' INTO @task_list;
- DELETE FROM project_assigned_to WHERE project_task_id IN ( @task_list ) AND assigned_to_id='100'");
- if ($res) {
- $res = db_next_result();
- }
- } else {
- $res = db_query_params ('DELETE FROM project_assigned_to
+ $res = db_query_params ('DELETE FROM project_assigned_to
WHERE project_task_id IN (SELECT pt.project_task_id
FROM project_task pt, project_group_list pgl, project_assigned_to pat
WHERE pt.group_project_id = pgl.group_project_id
AND pt.status_id=1 AND pgl.group_id=$1
AND pat.assigned_to_id=$2)
AND assigned_to_id=100',
- array ($this->getID(),
- $user_id)) ;
- }
+ array ($this->getID(),
+ $user_id)) ;
if (!$res) {
$this->setError(sprintf(_('ERROR: DB: project_assigned_to %d: %s'),1,db_error()));
db_rollback();
if there is anything we can do to help you.
-- the %4$s crew'),
- $this->getPublicName(),
+ htmlspecialchars_decode($this->getPublicName()),
$this->getUnixName(),
util_make_url ('/project/admin/?group_id='.$this->getID()),
forge_get_config ('forge_name'));
array ('A'));
if (db_numrows($res) < 1) {
- $this->setError(_("There is no administrator to send the mail."));
+ $this->setError(_("There is no administrator to send the mail to."));
return false;
}
Please visit the following URL to approve or reject this project:
%4$s'),
forge_get_config ('forge_name'),
- $this->getPublicName(),
- util_unconvert_htmlspecialchars($this->getRegistrationPurpose()),
+ htmlspecialchars_decode($this->getPublicName()),
+ htmlspecialchars_decode($this->getRegistrationPurpose()),
util_make_url ('/admin/approve-pending.php'),
$submitter->getRealName(),
$submitter->getUnixName());
Project Full Name: %2$s
Submitted Description: %3$s
-The %1$s admin team will now examine your project submission. You will be notified of their decision.'), forge_get_config ('forge_name'), $this->getPublicName(), util_unconvert_htmlspecialchars($this->getRegistrationPurpose()), $GLOBALS['sys_default_domain']);
+The %1$s admin team will now examine your project submission. You will be notified of their decision.'), forge_get_config ('forge_name'), $this->getPublicName(), util_unconvert_htmlspecialchars($this->getRegistrationPurpose()), forge_get_config('web_host'));
util_send_message($email, sprintf(_('New %1$s Project Submitted'), forge_get_config ('forge_name')), $message);
setup_gettext_from_context();
return $rolesId;
}
+ function normalizeAllRoles () {
+ $roles = $this->getRolesId () ;
+
+ foreach ($roles as $role_id) {
+ $r = new Role ($this, $role_id) ;
+ $r->normalizeData () ;
+ }
+ }
+
/**
* getUnixStatus - Status of activation of unix account.
*