From: Roland Mas
-
+
|*| [$qstring]: ".db_error();
+ return $res;
+}
+
/**
* db_query_params() - Query the database, with parameters
*
@@ -190,6 +228,8 @@ function db_query_qpa ($qpa,$limit='-1',$offset=0,$dbserver=SYS_DB_PRIMARY) {
/**
* db_mquery() - Query the database.
*
+ * @deprecated since 4.8. Use db_query_params() instead!
+ *
* @param text SQL statement.
* @param int How many rows do you want returned.
* @param int Of matching rows, return only rows starting here.
diff --git a/gforge/common/include/rbac_texts.php b/gforge/common/include/rbac_texts.php
index 1b72750308..5073792a25 100644
--- a/gforge/common/include/rbac_texts.php
+++ b/gforge/common/include/rbac_texts.php
@@ -82,16 +82,17 @@ function setup_rbac_strings () {
$rbac_edit_section_names = array (
'forum' => _('Forum'),
+ 'newforum' => _('Default for new forums'),
'forumpublic' => _('Forum'),
'forumanon' => _('Anonymous Forum'),
'forumadmin' => _('Forum Admin'),
'pm' => _('Tasks'),
- 'newpm' => _('New Tasks'),
+ 'newpm' => _('Default for new tasks'),
'pmpublic' => _('Tasks'),
'pmadmin' => _('Tasks Admin'),
'projectpublic' => _('Project'),
'tracker' => _('Tracker'),
- 'newtracker' => _('New Trackers'),
+ 'newtracker' => _('Default for new trackers'),
'trackerpublic' => _('Tracker'),
'trackeranon' => _('Anonymous Tracker'),
'trackeradmin' => _('Tracker Admin'),
diff --git a/gforge/common/include/session.php b/gforge/common/include/session.php
index 0151ae76d8..813b5fbb14 100644
--- a/gforge/common/include/session.php
+++ b/gforge/common/include/session.php
@@ -316,10 +316,12 @@ function session_issecure() {
* @return true/false
*/
function session_cookie($name ,$value, $domain = '', $expiration = 0) {
- if ( $expiration != 0){
- setcookie($name, $value, time() + $expiration, '/', $domain, 0);
- } else {
- setcookie($name, $value, $expiration, '/', $domain, 0);
+ if (php_sapi_name() != 'cli') {
+ if ( $expiration != 0){
+ setcookie($name, $value, time() + $expiration, '/', $domain, 0);
+ } else {
+ setcookie($name, $value, $expiration, '/', $domain, 0);
+ }
}
}
@@ -342,7 +344,6 @@ function session_redirect($loc) {
* fails checks.
*
* @param array Associative array specifying criteria
- * @param string Override error string (optional)
* @return does not return if check is failed
*
*/
@@ -350,6 +351,12 @@ function session_require($req, $reason='') {
if (!session_loggedin()) {
exit_not_logged_in();
}
+
+ $user =& user_get_object(user_getid());
+ if (! $user->isActive()) {
+ session_logout();
+ exit_error('Error','Your account is no longer active ; you have been disconnected');
+ }
if (array_key_exists('group', $req)) {
$group =& group_get_object($req['group']);
@@ -364,9 +371,7 @@ function session_require($req, $reason='') {
exit_permission_denied($reason);
}
- //don't really like this, but as admin_flags is not mandatory
- //I add @ to remove the warning
- if (@$req['admin_flags']) {
+ if (isset($req['admin_flags']) && $req['admin_flags']) {
if (!$perm->isAdmin()) {
exit_permission_denied($reason);
}
diff --git a/gforge/common/include/utils.php b/gforge/common/include/utils.php
index efbb840931..ee8436314b 100644
--- a/gforge/common/include/utils.php
+++ b/gforge/common/include/utils.php
@@ -119,10 +119,10 @@ function util_send_message($to,$subject,$body,$from='',$BCC='',$sendername='',$e
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');
}
@@ -975,6 +975,11 @@ function util_strip_accents($text) {
return utf8_encode($find);
}
+/**
+ * Constructs the forge's URL prefix out of $GLOBALS['sys_urlprefix']
+ *
+ * @return string
+ */
function normalized_urlprefix () {
$prefix = $GLOBALS['sys_urlprefix'] ;
$prefix = ereg_replace ("^/", "", $prefix) ;
@@ -985,17 +990,29 @@ function normalized_urlprefix () {
return $prefix ;
}
+/**
+ * Construct full URL from a relative path
+ *
+ * @param string $path
+ * @return string URL
+ */
function util_make_url ($path) {
if ($GLOBALS['sys_use_ssl'])
$url = "https://" ;
else
$url = "http://" ;
- $url .= $GLOBALS['sys_default_domain'] ;
+ $url .= forge_get_config('web_host') ;
$url .= util_make_uri ($path) ;
return $url ;
}
+/**
+ * Construct proper (relative) URI (prepending prefix)
+ *
+ * @param string $path
+ * @return string URI
+ */
function util_make_uri ($path) {
$path = ereg_replace ("^/", "", $path) ;
$uri = normalized_urlprefix () ;
@@ -1017,10 +1034,25 @@ function util_make_link ($path, $text, $extra_params=false, $absolute=false) {
}
}
+/**
+ * Create an HTML link to a user's profile page
+ *
+ * @param string $username
+ * @param int $user_id
+ * @param string $text
+ * @return string
+ */
function util_make_link_u ($username, $user_id,$text) {
return '' . $text . '' ;
}
+/**
+ * Create URL for user's profile page
+ *
+ * @param string $username
+ * @param int $user_id
+ * @return string URL
+ */
function util_make_url_u ($username, $user_id) {
if (isset ($GLOBALS['sys_noforcetype']) && $GLOBALS['sys_noforcetype']) {
return util_make_url ("/developer/?user_id=$user_id");
@@ -1029,10 +1061,24 @@ function util_make_url_u ($username, $user_id) {
}
}
+/**
+ * Create a HTML link to a project's page
+ * @param string $groupame
+ * @param int $group_id
+ * @param string $text
+ * @return string
+ */
function util_make_link_g ($groupame, $group_id,$text) {
return '' . $text . '' ;
}
+/**
+ * Create URL for a project's page
+ *
+ * @param string $groupame
+ * @param int $group_id
+ * @return string
+ */
function util_make_url_g ($groupame, $group_id) {
if (isset ($GLOBALS['sys_noforcetype']) && $GLOBALS['sys_noforcetype']) {
return util_make_url ("/project/?group_id=$group_id");
diff --git a/gforge/common/mail/MailingList.class.php b/gforge/common/mail/MailingList.class.php
index b46106c435..d389da8dcb 100644
--- a/gforge/common/mail/MailingList.class.php
+++ b/gforge/common/mail/MailingList.class.php
@@ -193,10 +193,10 @@ You are encouraged to change this password as soon as possible.
Thank you for registering your project with %1$s.
-- the %1$s staff
-'), $GLOBALS['sys_name'], $GLOBALS['sys_lists_host'], $realListName, $this->getExternalInfoUrl(), $this->getExternalAdminUrl(), $listPassword);
- $mailSubject = sprintf(_('%1$s New Mailing List'), $GLOBALS['sys_name']);
+'), 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();
diff --git a/gforge/common/pm/ProjectGroup.class.php b/gforge/common/pm/ProjectGroup.class.php
index 816b5e8fb0..875ae68418 100644
--- a/gforge/common/pm/ProjectGroup.class.php
+++ b/gforge/common/pm/ProjectGroup.class.php
@@ -185,6 +185,9 @@ class ProjectGroup extends Error {
}
db_commit();
+
+ $this->Group->normalizeAllRoles () ;
+
return true;
}
@@ -377,6 +380,15 @@ class ProjectGroup extends Error {
}
}
+ $res = db_query_params ('DELETE FROM role_setting WHERE section_name=$1 AND ref_id=$2',
+ array ('pm',
+ $this->getID())) ;
+
+ if (!$res)
+ {
+ $this->setError('DATABASE '.db_error());
+ return false;
+ }
if (!$this->userIsAdmin()) {
$this->setPermissionDeniedError();
@@ -527,17 +539,10 @@ class ProjectGroup extends Error {
return false;
}
- $res = db_query_params ('DELETE FROM role_setting WHERE section_name=$1 AND ref_id=$2',
- array ('pm',
- $this->getID())) ;
+ db_commit();
- if (!$res)
- {
- $this->setError('DATABASE '.db_error());
- return false;
- }
+ $this->Group->normalizeAllRoles () ;
- db_commit();
return true;
}
diff --git a/gforge/common/reporting/report_utils.php b/gforge/common/reporting/report_utils.php
index 60482596b4..4cd0236f39 100644
--- a/gforge/common/reporting/report_utils.php
+++ b/gforge/common/reporting/report_utils.php
@@ -24,12 +24,12 @@
*/
function report_header($title) {
- global $HTML,$sys_name;
+ global $HTML ;
echo $HTML->header(array('title'=>" "._('Reporting').": " . $title));
if (isset($GLOBALS['feedback'])) {
echo html_feedback_top($GLOBALS['feedback']);
}
- echo "".sprintf(_('%1$s Reporting'), $sys_name)."
\n";
+ echo "".sprintf(_('%1$s Reporting'), forge_get_config ('forge_name'))."
\n";
}
function report_footer() {
diff --git a/gforge/common/survey/Survey.class.php b/gforge/common/survey/Survey.class.php
index beb230f55a..1fb9083ec3 100644
--- a/gforge/common/survey/Survey.class.php
+++ b/gforge/common/survey/Survey.class.php
@@ -100,11 +100,11 @@ class Survey extends Error {
*/
function create($survey_title, $add_questions, $is_active=0, $is_public=1, $is_result_public=0, $double_vote=0) {
if (!$survey_title) {
- $this->setError(_('UPDATE FAILED: Survey Title Required'));
+ $this->setError(_('Update Failed: Survey Title Required'));
return false;
/* We need at least one survey question at this point */
} else if (!$add_questions || !is_array($add_questions) || count($add_questions)<1) {
- $this->setError(_('UPDATE FAILED: Survey Questions Required'));
+ $this->setError(_('Update Failed: Survey Questions Required'));
return false;
}
@@ -144,7 +144,7 @@ class Survey extends Error {
*/
function update($survey_title, &$add_questions, &$del_questions, $is_active=0, $is_public=1, $is_result_public=0, $double_vote=0) {
if (!$survey_title) {
- $this->setError(_('UPDATE FAILED: Survey Title Required'));
+ $this->setError(_('Update Failed: Survey Title Required'));
return false;
/* We need at least one survey question at this point */
}
diff --git a/gforge/common/system_event/SystemEvent.class.php b/gforge/common/system_event/SystemEvent.class.php
new file mode 100644
index 0000000000..90fbb7f465
--- /dev/null
+++ b/gforge/common/system_event/SystemEvent.class.php
@@ -0,0 +1,37 @@
+.
+ *
+ *
+ */
+
+
+
+/**
+ * System Event class
+ *
+ */
+abstract class SystemEvent {
+
+ const PRIORITY_MEDIUM = 2;
+ const STATUS_NEW= 1;
+ const STATUS_DONE= 3;
+}
+
+?>
+
diff --git a/gforge/common/system_event/SystemEventManager.class.php b/gforge/common/system_event/SystemEventManager.class.php
new file mode 100644
index 0000000000..b75c72bbcc
--- /dev/null
+++ b/gforge/common/system_event/SystemEventManager.class.php
@@ -0,0 +1,89 @@
+.
+ *
+ *
+ */
+
+/**
+* Manager of system events
+*
+* Base class to manage system events
+*/
+class SystemEventManager {
+
+
+
+ // Constructor
+ function SystemEventManager() {
+
+ }
+
+ protected static $_instance;
+ /**
+ * SystemEventManager is singleton
+ */
+ public static function instance() {
+ if (!isset(self::$_instance)) {
+ $c = __CLASS__;
+ self::$_instance = new $c;
+ }
+ return self::$_instance;
+ }
+
+ /**
+ * Create a new event, store it in the db and send notifications
+ */
+ public function createEvent($type, $parameters, $priority) {
+ return db_query_params('INSERT INTO system_event (type, parameters,create_date,log) VALUES ($1,$2,$3,$4)',
+ array($type,
+ $parameters,
+ $_SERVER['REQUEST_TIME'],
+ 'NEW')
+ );
+ }
+
+ /**
+ * Table to display the status of the last n events
+ *
+ * @param int $offset the offset of the pagination
+ * @param int $limit the number of event to includ in the table
+ * @param boolean $full display a full table or only a summary
+ * @param array $filter_status the filter on status
+ * @param array $filter_type the filter on type
+ *
+ * @return array events
+ */
+ public function fetchEvents($offset = 0, $limit = 10, $full = false, $filter_status = false, $filter_type = false, $filter_params = false) {
+ $results = db_query_params('SELECT * FROM system_event WHERE type=$1 AND status=$2 AND parameters=$3;',array($filter_type, $filter_status,$filter_params));
+ while($row = db_fetch_array($results))
+ {
+ $events[]=$row;
+ }
+ if (isset($events)) {
+ return $events;
+ }
+ else {
+ return null;
+ }
+
+ }
+}
+
+?>
+
diff --git a/gforge/common/tracker/Artifact.class.php b/gforge/common/tracker/Artifact.class.php
index 640359f31f..e1818015c1 100644
--- a/gforge/common/tracker/Artifact.class.php
+++ b/gforge/common/tracker/Artifact.class.php
@@ -852,7 +852,7 @@ class Artifact extends Error {
$res = $this->ArtifactType->getTechnicians();
$arr =& util_result_column_to_array($res,0);
if (!in_array($assigned_to, $arr)) {
- $this->setError("Invalid assigned_to (not member of the project)");
+ $this->setError("Invalid assigned_to (assigned person is not a technician)");
return false;
}
}
@@ -1006,12 +1006,12 @@ class Artifact extends Error {
$changes['assigned_to'] = 1;
$update = true;
}
- if ($summary && ($this->getSummary() != htmlspecialchars(stripslashes($summary)))) {
+ if ($summary && ($this->getSummary() != htmlspecialchars($summary))) {
$this->addHistory('summary', $this->getSummary());
$changes['summary'] = 1;
$update = true;
}
- if ($description && ($this->getDetails() != htmlspecialchars(stripslashes($description)))) {
+ if ($description && ($this->getDetails() != htmlspecialchars($description))) {
$this->addHistory('details', $this->getDetails());
$changes['details'] = 1;
$update = true;
@@ -1583,6 +1583,8 @@ class Artifact extends Error {
util_send_message('',$subject,$body,$from,$BCC,'',$extra_headers);
}
+ $this->sendSubjectMsg = $subject;
+ $this->sendBodyMsg = $body;
//util_handle_message($monitor_ids,$subject,$body,$BCC);
diff --git a/gforge/common/tracker/ArtifactExtraField.class.php b/gforge/common/tracker/ArtifactExtraField.class.php
index be8498a9f9..c552c15c6a 100644
--- a/gforge/common/tracker/ArtifactExtraField.class.php
+++ b/gforge/common/tracker/ArtifactExtraField.class.php
@@ -491,8 +491,8 @@ class ArtifactExtraField extends Error {
if (strlen($alias) == 0) return true; // empty alias
// invalid chars?
- if (preg_match("/[^[:alnum:]_\\-]/", $alias)) {
- $this->setError(_('The alias contains invalid characters. Only letters, numbers, hypens (-) and underscores (_) allowed.'));
+ if (preg_match("/[^[:alnum:]_@\\-]/", $alias)) {
+ $this->setError(_('The alias contains invalid characters. Only letters, numbers, hypens (-), arobase (@) and underscores (_) allowed.'));
return false;
} else if (in_array($alias, $reserved_alias)) { // alias is reserved?
$this->setError(sprintf(_('\'%1$s\' is a reserved alias. Please provide another name.'), $alias));
@@ -517,7 +517,7 @@ class ArtifactExtraField extends Error {
// called "Quality test", make an alias called "quality_test").
// The alias can be seen as a "unix name" for this field
$alias = preg_replace("/ /", "_", $name);
- $alias = preg_replace("/[^[:alnum:]_]/", "", $alias);
+ $alias = preg_replace("/[^[:alnum:]_@]/", "", $alias);
$alias = strtolower($alias);
} elseif (!$this->validateAlias($alias)) {
// alias is invalid...
diff --git a/gforge/common/tracker/ArtifactQuery.class.php b/gforge/common/tracker/ArtifactQuery.class.php
index 0f8810d766..93588523d4 100644
--- a/gforge/common/tracker/ArtifactQuery.class.php
+++ b/gforge/common/tracker/ArtifactQuery.class.php
@@ -121,7 +121,8 @@ class ArtifactQuery extends Error {
* @param string Name of the saved query.
* @return true on success / false on failure.
*/
- function create($name,$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange=0,$closedaterange=0,$summary,$description,$followups,$query_type=0) {
+ function create($name,$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange=0,$closedaterange=0,
+ $summary,$description,$followups,$query_type=0,$query_options=array()) {
//
// data validation
//
@@ -416,7 +417,7 @@ class ArtifactQuery extends Error {
$type = $aef->getType();
if ($type == ARTIFACT_EXTRAFIELDTYPE_INTEGER) {
if (!preg_match('/^[><= \-\+0-9%]+$/', $vals[$i])) {
- $this->setError('Invalid Value for Integer type: '. stripslashes($vals[$i]));
+ $this->setError('Invalid Value for Integer type: '. $vals[$i]);
return false;
}
}
@@ -621,7 +622,8 @@ class ArtifactQuery extends Error {
* @param string The name of the saved query
* @return boolean success.
*/
- function update($name,$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange='',$closedaterange='',$summary,$description,$followups,$query_type=0) {
+ function update($name,$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange='',$closedaterange='',
+ $summary,$description,$followups,$query_type=0,$query_options=array()) {
if (!$name) {
$this->setMissingParamsError();
return false;
@@ -651,13 +653,13 @@ class ArtifactQuery extends Error {
db_begin();
$result = db_query_params ('UPDATE artifact_query
SET query_name=$1,
- query_type=$2
- WHERE artifact_query_id=$3
- AND user_id=$4',
+ query_type=$2,
+ query_options=$3
+ WHERE artifact_query_id=$4',
array (htmlspecialchars($name),
$query_type,
- $this->getID(),
- user_getid())) ;
+ join('|', $query_options),
+ $this->getID())) ;
if ($result && db_affected_rows($result) > 0) {
if (!$this->insertElements($this->getID(),$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange,$closedaterange,$summary,$description,$followups)) {
db_rollback();
diff --git a/gforge/common/tracker/ArtifactType.class.php b/gforge/common/tracker/ArtifactType.class.php
index 70bf8044a9..a12bd51389 100644
--- a/gforge/common/tracker/ArtifactType.class.php
+++ b/gforge/common/tracker/ArtifactType.class.php
@@ -270,6 +270,7 @@ class ArtifactType extends Error {
return false;
} else {
db_commit();
+ $this->Group->normalizeAllRoles () ;
return $id;
}
}
@@ -421,14 +422,14 @@ class ArtifactType extends Error {
* @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;
}
@@ -880,6 +881,9 @@ class ArtifactType extends Error {
//echo '11'.db_error();
db_commit();
+
+ $this->Group->normalizeAllRoles () ;
+
return true;
}
diff --git a/gforge/cronjobs/calculate_user_metric.php b/gforge/cronjobs/calculate_user_metric.php
index d2ca3a3a89..9a68b94f92 100755
--- a/gforge/cronjobs/calculate_user_metric.php
+++ b/gforge/cronjobs/calculate_user_metric.php
@@ -95,39 +95,16 @@ $err .= db_error();
db_query_params ('UPDATE user_metric0 SET ranking=ranking-1',
array()) ;
-
-if ($sys_database_type == 'mysql') {
- $sql="
- SELECT count(*) FROM user_metric0 INTO @total;
- UPDATE user_metric0 SET
- metric=(log(times_ranked)*avg_rating),
- percentile=(100-(100*(ranking-1.0)/@total));";
-
- db_mquery($sql);
- $err .= db_error();
- db_next_result();
- $err .= db_error();
-} else {
- $sql=";";
-
- db_query_params ('UPDATE user_metric0 SET metric=(log(times_ranked::float)*avg_rating::float)::float, percentile=(100-(100*((ranking::float-1)/(select count(*) from user_metric0))))::float',
- array());
- $err .= db_error();
-}
-
-if ($sys_database_type == 'mysql') {
- $sql="UPDATE user_metric0 SET importance_factor=(1+((percentile/100.0)*.5));";
- db_query_mysql($sql);
-} else {
- db_query_params ('UPDATE user_metric0 SET importance_factor=(1+((percentile::float/100)*.5))::float',
- array()) ;
-}
-
+db_query_params ('UPDATE user_metric0 SET metric=(log(times_ranked::float)*avg_rating::float)::float, percentile=(100-(100*((ranking::float-1)/(select count(*) from user_metric0))))::float',
+ array());
+$err .= db_error();
+db_query_params ('UPDATE user_metric0 SET importance_factor=(1+((percentile::float/100)*.5))::float',
+ array()) ;
$err .= db_error();
db_query_params ('SELECT * INTO TEMPORARY TABLE user_metric_cur FROM user_metric0',
array()) ;
-
+$err .= db_error();
for ($i=1; $i<9; $i++) {
$j=($i-1);
diff --git a/gforge/cronjobs/create_home_dirs.php b/gforge/cronjobs/create_home_dirs.php
index eacaedc94f..51bf8d6e9c 100644
--- a/gforge/cronjobs/create_home_dirs.php
+++ b/gforge/cronjobs/create_home_dirs.php
@@ -129,7 +129,7 @@ foreach($groups as $group)
//
// Change some defaults in the template file
//
- $contents = str_replace ("
Please check back soon for updates or visit the project page."),
- "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
diff --git a/gforge/cronjobs/massmail.php b/gforge/cronjobs/massmail.php
index 869284fe51..ffef692391 100755
--- a/gforge/cronjobs/massmail.php
+++ b/gforge/cronjobs/massmail.php
@@ -85,7 +85,7 @@ if (!$mail_res) {
"$sys_admin_email",
"ATT: Problems with massmail cron script",
"This is automatically generated message from\n
-the mass mailing cron script of $sys_name\n
+the mass mailing cron script of ".forge_get_config ('forge_name')."\n
installation. There was error querying massmail_queue\n
database table. Please take appropriate actions.\n"
);
@@ -190,13 +190,13 @@ page (%2$s), or disable them altogether
by visiting following link:
<%3$s>
'),
- $GLOBALS['sys_name'],
+ forge_get_config ('forge_name'),
util_make_url('/account/'),
util_make_url('/account/unsubscribe.php?ch=_'.$row['confirm_hash'])) ;
} 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);
diff --git a/gforge/cronjobs/tracker_gateway.php b/gforge/cronjobs/tracker_gateway.php
index b5d178ee42..bbdc383a2c 100755
--- a/gforge/cronjobs/tracker_gateway.php
+++ b/gforge/cronjobs/tracker_gateway.php
@@ -7,7 +7,7 @@
* Copyright 2009, Roland Mas
*
* @author Tim Perdue tim@gforge.org
- * @author Sung Kim
+ * @author Sung Kim
* @author Francisco Gimeno
'.util_make_link ('/forum/forum.php?forum_id=' . $forum_id, _("Return to the forum")) ; + echo '
'.util_make_link ('/forum/forum.php?forum_id=' . $forum_id, _("Return to the forum")) . '
'; forum_footer(array()); } elseif (getStringFromRequest("cancel")) { // the user cancelled the request, go back to forum diff --git a/gforge/www/forum/forum.php b/gforge/www/forum/forum.php index c9e8aea6a9..038bbf739d 100644 --- a/gforge/www/forum/forum.php +++ b/gforge/www/forum/forum.php @@ -33,6 +33,7 @@ $thread_id = getIntFromRequest('thread_id'); $offset = getIntFromRequest('offset'); $max_rows = getIntFromRequest('max_rows'); $set = getStringFromRequest('set'); +$feedback = htmlspecialchars(getStringFromRequest('feedback')); if ($forum_id) { @@ -85,14 +86,14 @@ if ($forum_id) { $sanitizer = new TextSanitizer(); $body = $sanitizer->SanitizeHtml($body); - + $attach = getUploadedFile("attachment1"); if ($attach['size']) { $has_attach = true; } else { $has_attach = false; } - + if (!$fm->create($subject, $body, $thread_id, $is_followup_to,$has_attach) || $fm->isError()) { form_release_key(getStringFromRequest("form_key")); exit_error(_('Error'),_('Error creating ForumMessage: ').$fm->getErrorMessage()); @@ -312,42 +313,44 @@ ORDER BY f.most_recent_date DESC', echo db_error(); - $title_arr=array(); - $title_arr[]=_('Topic'); - $title_arr[]=_('Topic Starter'); - $title_arr[]=_('Replies'); - $title_arr[]=_('Last Post'); - - $ret_val .= $GLOBALS['HTML']->listTableTop ($title_arr); - $i=0; - while (($row=db_fetch_array($result)) && ($i < $max_rows)) { - $ret_val .= ' -';
if (!$result || db_numrows($result) < 1) {
- echo ''._('Error - this news item was not found').''; + echo ''._('Error - this news item was not found').' ';
} else {
$user = user_get_object(db_result($result,0,'submitted_by'));
$group =& group_get_object($params['group']);
diff --git a/gforge/www/forum/index.php b/gforge/www/forum/index.php
index 5f3fd1251a..50aba31dca 100644
--- a/gforge/www/forum/index.php
+++ b/gforge/www/forum/index.php
@@ -43,9 +43,10 @@ if ($group_id) {
}
forum_header(array('title'=>sprintf(_('Forums for %1$s'), $g->getPublicName()) ));
+ echo ''.sprintf(_('Forums for %1$s'), $g->getPublicName()) .''; if ($ff->isError() || count($farr) < 1) { - echo ''.sprintf(_('No Forums Found For %1$s'), $g->getPublicName()) .''; + echo ''.sprintf(_('No Forums Found for %1$s'), $g->getPublicName()) .' ';
if($ff->isError()) {
echo $ff->getErrorMessage();
}
diff --git a/gforge/www/frs/admin/deletepackage.php b/gforge/www/frs/admin/deletepackage.php
index a48f22811a..04de17ec17 100644
--- a/gforge/www/frs/admin/deletepackage.php
+++ b/gforge/www/frs/admin/deletepackage.php
@@ -52,14 +52,11 @@ if (!$frsp || !is_object($frsp)) {
}
/*
-
Relatively simple form to delete packages of releases
-
*/
-frs_admin_header(array('title'=>_('Release Edit/File Releases'),'group'=>$group_id));
+frs_admin_header(array('title'=>sprintf(_('Delete Package: %1$s'), $frsp->getName()),'group'=>$group_id));
- echo ''.$frsp->getName().' '; echo ' |
Now, choose a file to upload into the system. The maximum file size is determined by the site administrator, but defaults to 2MB. If you need to upload large files, contact your site administrator.
') ?> + + +