Procedural File: version_api.php
Source Location: /core/version_api.php
Classes:
VersionData
Version Data Structure Definition
Page Details:
Tags:
version_add [line 170]
int version_add(
int $p_project_id, string $p_version, [int $p_released = VERSION_FUTURE], [string $p_description = ''], [int $p_date_order = null], [bool $p_obsolete = false])
|
|
Add a version to the project
Parameters
int |
$p_project_id |
|
string |
$p_version |
|
int |
$p_released |
|
string |
$p_description |
|
int |
$p_date_order |
|
bool |
$p_obsolete |
|
version_cache_array_rows [line 359]
null version_cache_array_rows(
array $p_project_id_array)
|
|
Cache version information for an array of project id's
Parameters
array |
$p_project_id_array |
|
version_cache_row [line 82]
array version_cache_row(
int $p_version_id, [bool $p_trigger_errors = true])
|
|
Cache a version row if necessary and return the cached copy If the second parameter is true (default), trigger an error if the version can't be found. If the second parameter is false, return false if the version can't be found.
Parameters
int |
$p_version_id |
|
bool |
$p_trigger_errors |
|
version_ensure_exists [line 141]
void version_ensure_exists(
int $p_version_id)
|
|
Check whether the version exists Trigger an error if it does not
Parameters
version_ensure_unique [line 154]
void version_ensure_unique(
string $p_version, [int $p_project_id = null])
|
|
Check whether the version is unique within a project Trigger an error if it is not
Parameters
string |
$p_version |
|
int |
$p_project_id |
|
version_exists [line 121]
bool version_exists(
int $p_version_id)
|
|
Check whether the version exists $p_project_id : null will use the current project, otherwise the specified project Returns true if the version exists, false otherwise
Parameters
version_full_name [line 568]
string version_full_name(
int $p_version_id, [bool $p_show_project = null], [int $p_current_project_id = null])
|
|
Gets the full name of a version. This may include the project name as a prefix (e.g. '[MantisBT] 1.2.0')
Tags:
Parameters
int |
$p_version_id |
The version id. |
bool |
$p_show_project |
Whether to include the project or not, null means include the project if different from current. |
int |
$p_current_project_id |
The current project id or null to use the cookie. |
version_get [line 597]
get information about a version given its id
Parameters
version_get_all_rows [line 403]
array version_get_all_rows(
int $p_project_id, [int $p_released = null], [bool $p_obsolete = false], [ $p_inherit = null])
|
|
Return all versions for the specified project
Tags:
Parameters
int |
$p_project_id |
|
int |
$p_released |
|
bool |
$p_obsolete |
|
|
$p_inherit |
|
version_get_all_rows_with_subs [line 463]
array version_get_all_rows_with_subs(
int $p_project_id, [int $p_released = null], [bool $p_obsolete = false])
|
|
Return all versions for the specified project, including subprojects
Parameters
int |
$p_project_id |
|
int |
$p_released |
|
bool |
$p_obsolete |
|
version_get_field [line 548]
string version_get_field(
int $p_version_id, string $p_field_name)
|
|
Get the specified field name for the specified version id. triggers an error if version not found, otherwise returns the field value.
Parameters
int |
$p_version_id |
|
string |
$p_field_name |
|
version_get_id [line 509]
int version_get_id(
string $p_version, [int $p_project_id = null], [mixed $p_inherit = null])
|
|
Get the version_id, given the project_id and $p_version_id returns false if not found, otherwise returns the id.
Parameters
string |
$p_version |
|
int |
$p_project_id |
|
mixed |
$p_inherit |
true to look for version in parent projects, false not to, null to use default configuration. |
version_get_project_where_clause [line 654]
string version_get_project_where_clause(
integer $p_project_id, bool $p_inherit)
|
|
Gets the where clause to use for retrieving versions.
Tags:
Parameters
integer |
$p_project_id |
The project id to use. |
bool |
$p_inherit |
Include versions from parent projects? true: yes, false: no, null: use default configuration. |
version_is_unique [line 132]
bool version_is_unique(
string $p_version, [int $p_project_id = null])
|
|
Check whether the version name is unique Returns true if the name is unique, false otherwise
Parameters
string |
$p_version |
|
int |
$p_project_id |
|
version_prepare_db [line 627]
Return a copy of the version structure with all the instvars prepared for db insertion
Parameters
version_remove [line 285]
true version_remove(
int $p_version_id, [string $p_new_version = ''])
|
|
Remove a version from the project
Parameters
int |
$p_version_id |
|
string |
$p_new_version |
|
version_remove_all [line 331]
true version_remove_all(
int $p_project_id)
|
|
Remove all versions associated with a project
Parameters
version_should_show_product_version [line 641]
bool version_should_show_product_version(
integer $p_project_id)
|
|
Checks whether the product version should be shown (i.e. report, update, view, print).
Tags:
Parameters
integer |
$p_project_id |
The project id. |
version_update [line 200]
Update the definition of a version
Parameters
|
|