当前位置: 首页>>代码示例>>PHP>>正文


PHP version_get_field函数代码示例

本文整理汇总了PHP中version_get_field函数的典型用法代码示例。如果您正苦于以下问题:PHP version_get_field函数的具体用法?PHP version_get_field怎么用?PHP version_get_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了version_get_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_version_header

/**
 * Print header for the specified project version.
 * @param int $p_version_id a valid version id
 * @return null
 */
function print_version_header( $p_version_id ) {
	$t_project_id   = version_get_field( $p_version_id, 'project_id' );
	$t_version_name = version_get_field( $p_version_id, 'version' );
	$t_project_name = project_get_field( $t_project_id, 'name' );

	$t_release_title = '<a href="changelog_page.php?project_id=' . $t_project_id . '">' . string_display_line( $t_project_name ) . '</a> - <a href="changelog_page.php?version_id=' . $p_version_id . '">' . string_display_line( $t_version_name ) . '</a>';

	if ( config_get( 'show_changelog_dates' ) ) {
		$t_version_released = version_get_field( $p_version_id, 'released' );
		$t_release_timestamp = version_get_field( $p_version_id, 'date_order' );

		if ( (bool) $t_version_released ) {
			$t_release_date = ' (' . lang_get('released') . ' ' . string_display_line( date( config_get( 'short_date_format' ), $t_release_timestamp ) ) . ')';
		} else {
			$t_release_date = ' (' . lang_get( 'not_released' ) . ')';
		}
	} else {
		$t_release_date = '';
	}

	echo '<br />', $t_release_title, $t_release_date, lang_get( 'word_separator' ), print_bracket_link( 'view_all_set.php?type=1&temporary=y&' . FILTER_PROPERTY_PROJECT_ID . '=' . $t_project_id . '&' . filter_encode_field_and_value( FILTER_PROPERTY_FIXED_IN_VERSION, $t_version_name ), lang_get( 'view_bugs_link' ) ), '<br />';

	$t_release_title_without_hyperlinks = $t_project_name . ' - ' . $t_version_name . $t_release_date;
	echo utf8_str_pad( '', utf8_strlen( $t_release_title_without_hyperlinks ), '=' ), '<br />';
}
开发者ID:rombert,项目名称:mantisbt,代码行数:30,代码来源:changelog_page.php

示例2: print_version_header

function print_version_header($p_version_id)
{
    $t_project_id = version_get_field($p_version_id, 'project_id');
    $t_version_name = version_get_field($p_version_id, 'version');
    $t_project_name = project_get_field($t_project_id, 'name');
    $t_release_title = string_display($t_project_name) . ' - ' . string_display($t_version_name);
    echo '<tt>';
    echo '<br />', $t_release_title, '<br />';
    echo str_pad('', strlen($t_release_title), '='), '<br />';
}
开发者ID:amjadtbssm,项目名称:website,代码行数:10,代码来源:changelog_page.php

示例3: print_version_header

function print_version_header($p_version_id)
{
    $t_project_id = version_get_field($p_version_id, 'project_id');
    $t_version_name = version_get_field($p_version_id, 'version');
    $t_project_name = project_get_field($t_project_id, 'name');
    $t_release_title = string_display($t_project_name) . ' - ' . string_display($t_version_name);
    echo $t_release_title, '<br />';
    echo str_pad('', strlen($t_release_title), '='), '<br />';
    $t_description = version_get_field($p_version_id, 'description');
    if ($t_description !== false && !is_blank($t_description)) {
        echo string_display("<br />{$t_description}<br /><br />");
    }
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:13,代码来源:changelog_page.php

示例4: calculate_page_content

/**
 * @param $print_flag
 */
function calculate_page_content($print_flag)
{
    $specmanagement_database_api = new specmanagement_database_api();
    $specmanagement_print_api = new specmanagement_print_api();
    $specmanagement_editor_api = new specmanagement_editor_api();
    $version_id = $_POST['version_id'];
    $version_spec_bug_ids = $specmanagement_database_api->get_version_spec_bugs(version_get_field($version_id, 'version'));
    if (!is_null($version_spec_bug_ids)) {
        /** get bug and work package data */
        $plugin_version_obj = $specmanagement_database_api->get_plugin_version_row_by_version_id($version_id);
        $p_version_id = $plugin_version_obj[0];
        foreach ($version_spec_bug_ids as $version_spec_bug_id) {
            $p_source_row = $specmanagement_database_api->get_source_row($version_spec_bug_id);
            if (is_null($p_source_row[2])) {
                $specmanagement_database_api->update_source_row($version_spec_bug_id, $p_version_id, '');
            }
        }
        $work_packages = $specmanagement_database_api->get_document_spec_workpackages($p_version_id);
        asort($work_packages);
        $no_work_package_bug_ids = $specmanagement_database_api->get_workpackage_spec_bugs($p_version_id, '');
        /** get type options */
        $type_string = $specmanagement_database_api->get_type_string($specmanagement_database_api->get_type_by_version($version_id));
        $type_id = $specmanagement_database_api->get_type_id($type_string);
        $type_row = $specmanagement_database_api->get_type_row($type_id);
        $type_options = explode(';', $type_row[2]);
        /** generate and print page content */
        $specmanagement_editor_api->print_document_head($type_string, $version_id, $version_spec_bug_ids, $print_flag);
        if ($type_options[2] == '1') {
            $specmanagement_editor_api->print_directory($p_version_id, $work_packages, $no_work_package_bug_ids, $type_options[0], $print_flag);
        }
        $specmanagement_editor_api->print_editor_table_head($print_flag);
        $specmanagement_editor_api->generate_content($p_version_id, $work_packages, $no_work_package_bug_ids, $type_options[0], true, $print_flag);
        echo '</table>';
        if ($type_options[1] == '1') {
            $specmanagement_editor_api->print_expenses_overview($work_packages, $p_version_id, $print_flag, $no_work_package_bug_ids);
        }
    } else {
        echo '<br/>';
        $specmanagement_editor_api->print_editor_table_head($print_flag);
        echo '<tr><td class="center">';
        echo plugin_lang_get('editor_no_issues');
        echo '</td></tr>';
        $specmanagement_print_api->printTableFoot();
    }
}
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:48,代码来源:editor.php

示例5: print_document_selection

/**
 * @param $types
 */
function print_document_selection($types)
{
    $project_id = gpc_get_int('project_id', helper_get_current_project());
    $specmanagement_database_api = new specmanagement_database_api();
    echo '<select name="version_id">';
    foreach ($types as $type) {
        $type_string = string_html_specialchars($type);
        $type_id = $specmanagement_database_api->get_type_id($type);
        $version_id_array = get_version_ids($type_id, $project_id);
        foreach ($version_id_array as $version_id) {
            $version_spec_project_id = version_get_field($version_id, 'project_id');
            if (project_includes_user($version_spec_project_id, auth_get_current_user_id()) || user_is_administrator(auth_get_current_user_id())) {
                $version_string = version_full_name($version_id);
                echo '<option value="' . $version_id . '">';
                echo $type_string . " - " . $version_string;
                echo '</option>';
            }
        }
    }
    echo '</select>';
}
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:24,代码来源:choose_document.php

示例6: mc_project_version_update

/**
 * Submit the specified version details.
 *
 * @param string $p_username  The name of the user trying to update the issue.
 * @param string $p_password  The password of the user.
 * @param integer $p_version_id A version's id
 * @param Array $p_version  A ProjectVersionData structure containing information about the new verison.
 * @return bool returns true or false depending on the success of the update action
 */
function mc_project_version_update($p_username, $p_password, $p_version_id, $p_version)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return new soap_fault('Client', '', 'Access Denied', 'Username/password combination was incorrect');
    }
    if (!mci_has_administrator_access($t_user_id)) {
        return new soap_fault('Client', '', 'Access Denied', 'User does not have administrator access');
    }
    if (is_blank($p_version_id)) {
        return new soap_fault('Client', '', 'Mandatory field "version_id" was missing');
    }
    if (!version_exists($p_version_id)) {
        return new soap_fault('Client', '', "Version '{$p_version_id}' does not exist.");
    }
    extract($p_version, EXTR_PREFIX_ALL, 'v');
    if (is_blank($v_project_id)) {
        return new soap_fault('Client', '', 'Mandatory field "project_id" was missing');
    }
    if (!project_exists($v_project_id)) {
        return new soap_fault('Client', '', "Version '{$v_project_id}' does not exist.");
    }
    if (is_blank($v_name)) {
        return new soap_fault('Client', '', 'Mandatory field "name" was missing');
    }
    # check for duplicates
    $t_old_version_name = version_get_field($p_version_id, 'version');
    if (strtolower($t_old_version_name) != strtolower($v_name) && !version_is_unique($v_name, $v_project_id)) {
        return new soap_fault('Client', '', 'Version exists for project', 'The version you attempted to update already exists for this project');
    }
    if ($v_released === false) {
        $v_released = VERSION_FUTURE;
    } else {
        $v_released = VERSION_RELEASED;
    }
    $t_version_data = new VersionData();
    $t_version_data->id = $p_version_id;
    $t_version_data->project_id = $v_project_id;
    $t_version_data->version = $v_name;
    $t_version_data->description = $v_description;
    $t_version_data->released = $v_released;
    $t_version_data->date_order = date("Y-m-d H:i:s", strtotime($v_date_order));
    return version_update($t_version_data);
}
开发者ID:amjadtbssm,项目名称:website,代码行数:53,代码来源:mc_project_api.php

示例7: version_add

        version_add($project_id, $new_version_name_trimmed, false, '', $new_version_date_timestamp);
    }
}
/**
 * Change all existing versions
 */
if ($update && isset($_POST['version_ids'])) {
    $version_ids = $_POST['version_ids'];
    $versions = $_POST['version'];
    $date_order = $_POST['date_order'];
    $type = $_POST['type'];
    $description = $_POST['description'];
    for ($version_index = 0; $version_index < count($version_ids); $version_index++) {
        $version = version_get($version_ids[$version_index]);
        $version_id = $version->id;
        $project_id = version_get_field($version_id, 'project_id');
        $released = null;
        $obsolete = null;
        if (isset($_POST['released' . $version_index])) {
            $released = $_POST['released' . $version_index];
        }
        if (isset($_POST['obsolete' . $version_index])) {
            $obsolete = $_POST['obsolete' . $version_index];
        }
        if (!is_null($versions)) {
            $new_version = $versions[$version_index];
            $version->version = trim($new_version);
        }
        if (is_null($released)) {
            $version->released = false;
        } else {
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:31,代码来源:manage_versions_update.php

示例8: version_remove

/**
 * Remove a version from the project
 * @param int $p_version_id
 * @param string $p_new_version
 * @return true
 */
function version_remove($p_version_id, $p_new_version = '')
{
    $c_version_id = db_prepare_int($p_version_id);
    version_ensure_exists($p_version_id);
    $t_old_version = version_get_field($p_version_id, 'version');
    $t_project_id = version_get_field($p_version_id, 'project_id');
    $c_project_id = db_prepare_int($t_project_id);
    $t_project_version_table = db_get_table('project_version');
    $t_bug_table = db_get_table('bug');
    $query = "DELETE FROM {$t_project_version_table}\n\t\t\t\t  WHERE id=" . db_param();
    db_query_bound($query, array($c_version_id));
    $t_project_list = array($c_project_id);
    if (config_get('subprojects_inherit_versions')) {
        $t_project_list = array_merge($t_project_list, project_hierarchy_get_all_subprojects($c_project_id, true));
    }
    $t_project_list = implode(',', $t_project_list);
    $query = "UPDATE {$t_bug_table}\n\t\t\t\t  SET version=" . db_param() . "\n\t\t\t\t  WHERE project_id IN ( {$t_project_list} ) AND version=" . db_param();
    db_query_bound($query, array($p_new_version, $t_old_version));
    $query = "UPDATE {$t_bug_table}\n\t\t\t\t  SET fixed_in_version=" . db_param() . "\n\t\t\t\t  WHERE ( project_id IN ( {$t_project_list} ) ) AND ( fixed_in_version=" . db_param() . ')';
    db_query_bound($query, array($p_new_version, $t_old_version));
    $query = "UPDATE {$t_bug_table}\n\t\t\t\t  SET target_version=" . db_param() . "\n\t\t\t\t  WHERE ( project_id IN ( {$t_project_list} ) ) AND ( target_version=" . db_param() . ')';
    db_query_bound($query, array($p_new_version, $t_old_version));
    # db_query errors on failure so:
    return true;
}
开发者ID:kaos,项目名称:mantisbt,代码行数:31,代码来源:version_api.php

示例9: version_remove

function version_remove($p_version_id, $p_new_version = '')
{
    $c_version_id = db_prepare_int($p_version_id);
    $c_new_version = db_prepare_string($p_new_version);
    version_ensure_exists($p_version_id);
    $t_old_version = version_get_field($p_version_id, 'version');
    $t_project_id = version_get_field($p_version_id, 'project_id');
    $c_old_version = db_prepare_string($t_old_version);
    $c_project_id = db_prepare_int($t_project_id);
    $t_project_version_table = config_get('mantis_project_version_table');
    $t_bug_table = config_get('mantis_bug_table');
    $query = "DELETE FROM {$t_project_version_table}\r\n\t\t\t\t  WHERE id='{$c_version_id}'";
    db_query($query);
    $query = "UPDATE {$t_bug_table}\r\n\t\t\t\t  SET version='{$c_new_version}'\r\n\t\t\t\t  WHERE project_id='{$c_project_id}' AND version='{$c_old_version}'";
    db_query($query);
    $query = "UPDATE {$t_bug_table}\r\n\t\t\t\t  SET fixed_in_version='{$c_new_version}'\r\n\t\t\t\t  WHERE ( project_id='{$c_project_id}' ) AND ( fixed_in_version='{$c_old_version}' )";
    db_query($query);
    # db_query() errors on failure so:
    return true;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:20,代码来源:version_api.php

示例10: mc_project_version_delete

/**
 * Delete a version.
 *
 * @param string  $p_username   The name of the user trying to delete the version.
 * @param string  $p_password   The password of the user.
 * @param integer $p_version_id A version's id.
 * @return boolean returns true or false depending on the success of the delete action
 */
function mc_project_version_delete($p_username, $p_password, $p_version_id)
{
    global $g_project_override;
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (is_blank($p_version_id)) {
        return SoapObjectsFactory::newSoapFault('Client', 'Mandatory field "version_id" was missing');
    }
    if (!version_exists($p_version_id)) {
        return SoapObjectsFactory::newSoapFault('Client', 'Version \'' . $p_version_id . '\' does not exist.');
    }
    $t_project_id = version_get_field($p_version_id, 'project_id');
    $g_project_override = $t_project_id;
    if (!mci_has_readwrite_access($t_user_id, $t_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    if (!mci_has_access(config_get('manage_project_threshold'), $t_user_id, $t_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    return version_remove($p_version_id);
}
开发者ID:derrickweaver,项目名称:mantisbt,代码行数:31,代码来源:mc_project_api.php

示例11: error_parameters

        error_parameters($f_project);
        trigger_error(ERROR_PROJECT_NOT_FOUND, ERROR);
    }
}
$f_version = gpc_get_string('version', '');
if (is_blank($f_version)) {
    $f_version_id = gpc_get_int('version_id', -1);
    # If both version_id and project_id parameters are supplied, then version_id take precedence.
    if ($f_version_id == -1) {
        if ($f_project_id == -1) {
            $t_project_id = helper_get_current_project();
        } else {
            $t_project_id = $f_project_id;
        }
    } else {
        $t_project_id = version_get_field($f_version_id, 'project_id');
    }
} else {
    if ($f_project_id == -1) {
        $t_project_id = helper_get_current_project();
    } else {
        $t_project_id = $f_project_id;
    }
    $f_version_id = version_get_id($f_version, $t_project_id);
    if ($f_version_id === false) {
        error_parameters($f_version);
        trigger_error(ERROR_VERSION_NOT_FOUND, ERROR);
    }
}
if (ALL_PROJECTS == $t_project_id) {
    $t_project_ids_to_check = user_get_all_accessible_projects($t_user_id, ALL_PROJECTS);
开发者ID:gtn,项目名称:mantisbt,代码行数:31,代码来源:roadmap_page.php

示例12: ob_get_contents

 }
 $t_html_message = ob_get_contents();
 ob_end_clean();
 $t_id_list = array();
 if (plugin_config_get('notify_handler', PLUGINS_RELEASEMGT_NOTIFY_HANDLER_DEFAULT) == ON) {
     $t_user_list = project_get_all_user_rows($t_project_id, config_get('handle_bug_threshold'));
     foreach ($t_user_list as $t_user) {
         $t_id_list[] = $t_user['id'];
     }
 }
 // Get reporter
 if (plugin_config_get('notify_reporter', PLUGINS_RELEASEMGT_NOTIFY_REPORTER_DEFAULT) == ON) {
     if ($t_version == 0) {
         $t_query = 'SELECT reporter_id FROM ' . db_get_table('mantis_bug_table') . ' WHERE project_id=' . db_prepare_int($t_project_id) . ' AND fixed_in_version=\'\'';
     } else {
         $t_query = 'SELECT reporter_id FROM ' . db_get_table('mantis_bug_table') . ' WHERE project_id=' . db_prepare_int($t_project_id) . ' AND fixed_in_version=\'' . db_prepare_string(version_get_field($t_version, 'version')) . '\'';
     }
     $t_result = db_query($t_query);
     while ($t_row = db_fetch_array($t_result)) {
         $t_id_list[] = $t_row['reporter_id'];
     }
 }
 for ($i = 0; $i < count($t_id_list); $i++) {
     $t_id_list[$i] = user_get_email($t_id_list[$i]);
 }
 // Add users
 $t_emails = explode(',', plugin_config_get('notify_email', PLUGINS_RELEASEMGT_NOTIFY_EMAIL_DEFAULT));
 foreach ($t_emails as $t_email) {
     if (trim($t_email) != '') {
         $t_id_list[] = trim($t_email);
     }
开发者ID:jhron,项目名称:mantis-releasemgt,代码行数:31,代码来源:upload.php

示例13: remark_unreachable_issues

/**
 * information about unreachable issues cause of missing project assignment
 *
 * @param $data_row
 */
function remark_unreachable_issues($data_row)
{
    $user_id = $data_row['user_id'];
    $assigned_project_id = $data_row['assigned_project_id'];
    $assigned_to_project = userprojectapi::get_assigned_to_project($user_id, $assigned_project_id);
    $unreachable_issue = userprojectapi::get_unreachable_issue($assigned_to_project);
    if ($unreachable_issue) {
        $target_version_id = $data_row['target_version_id'];
        $target_version = '';
        if (strlen($target_version_id) > 0) {
            $target_version = version_get_field($target_version_id, 'version');
        }
        echo '<a href="search.php?project_id=' . $assigned_project_id . userprojectapi::prepare_filter_string() . '&amp;handler_id=' . userprojectapi::get_link_user_id($user_id) . '&amp;sticky_issues=on' . '&amp;target_version=' . $target_version . '&amp;sortby=last_updated' . '&amp;dir=DESC' . '&amp;hide_status_id=-2' . '&amp;match_type=0">';
        echo wordwrap(plugin_lang_get('remark_noProject'), 30, '<br />');
        echo '</a>';
        echo '<br/>' . PHP_EOL;
    }
}
开发者ID:Cre-ator,项目名称:Whiteboard.UserProjectView-Plugin,代码行数:23,代码来源:UserProject.php

示例14: print_editor_table_title

 /**
  * @param $type_string
  * @param $version_id
  * @param $print_flag
  */
 public function print_editor_table_title($type_string, $version_id, $print_flag)
 {
     echo '<tr>';
     echo '<td class="document_title_label">' . plugin_lang_get('head_title') . '</td>';
     echo '<td class="document_title" colspan="2">' . $type_string . ' - ' . version_get_field($version_id, 'version') . '</td>';
     if (!$print_flag) {
         echo '<td class="document_title_controls">';
         echo '<form action="' . plugin_page('editor') . '" method="post">';
         echo '<span class="input">';
         echo '<input type="hidden" name="version_id" value="' . $version_id . '" />';
         echo '<input type="submit" name="print" class="button" value="' . plugin_lang_get('editor_printhtml') . '"/>';
         echo '</span>';
         echo '</form>';
         //echo '<form method="post" name="form_set_source" action="' . plugin_page ( 'editorpdf' ) . '">';
         //echo '<span class="input">';
         //echo '<input type="hidden" name="version_id" value="' . $version_id . '" />';
         //echo '&nbsp<input type="submit" name="printtopdf" class="button" value="' . plugin_lang_get ( 'editor_printpdf' ) . '"/>';
         //echo '</span>';
         //echo '</form>';
         echo '</td>';
     }
     echo '</tr>';
 }
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:28,代码来源:specmanagement_editor_api.php

示例15: mc_project_version_delete

/**
 * Delete a version.
 *
 * @param string $p_username  The name of the user trying to delete the version.
 * @param string $p_password  The password of the user.
 * @param integer $p_version_id A version's id
 * @return bool returns true or false depending on the success of the delete action
 */
function mc_project_version_delete($p_username, $p_password, $p_version_id)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (is_blank($p_version_id)) {
        return new soap_fault('Client', '', 'Mandatory field "version_id" was missing');
    }
    if (!version_exists($p_version_id)) {
        return new soap_fault('Client', '', "Version '{$p_version_id}' does not exist.");
    }
    $t_project_id = version_get_field($p_version_id, 'project_id');
    if (!mci_has_readwrite_access($t_user_id, $t_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    if (!mci_has_access(config_get('manage_project_threshold'), $t_user_id, $t_project_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    return version_remove($p_version_id);
}
开发者ID:kaos,项目名称:mantisbt,代码行数:29,代码来源:mc_project_api.php


注:本文中的version_get_field函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。