本文整理汇总了PHP中version_get_all_rows函数的典型用法代码示例。如果您正苦于以下问题:PHP version_get_all_rows函数的具体用法?PHP version_get_all_rows怎么用?PHP version_get_all_rows使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了version_get_all_rows函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct()
{
$this->project_id = helper_get_current_project();
if (isset($_REQUEST['severity'])) {
// isset to allow empty
$this->severity = intval($_REQUEST['severity']);
$_SESSION[__CLASS__]['severity'] = $this->severity;
} else {
$this->severity = $_SESSION[__CLASS__]['severity'];
}
$versions = version_get_all_rows($this->project_id, null, null);
$this->versions = [];
foreach ($versions as $version) {
if ($_REQUEST['versions'] === $version['version']) {
// isset to allow empty
$this->versions[$version['version']] = [$version['version'], "true"];
$this->version = $version['version'];
} else {
$this->versions[$version['version']] = [$version['version'], "false"];
}
}
}
示例2: version_should_show_product_version
/**
* Checks whether the product version should be shown
* (i.e. report, update, view, print).
* @param integer $p_project_id The project id.
* @return bool true: show, false: otherwise.
*/
function version_should_show_product_version($p_project_id)
{
return ON == config_get('show_product_version', null, null, $p_project_id) || AUTO == config_get('show_product_version', null, null, $p_project_id) && count(version_get_all_rows($p_project_id)) > 0;
}
示例3: str_repeat
?>
<!-- PROJECTS -->
<?php
$t_project_name = str_repeat("» ", $p_level) . project_get_name($t_project);
?>
<tr valign="top">
<td class="category"><?php
echo $t_project_name;
?>
</td>
<td>
<table>
<!-- PROJECT VERSIONS -->
<?php
$t_versions = version_get_all_rows($t_project, null, null);
if (count($t_versions) > 0) {
foreach ($t_versions as $t_version) {
if ($t_version['project_id'] != $t_project) {
$t_inherited = true;
} else {
$t_inherited = false;
}
$t_version_name = version_full_name($t_version['id'], $t_inherited, $t_project);
$t_released = $t_version['released'];
$t_obsolete = $t_version['obsolete'];
if (!date_is_null($t_version['date_order'])) {
$t_date_formatted = date(config_get('complete_date_format'), $t_version['date_order']);
} else {
$t_date_formatted = ' ';
}
示例4: html_page_top
html_page_top(bug_format_summary($f_bug_id, SUMMARY_CAPTION));
print_recently_visited();
}
$t_action_button_position = config_get('action_button_position');
$t_bugslist = gpc_get_cookie(config_get('bug_list_cookie'), false);
$tpl_show_versions = version_should_show_product_version($tpl_bug->project_id);
$tpl_show_product_version = $tpl_show_versions && in_array('product_version', $t_fields);
$tpl_show_fixed_in_version = $tpl_show_versions && in_array('fixed_in_version', $t_fields);
$tpl_show_product_build = $tpl_show_versions && in_array('product_build', $t_fields) && config_get('enable_product_build') == ON;
$tpl_product_build = $tpl_show_product_build ? string_display_line($tpl_bug->build) : '';
$tpl_show_target_version = $tpl_show_versions && in_array('target_version', $t_fields) && access_has_bug_level(config_get('roadmap_view_threshold'), $f_bug_id);
$tpl_product_version_string = '';
$tpl_target_version_string = '';
$tpl_fixed_in_version_string = '';
if ($tpl_show_product_version || $tpl_show_fixed_in_version || $tpl_show_target_version) {
$t_version_rows = version_get_all_rows($tpl_bug->project_id);
if ($tpl_show_product_version) {
$tpl_product_version_string = prepare_version_string($tpl_bug->project_id, version_get_id($tpl_bug->version, $tpl_bug->project_id), $t_version_rows);
}
if ($tpl_show_target_version) {
$tpl_target_version_string = prepare_version_string($tpl_bug->project_id, version_get_id($tpl_bug->target_version, $tpl_bug->project_id), $t_version_rows);
}
if ($tpl_show_fixed_in_version) {
$tpl_fixed_in_version_string = prepare_version_string($tpl_bug->project_id, version_get_id($tpl_bug->fixed_in_version, $tpl_bug->project_id), $t_version_rows);
}
}
$tpl_product_version_string = string_display_line($tpl_product_version_string);
$tpl_target_version_string = string_display_line($tpl_target_version_string);
$tpl_fixed_in_version_string = string_display_line($tpl_fixed_in_version_string);
$tpl_bug_id = $f_bug_id;
$tpl_form_title = lang_get('bug_view_title');
示例5: user_get_all_accessible_subprojects
$t_project_ids = user_get_all_accessible_subprojects($t_user_id, $t_project_id);
array_unshift($t_project_ids, $t_project_id);
}
$t_project_index = 0;
version_cache_array_rows($t_project_ids);
category_cache_array_rows_by_project($t_project_ids);
foreach ($t_project_ids as $t_project_id) {
$t_project_name = project_get_field($t_project_id, 'name');
$t_can_view_private = access_has_project_level(config_get('private_bug_threshold'), $t_project_id);
$t_limit_reporters = config_get('limit_reporters');
$t_user_access_level_is_reporter = REPORTER == access_get_project_level($t_project_id);
$t_resolved = config_get('bug_resolved_status_threshold');
$t_bug_table = db_get_table('mantis_bug_table');
$t_relation_table = db_get_table('mantis_bug_relationship_table');
# grab version info for later use
$t_version_rows = version_get_all_rows($t_project_id, null, false);
# cache category info, but ignore the results for now
category_get_all_rows($t_project_id);
$t_project_header_printed = false;
foreach ($t_version_rows as $t_version_row) {
$t_version_header_printed = false;
$t_version = $t_version_row['version'];
$t_version_id = $t_version_row['id'];
# Skip all versions except the specified one (if any).
if ($f_version_id != -1 && $f_version_id != $t_version_id) {
continue;
}
$query = "SELECT sbt.*, dbt.fixed_in_version AS parent_version, rt.source_bug_id\n FROM {$t_bug_table} AS sbt\n LEFT JOIN {$t_relation_table} AS rt\n ON sbt.id=rt.destination_bug_id AND rt.relationship_type=" . BUG_DEPENDANT . "\n LEFT JOIN {$t_bug_table} AS dbt ON dbt.id=rt.source_bug_id\n WHERE sbt.project_id=" . db_param() . "\n AND sbt.fixed_in_version=" . db_param() . "\n ORDER BY sbt.status ASC, sbt.last_updated DESC";
$t_description = version_get_field($t_version_id, 'description');
$t_first_entry = true;
$t_issue_ids = array();
示例6: config_get
print_version_option_list( '', $t_project_id, VERSION_ALL );
break;
}
echo '</select>';
}
?>
</td>
</tr>
<?php
if ( isset( $t_question_title2 ) ) {
switch ( $f_action ) {
case 'RESOLVE':
$t_show_product_version = ( ON == config_get( 'show_product_version' ) )
|| ( ( AUTO == config_get( 'show_product_version' ) )
&& ( count( version_get_all_rows( $t_project_id ) ) > 0 ) );
if ( $t_show_product_version ) {
?>
<tr class="row-2">
<th class="category">
<?php echo $t_question_title2 ?>
</th>
<td>
<select name="<?php echo $t_form2 ?>">
<?php print_version_option_list( '', null, VERSION_ALL );?>
</select>
</td>
</tr>
<?php
}
break;
示例7: config_get
?>
</select>
</td>
</tr>
<?php
}
?>
<!-- spacer -->
<tr class="spacer">
<td colspan="2"></td>
</tr>
<?php
$t_show_version = ON == config_get('show_product_version') || AUTO == config_get('show_product_version') && count(version_get_all_rows($t_project_id)) > 0;
if ($t_show_version) {
?>
<!-- Product Version -->
<tr <?php
echo helper_alternate_class();
?>
>
<td class="category">
<?php
echo lang_get('product_version');
?>
</td>
<td>
<select <?php
echo helper_get_tab_index();
示例8: helper_alternate_class
helper_alternate_class(0);
?>
<!-- PROJECT VERSIONS -->
<table id="versions" class="width75" cellspacing="1">
<!-- Title -->
<tr>
<td class="form-title" colspan="3">
<?php
echo lang_get('versions');
?>
</td>
</tr>
<?php
$t_versions = version_get_all_rows($f_project_id, null, null);
if (count($t_versions) > 0) {
?>
<tr class="row-category">
<td>
<?php
echo lang_get('version');
?>
</td>
<td class="center">
<?php
echo lang_get('released');
?>
</td>
<td class="center">
<?php
示例9: access_ensure_project_level
} else {
access_ensure_project_level(config_get('roadmap_view_threshold'), $t_project_id);
$t_project_ids = user_get_all_accessible_subprojects($t_user_id, $t_project_id);
array_unshift($t_project_ids, $t_project_id);
}
$t_project_id_for_access_check = $t_project_id;
html_page_top(lang_get('roadmap'));
version_cache_array_rows($t_project_ids);
category_cache_array_rows_by_project($t_project_ids);
foreach ($t_project_ids as $t_project_id) {
$t_project_name = project_get_field($t_project_id, 'name');
$t_can_view_private = access_has_project_level(config_get('private_bug_threshold'), $t_project_id);
$t_limit_reporters = config_get('limit_reporters');
$t_user_access_level_is_reporter = config_get('report_bug_threshold', null, null, $t_project_id) == access_get_project_level($t_project_id);
$t_resolved = config_get('bug_resolved_status_threshold');
$t_version_rows = array_reverse(version_get_all_rows($t_project_id));
# cache category info, but ignore the results for now
category_get_all_rows($t_project_id);
$t_project_header_printed = false;
foreach ($t_version_rows as $t_version_row) {
if ($t_version_row['released'] == 1) {
continue;
}
# Skip all versions except the specified one (if any).
if ($f_version_id != -1 && $f_version_id != $t_version_row['id']) {
continue;
}
$t_issues_planned = 0;
$t_issues_resolved = 0;
$t_issues_counted = array();
$t_version_header_printed = false;
示例10: version_should_show_product_version
/**
* Checks whether the product version should be shown
* (i.e. report, update, view, print).
* @param integer $p_project_id The project id.
* @return bool true: show, false: otherwise.
*/
function version_should_show_product_version( $p_project_id ) {
return ( ON == config_get( 'show_product_version', /* default */ null, /* user_id */ null, $p_project_id ) )
|| ( ( AUTO == config_get( 'show_product_version', /* default */ null, /* user_id */ null, $p_project_id ) )
&& ( count( version_get_all_rows( $p_project_id ) ) > 0 ) );
}
示例11: require_api
require_api('version_api.php');
form_security_validate('manage_proj_ver_copy');
auth_reauthenticate();
$f_project_id = gpc_get_int('project_id');
$f_other_project_id = gpc_get_int('other_project_id');
$f_copy_from = gpc_get_bool('copy_from');
$f_copy_to = gpc_get_bool('copy_to');
project_ensure_exists($f_project_id);
project_ensure_exists($f_other_project_id);
access_ensure_project_level(config_get('manage_project_threshold'), $f_project_id);
access_ensure_project_level(config_get('manage_project_threshold'), $f_other_project_id);
if ($f_copy_from) {
$t_src_project_id = $f_other_project_id;
$t_dst_project_id = $f_project_id;
} else {
if ($f_copy_to) {
$t_src_project_id = $f_project_id;
$t_dst_project_id = $f_other_project_id;
} else {
trigger_error(ERROR_VERSION_NO_ACTION, ERROR);
}
}
$t_rows = version_get_all_rows($t_src_project_id);
foreach ($t_rows as $t_row) {
if (version_is_unique($t_row['version'], $t_dst_project_id)) {
$t_version_id = version_add($t_dst_project_id, $t_row['version'], $t_row['released'], $t_row['description'], $t_row['date_order']);
event_signal('EVENT_MANAGE_VERSION_CREATE', array($t_version_id));
}
}
form_security_purge('manage_proj_ver_copy');
print_header_redirect('manage_proj_edit_page.php?project_id=' . $f_project_id);
示例12: print_version_option_list
function print_version_option_list($p_version = '', $p_project_id = null, $p_released = null, $p_leading_blank = true, $p_with_subs = false)
{
if (null === $p_project_id) {
$c_project_id = helper_get_current_project();
} else {
$c_project_id = db_prepare_int($p_project_id);
}
if ($p_with_subs) {
$versions = version_get_all_rows_with_subs($c_project_id, $p_released);
} else {
$versions = version_get_all_rows($c_project_id, $p_released);
}
if ($p_leading_blank) {
echo '<option value=""></option>';
}
foreach ($versions as $version) {
$t_version = string_attribute($version['version']);
echo "<option value=\"{$t_version}\"";
check_selected($p_version, $t_version);
echo '>', string_shorten($t_version), '</option>';
}
}
示例13: mc_project_get_unreleased_versions
/**
* Get all unreleased (a.k.a. future) versions of a project.
*
* @param string $p_username The name of the user trying to access the versions.
* @param string $p_password The password of the user.
* @param integer $p_project_id The id of the project to retrieve the versions for.
* @return Array representing a ProjectVersionDataArray structure.
*/
function mc_project_get_unreleased_versions( $p_username, $p_password, $p_project_id ) {
$t_user_id = mci_check_login( $p_username, $p_password );
if( $t_user_id === false ) {
return mci_soap_fault_login_failed();
}
if( !project_exists( $p_project_id ) ) {
return new soap_fault( 'Client', '', "Project '$p_project_id' does not exist." );
}
if( !mci_has_readonly_access( $t_user_id, $p_project_id ) ) {
return mci_soap_fault_access_denied( $t_user_id );
}
$t_result = array();
foreach( version_get_all_rows( $p_project_id, VERSION_FUTURE ) as $t_version )
$t_result[] = mci_project_version_as_array ( $t_version );
return $t_result;
}
示例14: lang_get
<div id="project-versions-div" class="form-container">
<h2><?php echo lang_get( 'versions' ); ?></h2>
<form id="manage-project-version-copy-form" method="post" action="manage_proj_ver_copy.php">
<fieldset>
<?php echo form_security_field( 'manage_proj_ver_copy' ) ?>
<input type="hidden" name="project_id" value="<?php echo $f_project_id ?>" />
<select name="other_project_id">
<?php print_project_option_list( null, false, $f_project_id ); ?>
</select>
<input type="submit" name="copy_from" class="button" value="<?php echo lang_get( 'copy_versions_from' ) ?>" />
<input type="submit" name="copy_to" class="button" value="<?php echo lang_get( 'copy_versions_to' ) ?>" />
</fieldset>
</form><?php
$t_versions = version_get_all_rows( $f_project_id, /* released = */ null, /* obsolete = */ null );
if ( count( $t_versions ) > 0 ) { ?>
<table id="versions" cellspacing="1" cellpadding="5" border="1">
<tr class="row-category">
<th><?php echo lang_get( 'version' ) ?></th>
<th><?php echo lang_get( 'released' ) ?></th>
<th><?php echo lang_get( 'obsolete' ) ?></th>
<th><?php echo lang_get( 'timestamp' ) ?></th>
<th colspan="2"><?php echo lang_get( 'actions' ) ?></th>
</tr><?php
foreach ( $t_versions as $t_version ) {
$t_inherited = ( $t_version['project_id'] != $f_project_id ? true : false );
$t_name = version_full_name( $t_version['id'], /* showProject */ $t_inherited, $f_project_id );
$t_released = $t_version['released'];
$t_obsolete = $t_version['obsolete'];
示例15: custom_function_default_enum_future_versions
/**
* Construct an enumeration for future versions for the current project.
* The enumeration will be empty if current project is ALL PROJECTS.
* Enumerations format is: "abc|lmn|xyz"
* To use this in a custom field type "=future_versions" in the possible values field.
* @return string
*/
function custom_function_default_enum_future_versions()
{
$t_versions = version_get_all_rows(helper_get_current_project());
$t_enum = array();
foreach ($t_versions as $t_version) {
if ($t_version['released'] == 0) {
$t_enum[] = $t_version['version'];
}
}
$t_possible_values = implode('|', $t_enum);
return $t_possible_values;
}