コード例 #1
0
 /**
  * Updates a button in the plugin configuration
  *
  * @param $config
  */
 public function updateButton($config)
 {
     $button = gpc_get_int($config);
     if (plugin_config_get($config) != $button) {
         plugin_config_set($config, $button);
     }
 }
コード例 #2
0
ファイル: config_edit.php プロジェクト: fur81/zofaxiopeu
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
form_security_validate('plugin_format_config_edit');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
$f_process_text = gpc_get_int('process_text', ON);
$f_process_urls = gpc_get_int('process_urls', ON);
$f_process_buglinks = gpc_get_int('process_buglinks', ON);
$f_process_vcslinks = gpc_get_int('process_vcslinks', ON);
if (plugin_config_get('process_text') != $f_process_text) {
    plugin_config_set('process_text', $f_process_text);
}
if (plugin_config_get('process_urls') != $f_process_urls) {
    plugin_config_set('process_urls', $f_process_urls);
}
if (plugin_config_get('process_buglinks') != $f_process_buglinks) {
    plugin_config_set('process_buglinks', $f_process_buglinks);
}
if (plugin_config_get('process_vcslinks') != $f_process_vcslinks) {
    plugin_config_set('process_vcslinks', $f_process_vcslinks);
}
form_security_purge('plugin_format_config_edit');
print_successful_redirect(plugin_page('config', true));
コード例 #3
0
ファイル: config_edit.php プロジェクト: rombert/mantisbt
		case 'arial':
		case 'verdana':
		case 'trebuchet':
		case 'verasans':
		case 'times':
		case 'georgia':
		case 'veraserif':
		case 'courier':
		case 'veramono':
			plugin_config_set( 'font', $f_font );
			break;
		default:
			plugin_config_set( 'font', 'arial' );
	}
}

if ( current_user_is_administrator() ) {
	$f_jpgraph_path = gpc_get_string( 'jpgraph_path', '' );
	if ( plugin_config_get( 'jpgraph_path' ) != $f_jpgraph_path ) {
		plugin_config_set( 'jpgraph_path', $f_jpgraph_path );
	}
}

if ( plugin_config_get( 'jpgraph_antialias' ) != $f_jpgraph_antialias ) {
	plugin_config_set( 'jpgraph_antialias', $f_jpgraph_antialias );
}

form_security_purge( 'plugin_graph_config_edit' );

print_successful_redirect( plugin_page( 'config', true ) );
コード例 #4
0
<?php

form_security_validate('plugin_format_config_edit');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
$f_status_order = gpc_get_string('status_board_order');
if (plugin_config_get('status_board_order') != $f_status_order) {
    plugin_config_set('status_board_order', explode(';', $f_status_order));
}
$f_cooldown_period_days = gpc_get_int('cooldown_period_days');
if (plugin_config_get('cooldown_period_days') != $f_cooldown_period_days) {
    plugin_config_set('cooldown_period_days', $f_cooldown_period_days);
}
$f_cooldown_period_hours = gpc_get_int('cooldown_period_hours');
if (plugin_config_get('cooldown_period_hours') != $f_cooldown_period_hours) {
    plugin_config_set('cooldown_period_hours', $f_cooldown_period_hours);
}
form_security_purge('plugin_format_config_edit');
print_successful_redirect(plugin_page('config_page', true));
コード例 #5
0
    $t_email_template = gpc_get_string('email_template', PLUGINS_RELEASEMGT_EMAIL_TEMPLATE_DEFAULT);
    $t_download_requires_login = gpc_get_bool('download_requires_login');
    plugin_config_set('upload_threshold_level', $t_upload_access_level, NO_USER, $t_project_id);
    plugin_config_set('upload_method', $t_upload_method, NO_USER, $t_project_id);
    plugin_config_set('disk_dir', $t_disk_dir, NO_USER, $t_project_id);
    plugin_config_set('ftp_server', $t_ftp_server, NO_USER, $t_project_id);
    plugin_config_set('ftp_user', $t_ftp_user, NO_USER, $t_project_id);
    plugin_config_set('ftp_pass', $t_ftp_pass, NO_USER, $t_project_id);
    plugin_config_set('file_number', $t_file_number, NO_USER, $t_project_id);
    plugin_config_set('notification_enable', $t_notification_enable, NO_USER, $t_project_id);
    plugin_config_set('notify_handler', $t_notify_handler, NO_USER, $t_project_id);
    plugin_config_set('notify_reporter', $t_notify_reporter, NO_USER, $t_project_id);
    plugin_config_set('notify_email', $t_notify_email, NO_USER, $t_project_id);
    plugin_config_set('email_subject', $t_email_subject, NO_USER, $t_project_id);
    plugin_config_set('email_template', $t_email_template, NO_USER, $t_project_id);
    plugin_config_set('download_requires_login', $t_download_requires_login, NO_USER, $t_project_id);
}
if ($t_action == 'delete' && $t_project_id != ALL_PROJECTS) {
    plugin_config_delete('upload_threshold_level', NO_USER, $t_project_id);
    plugin_config_delete('upload_method', NO_USER, $t_project_id);
    plugin_config_delete('disk_dir', NO_USER, $t_project_id);
    plugin_config_delete('ftp_server', NO_USER, $t_project_id);
    plugin_config_delete('ftp_user', NO_USER, $t_project_id);
    plugin_config_delete('ftp_pass', NO_USER, $t_project_id);
    plugin_config_delete('file_number', NO_USER, $t_project_id);
    plugin_config_delete('notification_enable', NO_USER, $t_project_id);
    plugin_config_delete('notify_handler', NO_USER, $t_project_id);
    plugin_config_delete('notify_reporter', NO_USER, $t_project_id);
    plugin_config_delete('notify_email', NO_USER, $t_project_id);
    plugin_config_delete('email_subject', NO_USER, $t_project_id);
    plugin_config_delete('email_template', NO_USER, $t_project_id);
コード例 #6
0
ファイル: config_edit.php プロジェクト: rombert/mantisbt
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.

form_security_validate( 'plugin_format_config_edit' );

auth_reauthenticate( );
access_ensure_global_level( config_get( 'manage_plugin_threshold' ) );

$f_process_text = gpc_get_int( 'process_text', ON );
$f_process_urls = gpc_get_int( 'process_urls', ON );
$f_process_buglinks = gpc_get_int( 'process_buglinks', ON );

if( plugin_config_get( 'process_text' ) != $f_process_text ) {
	plugin_config_set( 'process_text', $f_process_text );
}

if( plugin_config_get( 'process_urls' ) != $f_process_urls ) {
	plugin_config_set( 'process_urls', $f_process_urls );
}

if( plugin_config_get( 'process_buglinks' ) != $f_process_buglinks ) {
	plugin_config_set( 'process_buglinks', $f_process_buglinks );
}

form_security_purge( 'plugin_format_config_edit' );

print_successful_redirect( plugin_page( 'config', true ) );
コード例 #7
0
<?php

form_security_validate('plugin_DailyScrum_config_update');
$f_foo_or_bar = gpc_get_string('foo_or_bar');
$f_reset = gpc_get_bool('reset', false);
if ($f_reset) {
    plugin_config_delete('foo_or_bar');
} else {
    if ($f_foo_or_bar == 'foo' || $f_foo_or_bar == 'bar') {
        plugin_config_set('foo_or_bar', $f_foo_or_bar);
    }
}
form_security_purge('plugin_DailyScrum_config_update');
print_successful_redirect(plugin_page('foo', true));
コード例 #8
0
if (plugin_config_get('default_duration_unit') != $f_default_duration_unit) {
    if ('d' === $f_default_duration_unit || 'h' === $f_default_duration_unit) {
        plugin_config_set('default_duration_unit', $f_default_duration_unit);
    } else {
        $t_error_on_field = true;
    }
}
if (plugin_config_get('working_hours_in_a_day') != $f_working_hours_in_a_day) {
    if (1 <= $f_working_hours_in_a_day && $f_working_hours_in_a_day <= 24) {
        plugin_config_set('working_hours_in_a_day', $f_working_hours_in_a_day);
    } else {
        $t_error_on_field = true;
    }
}
if (plugin_config_get('rows_max') != $f_rows_max) {
    plugin_config_set('rows_max', $f_rows_max);
}
if (plugin_config_get('weeks_max') != $f_weeks_max) {
    plugin_config_set('weeks_max', $f_weeks_max);
}
if (plugin_config_get('label_max') != $f_label_max) {
    plugin_config_set('label_max', $f_label_max);
}
if (plugin_config_get('eczlibrary') != config_get('plugin_MantisGraph_eczlibrary')) {
    plugin_config_set('eczlibrary', config_get('plugin_MantisGraph_eczlibrary'));
}
if (plugin_config_get('jpgraph_path') != config_get('plugin_MantisGraph_jpgraph_path')) {
    plugin_config_set('jpgraph_path', config_get('plugin_MantisGraph_jpgraph_path'));
}
form_security_purge('plugin_gantt_chart_config_edit');
print_successful_redirect(plugin_page('config', true));
コード例 #9
0
ファイル: config_edit.php プロジェクト: santoja/Lightbox
 * Lightbox Integration is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License 2
 * as published by the Free Software Foundation.
 *
 * Lightbox Integration 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Lightbox Integration; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 * or see http://www.gnu.org/licenses/.
 */
form_security_validate('plugin_lightbox_config_edit');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
$f_display_on_img_preview = gpc_get_int('display_on_img_preview', OFF);
$f_display_on_img_link = gpc_get_int('display_on_img_link', OFF);
$f_img_extensions = gpc_get_string('img_extensions', 'jpg,jpeg,png,gif');
if (plugin_config_get('display_on_img_preview') != $f_display_on_img_preview) {
    plugin_config_set('display_on_img_preview', $f_display_on_img_preview);
}
if (plugin_config_get('display_on_img_link') != $f_display_on_img_link) {
    plugin_config_set('display_on_img_link', $f_display_on_img_link);
}
if (plugin_config_get('img_extensions') != $f_img_extensions) {
    plugin_config_set('img_extensions', $f_img_extensions);
}
form_security_purge('plugin_lightbox_config_edit');
print_successful_redirect(plugin_page('config', true));
コード例 #10
0
#
# 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
form_security_validate('plugin_Dashboard_config_update');
$f_width = gpc_get_int('width', 4);
$f_reset_width = gpc_get_bool('reset-width', false);
if ($f_reset_width) {
    plugin_config_delete('width');
} else {
    plugin_config_set('width', $f_width);
}
$f_filter = gpc_get_int_array('filter', array());
$f_reset_boxes = gpc_get_bool('reset-boxes', false);
if ($f_reset_boxes) {
    plugin_config_delete('boxes');
} else {
    $f_boxes = array();
    foreach ($f_filter as $t_filter_id => $t_filter_pos) {
        if ($t_filter_pos != 0) {
            $f_boxes[$t_filter_id] = $t_filter_pos;
        }
    }
    plugin_config_set('boxes', $f_boxes);
}
form_security_purge('plugin_Dashboard_config_update');
print_successful_redirect(plugin_page('dashboard', true));
コード例 #11
0
<?php

auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
plugin_require_api('core/config_api.php');
$f_gpc = array('mail_add_bug_reports' => gpc_get_int('mail_add_bug_reports'), 'mail_add_bugnotes' => gpc_get_int('mail_add_bugnotes'), 'mail_add_complete_email' => gpc_get_int('mail_add_complete_email'), 'mail_add_users_from_cc_to' => gpc_get_int('mail_add_users_from_cc_to'), 'mail_auto_signup' => gpc_get_int('mail_auto_signup'), 'mail_block_attachments_md5' => array_map('strtolower', array_filter(array_map('trim', explode("\n", str_replace(array("\r\n", "\r"), "\n", gpc_get_string('mail_block_attachments_md5')))))), 'mail_block_attachments_logging' => gpc_get_int('mail_block_attachments_logging'), 'mail_debug' => gpc_get_int('mail_debug'), 'mail_debug_directory' => ERP_prepare_directory_string(gpc_get_string('mail_debug_directory')), 'mail_debug_show_memory_usage' => gpc_get_int('mail_debug_show_memory_usage'), 'mail_delete' => gpc_get_int('mail_delete'), 'mail_disposable_email_checker' => gpc_get_int('mail_disposable_email_checker'), 'mail_email_receive_own' => gpc_get_int('mail_email_receive_own'), 'mail_fallback_mail_reporter' => gpc_get_int('mail_fallback_mail_reporter'), 'mail_nodescription' => gpc_get_string('mail_nodescription'), 'mail_nosubject' => gpc_get_string('mail_nosubject'), 'mail_parse_html' => gpc_get_int('mail_parse_html'), 'mail_preferred_username' => gpc_get_string('mail_preferred_username'), 'mail_preferred_realname' => gpc_get_string('mail_preferred_realname'), 'mail_remove_mantis_email' => gpc_get_int('mail_remove_mantis_email'), 'mail_remove_replies' => gpc_get_int('mail_remove_replies'), 'mail_strip_gmail_style_replies' => gpc_get_int('mail_strip_gmail_style_replies'), 'mail_remove_replies_after' => gpc_get_string('mail_remove_replies_after'), 'mail_removed_reply_text' => gpc_get_string('mail_removed_reply_text'), 'mail_reporter_id' => gpc_get_int('mail_reporter_id'), 'mail_rule_system' => gpc_get_int('mail_rule_system'), 'mail_save_from' => gpc_get_int('mail_save_from'), 'mail_save_subject_in_note' => gpc_get_int('mail_save_subject_in_note'), 'mail_secured_script' => gpc_get_int('mail_secured_script'), 'mail_strip_signature' => gpc_get_int('mail_strip_signature'), 'mail_strip_signature_delim' => gpc_get_string('mail_strip_signature_delim'), 'mail_subject_id_regex' => gpc_get_string('mail_subject_id_regex'), 'mail_use_bug_priority' => gpc_get_int('mail_use_bug_priority'), 'mail_use_message_id' => gpc_get_int('mail_use_message_id'), 'mail_use_reporter' => gpc_get_int('mail_use_reporter'));
$f_mail_bug_priority = 'array (' . "\n" . gpc_get_string('mail_bug_priority') . "\n" . ')';
foreach ($f_gpc as $t_key => $t_value) {
    if (plugin_config_get($t_key) !== $t_value) {
        plugin_config_set($t_key, $t_value);
    }
}
$t_mail_bug_priority = process_complex_value($f_mail_bug_priority);
if (is_array($t_mail_bug_priority)) {
    if (plugin_config_get('mail_bug_priority') !== $t_mail_bug_priority) {
        plugin_config_set('mail_bug_priority', $t_mail_bug_priority);
    }
} else {
    html_page_top(plugin_lang_get('plugin_title'));
    echo '<br /><div class="center">';
    echo plugin_lang_get('mail_bug_priority_array_failure') . ' ';
    print_bracket_link(plugin_page('manage_config', TRUE), lang_get('proceed'));
    echo '</div>';
    $t_notsuccesfull = TRUE;
    html_page_bottom(__FILE__);
}
if (!isset($t_notsuccesfull)) {
    print_successful_redirect(plugin_page('manage_config', TRUE));
}
コード例 #12
0
<?php

form_security_validate('plugin_BackgroundImageView_config_edit');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
//$t_project_id = helper_get_current_project ();
$ShowInFooter = gpc_get_int('ShowInFooter', ON);
if (plugin_config_get('ShowInFooter') != $ShowInFooter) {
    plugin_config_set('ShowInFooter', $ShowInFooter);
}
$ShowBackgroundImage = gpc_get_int('ShowBackgroundImage', ON);
if (plugin_config_get('ShowBackgroundImage') != $ShowBackgroundImage) {
    plugin_config_set('ShowBackgroundImage', $ShowBackgroundImage);
}
$BackgroundImageAccessLevel = gpc_get_int('BackgroundImageAccessLevel');
if (plugin_config_get('BackgroundImageAccessLevel') != $BackgroundImageAccessLevel) {
    plugin_config_set('BackgroundImageAccessLevel', $BackgroundImageAccessLevel);
}
form_security_purge('plugin_BackgroundImageView_config_edit');
print_successful_redirect(plugin_page('config', true));
コード例 #13
0
//$t_project_id = helper_get_current_project ();
$ShowInFooter = gpc_get_int('ShowInFooter', ON);
if (plugin_config_get('ShowInFooter') != $ShowInFooter) {
    plugin_config_set('ShowInFooter', $ShowInFooter);
}
$ShowRelationshipColumn = gpc_get_int('ShowRelationshipColumn', ON);
if (plugin_config_get('ShowRelationshipColumn') != $ShowRelationshipColumn) {
    plugin_config_set('ShowRelationshipColumn', $ShowRelationshipColumn);
}
$ShowRelationships = gpc_get_int('ShowRelationships', ON);
if (plugin_config_get('ShowRelationships') != $ShowRelationships) {
    plugin_config_set('ShowRelationships', $ShowRelationships);
}
$ShowRelationshipsColorful = gpc_get_int('ShowRelationshipsColorful', ON);
if (plugin_config_get('ShowRelationshipsColorful') != $ShowRelationshipsColorful) {
    plugin_config_set('ShowRelationshipsColorful', $ShowRelationshipsColorful);
}
$ShowRelationshipIcons = gpc_get_int('ShowRelationshipIcons', ON);
if (plugin_config_get('ShowRelationshipIcons') != $ShowRelationshipIcons) {
    plugin_config_set('ShowRelationshipIcons', $ShowRelationshipIcons);
}
$ShowRelationshipsControl = gpc_get_int('ShowRelationshipsControl', ON);
if (plugin_config_get('ShowRelationshipsControl') != $ShowRelationshipsControl) {
    plugin_config_set('ShowRelationshipsControl', $ShowRelationshipsControl);
}
$RelationshipColumnAccessLevel = gpc_get_int('RelationshipColumnAccessLevel');
if (plugin_config_get('RelationshipColumnAccessLevel') != $RelationshipColumnAccessLevel) {
    plugin_config_set('RelationshipColumnAccessLevel', $RelationshipColumnAccessLevel);
}
form_security_purge('plugin_RelationshipColumnView_config_edit');
print_successful_redirect(plugin_page('config', true));
/**
 * Submit configuration changes
 */
if ($option_change) {
    $specmanagement_config_api->updateValue('AccessLevel', ADMINISTRATOR);
    $specmanagement_config_api->updateValue('ReadAccessLevel', REPORTER);
    $specmanagement_config_api->updateValue('WriteAccessLevel', DEVELOPER);
    $specmanagement_config_api->updateButton('ShowInFooter');
    $specmanagement_config_api->updateButton('ShowFields');
    $specmanagement_config_api->updateButton('ShowMenu');
    $specmanagement_config_api->updateButton('ShowSpecStatCols');
    $col_amount = gpc_get_int('CAmount', PLUGINS_SPECMANAGEMENT_COLUMN_AMOUNT);
    if (plugin_config_get('CAmount') != $col_amount && plugin_config_get('CAmount') != '' && $col_amount <= PLUGINS_SPECMANAGEMENT_MAX_COLUMNS) {
        plugin_config_set('CAmount', $col_amount);
    } elseif (plugin_config_get('CAmount') == '') {
        plugin_config_set('CAmount', PLUGINS_SPECMANAGEMENT_COLUMN_AMOUNT);
    }
    $specmanagement_config_api->updateDynamicValues('CStatSelect', PLUGINS_SPECMANAGEMENT_COLUMN_STAT_DEFAULT);
}
/**
 * Submit configuration reset
 */
if ($option_reset) {
    print_successful_redirect(plugin_page('reset_ensure', true));
}
/**
 * Add a document type
 */
if ($option_addtype) {
    if (isset($_POST['type'])) {
        $specmanagement_database_api->insert_type_row($_POST['type']);
コード例 #15
0
ファイル: config.php プロジェクト: gtn/mantisbt
/**
 * Sets plugin config option if value is different from current/default
 * @param string $p_name  option name
 * @param string $p_value value to set
 * @return void
 */
function config_set_if_needed($p_name, $p_value)
{
    if ($p_value != plugin_config_get($p_name)) {
        plugin_config_set($p_name, $p_value);
    }
}
コード例 #16
0
function maybe_set_option($name, $value)
{
    if ($value != plugin_config_get($name)) {
        plugin_config_set($name, $value);
    }
}
コード例 #17
0
ファイル: config_edit.php プロジェクト: aberad/MantisKanban
<?php

# MantisBT - a php based bugtracking system
# Copyright (C) 2002 - 2013  MantisBT Team - mantisbt-dev@lists.sourceforge.net
# MantisBT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# MantisBT 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.
form_security_validate('plugin_kanban_config_edit');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
$kanban_simple_columns = gpc_get_int('kanban_simple_columns', ON);
if (plugin_config_get('kanban_simple_columns') != $kanban_simple_columns) {
    plugin_config_set('kanban_simple_columns', $kanban_simple_columns);
}
form_security_purge('plugin_kanban_config_edit');
print_successful_redirect(plugin_page('config', true));
コード例 #18
0
$f_send_mes_up_status = gpc_get_string('send_mes_up_status');
$f_send_mes_up_category = gpc_get_string('send_mes_up_category');
$f_send_mes_up_view = gpc_get_string('send_mes_up_view');
$f_send_mes_add_note = gpc_get_string('send_mes_add_note');
plugin_config_set('jbr_server', $f_jbr_server);
plugin_config_set('jbr_port', $f_jbr_port);
plugin_config_set('jbr_timeout', $f_jbr_timeout);
plugin_config_set('jbr_login', $f_jbr_login);
plugin_config_set('jbr_pwd', $f_jbr_pwd);
plugin_config_set('add_send_quick_msg', $f_add_send_quick_msg);
plugin_config_set('change_xmpp_login', $f_change_xmpp_login);
plugin_config_set('send_mes_new_assign', $f_send_mes_new_assing);
plugin_config_set('send_mes_move_bug', $f_send_mes_move_bug);
plugin_config_set('send_mes_new_bug', $f_send_mes_new_bug);
plugin_config_set('send_mes_new_bugnote', $f_send_mes_new_bugnote);
plugin_config_set('send_mes_edit_bugnote', $f_send_mes_edit_bugnote);
plugin_config_set('send_mes_del_bugnote', $f_send_mes_del_bugnote);
plugin_config_set('send_mes_del_bug', $f_send_mes_del_bug);
plugin_config_set('send_mes_new_state_10', $f_send_mes_new_state_10);
plugin_config_set('send_mes_new_state_20', $f_send_mes_new_state_20);
plugin_config_set('send_mes_new_state_30', $f_send_mes_new_state_30);
plugin_config_set('send_mes_new_state_40', $f_send_mes_new_state_40);
plugin_config_set('send_mes_new_state_50', $f_send_mes_new_state_50);
plugin_config_set('send_mes_new_state_80', $f_send_mes_new_state_80);
plugin_config_set('send_mes_new_state_90', $f_send_mes_new_state_90);
plugin_config_set('send_mes_up_prior', $f_send_mes_up_prior);
plugin_config_set('send_mes_up_status', $f_send_mes_up_status);
plugin_config_set('send_mes_up_category', $f_send_mes_up_category);
plugin_config_set('send_mes_up_view', $f_send_mes_up_view);
plugin_config_set('send_mes_add_note', $f_send_mes_add_note);
print_successful_redirect(plugin_page('config_main'));
コード例 #19
0
$f_reminder_group_body2 = gpc_get_string('reminder_group_body2', 'Please do not reply to this message');
$f_reminder_feedback_project = gpc_get_int('reminder_feedback_project', 0);
$f_reminder_feedback_status = gpc_get_int_array('reminder_feedback_status', FEEDBACK);
$f_reminder_login = gpc_get_string('reminder_login', 'admin');
$f_reminder_subject = gpc_get_string('reminder_subject', 'Issues requiring your attention');
$f_reminder_finished = gpc_get_string('reminder_finished', 'Finished processing your selection');
$f_reminder_hours = gpc_get_int('reminder_hours', OFF);
$f_reminder_colsep = gpc_get_string('reminder_colsep', ';');
plugin_config_set('reminder_project_id', $f_reminder_project_id);
plugin_config_set('reminder_days_treshold', $f_reminder_days_treshold);
plugin_config_set('reminder_store_as_note', $f_reminder_store_as_note);
plugin_config_set('reminder_sender', $f_reminder_sender);
plugin_config_set('reminder_bug_status', $f_reminder_bug_status);
plugin_config_set('reminder_ignore_unset', $f_reminder_ignore_unset);
plugin_config_set('reminder_ignore_past', $f_reminder_ignore_past);
plugin_config_set('reminder_mail_subject', $f_reminder_mail_subject);
plugin_config_set('reminder_handler', $f_reminder_handler);
plugin_config_set('reminder_group_issues', $f_reminder_group_issues);
plugin_config_set('reminder_group_project', $f_reminder_group_project);
plugin_config_set('reminder_manager_overview', $f_reminder_manager_overview);
plugin_config_set('reminder_group_subject', $f_reminder_group_subject);
plugin_config_set('reminder_group_body1', $f_reminder_group_body1);
plugin_config_set('reminder_group_body2', $f_reminder_group_body2);
plugin_config_set('reminder_feedback_project', $f_reminder_feedback_project);
plugin_config_set('reminder_feedback_status', $f_reminder_feedback_status);
plugin_config_set('reminder_login', $f_reminder_login);
plugin_config_set('reminder_subject', $f_reminder_subject);
plugin_config_set('reminder_finished', $f_reminder_finished);
plugin_config_set('reminder_hours', $f_reminder_hours);
plugin_config_set('reminder_colsep', $f_reminder_colsep);
print_successful_redirect(plugin_page('config', TRUE));
コード例 #20
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with MantisBT.  If not, see <http://www.gnu.org/licenses/>.

form_security_validate( 'plugin_piwik_config_edit' );

auth_reauthenticate( );
access_ensure_global_level( config_get( 'manage_plugin_threshold' ) );

$f_url = gpc_get_string( 'url', ON );
$f_idsite = gpc_get_int( 'idsite', ON );

$f_url = str_replace("http://","",$f_url);
$f_url = str_replace("https://","",$f_url);

if( plugin_config_get( 'piwikUrl' ) != $f_url ) {
	plugin_config_set( 'piwikUrl', $f_url );
}

if( plugin_config_get( 'idSite' ) != $f_idsite ) {
	plugin_config_set( 'idSite', $f_idsite );
}


form_security_purge( 'plugin_piwik_config_edit' );

print_successful_redirect( plugin_page( 'config', true ) );
コード例 #21
0
            # make custom field technical checks
            $f_gadiv_technical = gpc_get_int('gadiv_technical', 0);
            if (plugin_config_get('gadiv_technical') != $f_gadiv_technical) {
                plugin_config_set('gadiv_technical', $f_gadiv_technical);
            }
            $agilemantis_team->changeCustomFieldFilter("Technical", plugin_config_get('gadiv_technical'));
            # make custom field release documentation checks
            $f_gadiv_release_documentation = gpc_get_int('gadiv_release_documentation', 0);
            if (plugin_config_get('gadiv_release_documentation') != $f_gadiv_release_documentation) {
                plugin_config_set('gadiv_release_documentation', $f_gadiv_release_documentation);
            }
            $agilemantis_team->changeCustomFieldFilter("InReleaseDocu", plugin_config_get('gadiv_release_documentation'));
            # make custom fields tracker_planned_costs checks
            $f_gadiv_tracker_planned_costs = gpc_get_int('gadiv_tracker_planned_costs', 0);
            if (plugin_config_get('gadiv_tracker_planned_costs') != $f_gadiv_tracker_planned_costs) {
                plugin_config_set('gadiv_tracker_planned_costs', $f_gadiv_tracker_planned_costs);
            }
            $agilemantis_team->changeCustomFieldFilter("PlannedWork", plugin_config_get('gadiv_tracker_planned_costs'));
            $backlogProjects = $agilemantis_project->getProjectsInBacklogs();
            if (!empty($backlogProjects)) {
                foreach ($backlogProjects as $num => $row) {
                    $agilemantis_project->addAdditionalProjectFields($row['project_id']);
                }
            }
        }
    }
} else {
    $throw_error_7 = true;
}
if (plugin_is_loaded('agileMantisExpert') && $_FILES['license']['tmp_name'] != "") {
    if ($_FILES['license']['name'] == 'license.txt') {
コード例 #22
0
        html_page_top(plugin_lang_get('plugin_title'));
        ?>
<br /><div class="center">
<?php 
        echo plugin_lang_get($t_is_custom_error || PEAR::isError($t_result) ? 'test_failure' : 'test_success') . '<br /><br />';
        echo plugin_lang_get('description') . ': ' . $t_mailbox_api->_mailbox['description'] . '<br />';
        echo plugin_lang_get('mailbox_type') . ': ' . $t_mailbox_api->_mailbox['mailbox_type'] . '<br />';
        echo plugin_lang_get('hostname') . ': ', $t_mailbox_api->_mailbox['hostname'] . '<br />';
        echo plugin_lang_get('port') . ': ', $t_mailbox_api->_mailbox['port'] . '<br />';
        echo plugin_lang_get('encryption') . ': ' . $t_mailbox_api->_mailbox['encryption'] . '<br />';
        echo plugin_lang_get('ssl_cert_verify') . ': ' . $t_mailbox_api->_mailbox['ssl_cert_verify'] . '<br />';
        echo plugin_lang_get('erp_username') . ': ' . $t_mailbox_api->_mailbox['erp_username'] . '<br />';
        echo plugin_lang_get('erp_password') . ': ******' . '<br />';
        echo plugin_lang_get('auth_method') . ': ' . $t_mailbox_api->_mailbox['auth_method'] . '<br />';
        if ($t_mailbox_api->_mailbox['mailbox_type'] === 'IMAP') {
            echo plugin_lang_get('imap_basefolder') . ': ' . $t_mailbox_api->_mailbox['imap_basefolder'] . '<br />';
        }
        echo '<br />' . ($t_is_custom_error ? nl2br($t_result['ERROR_MESSAGE']) : (PEAR::isError($t_result) ? $t_result->toString() : NULL)) . '<br /><br />';
        print_bracket_link(plugin_page('manage_mailbox', TRUE), lang_get('proceed'));
        ?>
</div>
<?php 
        html_page_bottom(__FILE__);
    }
}
if (plugin_config_get('mailboxes') !== $t_mailboxes && ($f_mailbox_action === 'add' || $f_mailbox_action === 'copy' || ($f_mailbox_action === 'edit' || $f_mailbox_action === 'delete') && $f_select_mailbox >= 0)) {
    plugin_config_set('mailboxes', $t_mailboxes);
}
if (!isset($t_no_redirect)) {
    print_successful_redirect(plugin_page('manage_mailbox', TRUE));
}
コード例 #23
0
ファイル: config_update.php プロジェクト: Kirill/ThePoser
if ($f_reset) {
    plugin_config_delete('headerHeight');
    plugin_config_delete('skin');
    plugin_config_delete('companyName');
    plugin_config_delete('companyUrl');
    plugin_config_delete('companyLogo');
    plugin_config_delete('companyTinyLogo');
    plugin_config_delete('customCss');
    plugin_config_delete('showCompanyLogo');
} else {
    if (in_array($f_header, array(0, 1, 2))) {
        plugin_config_set('headerHeight', $f_header);
    }
    if (in_array($f_skin, array(0, 1, 2))) {
        plugin_config_set('skin', $f_skin);
    }
    plugin_config_set('companyName', strip_tags(gpc_get_string('companyName')));
    plugin_config_set('companyUrl', strip_tags(gpc_get_string('companyUrl')));
    plugin_config_set('showCompanyLogo', gpc_get_bool('showCompanyLogo'));
    try {
        plugin_config_set('companyLogo', ThePoserPlugin::getImageForSaving(gpc_get_file('customLogo'), array(null, 80)));
    } catch (Exception $e) {
    }
    try {
        plugin_config_set('companyTinyLogo', ThePoserPlugin::getImageForSaving(gpc_get_file('customTinyLogo'), array(16, 16)));
    } catch (Exception $e) {
    }
    plugin_config_set('customCss', gpc_get_string('customCss'));
}
form_security_purge('plugin_Example_config_update');
print_successful_redirect(plugin_page('config', true));
コード例 #24
0
ファイル: config_edit.php プロジェクト: pinke/worklog
<?php

auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
$f_promote_text = gpc_get_int('promote_text', ON);
$f_project_text = gpc_get_int('project_text', ON);
$f_promote_threshold = gpc_get_string('promote_threshold', DEVELOPER);
$f_worklog_view_check = gpc_get_int('worklog_view_check', OFF);
$f_worklog_view_threshold = gpc_get_string('worklog_view_threshold', VIEWER);
$f_worklog_view_window = gpc_get_int('worklog_view_window', OFF);
plugin_config_set('promote_text', $f_promote_text);
plugin_config_set('project_text', $f_project_text);
plugin_config_set('promote_threshold', $f_promote_threshold);
plugin_config_set('worklog_view_window', $f_worklog_view_window);
plugin_config_set('worklog_view_check', $f_worklog_view_check);
plugin_config_set('worklog_view_threshold', $f_worklog_view_threshold);
print_successful_redirect(plugin_page('config', TRUE));
コード例 #25
0
ファイル: plugin_api.php プロジェクト: Kirill/mantisbt
/**
 * Upgrade an installed plugin's schema.
 * @param string Plugin basename
 * @return multi True if upgrade completed, null if problem
 */
function plugin_upgrade($p_plugin)
{
    access_ensure_global_level(config_get_global('manage_plugin_threshold'));
    if (!plugin_is_installed($p_plugin->basename)) {
        return;
    }
    require_api('install_helper_functions_api.php');
    plugin_push_current($p_plugin->basename);
    $t_schema_version = plugin_config_get('schema', -1);
    $t_schema = $p_plugin->schema();
    global $g_db;
    $t_dict = NewDataDictionary($g_db);
    $i = $t_schema_version + 1;
    while ($i < count($t_schema)) {
        if (!$p_plugin->upgrade($i)) {
            plugin_pop_current();
            return false;
        }
        $t_target = $t_schema[$i][1][0];
        if ($t_schema[$i][0] == 'InsertData') {
            $t_sqlarray = array('INSERT INTO ' . $t_schema[$i][1][0] . $t_schema[$i][1][1]);
        } else {
            if ($t_schema[$i][0] == 'UpdateSQL') {
                $t_sqlarray = array('UPDATE ' . $t_schema[$i][1][0] . $t_schema[$i][1][1]);
                $t_target = $t_schema[$i][1];
            } else {
                if ($t_schema[$i][0] == 'UpdateFunction') {
                    $t_sqlarray = false;
                    if (isset($t_schema[$i][2])) {
                        $t_status = call_user_func('install_' . $t_schema[$i][1], $t_schema[$i][2]);
                    } else {
                        $t_status = call_user_func('install_' . $t_schema[$i][1]);
                    }
                } else {
                    $t_sqlarray = call_user_func_array(array($t_dict, $t_schema[$i][0]), $t_schema[$i][1]);
                }
            }
        }
        if ($t_sqlarray) {
            $t_status = $t_dict->ExecuteSQLarray($t_sqlarray);
        }
        if (2 == $t_status) {
            plugin_config_set('schema', $i);
        } else {
            error_parameters($i);
            trigger_error(ERROR_PLUGIN_UPGRADE_FAILED, ERROR);
            return null;
        }
        $i++;
    }
    plugin_pop_current();
    return true;
}
コード例 #26
0
if (php_sapi_name() !== 'cli') {
    echo '<pre>';
}
plugin_require_api('core/mail_api.php');
plugin_require_api('core/config_api.php');
$GLOBALS['t_mailboxes'] = plugin_config_get('mailboxes');
$t_mail_mantisbt_url_fix = plugin_config_get('mail_mantisbt_url_fix', '');
if (isset($GLOBALS['t_dir_emailreporting_adjust']) && !is_blank($t_mail_mantisbt_url_fix)) {
    ERP_set_temporary_overwrite('path', $t_mail_mantisbt_url_fix);
}
// Register the user that is currently running this script
$t_job_users = plugin_config_get('job_users');
$t_username = ERP_get_current_os_user();
if (!isset($t_job_users[php_sapi_name()]) || $t_job_users[php_sapi_name()] !== $t_username) {
    $t_job_users[php_sapi_name()] = (string) $t_username;
    plugin_config_set('job_users', $t_job_users);
}
echo 'Start checking all mailboxes: ' . date('l jS \\of F Y H:i:s') . "\n\n";
$t_mailbox_api_index = ERP_get_mailbox_api_name();
$GLOBALS[$t_mailbox_api_index] = new ERP_mailbox_api();
foreach ($GLOBALS['t_mailboxes'] as $t_mailbox) {
    $GLOBALS[$t_mailbox_api_index]->process_mailbox($t_mailbox);
}
echo "\n\n" . 'Done checking all mailboxes' . "\n";
if (php_sapi_name() !== 'cli') {
    echo '</pre>';
}
exit(0);
?>

コード例 #27
0
ファイル: config_edit.php プロジェクト: khinT/mantisbt-master
<?php

auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
$f_format_text = gpc_get_int('format_text', ON);
$f_search_text = gpc_get_int('search_text', ON);
$f_search_threshold = gpc_get_string('search_threshold', REPORTER);
$f_serials_view_threshold = gpc_get_string('serials_view_threshold', REPORTER);
$f_format_threshold = gpc_get_string('format_threshold', DEVELOPER);
$f_manage_threshold = gpc_get_string('manage_threshold', ADMINISTRATOR);
plugin_config_set('format_text', $f_format_text);
plugin_config_set('search_text', $f_search_text);
plugin_config_set('search_threshold', $f_search_threshold);
plugin_config_set('serials_view_threshold', $f_serials_view_threshold);
plugin_config_set('format_threshold', $f_format_threshold);
plugin_config_set('manage_threshold', $f_manage_threshold);
print_successful_redirect(plugin_page('config', TRUE));
コード例 #28
0
$storyboard_db_api = new storyboard_db_api();
$option_change = gpc_get_bool('change', false);
$option_addtype = gpc_get_bool('addtype', false);
$option_deltype = gpc_get_bool('deletetype', false);
$option_changetype = gpc_get_bool('changetype', false);
/**
 * Submit configuration changes
 */
if ($option_change) {
    $storyboard_config_api->updateValue('AccessLevel', ADMINISTRATOR);
    $storyboard_config_api->updateButton('ShowInFooter');
    if (!empty($_POST['status_cols'])) {
        foreach ($_POST['status_cols'] as $status_cols) {
            $status_cols = gpc_get_int_array('status_cols');
            if (plugin_config_get('status_cols') != $status_cols) {
                plugin_config_set('status_cols', $status_cols);
            }
        }
    }
}
/**
 * Add a type
 */
if ($option_addtype) {
    if (isset($_POST['type'])) {
        $storyboard_db_api->insert_type($_POST['type'], 'type');
    }
}
/**
 * Delete a type
 */
コード例 #29
0
 *
 * You should have received a copy of the GNU General Public License
 * along with Slack Integration; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 * or see http://www.gnu.org/licenses/.
 */
form_security_validate('plugin_Slack_config_edit');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
$f_url_webhook = gpc_get_string('url_webhook');
$f_bot_name = gpc_get_string('bot_name');
$f_bot_icon = gpc_get_string('bot_icon');
$f_skip_bulk = gpc_get_bool('skip_bulk');
$f_default_channel = gpc_get_string('default_channel');
if (plugin_config_get('url_webhook') != $f_url_webhook) {
    plugin_config_set('url_webhook', $f_url_webhook);
}
if (plugin_config_get('bot_name') != $f_bot_name) {
    plugin_config_set('bot_name', $f_bot_name);
}
if (plugin_config_get('bot_icon') != $f_bot_icon) {
    plugin_config_set('bot_icon', $f_bot_icon);
}
if (plugin_config_get('skip_bulk') != $f_skip_bulk) {
    plugin_config_set('skip_bulk', $f_skip_bulk);
}
if (plugin_config_get('default_channel') != $f_default_channel) {
    plugin_config_set('default_channel', $f_default_channel);
}
form_security_purge('plugin_Slack_config_edit');
print_successful_redirect(plugin_page('config', true));
コード例 #30
0
<?php

# Copyright (C) 2010 Tomasz Sta�czyk, Lab74.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero 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 Affero General Public License for more details.
form_security_validate('plugin_jQueryDecorate_config_edit');
auth_reauthenticate();
access_ensure_global_level(config_get('manage_plugin_threshold'));
$f_selectors = gpc_get_string('selectors', '');
$f_decorators = gpc_get_string('decorators', '');
if (current_user_is_administrator()) {
    if (plugin_config_get('selectors') != $f_selectors) {
        plugin_config_set('selectors', $f_selectors);
    }
    if (plugin_config_get('decorators') != $f_decorators) {
        plugin_config_set('decorators', $f_decorators);
    }
}
form_security_purge('plugin_jQueryDecorate_config_edit');
print_successful_redirect(plugin_page('config', true));