This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via fe21219d27284233a3a5fba68cb7210c94382764 (commit)
from eeed9d54e0d580827b5580ac4c5718015f9e9f8a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=fe21219d27284233a3a5fba68cb7210c94382764
commit fe21219d27284233a3a5fba68cb7210c94382764
Author: Marc-Etienne Vargenau <[email protected]>
Date: Thu Aug 3 13:34:37 2017 +0200
PHP Doc
diff --git a/src/common/docman/DocumentGroup.class.php
b/src/common/docman/DocumentGroup.class.php
index 3567cc8..e7d7d32 100644
--- a/src/common/docman/DocumentGroup.class.php
+++ b/src/common/docman/DocumentGroup.class.php
@@ -143,6 +143,7 @@ class DocumentGroup extends FFError {
* 2 = deleted
* 5 = private
* @param int $createtimestamp Timestamp of the
directory creation
+ * @param bool $forcecreate
* @return bool true on success / false on failure.
* @access public
*/
diff --git a/src/common/docman/DocumentGroupFactory.class.php
b/src/common/docman/DocumentGroupFactory.class.php
index c3a7086..e23c9b1 100644
--- a/src/common/docman/DocumentGroupFactory.class.php
+++ b/src/common/docman/DocumentGroupFactory.class.php
@@ -99,7 +99,7 @@ class DocumentGroupFactory extends FFError {
/**
* getDocumentGroups - Return an array of DocumentGroup objects.
*
- * @param int $stateid The array of stateid of
DocumentGroups : default is public (1).
+ * @param array $stateid The array of stateid of
DocumentGroups : default is public (1).
* @return array The array of DocumentGroup.
*/
function &getDocumentGroups($stateid = array(1)) {
diff --git a/src/common/docman/DocumentManager.class.php
b/src/common/docman/DocumentManager.class.php
index c65d264..e9dfe7b 100644
--- a/src/common/docman/DocumentManager.class.php
+++ b/src/common/docman/DocumentManager.class.php
@@ -251,6 +251,7 @@ class DocumentManager extends FFError {
* getTree - retrieve the tree structure into an organized array
*
* @param int $docGroupId the doc_group to start: default 0
+ * @return array
*/
function getTree($docGroupId = 0) {
$dg = new DocumentGroup($this->Group);
@@ -274,6 +275,7 @@ class DocumentManager extends FFError {
/**
* getSettings - return the configuration flags of the docman
*
+ * @return array
*/
function getSettings() {
$settingsArr = array();
diff --git a/src/common/docman/DocumentReview.class.php
b/src/common/docman/DocumentReview.class.php
index 74674e9..c6bb32b 100644
--- a/src/common/docman/DocumentReview.class.php
+++ b/src/common/docman/DocumentReview.class.php
@@ -481,8 +481,9 @@ class DocumentReview extends FFError {
/**
* sendNotice - Notifies users of review.
*
- * @param array array of users where IDs to be notify is arr[1].
- * @param boolean true = new review, false = reminder
+ * @param array $users array of users where IDs to be notify is
arr[1].
+ * @param bool $new true = new review, false = reminder
+ * @param bool $reviewnotificationcomment
* @return bool
*/
function sendNotice($users, $new = false, $reviewnotificationcomment =
false) {
diff --git a/src/common/docman/DocumentVersion.class.php
b/src/common/docman/DocumentVersion.class.php
index b6a23d6..6c1df25 100644
--- a/src/common/docman/DocumentVersion.class.php
+++ b/src/common/docman/DocumentVersion.class.php
@@ -129,7 +129,6 @@ class DocumentVersion extends FFError {
/**
* getFileData - the filedata of this document.
*
- * @param boolean $download update the download flag or
not. default is true
* @return string The filedata.
*/
function getFileData() {
@@ -172,7 +171,8 @@ class DocumentVersion extends FFError {
* @param int $createtimetamp timestamp of creation
of this version
* @param int $version The version id to
create. Default is 1 (the first version)
* @param int $current_version Is it the current
version? Defaut is 1 (yes)
- * return bool true on success
+ * @param string $vcomment
+ * @return bool true on success
*/
function create($docid, $title, $description, $created_by, $filetype,
$filename, $filesize, $kwords, $createtimetamp, $version = 1, $current_version
= 1, $vcomment = '') {
db_begin();
@@ -296,6 +296,7 @@ class DocumentVersion extends FFError {
* @param int $filesize The new filesize
* @param int $updatetimestamp timestamp of this update
* @param int $current_version Is the current version
to set? Default is yes.
+ * @param string $vcomment
* @return bool true on success
*/
function update($version, $title, $description, $filetype, $filename,
$filesize, $updatetimestamp, $current_version = 1, $vcomment = '') {
diff --git a/src/common/docman/include/utils.php
b/src/common/docman/include/utils.php
index 0ff98a2..effe5ef 100644
--- a/src/common/docman/include/utils.php
+++ b/src/common/docman/include/utils.php
@@ -35,6 +35,7 @@
*
* @param string $checkedval
* @param array $removedval
+ * @return string
*/
function doc_get_state_box($checkedval = 'xzxz', $removedval = array()) {
diff --git a/src/common/frs/FRSFile.class.php b/src/common/frs/FRSFile.class.php
index b32217b..fce59de 100644
--- a/src/common/frs/FRSFile.class.php
+++ b/src/common/frs/FRSFile.class.php
@@ -108,8 +108,6 @@ class FRSFile extends FFError {
* @param int $type_id The type_id of this
file from the frs-file-types table.
* @param int $processor_id The processor_id of
this file from the frs-processor-types table.
* @param int|bool $release_time The release_date of
this file in unix time (seconds).
- * @param string $mime_type The mime type of the
file (default: application/octet-stream)
- * @param bool $is_remote True if file is an URL
and not an uploaded file (default: false)
* @return bool success.
*/
function
create($name,$file_location,$type_id,$processor_id,$release_time=false) {
diff --git a/src/common/frs/FRSPackage.class.php
b/src/common/frs/FRSPackage.class.php
index e09aa02..e7a7bc1 100644
--- a/src/common/frs/FRSPackage.class.php
+++ b/src/common/frs/FRSPackage.class.php
@@ -466,6 +466,7 @@ class FRSPackage extends FFError {
/**
* getReleases - gets Release objects for all the releases in this
package.
*
+ * @param bool $include_hidden
* @return array Array of FRSRelease Objects.
*/
function &getReleases($include_hidden = true) {
diff --git a/src/common/frs/FRSRelease.class.php
b/src/common/frs/FRSRelease.class.php
index 0d8bac3..1a08729 100644
--- a/src/common/frs/FRSRelease.class.php
+++ b/src/common/frs/FRSRelease.class.php
@@ -132,10 +132,11 @@ class FRSRelease extends FFObject {
* @param string $notes The release notes for the
release.
* @param string $changes The change log for the release.
* @param int $preformatted Whether the notes/log are
preformatted with \n chars (1) true (0) false.
- * @param int $release_date The unix date of the release.
+ * @param int|bool $release_date The unix date of the
release.
+ * @param int $status_id
* @param array $importData Array of data to change
creator, time of creation, bypass permission check and do not send notification
like:
* array('user' => 127, 'time' =>
1234556789, 'nopermcheck' => 1, 'nonotice' => 1)
- * @return boolean success.
+ * @return bool success.
*/
function create($name, $notes, $changes, $preformatted, $release_date =
false, $status_id = 1, $importData = array()) {
if (strlen($name) < 3) {
diff --git a/src/common/include/FFError.class.php
b/src/common/include/FFError.class.php
index 4132521..cb5c1c8 100644
--- a/src/common/include/FFError.class.php
+++ b/src/common/include/FFError.class.php
@@ -126,7 +126,7 @@ class FFError {
/**
* isPermissionDeniedError() - Determines if it is a permission denied
error
*
- * @return boolean
+ * @return bool
*/
function isPermissionDeniedError(){
return ($this->error_code == ERROR__PERMISSION_DENIED_ERROR);
@@ -134,7 +134,8 @@ class FFError {
/**
* setInvalidEmailError() - sets a Invalid Email error
- * retrieves the localized error string for Invalid Email and calls
exit_error()
+ * retrieves the localized error string for Invalid Email and calls
exit_error()
+ * @param bool $adr
*/
function setInvalidEmailError($adr=false){
$e = _('Invalid Email Address');
@@ -149,7 +150,7 @@ class FFError {
/**
* isInvalidEmailError() - Determines if it is an invalid email error
*
- * @return boolean
+ * @return bool
*/
function isInvalidEmailError(){
return ($this->error_code == ERROR__INVALID_EMAIL_ERROR);
@@ -169,7 +170,7 @@ class FFError {
/**
* isOnUpdateError() - Determines if it is an on update error
*
- * @return boolean
+ * @return bool
*/
function isOnUpdateError(){
return ($this->error_code == ERROR__ON_UPDATE_ERROR);
@@ -187,7 +188,7 @@ class FFError {
/**
* isGroupIdError() - Determines if it is a group ID error
*
- * @return boolean
+ * @return bool
*/
function isGroupIdError(){
return ($this->error_code == ERROR__GROUPID_ERROR);
@@ -210,7 +211,7 @@ class FFError {
/**
* isMissingParamsError() - Determines if it is a missing params error
*
- * @return boolean
+ * @return bool
*/
function isMissingParamsError(){
return ($this->error_code == ERROR__MISSING_PARAMS_ERROR);
diff --git a/src/common/include/FusionForge.class.php
b/src/common/include/FusionForge.class.php
index bcad0cd..bbcdea3 100644
--- a/src/common/include/FusionForge.class.php
+++ b/src/common/include/FusionForge.class.php
@@ -60,6 +60,7 @@ class FusionForge extends FFError {
*
* @param array $params array of columns and values to
filter query: $params['status'] = 'A' ...
* @param string $extended_qpa string of SQL to be part of the
QPA query
+ * @return bool|int
*/
function getNumberOfProjects($params = array(), $extended_qpa = null) {
$qpa = db_construct_qpa(false, 'SELECT count(*) AS count FROM
groups');
diff --git a/src/common/include/MailParser.class.php
b/src/common/include/MailParser.class.php
index 9d3026d..7ec2030 100644
--- a/src/common/include/MailParser.class.php
+++ b/src/common/include/MailParser.class.php
@@ -192,6 +192,8 @@ class MailParser extends FFError {
/**
* one word decode implementation of RFC 2047
+ * @param string $string
+ * @return array
*/
function mime_header_one_word_decode($string) {
/* Default charset */
diff --git a/src/common/include/Navigation.class.php
b/src/common/include/Navigation.class.php
index f24b79b..a82862f 100644
--- a/src/common/include/Navigation.class.php
+++ b/src/common/include/Navigation.class.php
@@ -75,6 +75,9 @@ class Navigation extends FFError {
* the URL of the favicon.
*
* @todo: Make favicon configurable
+ *
+ * @param bool $asHTML
+ * @return string
*/
function getFavIcon($asHTML = true) {
if (!$asHTML) {
@@ -91,6 +94,8 @@ class Navigation extends FFError {
* array with the following structure: $result['titles']:
* list of titles of the feeds; $result['urls'] list of urls
* of the feeds.
+ * @param bool $asHTML
+ * @return array
*/
function getRSS($asHTML = true) {
if (!$asHTML) {
@@ -345,14 +350,17 @@ class Navigation extends FFError {
/**
* Get a reference to an array of the projects menu for the project
with the id $group_id with the following structure:
- * $result['starturl']: URL of the projects starting page;
- * $result['name']: public name of the project;
- * $result['titles']: list of titles of the menu entries;
- * $result['tooltips']: list of tooltips (html title) of the menu
entries;
- * $result['urls']: list of urls of the menu entries;
- * $result['adminurls']: list of urls to the admin pages of the
menu entries.
- * If the user has no admin permissions, the corresponding
adminurl is false.
- * $result['selected']: number of the menu entry that is currently
selected.
+ * $result['starturl']: URL of the projects starting page;
+ * $result['name']: public name of the project;
+ * $result['titles']: list of titles of the menu entries;
+ * $result['tooltips']: list of tooltips (html title) of the menu
entries;
+ * $result['urls']: list of urls of the menu entries;
+ * $result['adminurls']: list of urls to the admin pages of the menu
entries.
+ * If the user has no admin permissions, the corresponding adminurl
is false.
+ * $result['selected']: number of the menu entry that is currently
selected.
+ * @param $group_id
+ * @param string $toptab
+ * @return mixed
*/
function getProjectMenu($group_id, $toptab = "") {
// rebuild menu if it has never been built before, or
@@ -608,6 +616,8 @@ class Navigation extends FFError {
* the link on the banner; $result['image']: URL of the banner
* image; $result['title']: HTML code that outputs the banner;
* $result['html']: HTML code that creates the banner and the link.
+ * @param bool $asHTML
+ * @return string
*/
function getPoweredBy($asHTML=true) {
$res['url'] = 'http://fusionforge.org/';
@@ -627,6 +637,8 @@ class Navigation extends FFError {
* set, otherwise an array with the following structure:
* $result['url']: URL of the link to the source code viewer;
* $result['title']: Title of the link.
+ * @param bool $asHTML
+ * @return null|string
*/
function getShowSource($asHTML=true) {
if (forge_get_config('show_source')) {
diff --git a/src/common/include/PluginManager.class.php
b/src/common/include/PluginManager.class.php
index 3cd7b65..4aa4616 100644
--- a/src/common/include/PluginManager.class.php
+++ b/src/common/include/PluginManager.class.php
@@ -150,6 +150,8 @@ class PluginManager extends FFError {
/**
* LoadPlugin() - load a specific plugin
*
+ * @param string $p_name plugin name
+ * @return bool
*/
function LoadPlugin($p_name) {
global $gfplugins, $gfcommon, $gfwww;
diff --git a/src/common/include/account.php b/src/common/include/account.php
index 79e7593..777940f 100644
--- a/src/common/include/account.php
+++ b/src/common/include/account.php
@@ -76,6 +76,7 @@ function account_pwvalid($pw) {
*
* @param string $name The username string
* @param bool $unix Check for an unix username
+ * @param bool $check_exists
* @return bool true on success/false on failure
*
*/
diff --git a/src/common/include/database-pgsql.php
b/src/common/include/database-pgsql.php
index 24e1f16..9c0a452 100644
--- a/src/common/include/database-pgsql.php
+++ b/src/common/include/database-pgsql.php
@@ -301,9 +301,10 @@ function db_query_params($qstring, $params = array(),
$limit = -1, $offset = 0,
/**
* db_prepare - Prepare an SQL query
*
- * @param string $qstring SQL statement.
- * @param string $qname name of the prepared query
- * @return int $dbserver result set handle.
+ * @param string $qstring SQL statement.
+ * @param string $qname name of the prepared query
+ * @param resource $dbserver
+ * @return int result set handle.
*/
function db_prepare($qstring, $qname, $dbserver = NULL) {
global $sysdebug_dbquery, $sysdebug_dberrors;
@@ -335,7 +336,7 @@ function db_prepare($qstring, $qname, $dbserver = NULL) {
/**
* db_execute - Execute a prepared statement, with parameters
*
- * @param string $name the prepared query
+ * @param string $qname the prepared query
* @param array $params the parameters
* @param int $dbserver ability to spread load to multiple db
servers.
* @return int result set handle.
@@ -609,7 +610,7 @@ function db_affected_rows($qhandle) {
* the current row of this database result
*
* @param resource $qhandle Query result set handle.
- * @param const $result_type Result type PGSQL_ASSOC,
PGSQL_NUM et PGSQL_BOTH
+ * @param int $result_type Result type:
PGSQL_ASSOC, PGSQL_NUM or PGSQL_BOTH
* @return array array of fieldname/value key pairs.
*/
function db_fetch_array($qhandle, $result_type = PGSQL_BOTH) {
diff --git a/src/common/include/license.php b/src/common/include/license.php
index bc767b6..8398fab 100644
--- a/src/common/include/license.php
+++ b/src/common/include/license.php
@@ -21,6 +21,12 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/**
+ * license_getname - get the license name
+ * @param int $id
+ * @return string
+ */
+
function license_getname($id) {
global $license_arr;
if (!isset($license_arr[$id])) {
@@ -31,10 +37,16 @@ function license_getname($id) {
return $license_arr[$id];
}
+/**
+ * license_add - get the license name
+ * @param string $name
+ * @return bool
+ */
+
function license_add($name) {
global $feedback;
- $res = db_query_params ('INSERT INTO licenses (license_name) VALUES
($1)',
- array (htmlspecialchars ($name))) ;
+ $res = db_query_params('INSERT INTO licenses (license_name) VALUES
($1)',
+ array (htmlspecialchars ($name)));
if (!$res) {
$feedback .= ' Error adding License: '.db_error();
return false;
@@ -43,11 +55,18 @@ function license_add($name) {
}
}
-function license_update($id,$name) {
+/**
+ * license_update - update license
+ * @param int $id
+ * @param string $name
+ * @return bool
+ */
+
+function license_update($id, $name) {
global $feedback;
- $res = db_query_params ('UPDATE licenses SET license_name=$1 WHERE
license_id=$2',
+ $res = db_query_params('UPDATE licenses SET license_name=$1 WHERE
license_id=$2',
array (htmlspecialchars($name),
- $id)) ;
+ $id));
if (!$res) {
$feedback .= ' Error updating License: '.db_error();
return false;
@@ -56,16 +75,22 @@ function license_update($id,$name) {
}
}
+/**
+ * license_delete - delete license
+ * @param int $id
+ * @return bool
+ */
+
function license_delete($id) {
global $feedback;
- $res = db_query_params ('UPDATE groups SET license_id=100 WHERE
license_id=$1',
- array ($id)) ;
+ $res = db_query_params('UPDATE groups SET license_id=100 WHERE
license_id=$1',
+ array ($id));
if (!$res) {
$feedback .= ' Error deleting License: '.db_error();
return false;
} else {
$res = db_query_params ('DELETE FROM licenses WHERE
license_id=$1',
- array ($id)) ;
+ array ($id));
if (!$res) {
$feedback .= ' Error deleting License: '.db_error();
return false;
@@ -75,9 +100,16 @@ function license_delete($id) {
}
}
-function license_selectbox($title='license_id',$selected='xzxz') {
- $res = db_query_params ('SELECT license_id, license_name FROM licenses
ORDER BY license_name',
- array()) ;
+/**
+ * license_selectbox - build license select box
+ * @param string $title
+ * @param string $selected
+ * @return string
+ */
+
+function license_selectbox($title='license_id', $selected='xzxz') {
+ $res = db_query_params('SELECT license_id, license_name FROM licenses
ORDER BY license_name',
+ array());
return html_build_select_box($res,$title,$selected,false);
}
diff --git a/src/common/pm/ProjectGroup.class.php
b/src/common/pm/ProjectGroup.class.php
index 5c9e1bd..0d75620 100644
--- a/src/common/pm/ProjectGroup.class.php
+++ b/src/common/pm/ProjectGroup.class.php
@@ -30,7 +30,7 @@ require_once $gfcommon.'include/FFError.class.php';
*
* @param array $group_project_id whether or not the db result
handle is passed in
* @param bool $data
- * @return ProjectGroup the ProjectGroup object
+ * @return ProjectGroup|bool the ProjectGroup object
*/
function &projectgroup_get_object($group_project_id, $data = false) {
global $PROJECTGROUP_OBJ;
diff --git a/src/common/pm/ProjectTaskFactory.class.php
b/src/common/pm/ProjectTaskFactory.class.php
index 7299351..d7da274 100644
--- a/src/common/pm/ProjectTaskFactory.class.php
+++ b/src/common/pm/ProjectTaskFactory.class.php
@@ -165,7 +165,7 @@ class ProjectTaskFactory extends FFError {
/**
* getTasks - get an array of ProjectTask objects.
*
- * @return array ProjectTask[] The array of ProjectTask
objects.
+ * @return array|bool ProjectTask[] The array of
ProjectTask objects.
*/
function &getTasks() {
if ($this->project_tasks) {
diff --git a/src/common/survey/Survey.class.php
b/src/common/survey/Survey.class.php
index e5f0310..cc7696a 100644
--- a/src/common/survey/Survey.class.php
+++ b/src/common/survey/Survey.class.php
@@ -125,8 +125,9 @@ class Survey extends FFError {
* @param string $survey_title The survey title
* @param array $add_questions The question numbers to
be added
* @param int $is_active 1: Active, 0: Inactive
+ * @param int $is_public
* @param int $is_result_public
- * @param Allow|int $double_vote
+ * @param int $double_vote
* @return bool success.
*/
function create($survey_title, $add_questions, $is_active = 0,
$is_public = 1, $is_result_public = 0, $double_vote = 0) {
@@ -167,8 +168,9 @@ class Survey extends FFError {
* @param array $add_questions The question numbers to
be added
* @param array $del_questions The question numbers to
be deleted
* @param int $is_active 1: Active, 0: Inactive
+ * @param int $is_public
* @param int $is_result_public
- * @param Allow|int $double_vote
+ * @param int $double_vote
* @return bool success.
*/
function update($survey_title, &$add_questions, &$del_questions,
$is_active = 0, $is_public = 1, $is_result_public = 0, $double_vote = 0) {
diff --git a/src/common/tracker/ArtifactExtraField.class.php
b/src/common/tracker/ArtifactExtraField.class.php
index 6b6ad88..127a07d 100644
--- a/src/common/tracker/ArtifactExtraField.class.php
+++ b/src/common/tracker/ArtifactExtraField.class.php
@@ -121,14 +121,16 @@ class ArtifactExtraField extends FFError {
* @param int $attribute2 For text (maxlength)
and textarea (cols)
* @param int $is_required True or false whether
this is a required field or not.
* @param string $alias Alias for this extra
field (optional)
- * @param int $show100 True or false whether
the 100 value is displayed or not
+ * @param int|bool $show100 True or false
whether the 100 value is displayed or not
* @param string $show100label The label used for the
100 value if displayed
* @param string $description Description used for
help text.
* @param string $pattern A regular expression to
check the field.
* @param int $parent Parent extra field id.
* @param int $autoassign True or false whether
it triggers auto-assignment rules
* @param int $is_hidden_on_submit True or false to
display the extrafield in the new artifact submit page
- * @param int $disabled True or false to
enable/disable the extrafield
+ * @param int $is_disabled True or false to
enable/disable the extrafield
+ * @param int $aggregation_rule
+ * @param int $distribution_rule
* @return bool true on success / false on failure.
*/
function create($name, $field_type, $attribute1, $attribute2,
$is_required = 0, $alias = '', $show100 = true, $show100label = 'none',
$description = '', $pattern = '', $parent = 100, $autoassign = 0,
$is_hidden_on_submit = 0, $is_disabled = 0, $aggregation_rule = 0,
$distribution_rule = 0) {
@@ -901,11 +903,16 @@ class ArtifactExtraField extends FFError {
* @param int $attribute2 For text (maxlength) and
textarea (cols)
* @param int $is_required True or false whether this is a
required field or not.
* @param string $alias Alias for this field
- * @param int $show100 True or false whether the 100
value is displayed or not
+ * @param int|bool $show100 True or false whether
the 100 value is displayed or not
* @param string $show100label The label used for the 100
value if displayed
* @param string $description Description used for help text.
* @param string $pattern A regular expression to check
the field.
* @param int $parent Parent extra field id.
+ * @param int $autoassign
+ * @param int $is_hidden_on_submit
+ * @param int $is_disabled
+ * @param int $aggregation_rule
+ * @param int $distribution_rule
* @return bool success.
*/
function update($name, $attribute1, $attribute2, $is_required = 0,
$alias = "", $show100 = true, $show100label = 'none', $description = '',
$pattern = '', $parent = 100, $autoassign = 0, $is_hidden_on_submit = 0,
$is_disabled = 0, $aggregation_rule = 0, $distribution_rule = 0) {
@@ -994,27 +1001,30 @@ class ArtifactExtraField extends FFError {
}
/**
+ * delete - delete extra field
*
- *
+ * @param $sure
+ * @param $really_sure
+ * @return bool
*/
function delete($sure, $really_sure) {
if (!$sure || !$really_sure) {
$this->setMissingParamsError(_('Please tick all
checkboxes.'));
return false;
}
- if (!forge_check_perm ('tracker_admin',
$this->ArtifactType->Group->getID())) {
+ if (!forge_check_perm('tracker_admin',
$this->ArtifactType->Group->getID())) {
$this->setPermissionDeniedError();
return false;
}
db_begin();
- $result = db_query_params ('DELETE FROM
artifact_extra_field_data WHERE extra_field_id=$1',
- array ($this->getID())) ;
+ $result = db_query_params('DELETE FROM
artifact_extra_field_data WHERE extra_field_id=$1',
+ array($this->getID()));
if ($result) {
$result = db_query_params ('DELETE FROM
artifact_extra_field_elements WHERE extra_field_id=$1',
- array ($this->getID())) ;
+ array($this->getID())) ;
if ($result) {
$result = db_query_params ('DELETE FROM
artifact_extra_field_list WHERE extra_field_id=$1',
- array
($this->getID())) ;
+
array($this->getID())) ;
if ($result) {
if ($this->getType() ==
ARTIFACT_EXTRAFIELDTYPE_STATUS) {
if
(!$this->ArtifactType->setCustomStatusField(0)) {
@@ -1207,7 +1217,8 @@ class ArtifactExtraField extends FFError {
* getMandatoryExtraFields - List of possible user built extra fields
* set up for this artifact type.
*
- * @return array arrays of data;
+ * @param int $atid
+ * @return array arrays of data
*/
static function getMandatoryExtraFields($atid) {
$return = array();
@@ -1230,7 +1241,8 @@ class ArtifactExtraField extends FFError {
* getAllExtraFields - List of possible user built extra fields
* set up for this artifact type.
*
- * @return array arrays of data;
+ * @param int $atid
+ * @return array arrays of data
*/
static function getAllExtraFields($atid) {
$return = array();
@@ -1252,7 +1264,9 @@ class ArtifactExtraField extends FFError {
* checkExtraFieldElements - Check the elements for extra fields
* set up for this artifact type.
*
- * @return boolean;
+ * @param int $field_id
+ * @param string $element_name
+ * @return bool
*/
static function checkExtraFieldElements($field_id, $element_name) {
$return = false;
diff --git a/src/common/tracker/ArtifactExtraFieldElement.class.php
b/src/common/tracker/ArtifactExtraFieldElement.class.php
index 302476a..d29f08c 100644
--- a/src/common/tracker/ArtifactExtraFieldElement.class.php
+++ b/src/common/tracker/ArtifactExtraFieldElement.class.php
@@ -306,8 +306,8 @@ class ArtifactExtraFieldElement extends FFError {
/**
* setAsDefault - set this field element as default value or not.
*
- * @param is_default boolean true-> set as default,
false->unset as default
- * @return boolean
+ * @param bool $is_default true-> set as default,
false->unset as default
+ * @return bool
*/
function setAsDefault($is_default) {
if ($is_default) {
@@ -407,6 +407,7 @@ class ArtifactExtraFieldElement extends FFError {
/**
* getChildrenElements - return the array of the elements of children
fields who depend on current element
*
+ * @param int $childExtraFieldId
* @return array of parent elements
*/
function getChildrenElements($childExtraFieldId = null) {
@@ -444,7 +445,7 @@ class ArtifactExtraFieldElement extends FFError {
/**
* saveParentElements - save the list of the elements of the parent
field on which depends the current element
*
- * @param elements array of new parent elements
+ * @param array $elements array of new parent elements
* @return bool always true
*/
function saveParentElements($elements) {
@@ -501,8 +502,9 @@ class ArtifactExtraFieldElement extends FFError {
* boxes and fields configured by the admin
*
* @param string $name Name of the choice in a box.
- * @param int $status_id Optional for status box - maps
to either open/closed.
- * @param boolean $is_default Set this element as default
value
+ * @param int $status_id Optional for status box
- maps to either open/closed.
+ * @param int $auto_assign_to
+ * @param bool $is_default Set this element as default
value
* @return bool success.
*/
function update($name, $status_id=0, $auto_assign_to=100,
$is_default=false) {
diff --git a/src/common/tracker/ArtifactMessage.class.php
b/src/common/tracker/ArtifactMessage.class.php
index c3feb99..9f35ffe 100644
--- a/src/common/tracker/ArtifactMessage.class.php
+++ b/src/common/tracker/ArtifactMessage.class.php
@@ -72,6 +72,7 @@ class ArtifactMessage extends FFError {
*
* @param string $body Body.
* @param string|bool $by Email of submitter (obsolete?).
+ * @param array $importData
* @return int|bool id on success / false on failure.
*/
function create($body, $by = false, $importData = array()) {
diff --git a/src/common/tracker/ArtifactQuery.class.php
b/src/common/tracker/ArtifactQuery.class.php
index 535012e..c352c45 100644
--- a/src/common/tracker/ArtifactQuery.class.php
+++ b/src/common/tracker/ArtifactQuery.class.php
@@ -129,10 +129,11 @@ class ArtifactQuery extends FFError {
* @param int $closedaterange
* @param string $summary
* @param string $description
- * @param $followups
+ * @param string $followups
* @param int $query_type
* @param array $query_options
* @param string $submitter Name of the saved query.
+ * @param string $last_modifier
* @return bool true on success / false on failure.
*/
function
create($name,$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange=0,$closedaterange=0,
@@ -260,6 +261,7 @@ class ArtifactQuery extends FFError {
* @param $closedaterange
* @param string $summary
* @param string $description
+ * @param $last_modifier
* @param $followups
* @return boolean True/false on success or not.
*/
@@ -764,6 +766,7 @@ class ArtifactQuery extends FFError {
* @param int $query_type Id of the saved query
* @param array $query_options
* @param string $submitter
+ * @param string $last_modifier
* @return bool success.
*/
function
update($name,$status,$assignee,$moddaterange,$sort_col,$sort_ord,$extra_fields,$opendaterange='',$closedaterange='',
diff --git a/src/common/tracker/ArtifactType.class.php
b/src/common/tracker/ArtifactType.class.php
index 3edd4b7..2241aa2 100644
--- a/src/common/tracker/ArtifactType.class.php
+++ b/src/common/tracker/ArtifactType.class.php
@@ -565,6 +565,7 @@ class ArtifactType extends FFError {
/**
* setMonitor - user can monitor this artifact.
*
+ * @param int $user_id
* @return bool false - always false - always use the
getErrorMessage() for feedback
*/
function setMonitor($user_id = -1) {
diff --git a/src/common/tracker/ArtifactTypeFactory.class.php
b/src/common/tracker/ArtifactTypeFactory.class.php
index 4394f02..f40ecff 100644
--- a/src/common/tracker/ArtifactTypeFactory.class.php
+++ b/src/common/tracker/ArtifactTypeFactory.class.php
@@ -50,6 +50,7 @@ class ArtifactTypeFactory extends FFError {
/**
* @param Group $Group The Group object to which this
ArtifactTypeFactory is associated
+ * @param bool $skip_check
*/
function __construct(&$Group, $skip_check=false) {
parent::__construct();
@@ -84,18 +85,18 @@ class ArtifactTypeFactory extends FFError {
* @return array The array of ArtifactType object ids.
*/
function &getAllArtifactTypeIds() {
- $result = array () ;
+ $result = array();
$res = db_query_params ('SELECT group_artifact_id FROM
artifact_group_list_vw
WHERE group_id=$1
ORDER BY group_artifact_id ASC',
- array ($this->Group->getID())) ;
+ array ($this->Group->getID()));
if (!$res) {
- return $result ;
+ return $result;
}
while ($arr = db_fetch_array($res)) {
- $result[] = $arr['group_artifact_id'] ;
+ $result[] = $arr['group_artifact_id'];
}
- return $result ;
+ return $result;
}
/**
@@ -108,8 +109,8 @@ class ArtifactTypeFactory extends FFError {
return $this->ArtifactTypes;
}
- $this->ArtifactTypes = array () ;
- $ids = $this->getAllArtifactTypeIds() ;
+ $this->ArtifactTypes = array();
+ $ids = $this->getAllArtifactTypeIds();
foreach ($ids as $id) {
if (forge_check_perm ('tracker', $id, 'read')) {
diff --git a/src/common/tracker/EffortUnit.class.php
b/src/common/tracker/EffortUnit.class.php
index 6c6facb..168daab 100644
--- a/src/common/tracker/EffortUnit.class.php
+++ b/src/common/tracker/EffortUnit.class.php
@@ -39,8 +39,8 @@ class EffortUnit extends FFError {
* EffortUnit - EffortUnit object constructor
*
* @param EffortUnitSet $EffortUnitSet Required - Effort Unit
Set.
- * @param integer|boolean $id Required - Id of the Effort
Unit you want to instantiate.
- * @param integer|boolean $res Database result from select
query OR associative array of all columns.
+ * @param int|bool $id Required - Id of the Effort
Unit you want to instantiate.
+ * @param int|bool $res Database result from select
query OR associative array of all columns.
*/
function __construct(&$EffortUnitSet, $id = false, $res = false) {
parent::__construct();
@@ -79,8 +79,8 @@ class EffortUnit extends FFError {
/**
* fetchData - May need to refresh database fields if an update
occurred.
*
- * @param integer $unit_id The unit_id.
- * @return boolean success or not
+ * @param int $unit_id The unit_id.
+ * @return bool success or not
*/
function fetchData($unit_id) {
$res = db_query_params ('SELECT * FROM effort_unit WHERE
unit_id=$1',
@@ -97,10 +97,10 @@ class EffortUnit extends FFError {
* create - Create new Effort Unit in the database.
*
* @param string $name The name of the
unit.
- * @param integer $conversion_factor The conversion factor
to define the current unit.
- * @param integer $to_unit The unity used
for the definition of the current unit.
- * @param integer $unit_position The position of the
unit when listed.
- * @param boolean $is_base_unit True if this unit is a
base unit.
+ * @param int $conversion_factor The conversion factor
to define the current unit.
+ * @param int $to_unit The unity used
for the definition of the current unit.
+ * @param bool|int $unit_position The position of
the unit when listed.
+ * @param bool $is_base_unit True if this unit is a
base unit.
* @param array $importData For import
* @return bool success or not
*/
@@ -176,7 +176,7 @@ class EffortUnit extends FFError {
/**
* getID - get this Effort Unit ID.
*
- * @return integer The unit_id.
+ * @return int The unit_id.
*/
function getID() {
return $this->data_array['unit_id'];
@@ -194,7 +194,7 @@ class EffortUnit extends FFError {
/**
* getBase - get this Effort Unit base ID.
*
- * @return integer unit base ID.
+ * @return int unit base ID.
*/
function getToUnit() {
return $this->data_array['to_unit'];
@@ -216,7 +216,7 @@ class EffortUnit extends FFError {
/**
* getConversionFactor - get conversion factor that define this unit .
*
- * @return integer conversion factor.
+ * @return int conversion factor.
*/
function getConversionFactor() {
return $this->data_array['conversion_factor'];
@@ -225,7 +225,7 @@ class EffortUnit extends FFError {
/**
* getPosition - get this Effort Unit display position.
*
- * @return integer unit display position.
+ * @return int unit display position.
*/
function getPosition() {
return $this->data_array['unit_position'];
@@ -243,7 +243,7 @@ class EffortUnit extends FFError {
/**
* isDeleted - this Effort Unit is or not deleted.
*
- * @return boolean is or not deleted.
+ * @return bool is or not deleted.
*/
function isDeleted() {
return ($this->data_array['is_deleted']?true:false);
@@ -252,7 +252,7 @@ class EffortUnit extends FFError {
/**
* isBaseUnit - this Effort Unit is or not the base unit.
*
- * @return boolean is or not base unit.
+ * @return bool is or not base unit.
*/
function isBaseUnit() {
return ($this->data_array['is_base_unit']?true:false);
@@ -262,7 +262,7 @@ class EffortUnit extends FFError {
* delete - delete this Effort Unit.
* @param array $importData For import
*
- * @return boolean success or not.
+ * @return bool success or not.
*/
function delete($importData = array()) {
db_begin();
@@ -328,11 +328,11 @@ class EffortUnit extends FFError {
/**
* update - update this Effort Unit, name or definition.
* @param string $name The name of the
unit.
- * @param integer $conversion_factor The conversion factor
to define the current unit.
- * @param integer $to_unit The unity used
for the definition of the current unit.
+ * @param int $conversion_factor The conversion factor
to define the current unit.
+ * @param int $to_unit The unity used
for the definition of the current unit.
* @param array $importData For import
*
- * @return boolean success or not.
+ * @return bool success or not.
*/
function update($name, $conversion_factor, $to_unit, $importData =
array()){
if (!ctype_digit(strval($conversion_factor)) ||
$conversion_factor<1) {
@@ -429,9 +429,9 @@ class EffortUnit extends FFError {
/**
* updatePosition - Update this Effort Unit dispaly position.
- * @param integer $unit_position new position
+ * @param int $unit_position new position
*
- * @return boolean success or not.
+ * @return bool success or not.
*/
function updatePosition($unit_position) {
$result=db_query_params ('UPDATE effort_unit SET unit_position=
$1 WHERE unit_id=$2',
@@ -447,9 +447,9 @@ class EffortUnit extends FFError {
/**
* reorderUnits - Reorder all units.
- * @param integer $new_position new position of this unit
+ * @param int $new_position new position of this unit
*
- * @return boolean success or not.
+ * @return bool success or not.
*/
function reorderUnits($new_position) {
$unitFactory = new EffortUnitFactory($this->EffortUnitSet);
@@ -487,7 +487,7 @@ class EffortUnit extends FFError {
* copy - copy definition from an other unit.
* @param EffortUnit $from_unit Unit to be copied
*
- * @return boolean success or not.
+ * @return bool success or not.
*/
function copy($from_unit) {
db_begin();
@@ -554,7 +554,7 @@ class EffortUnit extends FFError {
/**
* getConversionFactorForBaseUnit - get conversion factor for Base Unit.
*
- * @return integer conversion factor.
+ * @return int conversion factor.
*/
function getConversionFactorForBaseUnit() {
$factor = $this->getConversionFactor();
@@ -588,7 +588,7 @@ class EffortUnit extends FFError {
* isEquivalentTo - test if this unit is equivalent to the other.
* @param EffortUnit $effortUnit Unit to compare to
*
- * @return boolean success or not.
+ * @return bool success or not.
*/
function isEquivalentTo($effortUnit){
if ($this->getName() != $effortUnit->getName()) {
diff --git a/src/common/tracker/EffortUnitSet.class.php
b/src/common/tracker/EffortUnitSet.class.php
index 3e335e6..440bcc5 100644
--- a/src/common/tracker/EffortUnitSet.class.php
+++ b/src/common/tracker/EffortUnitSet.class.php
@@ -49,7 +49,7 @@ class EffortUnitSet extends FFError {
private $data_array;
/**
- * @var integer $objectLevel The level (forge/projet/tracker) of the
object $Object.
+ * @var int $objectLevel The level
(forge/projet/tracker) of the object $Object.
*/
private $objectLevel;
@@ -57,6 +57,8 @@ class EffortUnitSet extends FFError {
* EffortUnitSet - EffortUnitSet object constructor
*
* @param Object $Object Null, group, tracker object to which
this EffortUnitSet is associated
+ * @param bool $unit_set_id
+ * @param bool $arr
*/
function __construct(&$Object = null, $unit_set_id = false, $arr =
false) {
parent::__construct();
@@ -115,11 +117,11 @@ class EffortUnitSet extends FFError {
/**
* create - Create new Effort Unit Set in the database.
*
- * @param boolean $is_autoconvert set if unit is auto
convert
+ * @param bool $is_autoconvert set if unit is auto
convert
* @param array $importData For import
* @return bool success or not
*/
- function create($is_autoconvert = 0, $importData = array()) {
+ function create($is_autoconvert = false, $importData = array()) {
if(array_key_exists('user', $importData)){
$user = $importData['user'];
} else {
@@ -284,7 +286,7 @@ class EffortUnitSet extends FFError {
/**
* fetchData - May need to refresh database fields if an update
occurred.
*
- * @param integer $group_id The group_id.
+ * @param int $unit_set_id The unit set id.
* @return bool success or not
*/
function fetchData($unit_set_id) {
@@ -301,7 +303,7 @@ class EffortUnitSet extends FFError {
/**
* getID - Simply return the unit_set_id for this object.
*
- * @return integer unit_set_id.
+ * @return int unit_set_id.
*/
function getID() {
return $this->data_array['unit_set_id'];
@@ -310,7 +312,7 @@ class EffortUnitSet extends FFError {
/**
* getLevel - return the level (forge/projet/tracker) at which the set
is defined.
*
- * @return integer level.
+ * @return int level.
*/
function getLevel() {
return $this->data_array['level'];
@@ -319,7 +321,7 @@ class EffortUnitSet extends FFError {
/**
* getObjectLevel - return the level of the object used.
*
- * @return integer objectLevel.
+ * @return int objectLevel.
*/
function getObjectLevel() {
return $this->objectLevel;
@@ -356,7 +358,7 @@ class EffortUnitSet extends FFError {
* isEquivalentTo - test if this unit set is equivalent to the other.
* @param EffortUnitSet $effortUnitSet Unit set to test
*
- * @return boolean true/false.
+ * @return bool true/false.
*/
function isEquivalentTo($effortUnitSet) {
if ($this->getID() == $effortUnitSet->getID()) {
@@ -388,7 +390,7 @@ class EffortUnitSet extends FFError {
/**
* isAutoconvert - test if for this unit set, value will be convert on
an unit change.
*
- * @return boolean true/false.
+ * @return bool true/false.
*/
function isAutoconvert() {
return ($this->data_array['is_autoconvert']? true : false);
@@ -397,8 +399,8 @@ class EffortUnitSet extends FFError {
/**
* update - update Effort Unit Set in the database.
*
- * @param boolean $is_autoconvert set if unit is auto
convert
- * @return boolean true/false.
+ * @param bool $is_autoconvert set if unit is auto
convert
+ * @return bool true/false.
*/
function update($is_autoconvert) {
$res = db_query_params ('UPDATE effort_unit_set SET
is_autoconvert=$1 WHERE unit_set_id=$2',
@@ -481,9 +483,9 @@ function getAvailableEffortUnitSets(&$Object = null) {
/**
* getAvailableEffortUnitSets - Get EffortUnitSet ID available for the object
at this level.
* @param null|Group|ArtifactType $Object Object
- * @param integer $level level
+ * @param int $level level
*
- * @return integer EffortUnitSet ID.
+ * @return int EffortUnitSet ID.
*/
function getEffortUnitSetForLevel(&$Object, $level) {
if (!$Object) {
diff --git a/src/common/tracker/include/ArtifactHtml.class.php
b/src/common/tracker/include/ArtifactHtml.class.php
index 36d3b0a..3ff31f2 100644
--- a/src/common/tracker/include/ArtifactHtml.class.php
+++ b/src/common/tracker/include/ArtifactHtml.class.php
@@ -34,6 +34,8 @@ class ArtifactHtml extends Artifact {
* showDetails - show details preformatted (like followups)
*
* @param bool $editable is the detail editable or not?
default is false.
+ * @param array $editattrs
+ * @return string
*/
function showDetails($editable = false, $editattrs = array()) {
global $HTML;
diff --git a/src/common/tracker/include/ArtifactTypeHtml.class.php
b/src/common/tracker/include/ArtifactTypeHtml.class.php
index 1cd1a93..8e0228f 100644
--- a/src/common/tracker/include/ArtifactTypeHtml.class.php
+++ b/src/common/tracker/include/ArtifactTypeHtml.class.php
@@ -926,6 +926,7 @@ class ArtifactTypeHtml extends ArtifactType {
* @param string $text_100 What $string to call the '100
row'
* @param bool $show_any
* @param string $text_any
+ * @param bool $allowed
* @param array $attrs Array of other attributes
* @return string HTML code using radio buttons
*/
@@ -978,6 +979,7 @@ class ArtifactTypeHtml extends ArtifactType {
* @param array $checked The items that should
be checked
* @param bool|string $show_100 Whether to show the
'100 row'
* @param string $text_100 What to call the '100
row'
+ * @param bool $allowed
* @param array $attrs Array of other
attributes
* @return string radio buttons
*/
@@ -1037,6 +1039,7 @@ class ArtifactTypeHtml extends ArtifactType {
* @param array $checked The items that should
be checked
* @param bool|string $show_100 Whether to show the
'100 row'
* @param string $text_100 What to call the '100
row'
+ * @param bool $allowed
* @param array $attrs Array of other
attributes
* @return string radio multiselectbox
*/
@@ -1318,6 +1321,7 @@ class ArtifactTypeHtml extends ArtifactType {
*
* @param int $extra_field_id The ID of this field.
* @param string $contents The data for this field.
+ * @param $ef
* @return string
*/
function renderSLAField($extra_field_id, $contents, $ef) {
@@ -1514,7 +1518,12 @@ class ArtifactTypeHtml extends ArtifactType {
/**
* statusBox - show the statuses - automatically shows the "custom
statuses" if they exist
*
- * @return string HTML code
+ * @param string $name
+ * @param string $checked
+ * @param bool $show_100
+ * @param string $text_100
+ * @param array $attrs
+ * @return string HTML code
*/
function statusBox($name = 'status_id', $checked = 'xzxz', $show_100 =
false, $text_100 = 'none', $attrs = array()) {
if ($text_100=='none'){
@@ -1526,7 +1535,12 @@ class ArtifactTypeHtml extends ArtifactType {
/**
* priorityBox - show the priorities
*
- * @return string HTML code
+ * @param string $name
+ * @param string $checked_val
+ * @param bool $nochange
+ * @param array $attrs
+ * @param bool $show_any
+ * @return string HTML code
*/
function priorityBox($name = 'priority', $checked_val = '3', $nochange
= false, $attrs = array(), $show_any = false){
return html_build_priority_select_box($name, $checked_val,
$nochange, $attrs, $show_any);
-----------------------------------------------------------------------
Summary of changes:
src/common/docman/DocumentGroup.class.php | 1 +
src/common/docman/DocumentGroupFactory.class.php | 2 +-
src/common/docman/DocumentManager.class.php | 2 +
src/common/docman/DocumentReview.class.php | 5 +-
src/common/docman/DocumentVersion.class.php | 5 +-
src/common/docman/include/utils.php | 1 +
src/common/frs/FRSFile.class.php | 2 -
src/common/frs/FRSPackage.class.php | 1 +
src/common/frs/FRSRelease.class.php | 5 +-
src/common/include/FFError.class.php | 13 +++---
src/common/include/FusionForge.class.php | 1 +
src/common/include/MailParser.class.php | 2 +
src/common/include/Navigation.class.php | 28 +++++++----
src/common/include/PluginManager.class.php | 2 +
src/common/include/account.php | 1 +
src/common/include/database-pgsql.php | 11 +++--
src/common/include/license.php | 54 +++++++++++++++++-----
src/common/pm/ProjectGroup.class.php | 2 +-
src/common/pm/ProjectTaskFactory.class.php | 2 +-
src/common/survey/Survey.class.php | 6 ++-
src/common/tracker/ArtifactExtraField.class.php | 38 ++++++++++-----
.../tracker/ArtifactExtraFieldElement.class.php | 12 +++--
src/common/tracker/ArtifactMessage.class.php | 1 +
src/common/tracker/ArtifactQuery.class.php | 5 +-
src/common/tracker/ArtifactType.class.php | 1 +
src/common/tracker/ArtifactTypeFactory.class.php | 15 +++---
src/common/tracker/EffortUnit.class.php | 50 ++++++++++----------
src/common/tracker/EffortUnitSet.class.php | 28 +++++------
src/common/tracker/include/ArtifactHtml.class.php | 2 +
.../tracker/include/ArtifactTypeHtml.class.php | 18 +++++++-
30 files changed, 208 insertions(+), 108 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits