function config_obsolete($var, $replace)
{
    if (config_is_set($var)) {
        echo '$g_' . $var . ' is now obsolete';
        if ($replace != '') {
            echo ', please use $g_' . $replace;
        }
        exit;
    }
}
Exemple #2
0
function mc_config_get_string($p_username, $p_password, $p_config_var)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return new soap_fault('Client', '', 'Access Denied');
    }
    if (!mci_has_readonly_access($t_user_id)) {
        return new soap_fault('Client', '', 'Access Denied');
    }
    if (mci_config_is_private($p_config_var)) {
        return new soap_fault('Client', '', "Access to '{$p_config_var}' is denied");
    }
    if (!config_is_set($p_config_var)) {
        return new soap_fault('Client', '', "Config '{$p_config_var}' is undefined");
    }
    return config_get($p_config_var);
}
Exemple #3
0
function mc_config_get_string($p_username, $p_password, $p_config_var)
{
    $t_user_id = mci_check_login($p_username, $p_password);
    if ($t_user_id === false) {
        return mci_soap_fault_login_failed();
    }
    if (!mci_has_readonly_access($t_user_id)) {
        return mci_soap_fault_access_denied($t_user_id);
    }
    if (config_is_private($p_config_var)) {
        return SoapObjectsFactory::newSoapFault('Client', "Access to '{$p_config_var}' is denied");
    }
    if (!config_is_set($p_config_var)) {
        return SoapObjectsFactory::newSoapFault('Client', "Config '{$p_config_var}' is undefined");
    }
    return config_get($p_config_var);
}
            $agilemantis_pb->doUserStoryToSprint($row, $sprintName);
            bug_update_date($row);
        }
        if ($resetPlannedCapacity) {
            echo '<br><center><span class="message_error">' . plugin_lang_get('assume_userstories_error_106C00') . '</span></center>';
        }
        echo '<br><center><span class="message_ok">' . plugin_lang_get('assume_userstories_assume_successfull') . '</span></center>';
    } else {
        echo '<br><center><span class="message_error">' . plugin_lang_get('assume_userstories_error_120C00') . '</span></center>';
    }
}
# set different filters for assume new user stories
if (!config_is_set('current_user_assume_userstories_filter', auth_get_current_user_id())) {
    config_set('current_user_assume_userstories_filter', '', auth_get_current_user_id());
}
if (!config_is_set('current_user_assume_userstories_filter_direction', auth_get_current_user_id())) {
    config_set('current_user_assume_userstories_filter_direction', 'ASC', auth_get_current_user_id());
}
if (config_get('current_user_assume_userstories_filter_direction', null, auth_get_current_user_id()) == 'ASC') {
    $direction = 'DESC';
} else {
    $direction = 'ASC';
}
# check if available
if (plugin_config_get('gadiv_ranking_order') == 0 && config_get('current_user_assume_userstories_filter', null, auth_get_current_user_id()) == 'rankingOrder') {
    config_set('current_user_assume_userstories_filter', '', auth_get_current_user_id());
    config_set('current_user_assume_userstories_filter_direction', 'ASC', auth_get_current_user_id());
}
if (plugin_config_get('gadiv_tracker_planned_costs') == 0 && config_get('current_user_assume_userstories_filter', null, auth_get_current_user_id()) == 'plannedWork') {
    config_set('current_user_assume_userstories_filter', '', auth_get_current_user_id());
    config_set('current_user_assume_userstories_filter_direction', 'ASC', auth_get_current_user_id());
/**
 * Checks if an obsolete configuration variable is still in use.  If so, an error
 * will be generated and the script will exit.
 *
 * @param string $p_var     Old configuration option.
 * @param string $p_replace New configuration option.
 * @return void
 */
function config_obsolete($p_var, $p_replace = '')
{
    global $g_cache_config;
    # @@@ we could trigger a WARNING here, once we have errors that can
    #     have extra data plugged into them (we need to give the old and
    #     new config option names in the warning text)
    if (config_is_set($p_var)) {
        $t_description = 'The configuration option <em>' . $p_var . '</em> is now obsolete';
        $t_info = '';
        # Check if set in the database
        if (is_array($g_cache_config) && array_key_exists($p_var, $g_cache_config)) {
            $t_info .= 'it is currently defined in ';
            if (isset($GLOBALS['g_' . $p_var])) {
                $t_info .= 'config_inc.php, as well as in ';
            }
            $t_info .= 'the database configuration for: <ul>';
            foreach ($g_cache_config[$p_var] as $t_user_id => $t_user) {
                $t_info .= '<li>' . ($t_user_id == 0 ? lang_get('all_users') : user_get_name($t_user_id)) . ': ';
                foreach ($t_user as $t_project_id => $t_project) {
                    $t_info .= project_get_name($t_project_id) . ', ';
                }
                $t_info = rtrim($t_info, ', ') . '</li>';
            }
            $t_info .= '</ul>';
        }
        # Replacement defined
        if (is_array($p_replace)) {
            $t_info .= 'please see the following options: <ul>';
            foreach ($p_replace as $t_option) {
                $t_info .= '<li>' . $t_option . '</li>';
            }
            $t_info .= '</ul>';
        } else {
            if (!is_blank($p_replace)) {
                $t_info .= 'please use ' . $p_replace . ' instead.';
            }
        }
        check_print_test_warn_row($t_description, false, $t_info);
    }
}
Exemple #6
0
function config_obsolete( $p_var, $p_replace ) {

	# @@@ we could trigger a WARNING here, once we have errors that can
	#     have extra data plugged into them (we need to give the old and
	#     new config option names in the warning text)

	if( config_is_set( $p_var ) ) {
		$t_description = '<p><strong>Warning:</strong> The configuration option <tt>$g_' . $p_var . '</tt> is now obsolete</p>';
		if( is_array( $p_replace ) ) {
			$t_info = 'please see the following options: <ul>';
			foreach( $p_replace as $t_option ) {
				$t_info .= '<li>$g_' . $t_option . '</li>';
			}
			$t_info .= '</ul>';
		}
		else if( !is_blank( $p_replace ) ) {
			$t_info = 'please use <tt>$g_' . $p_replace . '</tt> instead.';
		} else {
			$t_info = '';
		}

		print_test_warn_row( $t_description, false, $t_info );
	}
}
Exemple #7
0
function config_obsolete($p_var, $p_replace)
{
    # @@@ we could trigger a WARNING here, once we have errors that can
    #     have extra data plugged into them (we need to give the old and
    #     new config option names in the warning text)
    if (config_is_set($p_var)) {
        print '<p><b>Warning:</b> The configuration option <tt>$g_' . $p_var . '</tt> is now obsolete';
        if (is_array($p_replace)) {
            print ', please see the following options: <ul>';
            foreach ($p_replace as $t_option) {
                print '<li>$g_' . $t_option . '</li>';
            }
            print '</ul>';
        } else {
            if (!is_blank($p_replace)) {
                print ', please use <tt>$g_' . $p_replace . '</tt> instead.';
            }
        }
        print '</p>';
    }
}
Exemple #8
0
# Copyright (C) 2012-2014 gadiv GmbH
#
# agileMantis is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with agileMantis. If not, see <http://www.gnu.org/licenses/>.
html_page_top(plugin_lang_get('info_title'));
if (!config_is_set('plugin_agileMantis_gadiv_agilemantis_version')) {
    config_set('plugin_agileMantis_gadiv_agilemantis_version', 0);
}
?>

<?php 
$t_user_right = $agilemantis_au->authUser();
if ($t_user_right == 2 || $t_user_right == 3 || current_user_is_administrator()) {
    ?>
<br>
<?php 
    include AGILEMANTIS_PLUGIN_URI . '/pages/footer_menu.php';
    ?>
<br>
<?php 
    echo $system;
    if (!config_is_set('burndown_tasks_trend', auth_get_current_user_id())) {
        config_set('burndown_tasks_trend', 1, auth_get_current_user_id());
    }
    if (!config_is_set('utilization_distribution_planned', auth_get_current_user_id())) {
        config_set('utilization_distribution_planned', 1, auth_get_current_user_id());
    }
    if (!config_is_set('utilization_distribution_remains', auth_get_current_user_id())) {
        config_set('utilization_distribution_remains', 1, auth_get_current_user_id());
    }
    if (!config_is_set('utilization_utilizationdetailed', auth_get_current_user_id())) {
        config_set('utilization_utilizationdetailed', 1, auth_get_current_user_id());
    }
    if (!config_is_set('statistic_velocity_amount_of_sprints', auth_get_current_user_id())) {
        config_set('statistic_velocity_amount_of_sprints', 5, auth_get_current_user_id());
    }
    if (!config_is_set('statistic_velocity_referenced_sprint', auth_get_current_user_id())) {
        config_set('statistic_velocity_referenced_sprint', "", auth_get_current_user_id());
    }
    include AGILEMANTIS_PLUGIN_URI . 'pages/sprint_backlog_header.php';
    ?>
<br>
<?php 
    include AGILEMANTIS_PLUGIN_URI . 'pages/sprint_backlog_actions.php';
    ?>
<br>
<center>
<?php 
    if (plugin_is_loaded('agileMantisExpert')) {
        event_signal('EVENT_LOAD_STATISTICS', array(auth_get_current_user_id()));
    } else {
        $images = array();
 function installConfigurationParams()
 {
     if (!config_is_set('plugin_agileMantis_gadiv_workday_in_hours')) {
         config_set('plugin_agileMantis_gadiv_workday_in_hours', 8);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_sprint_length')) {
         config_set('plugin_agileMantis_gadiv_sprint_length', 28);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_storypoint_mode')) {
         config_set('plugin_agileMantis_gadiv_storypoint_mode', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_fibonacci_length')) {
         config_set('plugin_agileMantis_gadiv_fibonacci_length', 10);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_show_storypoints')) {
         config_set('plugin_agileMantis_gadiv_show_storypoints', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_task_unit_mode')) {
         config_set('plugin_agileMantis_gadiv_task_unit_mode', 'h');
     }
     if (!config_is_set('plugin_agileMantis_gadiv_userstory_unit_mode')) {
         config_set('plugin_agileMantis_gadiv_userstory_unit_mode', 'h');
     }
     if (!config_is_set('plugin_agileMantis_gadiv_taskboard')) {
         config_set('plugin_agileMantis_gadiv_taskboard', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_daily_scrum')) {
         config_set('plugin_agileMantis_gadiv_daily_scrum', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_ranking_order')) {
         config_set('plugin_agileMantis_gadiv_ranking_order', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_show_rankingorder')) {
         config_set('plugin_agileMantis_gadiv_show_rankingorder', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_presentable')) {
         config_set('plugin_agileMantis_gadiv_presentable', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_release_documentation')) {
         config_set('plugin_agileMantis_gadiv_release_documentation', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_technical')) {
         config_set('plugin_agileMantis_gadiv_technical', 0);
     }
     if (!config_is_set('plugin_agileMantis_gadiv_tracker_planned_costs')) {
         config_set('gadiv_tracker_planned_costs', 0);
     }
 }
if (!config_is_set('show_only_own_userstories', auth_get_current_user_id())) {
    config_set('show_only_own_userstories', 0, auth_get_current_user_id());
}
if (!config_is_set('show_only_open_userstories', auth_get_current_user_id())) {
    config_set('show_only_open_userstories', 0, auth_get_current_user_id());
}
if (!config_is_set('current_user_sprint_backlog_filter', auth_get_current_user_id())) {
    config_set('current_user_sprint_backlog_filter', '', auth_get_current_user_id());
}
if (!config_is_set('current_user_sprint_backlog_filter_direction', auth_get_current_user_id())) {
    config_set('current_user_sprint_backlog_filter_direction', 'ASC', auth_get_current_user_id());
}
if (!config_is_set('plugin_agileMantis_gadiv_show_storypoints')) {
    config_set('plugin_agileMantis_gadiv_show_storypoints', 0);
}
if (!config_is_set('plugin_agileMantis_gadiv_show_rankingorder')) {
    config_set('plugin_agileMantis_gadiv_show_rankingorder', 0);
}
# set sorting direction of the sprint backlog / user story table
if (!empty($_GET['sort_by']) && isset($_GET['sort_by'])) {
    $direction = $_GET['direction'];
    config_set('current_user_sprint_backlog_filter_direction', $direction, auth_get_current_user_id());
    $sort_by = $_GET['sort_by'];
    config_set('current_user_sprint_backlog_filter', $sort_by, auth_get_current_user_id());
}
# set / update checkbox values
if ($_POST['action'] == 'save_sprint_options') {
    config_set('show_project_target_version', $_POST['show_project_target_version'], auth_get_current_user_id());
    config_set('show_only_own_userstories', $_POST['show_only_own_userstories'], auth_get_current_user_id());
    config_set('show_only_open_userstories', $_POST['show_only_open_userstories'], auth_get_current_user_id());
}
if (!config_is_set('show_closed_userstories', auth_get_current_user_id())) {
    config_set('show_closed_userstories', 0, auth_get_current_user_id());
}
if (!config_is_set('show_only_userstories_without_sprint', auth_get_current_user_id())) {
    config_set('show_only_userstories_without_sprint', 0, auth_get_current_user_id());
}
if (!config_is_set('show_only_project_userstories', auth_get_current_user_id())) {
    config_set('show_only_project_userstories', 0, auth_get_current_user_id());
}
if (!config_is_set('show_project_target_version', auth_get_current_user_id())) {
    config_set('show_project_target_version', 0, auth_get_current_user_id());
}
if (!config_is_set('current_user_product_backlog_filter', auth_get_current_user_id())) {
    config_set('current_user_product_backlog_filter', '', auth_get_current_user_id());
}
if (!config_is_set('current_user_product_backlog_filter_direction', auth_get_current_user_id())) {
    config_set('current_user_product_backlog_filter_direction', 'ASC', auth_get_current_user_id());
}
# check if available
if (plugin_config_get('gadiv_ranking_order') == 0 && config_get('current_user_product_backlog_filter', null, auth_get_current_user_id()) == 'rankingOrder') {
    config_set('current_user_product_backlog_filter', '', auth_get_current_user_id());
    config_set('current_user_product_backlog_filter_direction', 'ASC', auth_get_current_user_id());
}
if (plugin_config_get('gadiv_tracker_planned_costs') == 0 && config_get('current_user_product_backlog_filter_direction', null, auth_get_current_user_id()) == 'plannedWork') {
    config_set('current_user_product_backlog_filter', '', auth_get_current_user_id());
    config_set('current_user_product_backlog_filter_direction', 'ASC', auth_get_current_user_id());
}
# save / update filter checkbox values from product backlog
if ($_POST['action'] == 'save_product_backlog_filter') {
    updateMantisConfigFlag('show_only_us_without_storypoints', $_POST['show_only_us_without_storypoints']);
    updateMantisConfigFlag('show_resolved_userstories', $_POST['show_resolved_userstories']);