* @return string return email address
*/
function getReturnEmailAddress() {
- global $sys_default_domain, $sys_use_gateways;
+ global $sys_use_gateways;
$address = '';
if($sys_use_gateways) {
$address .= $this->getUnixName();
if($sys_use_gateways && isset($GLOBALS['sys_forum_return_domain'])) {
$address .= $GLOBALS['sys_forum_return_domain'];
} else {
- $address .= $sys_default_domain;
+ $address .= forge_get_config('web_host');
}
return $address;
}
'&group_id='.$this->Forum->Group->getID().'&stop=1')
);
- $extra_headers = "Return-Path: <noreply@".$GLOBALS['sys_default_domain'].">\n";
- $extra_headers .= "Errors-To: <noreply@".$GLOBALS['sys_default_domain'].">\n";
- $extra_headers .= "Sender: <noreply@".$GLOBALS['sys_default_domain'].">\n";
+ $extra_headers = "Return-Path: <noreply@".forge_get_config('web_host').">\n";
+ $extra_headers .= "Errors-To: <noreply@".forge_get_config('web_host').">\n";
+ $extra_headers .= "Sender: <noreply@".forge_get_config('web_host').">\n";
$extra_headers .= "Reply-To: ".$this->Forum->getReturnEmailAddress()."\n";
$extra_headers .= "Precedence: Bulk\n"
- ."List-Id: ".$this->Forum->getName()." <forum".$this->Forum->getId()."@".$GLOBALS['sys_default_domain'].">\n"
+ ."List-Id: ".$this->Forum->getName()." <forum".$this->Forum->getId()."@".forge_get_config('web_host').">\n"
."List-Help: ".util_make_url ('/forum/forum.php?id='.$this->Forum->getId())."\n"
- ."Message-Id: <forumpost".$this->getId()."@".$GLOBALS['sys_default_domain'].">";
+ ."Message-Id: <forumpost".$this->getId()."@".forge_get_config('web_host').">";
$parentid = $this->getParentId();
if (!empty($parentid)) {
$extra_headers .= "\nIn-Reply-To: ".$this->Forum->getReturnEmailAddress()."\n"
- ."References: <forumpost".$this->getParentId()."@".$GLOBALS['sys_default_domain'].">";
+ ."References: <forumpost".$this->getParentId()."@".forge_get_config('web_host').">";
}
$subject="[" . $this->Forum->getUnixName() ."][".$this->getID()."] ".util_unconvert_htmlspecialchars($this->getSubject());
- util_send_message($dest_email,$subject,$body,"noreply@".$GLOBALS['sys_default_domain'],'','Forum',$extra_headers);
+ util_send_message($dest_email,$subject,$body,"noreply@".forge_get_config('web_host'),'','Forum',$extra_headers);
}
// Switch back to the user language settings
"\n\n______________________________________________________________________".
"\nYou are receiving this email because the forum you administrate has a new moderated message awaiting your approval.";
- //$extra_headers = 'Reply-to: '.$this->Forum->getUnixName().'@'.$GLOBALS['sys_default_domain'];
- $extra_headers = "Return-Path: <noreply@".$GLOBALS['sys_default_domain'].">\n";
- $extra_headers .= "Errors-To: <noreply@".$GLOBALS['sys_default_domain'].">\n";
- $extra_headers .= "Sender: <noreply@".$GLOBALS['sys_default_domain'].">\n";
+ //$extra_headers = 'Reply-to: '.$this->Forum->getUnixName().'@'.forge_get_config('web_host');
+ $extra_headers = "Return-Path: <noreply@".forge_get_config('web_host').">\n";
+ $extra_headers .= "Errors-To: <noreply@".forge_get_config('web_host').">\n";
+ $extra_headers .= "Sender: <noreply@".forge_get_config('web_host').">\n";
$extra_headers .= "Reply-To: ".$this->Forum->getReturnEmailAddress()."\n";
$extra_headers .= "Precedence: Bulk\n"
- ."List-Id: ".$this->Forum->getName()." <forum".$this->Forum->getId()."@".$GLOBALS['sys_default_domain'].">\n"
+ ."List-Id: ".$this->Forum->getName()." <forum".$this->Forum->getId()."@".forge_get_config('web_host').">\n"
."List-Help: ".util_make_url('/forum/forum.php?id='.$this->Forum->getId())."\n"
- ."Message-Id: <forumpost".$this->getId()."@".$GLOBALS['sys_default_domain'].">";
+ ."Message-Id: <forumpost".$this->getId()."@".forge_get_config('web_host').">";
$parentid = $this->getParentId();
if (!empty($parentid)) {
$extra_headers .= "\nIn-Reply-To: ".$this->Forum->getReturnEmailAddress()."\n"
- ."References: <forumpost".$this->getParentId()."@".$GLOBALS['sys_default_domain'].">";
+ ."References: <forumpost".$this->getParentId()."@".forge_get_config('web_host').">";
}
$subject="[" . $this->Forum->getUnixName() ."][".$this->getID()."] ".util_unconvert_htmlspecialchars($this->getSubject());
$BCC =& implode(util_result_column_to_array($bccres),',').','.$this->Forum->getSendAllPostsTo();
$User = user_get_object($this->getPosterID());
//util_send_message('',$subject,$body,$User->getEmail(),$BCC,$this->getPosterRealName(),$extra_headers);
- util_send_message('',$subject,$body,"noreply@".$GLOBALS['sys_default_domain'],$BCC,'Forum',$extra_headers);
-// util_handle_message(array_unique($ids),$subject,$body,$this->Forum->getSendAllPostsTo(),'','forumgateway@'.$GLOBALS[sys_default_domain]);
+ util_send_message('',$subject,$body,"noreply@".forge_get_config('web_host'),$BCC,'Forum',$extra_headers);
+// util_handle_message(array_unique($ids),$subject,$body,$this->Forum->getSendAllPostsTo(),'','forumgateway@'.forge_get_config('web_host'));
return true;
}
"\nTo stop monitoring this forum, login to ".forge_get_config ('forge_name')." and visit: ".
"\n".util_make_url ('/forum/monitor.php?forum_id='.$this->Forum->getID() .'&group_id='.$this->Forum->Group->getID().'&stop=1');
- $extra_headers = "Return-Path: <noreply@".$GLOBALS['sys_default_domain'].">\n";
- $extra_headers .= "Errors-To: <noreply@".$GLOBALS['sys_default_domain'].">\n";
- $extra_headers .= "Sender: <noreply@".$GLOBALS['sys_default_domain'].">\n";
+ $extra_headers = "Return-Path: <noreply@".forge_get_config('web_host').">\n";
+ $extra_headers .= "Errors-To: <noreply@".forge_get_config('web_host').">\n";
+ $extra_headers .= "Sender: <noreply@".forge_get_config('web_host').">\n";
$extra_headers .= "Reply-To: ".$this->Forum->getReturnEmailAddress()."\n";
$extra_headers .= "Precedence: Bulk\n"
- ."List-Id: ".$this->Forum->getName()." <forum".$this->Forum->getId()."@".$GLOBALS['sys_default_domain'].">\n"
+ ."List-Id: ".$this->Forum->getName()." <forum".$this->Forum->getId()."@".forge_get_config('web_host').">\n"
."List-Help: ".util_make_url('/forum/forum.php?id='.$this->Forum->getId())."\n"
- ."Message-Id: <forumpost".$this->getId()."@".$GLOBALS['sys_default_domain'].">";
+ ."Message-Id: <forumpost".$this->getId()."@".forge_get_config('web_host').">";
$parentid = $this->getParentId();
if (!empty($parentid)) {
$extra_headers .= "\nIn-Reply-To: ".$this->Forum->getReturnEmailAddress()."\n"
- ."References: <forumpost".$this->getParentId()."@".$GLOBALS['sys_default_domain'].">";
+ ."References: <forumpost".$this->getParentId()."@".forge_get_config('web_host').">";
}
$subject="[" . $this->Forum->getUnixName() ."][".$this->getID()."] ".util_unconvert_htmlspecialchars($this->getSubject());
}
$BCC =& implode(util_result_column_to_array($bccres),',').','.$this->Forum->getSendAllPostsTo();
$User = user_get_object($this->getPosterID());
- util_send_message('',$subject,$body,"noreply@".$GLOBALS['sys_default_domain'],$BCC,'Forum',$extra_headers);
+ util_send_message('',$subject,$body,"noreply@".forge_get_config('web_host'),$BCC,'Forum',$extra_headers);
return true;
}
$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) {
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();
global $sys_bcc_all_email_address,$sys_sendmail_path;
if (!$to) {
- $to='noreply@'.$GLOBALS['sys_default_domain'];
+ $to='noreply@'.forge_get_config('web_host');
}
if (!$from) {
- $from='noreply@'.$GLOBALS['sys_default_domain'];
+ $from='noreply@'.forge_get_config('web_host');
}
else
$url = "http://" ;
- $url .= $GLOBALS['sys_default_domain'] ;
+ $url .= forge_get_config('web_host') ;
$url .= util_make_uri ($path) ;
return $url ;
}
'), forge_get_config ('forge_name'), $GLOBALS['sys_lists_host'], $realListName, $this->getExternalInfoUrl(), $this->getExternalAdminUrl(), $listPassword);
$mailSubject = sprintf(_('%1$s New Mailing List'), forge_get_config ('forge_name'));
- util_send_message($userEmail, $mailSubject, $mailBody, 'admin@'.$GLOBALS['sys_default_domain']);
+ util_send_message($userEmail, $mailSubject, $mailBody, 'admin@'.forge_get_config('web_host'));
}
db_commit();
* @return string return email address
*/
function getReturnEmailAddress() {
- global $sys_default_domain,$sys_use_gateways;
+ global $sys_use_gateways;
$address = '';
if($sys_use_gateways) {
$address .= strtolower($this->getUnixName());
} else {
$address .= 'noreply';
}
- $address .= '@'.$sys_default_domain;
+ $address .= '@'.forge_get_config('web_host');
return $address;
}
//
// Change some defaults in the template file
//
- $contents = str_replace ("<domain>", $sys_default_domain, $contents);
+ $contents = str_replace ("<domain>", forge_get_config('web_host'), $contents);
$contents = str_replace ("<project_description>", $g->getDescription (), $contents);
$contents = str_replace ("<project_name>", $g->getPublicName (), $contents);
$contents = str_replace ("<group_id>", $g->getID (), $contents);
//
// Change some defaults in the template file
//
- //$contents=str_replace('<domain>',$sys_default_domain,$contents);
+ //$contents=str_replace('<domain>',forge_get_config('web_host'),$contents);
//$contents=str_replace('<project_description>',$g->getDescription(),$contents);
//$contents=str_replace('<project_name>',$g->getPublicName(),$contents);
//$contents=str_replace('<group_id>',$g->getID(),$contents);
$contents=str_replace('##body##',
sprintf(
_("We're Sorry but this Project hasn't yet uploaded their personal webpage yet. <br /> Please check back soon for updates or visit <a href=\"%s\">the project page</a>."),
- "http://".$GLOBALS['sys_default_domain'].'/projects/'.$g->getUnixName()),
+ "http://".forge_get_config('web_host').'/projects/'.$g->getUnixName()),
$contents);
//
// Write the file back out to the project home dir
} else {
$tail = "" ;
}
- util_send_message($row['email'],$subj, $body."\r\n".$tail,'noreply@'.$sys_default_domain);
+ util_send_message($row['email'],$subj, $body."\r\n".$tail,'noreply@'.forge_get_config('web_host'));
$last_userid = $row['user_id'];
sleep($SLEEP);
<?php
$externalSearchEngines = array(
- 'Google' => 'http://www.google.com/search?as_sitesearch='.$GLOBALS['sys_default_domain'].'&as_q=',
- 'AllTheWeb' => 'http://alltheweb.com/search?advanced=1&dincl='.$GLOBALS['sys_default_domain'].'&q='
+ 'Google' => 'http://www.google.com/search?as_sitesearch='.forge_get_config('web_host').'&as_q=',
+ 'AllTheWeb' => 'http://alltheweb.com/search?advanced=1&dincl='.forge_get_config('web_host').'&q='
);
// Local Variables:
// Defines new user email address, from LDAP or based on forge domain.
$result['email'] = $entry['mail'][0] ;
- //$result['email'] = $entry['uid'][0] . '@' . $GLOBALS['sys_default_domain'] ;
+ //$result['email'] = $entry['uid'][0] . '@' . forge_get_config('web_host') ;
// Defines new user theme, causes error if left blank.
$result['themeid']=$GLOBALS['sys_default_theme_id'];
$GLOBALS['sys_plugins_path'] = $sys_plugins_path ;
$GLOBALS['sys_urlprefix'] = $sys_urlprefix ;
$GLOBALS['sys_use_ssl'] = $sys_use_ssl ;
-$GLOBALS['sys_default_domain'] = $sys_default_domain ;
+$GLOBALS['sys_default_domain'] = forge_get_config('web_host') ;
$GLOBALS['sys_custom_path'] = $sys_custom_path ;
$GLOBALS['gfwww'] = $gfwww ;
$GLOBALS['gfplugins'] = $gfplugins ;
<?php
-$default_ccase_server = "ccase." . $GLOBALS['sys_default_domain'] ;
-$this_server = "ccase." . $GLOBALS['sys_default_domain'] ;
+$default_ccase_server = "ccase." . forge_get_config('web_host') ;
+$this_server = "ccase." . forge_get_config('web_host') ;
$tag_pattern = "GROUPNAME_vob" ;
<?php
if (isset ($GLOBALS['sys_scm_host'])) {
- $default_cvs_server = "cvs." . $GLOBALS['sys_default_domain'];
+ $default_cvs_server = "cvs." . forge_get_config('web_host');
} else {
$default_cvs_server = 'scm';
}
<?php
-//$default_svn_server = $GLOBALS['sys_default_domain'] ;
-//$default_svn_server = "svn." . $GLOBALS['sys_default_domain'] ;
+//$default_svn_server = forge_get_config('web_host') ;
+//$default_svn_server = "svn." . forge_get_config('web_host') ;
if (isset ($GLOBALS['sys_scm_host'])) {
$default_svn_server = $GLOBALS['sys_scm_host'];
} else {
}
print '<?xml version="1.0"?>
-<!DOCTYPE sf_forum SYSTEM "http://'.$GLOBALS['sys_default_domain'].'/exports/sf_forum_0.1.dtd">
+<!DOCTYPE sf_forum SYSTEM "http://'.forge_get_config('web_host').'/exports/sf_forum_0.1.dtd">
';
print '<group name="'.$row_grp['group_name'].'">';
// ## one time output
print " <channel>\n";
print " <title>".forge_get_config ('forge_name')." Project$title Releases</title>\n";
-print " <link>http://".$GLOBALS['sys_default_domain']."$link</link>\n";
+print " <link>http://".forge_get_config('web_host')."$link</link>\n";
print " <description>".forge_get_config ('forge_name')." Project Releases$description</description>\n";
print " <language>en-us</language>\n";
print " <copyright>Copyright ".date("Y")." ".forge_get_config ('forge_name')."</copyright>\n";
if (!isset ($seen[$row['filerelease_id']])) {
print " <item>\n";
print " <title>".htmlspecialchars($row['package_name'])." ".htmlspecialchars($row['module_name'])."</title>\n";
- print " <link>http://".$GLOBALS['sys_default_domain']."/project/showfiles.php?group_id=".$row['group_id']."&release_id=".$row['filerelease_id']."</link>\n";
+ print " <link>http://".forge_get_config('web_host')."/project/showfiles.php?group_id=".$row['group_id']."&release_id=".$row['filerelease_id']."</link>\n";
print " <description>".rss_description($row['module_notes'])."</description>\n";
print " <author>".$row['user_name']."@".$GLOBALS['sys_users_host']." (".$row['realname'].")</author>\n";
- print " <comments>http://".$GLOBALS['sys_default_domain']."/project/shownotes.php?group_id=".$row['group_id']."&release_id=".$row['filerelease_id']."</comments>\n";
+ print " <comments>http://".forge_get_config('web_host')."/project/shownotes.php?group_id=".$row['group_id']."&release_id=".$row['filerelease_id']."</comments>\n";
print " <pubDate>".rss_date($row['release_date'])."</pubDate>\n";
- print " <guid>http://".$GLOBALS['sys_default_domain']."/project/showfiles.php?group_id=".$row['group_id']."&release_id=".$row['filerelease_id']."</guid>\n";
+ print " <guid>http://".forge_get_config('web_host')."/project/showfiles.php?group_id=".$row['group_id']."&release_id=".$row['filerelease_id']."</guid>\n";
print " </item>\n";
$outputtotal++;
}
}
$rssTitle = forge_get_config ('forge_name')." Project$title News";
-$rssLink = "http://".$GLOBALS['sys_default_domain']."/news/$link";
+$rssLink = "http://".forge_get_config('web_host')."/news/$link";
// ## one time output
print " <channel>\n";
print " <title>".htmlspecialchars($row['summary'])."</title>\n";
// if news group, link is main page
if ($row['group_id'] != $sys_news_group) {
- print " <link>http://".$GLOBALS['sys_default_domain']."/forum/forum.php?forum_id=".$row['forum_id']."</link>\n";
+ print " <link>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</link>\n";
} else {
- print " <link>http://".$GLOBALS['sys_default_domain']."/</link>\n";
+ print " <link>http://".forge_get_config('web_host')."/</link>\n";
}
print " <description>".rss_description($row['details'])."</description>\n";
print " <author>".$row['user_name']."@".$GLOBALS['sys_users_host']." (".$row['realname'].")</author>\n";
print " <pubDate>".rss_date($row['post_date'])."</pubDate>\n";
if ($row['group_id'] != $sys_news_group) {
- print " <guid>http://".$GLOBALS['sys_default_domain']."/forum/forum.php?forum_id=".$row['forum_id']."</guid>\n";
+ print " <guid>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</guid>\n";
} else {
- print " <guid>http://".$GLOBALS['sys_default_domain']."/</guid>\n";
+ print " <guid>http://".forge_get_config('web_host')."/</guid>\n";
}
// if news group, comment is main page
if ($row['group_id'] != $sys_news_group) {
- print " <comments>http://".$GLOBALS['sys_default_domain']."/forum/forum.php?forum_id=".$row['forum_id']."</comments>\n";
+ print " <comments>http://".forge_get_config('web_host')."/forum/forum.php?forum_id=".$row['forum_id']."</comments>\n";
} else {
- print " <comments>http://".$GLOBALS['sys_default_domain']."/</comments>\n";
+ print " <comments>http://".forge_get_config('web_host')."/</comments>\n";
}
print " </item>\n";
}
$vers=$forge->software_version;
$name=$forge->software_name;
$date=rss_date(time());
-$link="http://".$GLOBALS['sys_default_domain'].'/';
+$link="http://".forge_get_config('web_host').'/';
$title=forge_get_config ('forge_name').' - Software version';
header("Content-Type: text/xml; charset=utf-8");
print " <copyright>Copyright ".date("Y")." ".forge_get_config ('forge_name')."</copyright>\n";
print " <pubDate>".rss_date(time())."</pubDate>\n";
print " <description>".forge_get_config ('forge_name')." New Releases</description>\n";
-print " <link>http://".$GLOBALS['sys_default_domain']."</link>\n";
+print " <link>http://".forge_get_config('web_host')."</link>\n";
print " <title>".forge_get_config ('forge_name')." New Releases</title>\n";
print " <webMaster>".$GLOBALS['sys_admin_email']."</webMaster>\n";
print " <language>en-us</language>\n";
if (!isset ($seen[$row['group_id']])) {
print " <item>\n";
print " <title>".htmlspecialchars($row['group_name'])."</title>\n";
- print " <link>http://$GLOBALS[sys_default_domain]/project/showfiles.php?group_id=$row[group_id]</link>\n";
+ print " <link>http://forge_get_config('web_host')/project/showfiles.php?group_id=$row[group_id]</link>\n";
print " <description>".rss_description($row['summary'])."</description>\n";
print " </item>\n";
$outputtotal++;
<ShortName><?php echo forge_get_config ('forge_name'); ?></ShortName>
<Description><?php echo _("Search in project"); ?></Description>
<InputEncoding>UTF-8</InputEncoding>
-<Image width="16" height="16" type="image/x-icon"><?php echo "http://".$GLOBALS['sys_default_domain']."/images/opensearchdescription.png"; ?></Image>
-<Url type="text/html" method="GET" template="<?php print 'http' . (session_issecure()?'s':'') . '://' . $GLOBALS['sys_default_domain']; ?>/search/?type_of_search=soft&words={searchTerms}"/>
+<Image width="16" height="16" type="image/x-icon"><?php echo "http://".forge_get_config('web_host')."/images/opensearchdescription.png"; ?></Image>
+<Url type="text/html" method="GET" template="<?php print 'http' . (session_issecure()?'s':'') . '://' . forge_get_config('web_host'); ?>/search/?type_of_search=soft&words={searchTerms}"/>
</OpenSearchDescription>
require_once $gfcommon.'tracker/ArtifactCanned.class.php';
function beginDocument() {
- global $sys_default_domain;
+
header("Content-Type: text/plain");
- echo '<tracker version="1.0" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://'.$sys_default_domain.'/export/tracker.xsd">'."\n";
+ echo '<tracker version="1.0" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://'.forge_get_config('web_host').'/export/tracker.xsd">'."\n";
}
function displayError($errorMessage) {
forge_define_config_item ('forge_name', 'core', $GLOBALS['sys_name']) ;
forge_define_config_item ('user_registration_restricted', 'core', $GLOBALS['sys_user_reg_restricted']) ;
+forge_define_config_item ('web_host', 'core', $GLOBALS['sys_default_domain']) ;
+// forge_define_config_item ('', 'core', $GLOBALS['sys_']) ;
+
/* Long-term:
require_once $gfcommon.'include/FusionForge.class.php';
$forge = new FusionForge() ;
echo '<div class="public-area-box">';
$link_content = $HTML->getFtpPic('') . ' ' . _('Anonymous FTP Space');
-// print '<a rel="doap:anonymous root" href="ftp://' . $project->getUnixName() . '.' . $GLOBALS['sys_default_domain'] . '/pub/'. $project->getUnixName() .'/">';
- print util_make_link('ftp://' . $project->getUnixName() . '.' . $GLOBALS['sys_default_domain'] . '/pub/'. $project->getUnixName(), $link_content, false, true);
+// print '<a rel="doap:anonymous root" href="ftp://' . $project->getUnixName() . '.' . forge_get_config('web_host') . '/pub/'. $project->getUnixName() .'/">';
+ print util_make_link('ftp://' . $project->getUnixName() . '.' . forge_get_config('web_host') . '/pub/'. $project->getUnixName(), $link_content, false, true);
echo '</div>';
}
}
global $sys_use_shell;
if ($sys_use_shell) {
?>
-<p><?php echo _('Group shell (SSH) server: ') ?><strong><?php echo $group->getUnixName().'.'.$GLOBALS['sys_default_domain']; ?></strong></p>
+<p><?php echo _('Group shell (SSH) server: ') ?><strong><?php echo $group->getUnixName().'.'.forge_get_config('web_host'); ?></strong></p>
<p><?php echo _('Group directory on shell server: ') ?><br/><strong><?php echo account_group_homedir($group->getUnixName()); ?></strong></p>
<p><?php echo _('Project WWW directory on shell server: ') ?><br /><strong><?php echo account_group_homedir($group->getUnixName()).'/htdocs'; ?></strong></p>
<?php
<p> </p>
-<?php printf(_('<strong><span style="text-decoration:underline">Add New Virtual Host</span></strong><p>To add a new virtual host - simply point a <strong>CNAME</strong> for <em>yourhost.org</em> at <strong>%1$s.%2$s</strong>. %3$s does not currently host mail (i.e. cannot be an MX) or DNS</strong>. <p>Clicking on "create" will schedule the creation of the Virtual Host. This will be synced to the project webservers - such that <em>yourhost.org</em> will display the material at <em>%4$s.%5$s</em>.'), $group->getUnixName(), $GLOBALS['sys_default_domain'], forge_get_config ('forge_name'), $group->getUnixName(), $GLOBALS['sys_default_domain']) ?>
+<?php printf(_('<strong><span style="text-decoration:underline">Add New Virtual Host</span></strong><p>To add a new virtual host - simply point a <strong>CNAME</strong> for <em>yourhost.org</em> at <strong>%1$s.%2$s</strong>. %3$s does not currently host mail (i.e. cannot be an MX) or DNS</strong>. <p>Clicking on "create" will schedule the creation of the Virtual Host. This will be synced to the project webservers - such that <em>yourhost.org</em> will display the material at <em>%4$s.%5$s</em>.'), $group->getUnixName(), forge_get_config('web_host'), forge_get_config ('forge_name'), $group->getUnixName(), forge_get_config('web_host')) ?>
<p>
<form name="new_vhost" action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group->getID().'&createvhost=1'; ?>" method="post">
<?php
$index++;
echo '<h3>'.$index.'. '._('Project Unix Name').'</h3>';
- printf(_('In addition to full project name, you will need to choose short,"Unix" name for your project.<p/> The "Unix Name" has several restrictions because it is used in so many places around the site. They are:<ul><li>Cannot match the unix name of any other project</li><li>Must be between 3 and 15 characters in length</li><li>Must be in lower case</li><li>Can only contain characters, numbers, and dashes</li><li>Must be a valid unix username</li><li>Cannot match one of our reserved domains</li><li>Unix name will never change for this project</li></ul><p/>Your unix name is important, however, because it will be used for many things, including:<ul><li>A web site at <tt>unixname.%1$s</tt></li><li>A CVS Repository root of <tt>/cvsroot/unixname</tt> at <tt>cvs.unixname.%1$s</tt></li><li>Shell access to <tt>unixname.%1$s</tt></li><li>Search engines throughout the site</li></ul><p/>Unix Name:<br/>'), $GLOBALS['sys_default_domain']) ?>
+ printf(_('In addition to full project name, you will need to choose short,"Unix" name for your project.<p/> The "Unix Name" has several restrictions because it is used in so many places around the site. They are:<ul><li>Cannot match the unix name of any other project</li><li>Must be between 3 and 15 characters in length</li><li>Must be in lower case</li><li>Can only contain characters, numbers, and dashes</li><li>Must be a valid unix username</li><li>Cannot match one of our reserved domains</li><li>Unix name will never change for this project</li></ul><p/>Your unix name is important, however, because it will be used for many things, including:<ul><li>A web site at <tt>unixname.%1$s</tt></li><li>A CVS Repository root of <tt>/cvsroot/unixname</tt> at <tt>cvs.unixname.%1$s</tt></li><li>Shell access to <tt>unixname.%1$s</tt></li><li>Search engines throughout the site</li></ul><p/>Unix Name:<br/>'), forge_get_config('web_host')) ?>
<input type="text" maxlength="15" size="15" name="unix_name" value="<?php echo htmlspecialchars($unix_name); ?>"/>
// check if the scm_box is located in another server
$scm_box = $Group->getSCMBox();
-//$external_scm = (gethostbyname($sys_default_domain) != gethostbyname($scm_box));
+//$external_scm = (gethostbyname(forge_get_config('web_host')) != gethostbyname($scm_box));
$external_scm = !$sys_scm_single_host;
if (session_loggedin()) {
}
}
-if ($toaddress && !eregi($GLOBALS['sys_default_domain'],$toaddress)) {
- exit_error(_('Error'),sprintf(_('You can only send to addresses @<em>%1$s</em>.'),$GLOBALS['sys_default_domain']));
+if ($toaddress && !eregi(forge_get_config('web_host'),$toaddress)) {
+ exit_error(_('Error'),sprintf(_('You can only send to addresses @<em>%1$s</em>.'),forge_get_config('web_host')));
}
ini_set('memory_limit','32M');
-$uri = 'http://'.$sys_default_domain;
+$uri = 'http://'.forge_get_config('web_host');
// 1. include client and server
require_once $gfwww.'soap/nusoap.php';
//$debug = true;
<!--
function help_window(helpurl) {
HelpWin = window.open( '<?php echo ((session_issecure()) ? 'https://'.
- $GLOBALS['sys_default_domain'] : 'http://'.$GLOBALS['sys_default_domain']); ?>' + helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
+ forge_get_config('web_host') : 'http://'.forge_get_config('web_host')); ?>' + helpurl,'HelpWindow','scrollbars=yes,resizable=yes,toolbar=no,height=400,width=400');
}
// -->
<?php plugin_hook ("javascript",false) ; ?>
}
else if ($type == 'pageviews_proj') {
$res_top = $stats->getTopPageViews();
- $title = sprintf(_('Top Weekly Project Pageviews at *.%1$s (from impressions of %2$s logo)'), $GLOBALS['sys_default_domain'], forge_get_config ('forge_name'));
+ $title = sprintf(_('Top Weekly Project Pageviews at *.%1$s (from impressions of %2$s logo)'), forge_get_config('web_host'), forge_get_config ('forge_name'));
$column1 = _('Pageviews');
}
else if ($type == 'forumposts_week') {
public function testconfig_vars()
{
$vars = array ('sys_name',
- 'sys_user_reg_restricted') ;
+ 'sys_user_reg_restricted',
+ 'sys_default_domain') ;
$pattern = implode ('|', $vars) ;
- $output = `cd .. ; find gforge tests -name '*.php' -type f | xargs pcregrep -n '\\$($pattern)\b' \
+ $output = `cd .. ; find gforge tests -name '*.php' -type f | xargs pcregrep -n '\\$($pattern)\b(?! *=[^=])' \
| grep -v ^gforge/www/include/pre.php`;
$this->assertEquals('', $output, "Found deprecated \$var for var in ($pattern):");
- $output = `cd .. ; find gforge tests -name '*.php' -type f | xargs pcregrep -n '\\\$GLOBALS\\[.?($pattern).?\\]' \
+ $output = `cd .. ; find gforge tests -name '*.php' -type f | xargs pcregrep -n '\\\$GLOBALS\\[.?($pattern).?\\](?! *=[^=])' \
| grep -v ^gforge/www/include/pre.php`;
$this->assertEquals('', $output, "Found deprecated \$GLOBALS['\$var'] for var in ($pattern):");