• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP helper_get_current_project函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: print_versions

/**
 * @param $edit_page
 * @param $obsolete_flag
 */
function print_versions($edit_page, $obsolete_flag)
{
    $specmanagement_database_api = new specmanagement_database_api();
    $specmanagement_print_api = new specmanagement_print_api();
    $obsolote = false;
    if ($obsolete_flag) {
        $obsolote = null;
    }
    if ($edit_page) {
        $versions = version_get_all_rows_with_subs(helper_get_current_project(), null, null);
    } else {
        $versions = version_get_all_rows_with_subs(helper_get_current_project(), null, $obsolote);
    }
    for ($version_index = 0; $version_index < count($versions); $version_index++) {
        $version = $versions[$version_index];
        $current_type = $specmanagement_database_api->get_type_string($specmanagement_database_api->get_type_by_version($version['id']));
        $specmanagement_print_api->printRow();
        echo '<input type="hidden" name="version_ids[]" value="' . $version['id'] . '"/>';
        print_name($edit_page, $version);
        print_released($edit_page, $version_index, $version);
        print_obsolete($edit_page, $version_index, $version);
        print_date($edit_page, $version);
        print_type($edit_page, $current_type, $version);
        print_description($edit_page, $version);
        print_action($edit_page, $version);
        echo '</tr>';
    }
}
开发者ID:Cre-ator,项目名称:Whiteboard.SpecificationManagement-Plugin,代码行数:32,代码来源:manage_versions.php


示例2: renderIssues

    function renderIssues($status)
    {
        $content = array();
        $t_project_id = helper_get_current_project();
        $t_bug_table = db_get_table('mantis_bug_table');
        $t_user_id = auth_get_current_user_id();
        $specific_where = helper_project_specific_where($t_project_id, $t_user_id);
        if ($this->severity) {
            $severityCond = '= ' . $this->severity;
        } else {
            $severityCond = '> -1';
        }
        $query = "SELECT *\n\t\t\tFROM {$t_bug_table}\n\t\t\tWHERE {$specific_where}\n\t\t\tAND status = {$status}\n\t\t\tAND severity {$severityCond}\n\t\t\tORDER BY last_updated DESC\n\t\t\tLIMIT 20";
        $result = db_query_bound($query);
        $category_count = db_num_rows($result);
        for ($i = 0; $i < $category_count; $i++) {
            $row = db_fetch_array($result);
            //pre_var_dump($row);
            $content[] = '<div class="portlet ui-helper-clearfix" id="' . $row['id'] . '">
			<div class="portlet-header">' . string_get_bug_view_link($row['id']) . ': ' . $row['summary'] . '</div>
			<div class="portlet-content">' . ($row['reporter_id'] ? 'Reporter: ' . user_get_name($row['reporter_id']) . BR : '') . ($row['handler_id'] ? 'Assigned: ' . user_get_name($row['handler_id']) . BR : '') . '</div></div>';
        }
        if ($row) {
            //pre_var_dump(array_keys($row));
        }
        return $content;
    }
开发者ID:vboctor,项目名称:LikeTrello,代码行数:27,代码来源:trello.php


示例3: get_closed_count_by_date

function get_closed_count_by_date($p_date)
{
    $t_project_id = helper_get_current_project();
    $d_arr = explode('/', $p_date);
    $p_date = $d_arr[2] . '-' . $d_arr[0] . '-' . $d_arr[1];
    $query = "SELECT COUNT(*)\r\n\t\t\t\tFROM mantis_bug_table\r\n\t\t\t\tWHERE last_updated<='{$p_date}' AND\r\n\t\t\t\t\tstatus='90' AND\r\n\t\t\t\t\tproject_id='{$t_project_id}'";
    $result = db_query($query);
    return db_result($result, 0, 0);
}
开发者ID:amjadtbssm,项目名称:website,代码行数:9,代码来源:graph_by_cumulative.php


示例4: footer

 function footer()
 {
     $t_project_id = helper_get_current_project();
     $t_user_id = auth_get_current_user_id();
     $t_user_has_level = user_get_access_level($t_user_id, $t_project_id) >= plugin_config_get('BackgroundImageAccessLevel', PLUGINS_BACKGROUNDIMAGEVIEW_THRESHOLD_LEVEL_DEFAULT);
     if (plugin_config_get('ShowInFooter') == 1 && $t_user_has_level) {
         return '<address>' . $this->name . ' ' . $this->version . ' Copyright &copy; 2015 by <a href="mailto://' . $this->contact . '">' . $this->author . '</a></address>';
     }
     return null;
 }
开发者ID:QuestorX,项目名称:MantisBT-Plugin.BackgroundImageView,代码行数:10,代码来源:BackgroundImageView.php


示例5: csv_get_default_filename

/**
 * if all projects selected, default to <username>.csv, otherwise default to
 * <projectname>.csv.
 * @return string filename
 * @access public
 */
function csv_get_default_filename()
{
    $t_current_project_id = helper_get_current_project();
    if (ALL_PROJECTS == $t_current_project_id) {
        $t_filename = user_get_name(auth_get_current_user_id());
    } else {
        $t_filename = project_get_field($t_current_project_id, 'name');
    }
    return $t_filename . '.csv';
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:16,代码来源:csv_api.php


示例6: set_overrides

/**
 * Set overrides
 * @param string $p_config     Configuration value.
 * @param bool   $p_can_change True if user has access level to change config
 * @param string $p_color      CSS class name
 * @return void
 */
function set_overrides($p_config, $p_can_change, $p_color)
{
    global $g_overrides;
    if (!$p_can_change) {
        return;
    }
    $t_project = helper_get_current_project();
    if ($t_project == ALL_PROJECTS && $p_color == COLOR_GLOBAL || $t_project != ALL_PROJECTS && $p_color == COLOR_PROJECT) {
        $g_overrides[$p_config] = $p_config;
    }
}
开发者ID:gtn,项目名称:mantisbt,代码行数:18,代码来源:manage_config_workflow_page.php


示例7: add_columns

 function add_columns()
 {
     $t_project_id = helper_get_current_project();
     $t_user_id = auth_get_current_user_id();
     $t_user_has_level = user_get_access_level($t_user_id, $t_project_id) >= plugin_config_get('RelationshipColumnAccessLevel', PLUGINS_RELATIONSHIPCOLUMNVIEW_THRESHOLD_LEVEL_DEFAULT);
     $t_result = array();
     if (plugin_config_get('ShowRelationshipColumn') == gpc_get_int('ShowRelationshipColumn', ON) && $t_user_has_level) {
         if ('1.2.' == substr(MANTIS_VERSION, 0, 4)) {
             require_once 'classes' . DIRECTORY_SEPARATOR . 'RelationshipColumn.class.1.2.0.php';
         } else {
             require_once 'classes' . DIRECTORY_SEPARATOR . 'RelationshipColumn.class.1.3.0.php';
         }
         $t_result[] = 'RelationshipColumn';
     }
     return $t_result;
 }
开发者ID:QuestorX,项目名称:MantisBT-Plugin.RelationshipColumnView,代码行数:16,代码来源:RelationshipColumnView.php


示例8: 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


示例9: menu

 function menu()
 {
     if (plugin_config_get('show_menu')) {
         require_once __DIR__ . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'wmApi.php';
         $projectId = helper_get_current_project();
         $userId = auth_get_current_user_id();
         $userAccessLevel = user_get_access_level($userId, $projectId);
         $whiteboardPlugins = wmApi::getWhiteboardPlugins();
         $showMenu = false;
         foreach ($whiteboardPlugins as $whiteboardPlugin) {
             $pluginAccessLevel = $whiteboardPlugin[2];
             if (user_is_administrator($userId) || $userAccessLevel >= $pluginAccessLevel) {
                 $showMenu = true;
                 break;
             }
         }
         if ($showMenu) {
             return '<a href="' . plugin_page('whiteboard_menu') . '">' . plugin_lang_get('menu_title') . '</a>';
         }
     }
     return null;
 }
开发者ID:Cre-ator,项目名称:Whiteboard.Menu-Plugin,代码行数:22,代码来源:WhiteboardMenu.php


示例10: __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"];
         }
     }
 }
开发者ID:pedroresende,项目名称:MantisBTKanbanBoard,代码行数:22,代码来源:kanban.php


示例11: print_tbody

/**
 * Print table body
 * @param $status_cols
 */
function print_tbody($status_cols)
{
    $storyboard_db_api = new storyboard_db_api();
    $project_spec_bug_ids = $storyboard_db_api->get_bugarray_by_project(helper_get_current_project());
    $types = $storyboard_db_api->select_all_types();
    echo '<tbody>';
    foreach ($types as $type) {
        echo '<tr>';
        echo '<td class="category">' . $type[1] . '</td>';
        foreach ($status_cols as $status_col) {
            echo '<td class="story_baord">';
            foreach ($project_spec_bug_ids as $project_spec_bug_id) {
                $card = $storyboard_db_api->select_story_card($project_spec_bug_id);
                if ($card[2] == $type[0]) {
                    $bug_status = bug_get_field($project_spec_bug_id, 'status');
                    if ($bug_status == $status_col) {
                        echo '<a href="' . string_get_bug_view_url($project_spec_bug_id) . '" class="rcv_tooltip">';
                        echo '<div class="story_card">';
                        echo string_display_line(bug_format_id($project_spec_bug_id));
                        echo '<span>';
                        print_story_card_title($project_spec_bug_id);
                        print_story_card_info('summary', bug_get_field($project_spec_bug_id, 'summary'), false);
                        print_story_card_info('description', bug_get_text_field($project_spec_bug_id, 'description'), false);
                        print_story_card_info('card_risk', $card[3], true);
                        print_story_card_info('card_story_pt', $card[4], true);
                        print_story_card_info('card_story_pt_post', $card[5], true);
                        print_story_card_info('card_acc_crit', $card[6], true);
                        echo '</span>';
                        echo '</div>';
                        echo '</a><br/><br/><br/>';
                    }
                }
            }
            echo '</td>';
        }
        echo '</tr>';
    }
    echo '</tbody>';
}
开发者ID:Cre-ator,项目名称:Whiteboard.StoryBoard-Plugin,代码行数:43,代码来源:storyboard_index.php


示例12: timeline_get_affected_issues

/**
 * Get list of affected issues between a given time period
 * @param integer $p_start_time Timestamp representing start time of the period.
 * @param integer $p_end_time   Timestamp representing end time of the period.
 * @return array
 */
function timeline_get_affected_issues($p_start_time, $p_end_time)
{
    $t_query = 'SELECT DISTINCT(bug_id) from {bug_history} WHERE date_modified >= ' . db_param() . ' AND date_modified < ' . db_param();
    $t_result = db_query($t_query, array($p_start_time, $p_end_time));
    $t_current_project = helper_get_current_project();
    $t_all_issue_ids = array();
    while (($t_row = db_fetch_array($t_result)) !== false) {
        $t_all_issue_ids[] = $t_row['bug_id'];
    }
    bug_cache_array_rows($t_all_issue_ids);
    $t_issue_ids = array();
    foreach ($t_all_issue_ids as $t_issue_id) {
        if ($t_current_project != ALL_PROJECTS && $t_current_project != bug_get_field($t_issue_id, 'project_id')) {
            continue;
        }
        if (!access_has_bug_level(config_get('view_bug_threshold'), $t_issue_id)) {
            continue;
        }
        $t_issue_ids[] = $t_issue_id;
    }
    return $t_issue_ids;
}
开发者ID:skbly7,项目名称:mantisbt,代码行数:28,代码来源:timeline_api.php


示例13: printWhiteboardMenu

 /**
  * print menu entrys for each plugin
  */
 public static function printWhiteboardMenu()
 {
     $projectId = helper_get_current_project();
     $userId = auth_get_current_user_id();
     $userAccessLevel = user_get_access_level($userId, $projectId);
     $whiteboardPlugins = self::getWhiteboardPlugins();
     $whiteboardPluginCount = count($whiteboardPlugins);
     echo '<div class="table">';
     for ($index = 0; $index < $whiteboardPluginCount; $index++) {
         $whiteboardPlugin = $whiteboardPlugins[$index];
         $plugin = $whiteboardPlugin[1];
         $pluginAccessLevel = $whiteboardPlugin[2];
         $pluginShowMenu = $whiteboardPlugin[3];
         if ((user_is_administrator($userId) || $userAccessLevel >= $pluginAccessLevel) && $pluginShowMenu == 1) {
             if ($index > 0) {
                 echo '<div class="item">&nbsp;|&nbsp;</div>';
             }
             $pluginLink = $whiteboardPlugin[4];
             echo '<div class="item"><a href="' . $pluginLink . '">' . plugin_lang_get('menu_title', $plugin) . '</a></div>';
         }
     }
     echo '</div>';
 }
开发者ID:Cre-ator,项目名称:Whiteboard.Menu-Plugin,代码行数:26,代码来源:wmApi.php


示例14: print_project_user_list_option_list

function print_project_user_list_option_list($p_project_id = null)
{
    $t_mantis_project_user_list_table = db_get_table('mantis_project_user_list_table');
    $t_mantis_user_table = db_get_table('mantis_user_table');
    if (null === $p_project_id) {
        $p_project_id = helper_get_current_project();
    }
    $c_project_id = (int) $p_project_id;
    $t_adm = config_get_global('admin_site_threshold');
    $query = "SELECT DISTINCT u.id, u.username, u.realname\n\t\t\t\tFROM {$t_mantis_user_table} u\n\t\t\t\tLEFT JOIN {$t_mantis_project_user_list_table} p\n\t\t\t\tON p.user_id=u.id AND p.project_id=" . db_param() . "\n\t\t\t\tWHERE u.access_level<" . db_param() . " AND\n\t\t\t\t\tu.enabled = " . db_param() . " AND\n\t\t\t\t\tp.user_id IS NULL\n\t\t\t\tORDER BY u.realname, u.username";
    $result = db_query_bound($query, array($c_project_id, $t_adm, true));
    $t_display = array();
    $t_sort = array();
    $t_users = array();
    $t_show_realname = ON == config_get('show_realname');
    $t_sort_by_last_name = ON == config_get('sort_by_last_name');
    $category_count = db_num_rows($result);
    for ($i = 0; $i < $category_count; $i++) {
        $row = db_fetch_array($result);
        $t_users[] = $row['id'];
        $t_user_name = string_attribute($row['username']);
        $t_sort_name = $t_user_name;
        if (isset($row['realname']) && $row['realname'] != '' && $t_show_realname) {
            $t_user_name = string_attribute($row['realname']);
            if ($t_sort_by_last_name) {
                $t_sort_name_bits = explode(' ', utf8_strtolower($t_user_name), 2);
                $t_sort_name = (isset($t_sort_name_bits[1]) ? $t_sort_name_bits[1] . ', ' : '') . $t_sort_name_bits[0];
            } else {
                $t_sort_name = utf8_strtolower($t_user_name);
            }
        }
        $t_display[] = $t_user_name;
        $t_sort[] = $t_sort_name;
    }
    array_multisort($t_sort, SORT_ASC, SORT_STRING, $t_users, $t_display);
    $t_count = count($t_sort);
    for ($i = 0; $i < $t_count; $i++) {
        echo '<option value="' . $t_users[$i] . '">' . $t_display[$i] . '</option>';
    }
}
开发者ID:Tarendai,项目名称:spring-website,代码行数:40,代码来源:print_api.php


示例15: filter_db_get_available_queries

/**
 * Note: any changes made in this function should be reflected in
 * mci_filter_db_get_available_queries())
 * @param integer $p_project_id A valid project identifier.
 * @param integer $p_user_id    A valid user identifier.
 * @return mixed
 */
function filter_db_get_available_queries($p_project_id = null, $p_user_id = null)
{
    $t_overall_query_arr = array();
    if (null === $p_project_id) {
        $t_project_id = helper_get_current_project();
    } else {
        $t_project_id = (int) $p_project_id;
    }
    if (null === $p_user_id) {
        $t_user_id = auth_get_current_user_id();
    } else {
        $t_user_id = (int) $p_user_id;
    }
    # If the user doesn't have access rights to stored queries, just return
    if (!access_has_project_level(config_get('stored_query_use_threshold'))) {
        return $t_overall_query_arr;
    }
    # Get the list of available queries. By sorting such that public queries are
    # first, we can override any query that has the same name as a private query
    # with that private one
    $t_query = 'SELECT * FROM {filters}
					WHERE (project_id=' . db_param() . '
						OR project_id=0)
					AND name!=\'\'
					AND (is_public = ' . db_param() . '
						OR user_id = ' . db_param() . ')
					ORDER BY is_public DESC, name ASC';
    $t_result = db_query($t_query, array($t_project_id, true, $t_user_id));
    while ($t_row = db_fetch_array($t_result)) {
        $t_overall_query_arr[$t_row['id']] = $t_row['name'];
    }
    $t_overall_query_arr = array_unique($t_overall_query_arr);
    asort($t_overall_query_arr);
    return $t_overall_query_arr;
}
开发者ID:vipjaven,项目名称:mantisbt,代码行数:42,代码来源:filter_api.php


示例16: news_ensure_enabled

 * @link http://www.mantisbt.org
 */
/**
 * MantisBT Core API's
 */
require_once 'core.php';
require_once 'news_api.php';
require_once 'print_api.php';
news_ensure_enabled();
form_security_validate('news_add');
access_ensure_project_level(config_get('manage_news_threshold'));
$f_view_state = gpc_get_int('view_state');
$f_headline = gpc_get_string('headline');
$f_announcement = gpc_get_bool('announcement');
$f_body = gpc_get_string('body');
$t_news_id = news_create(helper_get_current_project(), auth_get_current_user_id(), $f_view_state, $f_announcement, $f_headline, $f_body);
form_security_purge('news_add');
$t_news_row = news_get_row($t_news_id);
html_page_top();
?>

<br />
<div align="center">
<?php 
echo lang_get('operation_successful') . '<br />';
print_bracket_link('news_menu_page.php', lang_get('proceed'));
echo '<br /><br />';
print_news_entry_from_row($t_news_row);
?>
</div>
开发者ID:fur81,项目名称:zofaxiopeu,代码行数:30,代码来源:news_add.php


示例17: helper_get_default_export_filename

function helper_get_default_export_filename($p_extension_with_dot, $p_prefix = '', $p_suffix = '')
{
    $t_filename = $p_prefix;
    $t_current_project_id = helper_get_current_project();
    if (ALL_PROJECTS == $t_current_project_id) {
        $t_filename .= user_get_name(auth_get_current_user_id());
    } else {
        $t_filename .= project_get_field($t_current_project_id, 'name');
    }
    return $t_filename . $p_suffix . $p_extension_with_dot;
}
开发者ID:amjadtbssm,项目名称:website,代码行数:11,代码来源:helper_api.php


示例18: print_column_category

function print_column_category($p_row, $p_columns_target = COLUMNS_TARGET_VIEW_PAGE)
{
    global $t_sort, $t_dir;
    # grab the project name
    $t_project_name = project_get_field($p_row['project_id'], 'name');
    echo '<td class="center">';
    # type project name if viewing 'all projects' or if issue is in a subproject
    if (ON == config_get('show_bug_project_links') && helper_get_current_project() != $p_row['project_id']) {
        echo '<small>[';
        print_view_bug_sort_link($t_project_name, 'project_id', $t_sort, $t_dir, $p_columns_target);
        echo ']</small><br />';
    }
    echo string_display($p_row['category']);
    echo '</td>';
}
开发者ID:centaurustech,项目名称:BenFund,代码行数:15,代码来源:columns_api.php


示例19: process

 public function process(XMLreader $reader)
 {
     //print "\nImportIssue process()\n";
     $t_project_id = helper_get_current_project();
     // TODO: category_get_id_by_name could work by default on current project
     $userId = auth_get_current_user_id();
     $t_custom_fields = array();
     $t_bugnotes = array();
     $t_attachments = array();
     $depth = $reader->depth;
     while ($reader->read() && ($reader->depth > $depth || $reader->nodeType != XMLReader::END_ELEMENT)) {
         if ($reader->nodeType == XMLReader::ELEMENT) {
             switch ($reader->localName) {
                 case 'reporter':
                     $t_old_id = $reader->getAttribute('id');
                     $reader->read();
                     $this->newbug_->reporter_id = $this->get_user_id($reader->value, $userId);
                     //echo "reporter: old id = $t_old_id - new id = {$this->newbug_->reporter_id}\n";
                     break;
                 case 'handler':
                     $t_old_id = $reader->getAttribute('id');
                     $reader->read();
                     $this->newbug_->handler_id = $this->get_user_id($reader->value, $userId);
                     //echo "handler: old id = $t_old_id - new id = {$this->newbug_->handler_id}\n";
                     break;
                 case 'category':
                     $this->newbug_->category_id = $this->defaultCategory_;
                     if (version_compare(MANTIS_VERSION, '1.2', '>') === true) {
                         $reader->read();
                         if ($this->keepCategory_) {
                             # Check for the category's existence in the current project
                             # well as its parents (if any)
                             $t_projects_hierarchy = project_hierarchy_inheritance($t_project_id);
                             foreach ($t_projects_hierarchy as $t_project) {
                                 $t_category_id = category_get_id_by_name($reader->value, $t_project, false);
                                 if ($t_category_id !== false) {
                                     $this->newbug_->category_id = $t_category_id;
                                     break;
                                 }
                             }
                         }
                         //	echo "new id = {$this->newbug_->category_id}\n";
                     }
                     break;
                 case 'eta':
                 case 'priority':
                 case 'projection':
                 case 'reproducibility':
                 case 'resolution':
                 case 'severity':
                 case 'status':
                 case 'view_state':
                     $t_field = $reader->localName;
                     $t_id = $reader->getAttribute('id');
                     $reader->read();
                     $t_value = $reader->value;
                     // Here we assume ids have the same meaning in both installations
                     // TODO add a check for customized values
                     $this->newbug_->{$t_field} = $t_id;
                     break;
                 case 'id':
                     $reader->read();
                     $this->old_id_ = $reader->value;
                     break;
                 case 'project':
                     // ignore original value, use current project
                     $this->newbug_->project_id = $t_project_id;
                     break;
                 case 'custom_fields':
                     // store custom fields
                     $i = -1;
                     $depth_cf = $reader->depth;
                     while ($reader->read() && ($reader->depth > $depth_cf || $reader->nodeType != XMLReader::END_ELEMENT)) {
                         if ($reader->nodeType == XMLReader::ELEMENT) {
                             if ($reader->localName == 'custom_field') {
                                 $t_custom_fields[++$i] = new stdClass();
                             }
                             switch ($reader->localName) {
                                 default:
                                     $field = $reader->localName;
                                     $reader->read();
                                     $t_custom_fields[$i]->{$field} = $reader->value;
                             }
                         }
                     }
                     break;
                 case 'bugnotes':
                     // store bug notes
                     $i = -1;
                     $depth_bn = $reader->depth;
                     while ($reader->read() && ($reader->depth > $depth_bn || $reader->nodeType != XMLReader::END_ELEMENT)) {
                         if ($reader->nodeType == XMLReader::ELEMENT) {
                             if ($reader->localName == 'bugnote') {
                                 $t_bugnotes[++$i] = new stdClass();
                             }
                             switch ($reader->localName) {
                                 case 'reporter':
                                     $t_old_id = $reader->getAttribute('id');
                                     $reader->read();
                                     $t_bugnotes[$i]->reporter_id = $this->get_user_id($reader->value, $userId);
//.........这里部分代码省略.........
开发者ID:N0ctrnl,项目名称:mantisbt,代码行数:101,代码来源:Issue.php


示例20: print_build_option_list

/**
 * print build option list
 * @param string $p_build The current build value.
 * @return void
 */
function print_build_option_list($p_build = '')
{
    $t_overall_build_arr = array();
    $t_project_id = helper_get_current_project();
    $t_project_where = helper_project_specific_where($t_project_id);
    # Get the "found in" build list
    $t_query = 'SELECT DISTINCT build
				FROM {bug}
				WHERE ' . $t_project_where . '
				ORDER BY build DESC';
    $t_result = db_query($t_query);
    while ($t_row = db_fetch_array($t_result)) {
        $t_overall_build_arr[] = $t_row['build'];
    }
    $t_max_length = config_get('max_dropdown_length');
    foreach ($t_overall_build_arr as $t_build_unescaped) {
        $t_build = string_attribute($t_build_unescaped);
        echo '<option value="' . $t_build . '"';
        check_selected($p_build, $t_build_unescaped);
        echo '>' . string_shorten($t_build, $t_max_length) . '</option>';
    }
}
开发者ID:gtn,项目名称:mantisbt,代码行数:27,代码来源:print_api.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP helper_get_tab_index函数代码示例发布时间:2022-05-15
下一篇:
PHP helper_get_columns_to_view函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap